STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.props.backends.tabulated.TabulatedProperties Class Reference

Public Member Functions

None __init__ (self, Sequence[float] p, Sequence[float] T, Mapping[str, Any] values, *, str source, str name="measured")
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)

Public Attributes

 source = source

Protected Attributes

 _p = np.asarray(p, dtype=float)
 _T = np.asarray(T, dtype=float)
str _name = name
dict _interp = {}
 _cursor = threading.local()

Detailed Description

Properties read from a measured grid over pressure and temperature.

Args:
    p: Strictly increasing pressures [Pa].
    T: Strictly increasing temperatures [K].
    values: Property name to a ``(len(p), len(T))`` array of values, in the
        SI units :data:`feedtwin.props.state.PROPERTIES` declares.
    source: Where the numbers came from -- a test campaign, a datasheet
        revision. Carried into every :class:`ThermoState` this produces, so
        a result can always be traced to the measurement behind it.
    name: Backend identifier; defaults to ``"measured"``.

Only ``StatePair.PT`` is addressable. Any other pair raises
:class:`OutOfRange`, which the chain answers by trying the next backend --
the same path as a state point outside the grid.

Definition at line 41 of file tabulated.py.

Constructor & Destructor Documentation

◆ __init__()

None feedtwin.props.backends.tabulated.TabulatedProperties.__init__ ( self,
Sequence[float] p,
Sequence[float] T,
Mapping[str, Any] values,
* ,
str source,
str name = "measured" )

Definition at line 59 of file tabulated.py.

Member Function Documentation

◆ name()

str feedtwin.props.backends.tabulated.TabulatedProperties.name ( self)

Definition at line 108 of file tabulated.py.

References feedtwin.props.backends.coolprop.CoolPropBackend._name, and _name.

◆ phase()

Phase feedtwin.props.backends.tabulated.TabulatedProperties.phase ( self)
Unknown: a measured grid does not carry phase information.

Reported honestly rather than guessed. A caller that needs the phase
gets it from an equation-of-state backend, which is what the chain is
for.

Definition at line 144 of file tabulated.py.

◆ quality()

float | None feedtwin.props.backends.tabulated.TabulatedProperties.quality ( self)

Definition at line 153 of file tabulated.py.

◆ supports()

bool feedtwin.props.backends.tabulated.TabulatedProperties.supports ( self,
str prop )

Definition at line 111 of file tabulated.py.

References _interp.

◆ update()

None feedtwin.props.backends.tabulated.TabulatedProperties.update ( self,
StatePair pair,
float v1,
float v2 )

◆ value()

float feedtwin.props.backends.tabulated.TabulatedProperties.value ( self,
str prop )

Member Data Documentation

◆ _cursor

feedtwin.props.backends.tabulated.TabulatedProperties._cursor = threading.local()
protected

Definition at line 105 of file tabulated.py.

Referenced by update(), and value().

◆ _interp

dict feedtwin.props.backends.tabulated.TabulatedProperties._interp = {}
protected

◆ _name

feedtwin.props.backends.tabulated.TabulatedProperties._name = name
protected

Definition at line 70 of file tabulated.py.

Referenced by name(), update(), and value().

◆ _p

feedtwin.props.backends.tabulated.TabulatedProperties._p = np.asarray(p, dtype=float)
protected

Definition at line 68 of file tabulated.py.

Referenced by update().

◆ _T

feedtwin.props.backends.tabulated.TabulatedProperties._T = np.asarray(T, dtype=float)
protected

Definition at line 69 of file tabulated.py.

Referenced by update().

◆ source

feedtwin.props.backends.tabulated.TabulatedProperties.source = source

Definition at line 71 of file tabulated.py.


The documentation for this class was generated from the following file: