STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
engine.pipeline.forward_report Namespace Reference

Functions

Optional[float] _f (Any v)
Dict[str, Any] Q (str key, str label, Any value, str unit="", *, int digits=3, str basis="", Sequence[str] assumed=(), Optional[str] status=None, Optional[str] band=None, bool detail=False)
Dict[str, Any] V (str key, str label, Any value, str unit, str status, str threshold, str basis, Sequence[str] assumed=(), int digits=2)
Optional[str] cea_off_table (Mapping[str, Any] d, Optional[Mapping[str, Any]] at=None)
str _grade (Optional[float] value, float ok, Optional[float] warn=None, *, bool higher_is_better=True)
List[Dict[str, Any]] _headline (Mapping[str, Any] r)
List[Dict[str, Any]] _verdicts (Any cfg, Mapping[str, Any] r, Mapping[str, Any] sr)
Dict[str, Any] _chamber (Any cfg, Mapping[str, Any] r)
Dict[str, Any] _nozzle (Any cfg, Mapping[str, Any] r)
Dict[str, Any] _injector (Any cfg, Mapping[str, Any] r)
Dict[str, Any] _spray (Any cfg, Mapping[str, Any] r, Mapping[str, Any] sr)
Optional[Dict[str, Any]] _cooling (Any cfg, Mapping[str, Any] r)
Dict[str, Any] _stability (Mapping[str, Any] sr)
Dict[str, Dict[str, Any]] _calibration (Any cfg, Sequence[str] used)
List[Dict[str, Any]] _references (Any cfg, Mapping[str, Any] sr)
Dict[str, Any] forward_report (Any cfg, Mapping[str, Any] r, *, Optional[Mapping[str, Any]] handcheck_rows=None)

Variables

float PSI = 6894.757
float G0 = 9.80665
dict CALIBRATION
tuple _FLOW = ("cd", "manifold")
tuple _CSTAR = ("em", "smd")
tuple _THRUST = _FLOW + _CSTAR + ("nozzle",)
dict _CEA_AXES = {"Pc": ("Pc", 1.0 / PSI, "psia", 0), "MR": ("O/F", 1.0, "", 2), "eps": ("ε", 1.0, "", 2)}

Detailed Description

Forward mode's result, one number per quantity.

``forward_report(cfg, result)`` turns a solve (``PintleEngineRunner.evaluate``) into what forward mode
shows: a headline, verdicts, and sections of quantities. Every quantity is read from the solve
ONCE, here, with its unit, what it is (``basis``) and which unmeasured inputs it rests on
(``assumed``). The frontend draws these and computes nothing: two cards cannot disagree about a
number neither of them computes.

A verdict carries its own status and threshold, decided here, so no card grades anything.

Quantity:  {key, label, value, unit, digits, basis, assumed: [calibration keys], status?, band?, detail?}
Verdict:   {key, label, value, unit, digits, status: ok|warn|bad|unknown, threshold, basis, assumed}
Section:   {key, title, summary: [quantity keys], quantities: [Quantity]}

Function Documentation

◆ _calibration()

Dict[str, Dict[str, Any]] engine.pipeline.forward_report._calibration ( Any cfg,
Sequence[str] used )
protected
The inputs this result rests on, each assumed or measured (engine/pipeline/measurements.py).

Definition at line 345 of file forward_report.py.

Referenced by forward_report().

◆ _chamber()

Dict[str, Any] engine.pipeline.forward_report._chamber ( Any cfg,
Mapping[str, Any] r )
protected

Definition at line 182 of file forward_report.py.

References _f(), and Q().

Referenced by forward_report().

◆ _cooling()

Optional[Dict[str, Any]] engine.pipeline.forward_report._cooling ( Any cfg,
Mapping[str, Any] r )
protected

Definition at line 307 of file forward_report.py.

References _f(), and Q().

Referenced by forward_report().

◆ _f()

Optional[float] engine.pipeline.forward_report._f ( Any v)
protected

◆ _grade()

str engine.pipeline.forward_report._grade ( Optional[float] value,
float ok,
Optional[float] warn = None,
* ,
bool higher_is_better = True )
protected
ok at/past ``ok``; warn between ``warn`` and ``ok``; bad beyond. unknown without a value.

Definition at line 113 of file forward_report.py.

Referenced by _injector(), _nozzle(), and _verdicts().

◆ _headline()

List[Dict[str, Any]] engine.pipeline.forward_report._headline ( Mapping[str, Any] r)
protected

Definition at line 128 of file forward_report.py.

References _f(), and Q().

Referenced by forward_report().

◆ _injector()

Dict[str, Any] engine.pipeline.forward_report._injector ( Any cfg,
Mapping[str, Any] r )
protected

Definition at line 231 of file forward_report.py.

References _f(), _grade(), and Q().

Referenced by forward_report().

◆ _nozzle()

Dict[str, Any] engine.pipeline.forward_report._nozzle ( Any cfg,
Mapping[str, Any] r )
protected

Definition at line 213 of file forward_report.py.

References _f(), _grade(), and Q().

Referenced by forward_report().

◆ _references()

List[Dict[str, Any]] engine.pipeline.forward_report._references ( Any cfg,
Mapping[str, Any] sr )
protected
Measurements that are compared with the model rather than fed into it.

Definition at line 356 of file forward_report.py.

References _f().

Referenced by forward_report().

◆ _spray()

Dict[str, Any] engine.pipeline.forward_report._spray ( Any cfg,
Mapping[str, Any] r,
Mapping[str, Any] sr )
protected

Definition at line 279 of file forward_report.py.

