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

Functions

Tuple[float, float] _eta_window (streams, *, float lo_frac=0.35, float hi_frac=2.2, float floor=0.02, float ceil=0.90)
List[List[float]] _chug_boundary_curve (streams, chamber, int n_pts=24, Optional[Tuple[float, float]] eta_window=None)
float _mean_tau (streams)
Dict[str, Any] _chug_design_point (streams, chamber, Optional[Dict[str, Any]] band, Dict[str, Any] inp)
Dict[str, Any] _stream_from_march (Dict[str, Any] inp, str key, Dict[str, Any] march)
Dict[str, Any] _stream_vaporization (Dict[str, Any] inp, float Pc, str key, int n_pts)
Dict[str, Any] _vaporization_profile (Dict[str, Any] inp, float Pc, int n_pts=40, Optional[Dict[str, Any]] march=None)
Dict[str, Any] _sensitivity (Dict[str, Any] inp, float nominal_gm)
Dict[str, float] _chug_pole (Dict[str, Any] chug_rich)
Dict[str, float] _locus_crossing (List[Dict[str, float]] locus)
Dict[str, Any] _radar (float chug_margin, Dict[str, Any] ac, Dict[str, Any] vap, float gate_threshold)
Dict[str, Any] _diagnostics (str state, float chug_margin, float acoustic_margin, float gate_threshold, Optional[str] limiting, Dict[str, Any] chug_rich, Dict[str, Any] ac, Dict[str, Any] vap, List[Dict[str, Any]] fallbacks, str acoustic_gate="report_only")
Dict[str, Any] build_rich_report (config, float Pc, float MR, float mdot_total, float cstar, float gamma, float R, float Tc, Dict[str, Any] diagnostics, Any cg, *, Optional[float] gate_threshold=None, Optional[Dict[str, float]] overrides=None)
Dict[str, Any] _build_rich_report (config, float Pc, float MR, float mdot_total, float cstar, float gamma, float R, float Tc, Dict[str, Any] diagnostics, Any cg, *, float gate_threshold, Optional[Dict[str, float]] overrides, Dict[str, Any] used_here)
 _fallbacks_used (Optional[Dict[str, Any]] used_here=None)

Variables

float _PA_PER_PSI = 6894.757
dict _DRIVER_LABEL

Detailed Description

Rich stability report (<=5 s) for the final report and forward mode.

Runs the RICH tiers (chug root-find, full acoustic mode set with damping budgets) and assembles the
single payload that both the post-optimizer report and forward mode render from (plan §A5 schema).
Every block maps to a §V visualization. Pure-ish: takes the same (config, Pc, ..., diagnostics, cg)
as comprehensive_stability_analysis and reuses analysis.build_stability_inputs for identical extraction.

[Phys §3-§6; plan A5, §V]

Function Documentation

◆ _build_rich_report()

Dict[str, Any] engine.pipeline.stability.report._build_rich_report ( config,
float Pc,
float MR,
float mdot_total,
float cstar,
float gamma,
float R,
float Tc,
Dict[str, Any] diagnostics,
Any cg,
* ,
float gate_threshold,
Optional[Dict[str, float]] overrides,
Dict[str, Any] used_here )
protected

◆ _chug_boundary_curve()

List[List[float]] engine.pipeline.stability.report._chug_boundary_curve ( streams,
chamber,
int n_pts = 24,
Optional[Tuple[float, float]] eta_window = None )
protected
Viz #1: the chug stability boundary in the design's own frame: x = the streams' mass-
weighted injector stiffness, reached by scaling every stream's drop by one factor; y = their
mass-weighted lag over theta_c, reached by scaling every lag by one factor k. At each x, k is
bisected to gain margin 1. The design itself is the point (1, 1) of both scalings, so it sits
in the same plane as the curve (``_chug_design_point``) -- the old curve set every stream to
one common eta and scaled their mean lag, and then plotted each stream against it, which is
two different systems on one chart.

Definition at line 38 of file report.py.

References _eta_window(), and _mean_tau().

Referenced by _build_rich_report().

◆ _chug_design_point()

