component_model.variable¶
Functions
|
Turn the vector 'vec' given in cartesian coordinates into cylindrical coordinates. |
|
Turn the vector 'vec' given in cartesian coordinates into spherical coordinates. |
|
Turn cylinder coordinate vector 'vec' (defined according to ISO (r,phi,z)) into cartesian coordinates. |
|
|
|
Turn a 4-tuple, consisting of quantity (float) and a direction 3-vector to a direction 3-vector, where the norm denotes the direction and the length denotes the quantity. |
|
Turn spherical vector 'vec' (defined according to ISO 80000-2 (r,polar,azimuth)) into cartesian coordinates. |
Classes
|
Flags to denote how variables should be checked with respect to units and range. |
|
Interface variable of an FMU. |
Exceptions
Special error indicating that something is wrong with the variable definition. |
|
Special Exception class signalling that a value is not within the range. |
|
Special Exception class signalling that variable use was not in accordance with settings. |
- exception component_model.variable.VariableInitError¶
Special error indicating that something is wrong with the variable definition.
- exception component_model.variable.VariableRangeError¶
Special Exception class signalling that a value is not within the range.
- exception component_model.variable.VariableUseError¶
Special Exception class signalling that variable use was not in accordance with settings.
- component_model.variable.cartesian_to_cylindrical(vec: ndarray | tuple, deg: bool = False) ndarray ¶
Turn the vector ‘vec’ given in cartesian coordinates into cylindrical coordinates. (defined according to ISO, (r, phi, z), with phi right-handed wrt. x-axis).
- component_model.variable.cartesian_to_spherical(vec: ndarray | tuple, deg: bool = False) ndarray ¶
Turn the vector ‘vec’ given in cartesian coordinates into spherical coordinates. (defined according to ISO 80000-2, (r, polar, azimuth)).
- component_model.variable.cylindrical_to_cartesian(vec: ndarray | tuple, deg: bool = False) ndarray ¶
Turn cylinder coordinate vector ‘vec’ (defined according to ISO (r,phi,z)) into cartesian coordinates. The angle phi is measured with respect to x-axis, right hand.
- component_model.variable.linear(x: float, b: float, a: float = 0.0)¶
- component_model.variable.quantity_direction(quantity_direction: tuple, spherical: bool = False, deg: bool = False) ndarray ¶
Turn a 4-tuple, consisting of quantity (float) and a direction 3-vector to a direction 3-vector, where the norm denotes the direction and the length denotes the quantity. The return vector is always a cartesian vector.
- Parameters:
quantity_direction (tuple) – a 4-tuple consisting of the desired length of the resulting vector (in standard units (m or m/s)) and the direction 3-vector (in standard units)
spherical (bool) – Optional possibility to provide the input direction vector in spherical coordinates
deg (bool) – Optional possibility to provide the input angle (of spherical coordinates) in degrees. Only relevant if spherical=True
- component_model.variable.spherical_to_cartesian(vec: ndarray | tuple, deg: bool = False) ndarray ¶
Turn spherical vector ‘vec’ (defined according to ISO 80000-2 (r,polar,azimuth)) into cartesian coordinates.