twpasolver.models.compose module#
Direct composition between models.
- twpasolver.models.compose.compose(*args: TwoPortModel, parallel=False, **kwargs) TwoPortArray | OnePortArray[source]#
Compose any number of OnePortModels or TwoPortModels into a ModelArray.
Returns a OnePortArray if all inputs are OnePortModels with the same
twoport_parallelsetting, otherwise a TwoPortArray.- Parameters:
*args (TwoPortModel) – Models to compose.
parallel (bool, optional) – Compose the OnePortModels in parallel (OnePortArray result only). Defaults to False.
**kwargs – Passed to the OnePortArray or TwoPortArray constructor.