Dict[str, Any] engine.pipeline.stability.report._chug_design_point ( streams,
chamber,
Optional[Dict[str, Any]] band,
Dict[str, Any] inp )
protected
Where the design sits on the boundary chart: nominal mixing lag, and the mixing lag the gate
is taken at (the low end of the band). Both at the design's own mean stiffness.

Definition at line 88 of file report.py.

References _mean_tau().

Referenced by _build_rich_report().

◆ _chug_pole()

Dict[str, float] engine.pipeline.stability.report._chug_pole ( Dict[str, Any] chug_rich)
protected
Viz #1b: dominant chug pole location in the s-plane (σ + jω).

Definition at line 264 of file report.py.

Referenced by _build_rich_report().

◆ _diagnostics()

Dict[str, Any] engine.pipeline.stability.report._diagnostics ( str state,
float chug_margin,
float acoustic_margin,
float gate_threshold,
Optional[str] limiting,
Dict[str, Any] chug_rich,
Dict[str, Any] ac,
Dict[str, Any] vap,
List[Dict[str, Any]] fallbacks,
str acoustic_gate = "report_only" )
protected
Turn the rich quantities into a verdict, findings, and design actions tied to the
sensitivity sliders (η_inj, SMD, n, χ). Derived from the SAME numbers the cards render,
so the headline can never disagree with the charts.

Definition at line 340 of file report.py.

Referenced by _build_rich_report().

◆ _eta_window()

Tuple[float, float] engine.pipeline.stability.report._eta_window ( streams,
* ,
float lo_frac = 0.35,
float hi_frac = 2.2,
float floor = 0.02,
float ceil = 0.90 )
protected
(eta_lo, eta_hi) sweep window bracketing THIS design's injector stiffness.

The window used to be a fixed 0.08..0.45 for every engine, which puts a design at eta = 0.55
off the right edge of its own chart and a design at eta = 0.05 off the left. Anchoring it to
the design point keeps the operating dot on the plot whatever the injector does.

Definition at line 25 of file report.py.

References max, and min.

Referenced by _build_rich_report(), and _chug_boundary_curve().

◆ _fallbacks_used()

engine.pipeline.stability.report._fallbacks_used ( Optional[Dict[str, Any]] used_here = None)
protected
Substitutions made by THIS evaluation.

``used_here`` is the collection from the ``assumptions.scope()`` wrapped around the report. The
old form read the process-global registry, so a report inherited every fallback the process had
ever recorded -- after a methalox run, an ethalox run with a complete preset still announced the
previous propellant's missing fields. Falls back to the global registry only when called without
a scope (kept so an external caller does not break).

Definition at line 650 of file report.py.

Referenced by _build_rich_report().

◆ _locus_crossing()

Dict[str, float] engine.pipeline.stability.report._locus_crossing ( List[Dict[str, float]] locus)
protected
Where the locus branch crosses the imaginary axis: the neutral-stability gain and frequency.

Linear interpolation in ``eta`` on the sign change of ``Re(s)``. This is the number a designer
reads off a root locus — "stiffen past here and the pole is in the left half-plane" — so it is
computed once on the backend rather than eyeballed off the chart.

Definition at line 273 of file report.py.

Referenced by _build_rich_report().

◆ _mean_tau()

float engine.pipeline.stability.report._mean_tau ( streams)
protected

Definition at line 83 of file report.py.

References max.

Referenced by _chug_boundary_curve(), and _chug_design_point().

◆ _radar()

Dict[str, Any] engine.pipeline.stability.report._radar ( float chug_margin,
Dict[str, Any] ac,
Dict[str, Any] vap,
float gate_threshold )
protected
Viz #7: one-glance health radar. Every axis is a ratio that is 1 at neutral stability:
chug GM, acoustic damping/driving per mode (nominal phase, report-only unless gated), and
L_ch/L_vap for vaporization. Plot caps: 3 for the margins, 1.3 for vaporization (an infinite
damping/driving would otherwise serialize as null).

Definition at line 290 of file report.py.

Referenced by _build_rich_report().

◆ _sensitivity()

Dict[str, Any] engine.pipeline.stability.report._sensitivity ( Dict[str, Any] inp,
float nominal_gm )
protected
Sensitivity of both verdicts to the inputs nobody has measured (cheap sweeps).

