twpasolver.models.modelarray module#
Generic container for arrays of TwoPortModels, including nested lists.
- pydantic model twpasolver.models.modelarray.ModelArray[source]#
Bases:
TwoPortModelGeneric container for arrays of TwoPortModels.
Cells are model instances (copied), dicts with the
nameof a model class (anyTwoPortModelsubclass that declares anamefield, including user models defined after import) or nested lists, wrapped into arrays.Show JSON schema
{ "title": "ModelArray", "description": "Generic container for arrays of TwoPortModels.\n\nCells are model instances (copied), dicts with the ``name`` of a model class\n(any ``TwoPortModel`` subclass that declares a ``name`` field, including user\nmodels defined after import) or nested lists, wrapped into arrays.", "type": "object", "properties": { "Z0_ref": { "default": 50.0, "description": "Reference line impedance of the two-port component.", "title": "Z0 Ref", "type": "number" }, "N": { "default": 1, "description": "Number of repetitions of the model in the computed abcd matrix.", "minimum": 0, "title": "N", "type": "integer" }, "cells": { "description": "List of TwoPortModels representing the basic cells. Nested lists are allowed.", "items": {}, "title": "Cells", "type": "array" } } }
- Fields:
- Validators:
- cell_base#
alias of
TwoPortModel
- field cells: list[Any] [Optional]#
List of TwoPortModels representing the basic cells. Nested lists are allowed.
- Validated by:
- validator validate_nested_cells » cells[source]#
Validate every cell by its model class; nested lists become arrays.
- append(other: TwoPortModel) None[source]#
Append a model to the cells.