|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| None | __init__ (self, SpeciesSpec species, str backend, str name) |
| str | name (self) |
| bool | supports (self, str prop) |
| None | update (self, StatePair pair, float v1, float v2) |
| float | value (self, str prop) |
| dict[str, float] | constants (self) |
| Phase | phase (self) |
| float|None | quality (self) |
Protected Member Functions | |
| float | _compressibility (self) |
| NoReturn | _reraise (self, Exception exc, str detail, str|None prop=None) |
Protected Attributes | |
| _species = species | |
| _backend = backend | |
| str | _name = name |
| _state = CP.AbstractState(backend, species.backend_fluid) | |
| set[str] | _unsupported = set() |
| float|None | _r_specific = None |
| _Dome|None | _dome = None |
| _tabulated = backend.upper().startswith(("BICUBIC", "TTSE")) | |
Properties for one species from one CoolProp backend. Stateful and **not thread-safe** -- it wraps a single ``AbstractState`` that :meth:`update` moves around. :class:`~feedtwin.props.fluid.Fluid` gives each thread its own; never share an instance across threads.
Definition at line 251 of file coolprop.py.
| None feedtwin.props.backends.coolprop.CoolPropBackend.__init__ | ( | self, | |
| SpeciesSpec | species, | ||
| str | backend, | ||
| str | name ) |
Definition at line 259 of file coolprop.py.
|
protected |
Z = p / (rho . R_specific . T), derived rather than read. BICUBIC does not implement ``compressibility_factor``. Deriving it from density gives one definition of Z on every backend, and it agrees with CoolProp's own to ~3e-6.
Definition at line 357 of file coolprop.py.
References _name, _r_specific, and _state.
Referenced by value().
|
protected |
Translate a CoolProp failure into the layer's own vocabulary. ``prop`` is given only when the failure came from reading a named property, and is what gets remembered as unsupported -- a failed ``update`` says nothing about any property's availability, so passing the state-pair description here would poison the capability cache.
Definition at line 380 of file coolprop.py.
References _name, _species, and _unsupported.
| dict[str, float] feedtwin.props.backends.coolprop.CoolPropBackend.constants | ( | self | ) |
Constants of the substance, not of any state point. Critical pressure and temperature are needed by the IEC 60534 choked liquid correlation, and they are properties of the fluid rather than of where it happens to be -- so they are read once, from the same backend that answers everything else, rather than through a convenience call.
Definition at line 323 of file coolprop.py.
References _state.
Referenced by feedtwin.props.fluid.Fluid.critical_pressure(), and feedtwin.props.fluid.Fluid.critical_temperature().
| str feedtwin.props.backends.coolprop.CoolPropBackend.name | ( | self | ) |
Definition at line 278 of file coolprop.py.
References _name.
| Phase feedtwin.props.backends.coolprop.CoolPropBackend.phase | ( | self | ) |
| float | None feedtwin.props.backends.coolprop.CoolPropBackend.quality | ( | self | ) |
Vapour fraction, or ``None`` when the state is not two-phase. CoolProp signals "not applicable" with an out-of-band number, and uses more than one: -1 for a subcooled liquid, -1000 for a supercritical state. Anything outside [0, 1] is therefore treated as "no quality" rather than matched against those two values specifically.
Definition at line 343 of file coolprop.py.
References _state.
| bool feedtwin.props.backends.coolprop.CoolPropBackend.supports | ( | self, | |
| str | prop ) |
Definition at line 281 of file coolprop.py.
References _unsupported.
| None feedtwin.props.backends.coolprop.CoolPropBackend.update | ( | self, | |
| StatePair | pair, | ||
| float | v1, | ||
| float | v2 ) |
Definition at line 286 of file coolprop.py.
References _dome, _name, _reraise(), _species, _state, _tabulated, near(), and update().
Referenced by combined_gui.PressureBarWidget.set_global_line_ys(), combined_gui.PressureBarWidget.set_limits(), combined_gui.PressureBarWidget.set_value(), and update().
| float feedtwin.props.backends.coolprop.CoolPropBackend.value | ( | self, | |
| str | prop ) |
Definition at line 308 of file coolprop.py.
References _compressibility(), _name, _reraise(), _state, _unsupported, value, ADS126X::ADCReading.value, ads126x_reading.value, array_init_elem.value, comms::CommsMessage< Fields >::MessageSizeHelper< T >.value, comms::CommsMessage< Fields >::MessageSizeHelper< CommsMessage< Ts... > >.value, detail::has_from_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >.value, detail::has_non_default_from_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >.value, detail::has_to_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >.value, detail::is_compatible_array_type_impl< BasicJsonType, CompatibleArrayType, enable_if_t< is_detected< iterator_t, CompatibleArrayType >::value &&is_iterator_traits< iterator_traits< detected_t< iterator_t, CompatibleArrayType > > >::value &&!std::is_same< CompatibleArrayType, detected_t< range_value_t, CompatibleArrayType > >::value > >.value, detail::is_compatible_integer_type_impl< RealIntegerType, CompatibleNumberIntegerType, enable_if_t< std::is_integral< RealIntegerType >::value &&std::is_integral< CompatibleNumberIntegerType >::value &&!std::is_same< bool, CompatibleNumberIntegerType >::value > >.value, detail::is_compatible_object_type_impl< BasicJsonType, CompatibleObjectType, enable_if_t< is_detected< mapped_type_t, CompatibleObjectType >::value &&is_detected< key_type_t, CompatibleObjectType >::value > >.value, detail::is_compatible_string_type< BasicJsonType, CompatibleStringType >.value, detail::is_compatible_type_impl< BasicJsonType, CompatibleType, enable_if_t< is_complete_type< CompatibleType >::value > >.value, detail::is_constructible_array_type_impl< BasicJsonType, ConstructibleArrayType, enable_if_t< !std::is_same< ConstructibleArrayType, typename BasicJsonType::value_type >::value &&!is_compatible_string_type< BasicJsonType, ConstructibleArrayType >::value &&is_default_constructible< ConstructibleArrayType >::value &&(std::is_move_assignable< ConstructibleArrayType >::value||std::is_copy_assignable< ConstructibleArrayType >::value)&&is_detected< iterator_t, ConstructibleArrayType >::value &&is_iterator_traits< iterator_traits< detected_t< iterator_t, ConstructibleArrayType > > >::value &&is_detected< range_value_t, ConstructibleArrayType >::value &&!std::is_same< ConstructibleArrayType, detected_t< range_value_t, ConstructibleArrayType > >::value &&is_complete_type< detected_t< range_value_t, ConstructibleArrayType > >::value > >.value, detail::is_constructible_object_type_impl< BasicJsonType, ConstructibleObjectType, enable_if_t< is_detected< mapped_type_t, ConstructibleObjectType >::value &&is_detected< key_type_t, ConstructibleObjectType >::value > >.value, detail::is_constructible_string_type< BasicJsonType, ConstructibleStringType >.value, detail::is_getable< BasicJsonType, T >.value, detail::is_iterator_traits< iterator_traits< T > >.value, detail::is_ordered_map< T >.value, detail::is_range< T >.value, detail::is_sax< SAX, BasicJsonType >.value, detail::static_const< T >.value, engine.pipeline.config_schemas.MeasuredValue.value, engine.pipeline.numerical_robustness.ValidationResult.value, feedtwin.model.param.Param.value, feedtwin.props.backend.PropertyBackend.value(), value(), fsw::calibration::IMUCalibration::CalibratedReading.value, fsw::calibration::IMUCalibration::RawReading.value, inserter< T >.value, MessageSize< T >.value, MessageSize< comms::CommsMessage< Ts... > >.value, node_type_getter< T >.value, node_type_getter< array >.value, node_type_getter< table >.value, node_type_getter< void >.value, parsed_string.value, table_init_pair.value, ubx_item_t.value, and utf8_codepoint.value.
Referenced by feedtwin.model.param.Uncertainty.__post_init__(), feedtwin.model.param.Uncertainty.bounds(), and value().
|
protected |
Definition at line 261 of file coolprop.py.
Referenced by feedtwin.props.fluid.Fluid._eligible(), and feedtwin.props.fluid.Fluid.constants().
|
protected |
Definition at line 274 of file coolprop.py.
Referenced by update().
|
protected |
Definition at line 262 of file coolprop.py.
Referenced by _compressibility(), _reraise(), name(), feedtwin.props.backends.tabulated.TabulatedProperties.name(), update(), feedtwin.props.backends.tabulated.TabulatedProperties.update(), value(), and feedtwin.props.backends.tabulated.TabulatedProperties.value().
|
protected |
Definition at line 271 of file coolprop.py.
Referenced by _compressibility().
|
protected |
Definition at line 260 of file coolprop.py.
Referenced by feedtwin.props.fluid.Fluid._backend(), _reraise(), feedtwin.props.fluid.Fluid.name(), feedtwin.props.fluid.Fluid.species(), feedtwin.props.fluid.Fluid.state(), and update().
|
protected |
Definition at line 263 of file coolprop.py.
Referenced by _compressibility(), constants(), phase(), quality(), update(), and value().
|
protected |
Definition at line 275 of file coolprop.py.
Referenced by update().
|
protected |
Definition at line 268 of file coolprop.py.
Referenced by _reraise(), supports(), and value().