References _f(), and Q().

Referenced by forward_report().

◆ _stability()

Dict[str, Any] engine.pipeline.forward_report._stability ( Mapping[str, Any] sr)
protected

Definition at line 326 of file forward_report.py.

References min, and Q().

Referenced by forward_report().

◆ _verdicts()

List[Dict[str, Any]] engine.pipeline.forward_report._verdicts ( Any cfg,
Mapping[str, Any] r,
Mapping[str, Any] sr )
protected

Definition at line 142 of file forward_report.py.

References _f(), _grade(), cea_off_table(), min, and V().

Referenced by forward_report().

◆ cea_off_table()

Optional[str] engine.pipeline.forward_report.cea_off_table ( Mapping[str, Any] d,
Optional[Mapping[str, Any]] at = None )
None when the solve read its thermochemistry inside the CEA table; else a sentence.

``d`` is a solve's diagnostics (chamber_solver: ``cea_clamped``, ``cea_table_range``); ``at``
the solved values by axis ({"Pc": Pa, "MR": .., "eps": ..}) when known. The cache clamps an
off-table input to the edge without a word, so a point past it is solved on the edge's c*, Tc
and γ: on the LE4 (3) stand at 578/300 psia the solve lands at O/F 3.52 on a 1.0–2.5 table.

Definition at line 90 of file forward_report.py.

References _f().

Referenced by _verdicts().

◆ forward_report()

Dict[str, Any] engine.pipeline.forward_report.forward_report ( Any cfg,
Mapping[str, Any] r,
* ,
Optional[Mapping[str, Any]] handcheck_rows = None )
Forward mode's view of solve ``r`` of ``cfg``. ``r`` must carry ``stability_rich``.

Definition at line 370 of file forward_report.py.

References _calibration(), _chamber(), _cooling(), _headline(), _injector(), _nozzle(), _references(), _spray(), _stability(), _verdicts(), and Q().

◆ Q()

Dict[str, Any] engine.pipeline.forward_report.Q ( str key,
str label,
Any value,
str unit = "",
* ,
int digits = 3,
str basis = "",
Sequence[str] assumed = (),
Optional[str] status = None,
Optional[str] band = None,
bool detail = False )

Definition at line 64 of file forward_report.py.

References _f().

Referenced by _chamber(), _cooling(), _headline(), _injector(), _nozzle(), _spray(), _stability(), and forward_report().

◆ V()

Dict[str, Any] engine.pipeline.forward_report.V ( str key,
str label,
Any value,
str unit,
str status,
str threshold,
str basis,
Sequence[str] assumed = (),
int digits = 2 )

Definition at line 79 of file forward_report.py.

References _f().

Referenced by _verdicts().

Variable Documentation

◆ _CEA_AXES

dict engine.pipeline.forward_report._CEA_AXES = {"Pc": ("Pc", 1.0 / PSI, "psia", 0), "MR": ("O/F", 1.0, "", 2), "eps": ("ε", 1.0, "", 2)}
protected

Definition at line 87 of file forward_report.py.

◆ _CSTAR

tuple engine.pipeline.forward_report._CSTAR = ("em", "smd")
protected

Definition at line 52 of file forward_report.py.

◆ _FLOW

tuple engine.pipeline.forward_report._FLOW = ("cd", "manifold")
protected

Definition at line 51 of file forward_report.py.

◆ _THRUST

tuple engine.pipeline.forward_report._THRUST = _FLOW + _CSTAR + ("nozzle",)
protected

Definition at line 53 of file forward_report.py.

◆ CALIBRATION

dict engine.pipeline.forward_report.CALIBRATION
Initial value:
1= {
2 "cd": {"label": "Orifice Cd", "where": "discharge.<side>",
3 "basis": "Lichtarowicz (1965) Cd(Re, L/d) for a sharp inlet; not flow-tested"},
4 "em": {"label": "Mixing factor E_m", "where": "combustion.efficiency.rupe_Em_opt",
5 "basis": "Rupe, JPL TR 32-1546: 0.70–0.85 for 1-on-1 unlike doublets"},
6 "smd": {"label": "Spray D32", "where": "spray.smd",
7 "basis": "NACA TN 4222 carried to the propellants; three published transfers disagree"},
8 "mix_lag": {"label": "Chug mixing lag", "where": "stability.mixing_lag_fraction",
9 "basis": "Leonardi 2017 double time lag; fraction unmeasured, gate takes the worst"},
10 "n_chi": {"label": "Combustion response n, χ", "where": "stability",
11 "basis": "Crocco n–τ constants; no measurement for this propellant pair"},
12 "ac_damping": {"label": "Acoustic damping", "where": "stability.damping_*_frac",
13 "basis": "injector-face and two-phase damping as fixed fractions of πf"},
14 "nozzle": {"label": "Nozzle efficiency ζ_n", "where": "chamber_geometry.nozzle_efficiency",
15 "basis": "divergence and boundary-layer loss taken as one factor"},
16 "manifold": {"label": "Manifold losses", "where": "injector.plate.channel_entry_K / _pressure_regain",
17 "basis": "Idelchik entry K and Acrivos regain; not flow-tested"},
18 "wall_heat": {"label": "Wall heat transfer", "where": "ablative_cooling",
19 "basis": "Bartz-type convection and gas radiation; liner not tested"},
20}

Definition at line 29 of file forward_report.py.

◆ G0

float engine.pipeline.forward_report.G0 = 9.80665

Definition at line 21 of file forward_report.py.

◆ PSI

float engine.pipeline.forward_report.PSI = 6894.757

Definition at line 20 of file forward_report.py.