Acoustic: alpha of the limiting mode over n and chi (chi scales the RATE-LIMITING stream's lag,
which is what tau_sens is built from). Chug: GM over the feed lengths (x0.5, x2) and over a
uniform scale on every conversion lag (x0.5, x2). The liquid bulk modulus does not enter the
lumped chug loop at all (no line compliance), so the chug verdict cannot move with it.

Definition at line 232 of file report.py.

References max, and min.

Referenced by _build_rich_report().

◆ _stream_from_march()

Dict[str, Any] engine.pipeline.stability.report._stream_from_march ( Dict[str, Any] inp,
str key,
Dict[str, Any] march )
protected
One stream's vaporization from the droplet march that set eta_vap
(combustion_physics.vaporization_profile): x from the injector face, ``L_vap_m`` where 95 % of
the stream's liquid is gone (None when it is not gone by the chamber end), ``L_ch_m`` the
chamber the march ran in (L* A_t / A_c, the volume-equivalent cylinder).

This card used to take L_vap = u_inj x tau_conv: the injection velocity held all the way down
the chamber, times the CHUG lag -- which on the Leonardi model includes a mixing lag that is
not evaporation at all. On the 6.5 kN ethalox doublet that read 675 mm against a 199 mm
chamber while the march that sets eta_vap had the fuel 95 % gone at 157 mm.

Definition at line 101 of file report.py.

Referenced by _vaporization_profile().

◆ _stream_vaporization()

Dict[str, Any] engine.pipeline.stability.report._stream_vaporization ( Dict[str, Any] inp,
float Pc,
str key,
int n_pts )
protected
d^2-law droplet decay for ONE stream. ``key`` is "O" or "F". Used only when the solve
carried no droplet march (see ``_stream_from_march``): the drop's speed held at injection and
its life taken as the chug convective lag, which over-counts both ways.

Definition at line 137 of file report.py.

References max.

Referenced by _vaporization_profile().

◆ _vaporization_profile()

Dict[str, Any] engine.pipeline.stability.report._vaporization_profile ( Dict[str, Any] inp,
float Pc,
int n_pts = 40,
Optional[Dict[str, Any]] march = None )
protected
Viz #5: droplet decay along the chamber, for BOTH streams.

The top-level keys (``L_vap_m``, ``smd_um``, ``tau_conv_s``, ``vaporized_in_chamber``) describe
the **rate-limiting** stream — the one that paces the burn — not the oxidizer. They used to be
hardwired to the oxidizer, which is right only when the oxidizer happens to be the slower
vaporizer. On LOX/methane it is (3.7 ms vs 2.9 ms) so the card read correctly by luck; on
LOX/ethanol it is not (13 ms vs 25 ms), and the card reported a 211 mm vaporization length for
LOX while ethanol -- the stream actually setting the lag -- was far worse. The health radar
scores off these keys, so it was scoring the wrong stream too.

Definition at line 192 of file report.py.

References _stream_from_march(), _stream_vaporization(), and max.

Referenced by _build_rich_report().

◆ build_rich_report()

Dict[str, Any] engine.pipeline.stability.report.build_rich_report ( config,
float Pc,
float MR,
float mdot_total,
float cstar,
float gamma,
float R,
float Tc,
Dict[str, Any] diagnostics,
Any cg,
* ,
Optional[float] gate_threshold = None,
Optional[Dict[str, float]] overrides = None )
Assemble the full rich stability payload (plan §A5 schema). <=5 s.

``gate_threshold`` defaults to design_requirements.min_stability_margin (as Layer 1 relaxes
it), so the report and the optimizer gate on the same number.

Definition at line 472 of file report.py.

References _build_rich_report().

Variable Documentation

◆ _DRIVER_LABEL

dict engine.pipeline.stability.report._DRIVER_LABEL
protected
Initial value:
1= {
2 "feed_inertance": "feed-line inertance",
3 "feed_resistance": "feed-line resistance",
4 "injector_stiffness": "injector stiffness (ΔP_inj)",
5 "regulator": "dome-regulator dynamics",
6 "unknown": "feed/injector coupling",
7}

Definition at line 331 of file report.py.

◆ _PA_PER_PSI

float engine.pipeline.stability.report._PA_PER_PSI = 6894.757
protected

Definition at line 18 of file report.py.