Understanding How Variables Work
Understanding How Variables Work¶
In general, a numerical model can be complex, multidisciplinary, and heterogeneous. It can be decomposed into a series of smaller computations that are chained together.
A Simple Numerical Model¶
Let us consider the following numerical model that takes \(x\) as an input:
OpenMDAO reformulates all numerical models into the form of a nonlinear system which drives a set of residual equations to 0. This is done so that all models ‘look the same’ to the framework, which helps simplify methods for converging coupled numerical models and for computing their derivatives (i.e., \(dz/dx\) and \(dy/dx\) in this case). If we say we want to evaluate the numerical model at \(x=\pi\), the reformulation would be:
The variables in this model would be x, y, and z.
The Relationship Between Variables and Components¶
In OpenMDAO, all three of these variables would be defined as the output of one or more
There are two main component types:
ExplicitComponent allows you to define your equations in the explicit form (e.g. \(z = \sin(y)\)) and it computes the implicit transformation for you in order to compute the residuals.
ImplicitComponent expects you to compute all the residuals yourself in the
Regardless of which type of component you chose, OpenMDAO sees everything in the implicit form, and treats your model as system of nonlinear equations.
Multiple components can be aggregated into a hierarchy with the
A Group is seen by OpenMDAO as a collection of all the implicit equations from all of its children components.
Group represent systems of nonlinear equations,
you call the add_system method to construct a model hierarchy.
The underlying mathematics that power OpenMDAO are based on the MAUD architecture, which established the foundation for treating a multidisciplinary model as a single system of nonlinear equations as a means to efficiently computing analytic derivatives across it.