The MphysGroup¶
The purpose of the MphysGroup is to implement the mechananics of promoting the MPhys variables by tags.
Subsystems with tagged variables that will be promoted are added with the mphys_add_subsystem()
method.
Subsystems that have variables that should not be promoted can still be added with add_subsystem
The automated promotion of tagged variables is done during the configure phase of OpenMDAO setup.
If you need to use configure
in your CouplingGroup or Scenario group, be sure to call the parent’s configure with
super().configure()
.
The MphysGroup
is the base class of the Coupling Groups and Scenarios.
While it is important to understand the MphysGroup’s configure()
and mphys_add_subsystem()
interactions,
any new scenario or coupling group should inherit from Scenario
and CouplingGroup
.
rather than subclassing MphysGroup directly.
- class mphys.mphys_group.MphysGroup(**kwargs)[source]¶
A OpenMDAO class for automated promotion of MPhys variables
Set the solvers to nonlinear and linear block Gauss–Seidel by default.
- mphys_add_subsystem(name, subsystem)[source]¶
Adding an mphys subsystem will add the subsystem and then set the group to automatically promote the mphys tagged variables
- configure()[source]¶
Promote the mphys-tagged variables of subsystems added by
mphys_add_subsystem()
Manual Connection of Variables¶
In some instances, the use of automated promotion is not appropriate.
Because the MphysGroup inherits from the standard OpenMDAO group,
subsystems can be added with the standard add_subsystem
method and connected manually.