Use Julia with OpenMDAO! OpenMDAO.jl is a Julia package that allows a user to:
- Write OpenMDAO
Components in Julia, and incorporate these components into a OpenMDAO model. - Create and run optimizations in Julia, using OpenMDAO as a library.
OpenMDAO.jl consists of three pieces of software:
- OpenMDAOCore.jl: A small, pure-Julia package that allows users to define Julia code that will eventually be used in an OpenMDAO
Problem. OpenMDAOCore.jl defines two Julia abstract types (AbstractExplicitComponentandAbstractImplicitComponent) and methods that mimic OpenMDAO's ExplicitComponent and ImplicitComponent classes. omjlcomps: A Python package (actually, a OpenMDAO Plugin) that defines two classes,JuliaExplicitCompandJuliaImplicitComp, which inherit from OpenMDAO'sExplicitComponentandImplicitComponent, respectively. These components take instances of concrete subtypes ofOpenMDAOCore.ExplicitComponentandOpenMDAOCore.ImplicitComponentand turn them into instances ofJuliaExplicitCompandJuliaImplicitComp. Like any other OpenMDAOExplicitComponentorImplicitComponentobjects,JuliaExplicitCompandJuliaImplicitCompinstances can be used in an OpenMDAO model, but call Julia code in their methods (compute,apply_nonlinear, etc.).- OpenMDAO.jl: A Julia package that has the openmdao and
omjlcompsPython packages as dependencies. Users can installOpenMDAO.jland have the full power of the OpenMDAO framework at their disposal in Julia.
There are two approaches to getting OpenMDAO working with Julia: the Python-Centric Approach and the Julia-Centric Approach.
If you like Python and just want to have a little (or a lot) of Julia buried in your OpenMDAO System, then you'll probably prefer the Python-centric approach.
If you're a huge fan of Julia and would like to pretend that OpenMDAO is a Julia library, you'll want the Julia-centric approach.
Either way, pick one or the other: you don't need to follow both installation instructions.
The first (and only!) step is to install omjlcomps, which is in the Python Package Index, so a simple
pip install omjlcompsshould be all you need.
omjlcomps uses JuliaPkg to manage Julia dependencies, so all the Julia packages needed by omjlcomps (and even Julia itself, if necessary) will be installed automatically.
The OpenMDAOCore.jl and OpenMDAO.jl Julia packages are registered in the General registry, so installation should be as simple as
] add OpenMDAOCore OpenMDAO
in the Julia REPL.
OpenMDAOCore.jl is a fairly small package without any Python dependencies, but OpenMDAO.jl depends on omjlcomps and openmdao itself.
OpenMDAO.jl's Python dependencies are managed by CondaPkg, and should be automatically installed into a separate Conda environment specific to your current Julia environment.
Check out the documentation for usage, examples, etc..
- An early version of OpenMDAO.jl was written by Daniel Ingraham, Justin Gray, and Andrew Ning while visiting Prof. Ning at Brigham Young University.
- OpenMDAO.jl depends heavily on PythonCall and related packages, developed by Christopher Rowley.