|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| np.ndarray | arr (Optional[Iterable[Any]] values, Optional[int] n=None) |
| List[Optional[float]] | out (Iterable[float] values, Optional[int] digits=None) |
| Optional[float] | scalar (Any v) |
| Dict[str, Any] | unavailable (str error) |
| Dict[str, Any] | inp (Any value, str unit, str provenance) |
| Dict[str, Any] | model_block (str name, str source, Sequence[str] assumptions, Mapping[str, Dict[str, Any]] inputs) |
| np.ndarray | series_t (Mapping[str, Any] result) |
| np.ndarray | firing_mask (Mapping[str, Any] result, int n) |
| Mapping[str, Any] | network_of (Mapping[str, Any] result) |
| np.ndarray | node_p (Mapping[str, Any] net, str node, int n) |
| np.ndarray | node_T (Mapping[str, Any] net, str node, int n) |
| np.ndarray | branch_dp (Mapping[str, Any] net, str bid, int n) |
| Dict[str, Any] | _element (str eid, str label, str kind, np.ndarray dp, str frm, str to) |
| List[Dict[str, Any]] | side_elements (Mapping[str, Any] net, str side, int n, Optional[Mapping[str, Any]] series_side=None) |
| Dict[str, Any] | build_ladder (Mapping[str, Any] result, Any prep=None, Any config=None) |
| List[Dict[str, Any]] | element_series (Mapping[str, Any] ladder, str side, str kind) |
Variables | |
| float | PSI = 6894.757293168361 |
| tuple | SIDES = ("ox", "fuel") |
| dict | SIDE_ROLE = {"ox": "oxidiser", "fuel": "fuel"} |
| dict | SIDE_CONFIG = {"ox": "oxidizer", "fuel": "fuel"} |
| int | SUM_TOLERANCE_PSI = 1e-6 |
The pressure ladder: bottle to chamber, element by element, per side, at every twin step. ``build_ladder(result, prep=None, config=None)`` reads ``result["network"]`` (DATA-CONTRACT 2) and returns ``diagnostics.ladder`` (DATA-CONTRACT 3). It is bookkeeping, not a model: every drop is a difference of the twin's own node pressures, so the elements of one side telescope to the end-to-end drop by construction. The sum check is still made, on the branches' recorded ``dp_psi`` against the end nodes, because a recorder that writes a component's own loss (static head left out, say) would break that identity and the ladder should say so rather than hide it. Conventions (AUDIT 9.6 B1-B4): * Node pressures only. ``series.copv_psia`` and ``series.*.tank_psia`` are post-step vessel states; the network's nodes are the solve's boundaries (1645.6 against 1651.4 psia at burnout on the bottle). Mixing the two in one ladder leaves a residual that is not a loss (AUDIT 5.5). * Liquid-line nodes carry **total** pressure (lumped K, Borda dump at the manifold), so a wall-mounted PT reads about one dynamic head lower than the node. * The tank is its own element: ullage node -> outlet node is the liquid head (a gain, negative). * The engine card's injector branch (line exit -> chamber) is split, where the series carry the split, into the Borda dump at the manifold entrance and the orifice drop (manifold -> chamber). The helpers at the top (``PSI``, ``arr``, ``out``, ``unavailable``, ``model_block``, ``inp``) are shared by the other ``engine.layerx.diag`` modules of this set.
|
protected |
Definition at line 157 of file ladder.py.
Referenced by side_elements().
| np.ndarray engine.layerx.diag.ladder.arr | ( | Optional[Iterable[Any]] | values, |
| Optional[int] | n = None ) |
A float array with NaN where the input has None (JSON null) or a non-number.
Definition at line 51 of file ladder.py.
Referenced by branch_dp(), node_p(), node_T(), series_t(), and side_elements().
| np.ndarray engine.layerx.diag.ladder.branch_dp | ( | Mapping[str, Any] | net, |
| str | bid, | ||
| int | n ) |
A branch's own drop [psi]: the recorded ``dp_psi``, else from/to node pressures.
Definition at line 147 of file ladder.py.
References arr(), and node_p().
Referenced by side_elements().
| Dict[str, Any] engine.layerx.diag.ladder.build_ladder | ( | Mapping[str, Any] | result, |
| Any | prep = None, | ||
| Any | config = None ) |
``diagnostics.ladder`` from ``result["network"]``. Never raises.
Per side: ``elements`` [{id, label, kind, from, to, dp_psi, share}], ``total_psi`` (first node of
the path minus its last), ``sum_psi`` (the elements added up), ``residual_psi`` and
``max_abs_residual_psi`` (sum minus total) and ``closes`` (the residual within
``SUM_TOLERANCE_PSI``). ``share`` is each drop over ``total_psi`` (null where the total is 0).
``prep`` and ``config`` are not needed; they are accepted for a uniform signature.
Definition at line 216 of file ladder.py.
References network_of(), node_p(), out(), scalar(), series_t(), side_elements(), and unavailable().
| List[Dict[str, Any]] engine.layerx.diag.ladder.element_series | ( | Mapping[str, Any] | ladder, |
| str | side, | ||
| str | kind ) |
| np.ndarray engine.layerx.diag.ladder.firing_mask | ( | Mapping[str, Any] | result, |
| int | n ) |
| Dict[str, Any] engine.layerx.diag.ladder.inp | ( | Any | value, |
| str | unit, | ||
| str | provenance ) |
| Dict[str, Any] engine.layerx.diag.ladder.model_block | ( | str | name, |
| str | source, | ||
| Sequence[str] | assumptions, | ||
| Mapping[str, Dict[str, Any]] | inputs ) |
| Mapping[str, Any] engine.layerx.diag.ladder.network_of | ( | Mapping[str, Any] | result | ) |
``result["network"]`` checked against ``series.t``; raises ValueError with the reason.
Definition at line 118 of file ladder.py.
Referenced by build_ladder().
| np.ndarray engine.layerx.diag.ladder.node_p | ( | Mapping[str, Any] | net, |
| str | node, | ||
| int | n ) |
Definition at line 130 of file ladder.py.
References arr().
Referenced by branch_dp(), build_ladder(), and side_elements().
| np.ndarray engine.layerx.diag.ladder.node_T | ( | Mapping[str, Any] | net, |
| str | node, | ||
| int | n ) |
| List[Optional[float]] engine.layerx.diag.ladder.out | ( | Iterable[float] | values, |
| Optional[int] | digits = None ) |
A JSON-safe list: non-finite -> None.
Definition at line 67 of file ladder.py.
Referenced by build_ladder().
| Optional[float] engine.layerx.diag.ladder.scalar | ( | Any | v | ) |
A JSON-safe float or None.
Definition at line 79 of file ladder.py.
Referenced by build_ladder(), inp(), and side_elements().
| np.ndarray engine.layerx.diag.ladder.series_t | ( | Mapping[str, Any] | result | ) |
| List[Dict[str, Any]] engine.layerx.diag.ladder.side_elements | ( | Mapping[str, Any] | net, |
| str | side, | ||
| int | n, | ||
| Optional[Mapping[str, Any]] | series_side = None ) |
The elements along ``net["paths"][side]``, with every gap between consecutive branches filled by a vessel element (a tank's liquid head) and the injector branch split into dump and orifices when ``series_side`` carries ``dump_psi`` and ``dp_injector_psi``. The orifice element's ``check_psi`` is the largest gap between its drop and ``series.*.dp_injector_psi`` on the steps the series carry one (0 on the card).
Definition at line 161 of file ladder.py.
References _element(), arr(), branch_dp(), node_p(), and scalar().
Referenced by build_ladder().
| Dict[str, Any] engine.layerx.diag.ladder.unavailable | ( | str | error | ) |
DATA-CONTRACT: a block that could not be computed. It never raises.
Definition at line 88 of file ladder.py.
Referenced by build_ladder().
| dict engine.layerx.diag.ladder.SIDE_CONFIG = {"ox": "oxidizer", "fuel": "fuel"} |
| dict engine.layerx.diag.ladder.SIDE_ROLE = {"ox": "oxidiser", "fuel": "fuel"} |