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

Classes

class  TabulatedProperties

Functions

None _require_increasing (Any values, str label)
TabulatedProperties tabulated_from_spec (SpeciesSpec species)

Detailed Description

Measured data as a property source.

The point of this backend is that it sits *in front of* an equation of state and
covers only the region you actually measured. Inside that region your numbers
win; outside it, it raises :class:`OutOfRange` and the fluid's chain falls
through to the equation of state. Nobody writes the "do we have data here?"
branch, because the chain already is that branch::

    tab = TabulatedProperties(
        p=[...], T=[...], values={"rho": rho_grid}, source="CF-2026-03"
    )
    n2 = Fluid("nitrogen", chain=[tab, "bicubic", "heos"])

This is the property-layer half of a principle that runs through the whole
project (Decision 02 in the plan): anything modelled can be replaced by
something measured, with the provenance recorded. It is here in Phase 01 rather
than bolted on at Phase 12 because a seam added after the fact is a seam every
existing call site has to be audited against.

A blended fluid -- a real ullage of pressurant over propellant vapour -- is a
mixture, not a table, and belongs to a mixture backend rather than to this one.

Function Documentation

◆ _require_increasing()

None feedtwin.props.backends.tabulated._require_increasing ( Any values,
str label )
protected

Definition at line 157 of file tabulated.py.

◆ tabulated_from_spec()

TabulatedProperties feedtwin.props.backends.tabulated.tabulated_from_spec ( SpeciesSpec species)
Build a tabulated backend from ``[species.options.measured]`` in TOML.

Lets a species declare its measured data in the species table rather than
only in code::

    [nitrogen.options.measured]
    path = "data/n2_coldflow.npz"
    source = "CF-2026-03"

The ``.npz`` must hold ``p`` and ``T`` arrays plus one array per property.

Definition at line 164 of file tabulated.py.