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

Functions

Param _p (float value, str unit)
Regulator _regulator (float setpoint_psia, bool droop=True)
 _gas (str name, float psia, float T, signals=None)
None test_on_in_the_cockpit_and_off_in_the_benchmark_study ()
None test_off_the_seat_is_the_incompressible_law_exactly ()
float _saturation_flow (Regulator reg, flow)
None test_gn2_capacity_near_burnout_falls_as_the_audit_says ()
None test_on_helium_at_le4_flows_the_outlet_does_not_move (float psia, float T, float mdot, float target)
None test_wide_open_and_choked_the_solve_pins_the_capacity ()
None test_the_seat_model_block ()
None test_the_drawn_1092_has_no_xt_so_the_setup_value_is_used ()
None test_a_helium_burn_is_unchanged_with_the_seat_on ()

Variables

 STAR = Path(__file__).resolve().parents[3]
str HE = STAR / "feed-twin" / "backend" / "diagrams" / "copv_study_he.json"
float CV = 0.8
float BORE = 0.23 * 0.0254
dict ON = {SEAT_XT_SIGNAL: XT_TYPICAL}
str ENGINE = STAR / "EngineDesign" / "configs" / "ethalox_doublet_7000N.yaml"
str CEA = STAR / "EngineDesign" / "output" / "cache" / "cea_cache_LOX_Ethanol_3D.npz"
str TABLES = STAR / "feed-twin" / "backend" / "statemachines"

Detailed Description

The regulator's compressible seat (``Setup.regulator_compressible_seat``).

The seat a dome regulator saturates against was ``K rho v^2 / 2`` at the inlet
density: no expansion factor, no choke (EngineDesign/docs/layerx/AUDIT.md 5.3).
On GN2 near burnout that passes 0.398 kg/s across the 441 psi a 1092-50 has, where
IEC 60534-2-1 with its expansion factor passes 0.319 (AUDIT.md 9.6 C3, by hand,
Cv 0.8, xT 0.7 assumed, gamma 1.40). On -- the default since 2026-10-08, pinned off
in the benchmark Study -- it reproduces that; off it is the old law exactly; on, a
regulator that is regulating -- helium at the LE4's hot-fire flows -- does not move.

States are the audit's (``scratchpad/audit/drawings/regcalc.py`` at the twin's
recorded ``PR_D.in``): GN2 at 3.62 s, 1054.78 psia and 199.95 K, outlet target
614.174 psia; He at 0.55 s and 3.478 s.

Function Documentation

◆ _gas()

◆ _p()

Param test_regulator_seat._p ( float value,
str unit )
protected

Definition at line 43 of file test_regulator_seat.py.

Referenced by _regulator().

◆ _regulator()

◆ _saturation_flow()

float test_regulator_seat._saturation_flow ( Regulator reg,
flow )
protected
The flow at which the wide-open seat takes the whole available drop.

Definition at line 85 of file test_regulator_seat.py.

Referenced by test_gn2_capacity_near_burnout_falls_as_the_audit_says().

◆ test_a_helium_burn_is_unchanged_with_the_seat_on()

None test_regulator_seat.test_a_helium_burn_is_unchanged_with_the_seat_on ( )
The helium hot-fire drawing burning: every tank, regulator-outlet and
injector pressure within 0.1 psi with the opt-in on (it regulates
throughout, so it is in fact identical).

Definition at line 208 of file test_regulator_seat.py.

◆ test_gn2_capacity_near_burnout_falls_as_the_audit_says()

None test_regulator_seat.test_gn2_capacity_near_burnout_falls_as_the_audit_says ( )
441 psi available at 1054.78 psia, 199.95 K: 0.398 kg/s incompressible,
0.319 with IEC 60534-2-1's expansion factor (x = 0.418, Y = 0.801).

Definition at line 94 of file test_regulator_seat.py.

References _gas(), _regulator(), and _saturation_flow().

◆ test_off_the_seat_is_the_incompressible_law_exactly()

None test_regulator_seat.test_off_the_seat_is_the_incompressible_law_exactly ( )
Without the signal the saturated drop is K rho v^2/2 at the inlet density,
bit for bit, however the gas is priced.

Definition at line 72 of file test_regulator_seat.py.

References _gas(), _regulator(), and max.

◆ test_on_helium_at_le4_flows_the_outlet_does_not_move()

None test_regulator_seat.test_on_helium_at_le4_flows_the_outlet_does_not_move ( float psia,
float T,
float mdot,
float target )
Regulating at 5-18 % of its choked capacity, the seat never binds: the
outlet is the droop law with the opt-in on or off (< 0.1 psi; it is 0).

Definition at line 130 of file test_regulator_seat.py.

References _gas(), and _regulator().

◆ test_on_in_the_cockpit_and_off_in_the_benchmark_study()

None test_regulator_seat.test_on_in_the_cockpit_and_off_in_the_benchmark_study ( )
The team turned it on (2026-10-08); the benchmark keeps the law its
expectations were stated at.

Definition at line 64 of file test_regulator_seat.py.

◆ test_the_drawn_1092_has_no_xt_so_the_setup_value_is_used()

None test_regulator_seat.test_the_drawn_1092_has_no_xt_so_the_setup_value_is_used ( )

Definition at line 184 of file test_regulator_seat.py.

References _gas().

◆ test_the_seat_model_block()

None test_regulator_seat.test_the_seat_model_block ( )

Definition at line 175 of file test_regulator_seat.py.

References _regulator().

◆ test_wide_open_and_choked_the_solve_pins_the_capacity()

None test_regulator_seat.test_wide_open_and_choked_the_solve_pins_the_capacity ( )
A GN2 bottle at 4039.76 psia, 284.84 K straight into a tank at 100 psia:
the regulator is wide open and past F_gamma xT. The solve must carry the
IEC choked flow, N6 C (2/3) sqrt(F_gamma xT p1 rho1) with N6 = 2.73
(Cv; kg/h, kPa, kg/m^3); the incompressible law passes far more.

Definition at line 149 of file test_regulator_seat.py.

References _regulator().

Variable Documentation

◆ BORE

float test_regulator_seat.BORE = 0.23 * 0.0254

Definition at line 39 of file test_regulator_seat.py.

◆ CEA

str test_regulator_seat.CEA = STAR / "EngineDesign" / "output" / "cache" / "cea_cache_LOX_Ethanol_3D.npz"

Definition at line 200 of file test_regulator_seat.py.

◆ CV

float test_regulator_seat.CV = 0.8

Definition at line 38 of file test_regulator_seat.py.

◆ ENGINE

str test_regulator_seat.ENGINE = STAR / "EngineDesign" / "configs" / "ethalox_doublet_7000N.yaml"

Definition at line 199 of file test_regulator_seat.py.

◆ HE

str test_regulator_seat.HE = STAR / "feed-twin" / "backend" / "diagrams" / "copv_study_he.json"

Definition at line 36 of file test_regulator_seat.py.

◆ ON

dict test_regulator_seat.ON = {SEAT_XT_SIGNAL: XT_TYPICAL}

Definition at line 40 of file test_regulator_seat.py.

◆ STAR

test_regulator_seat.STAR = Path(__file__).resolve().parents[3]

Definition at line 35 of file test_regulator_seat.py.

◆ TABLES

str test_regulator_seat.TABLES = STAR / "feed-twin" / "backend" / "statemachines"

Definition at line 201 of file test_regulator_seat.py.