|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| str | name (self) |
| bool | supports (self, str prop) |
| None | update (self, StatePair pair, float v1, float v2) |
| float | value (self, str prop) |
| Phase | phase (self) |
| float|None | quality (self) |
A source of thermophysical properties for one species. Implementations are **stateful and single-threaded**: :meth:`update` moves the backend to a state point and :meth:`value` reads from wherever it was last moved. That is CoolProp's model and it is fast for exactly the reason it is dangerous -- one object, reused. :class:`~feedtwin.props.fluid.Fluid` owns the thread-confinement that makes it safe; do not share an instance.
Definition at line 62 of file backend.py.
| str feedtwin.props.backend.PropertyBackend.name | ( | self | ) |
Short identifier, e.g. ``"bicubic"``. Appears in ThermoState.
Definition at line 73 of file backend.py.
| Phase feedtwin.props.backend.PropertyBackend.phase | ( | self | ) |
Phase at the current state point.
Definition at line 102 of file backend.py.
| float | None feedtwin.props.backend.PropertyBackend.quality | ( | self | ) |
Vapour mass fraction, or ``None`` outside the two-phase dome.
Definition at line 106 of file backend.py.
| bool feedtwin.props.backend.PropertyBackend.supports | ( | self, | |
| str | prop ) |
Whether this backend can compute ``prop`` at all. A property of the backend, not of the state, so callers can answer it once and route around a gap rather than probing per state point.
Definition at line 77 of file backend.py.
| None feedtwin.props.backend.PropertyBackend.update | ( | self, | |
| StatePair | pair, | ||
| float | v1, | ||
| float | v2 ) |
Move to a state point.
Raises:
OutOfRange: the point is outside this backend's envelope. Routine --
the caller's chain tries the next backend.
Definition at line 85 of file backend.py.
Referenced by combined_gui.PressureBarWidget.set_global_line_ys(), combined_gui.PressureBarWidget.set_limits(), and combined_gui.PressureBarWidget.set_value().
| float feedtwin.props.backend.PropertyBackend.value | ( | self, | |
| str | prop ) |
Read a property at the current state point.
Raises:
UnsupportedProperty: this backend cannot compute it.
Definition at line 94 of file backend.py.
Referenced by feedtwin.model.param.Uncertainty.__post_init__(), feedtwin.model.param.Uncertainty.bounds(), and feedtwin.props.backends.coolprop.CoolPropBackend.value().