|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| CP = pytest.importorskip("CoolProp.CoolProp") | |
| float | PSI = 6894.757293168361 |
| str | RUNS = Path(__file__).resolve().parents[1] / ".userdata" / "local" / "engine" / "layerx" / "runs" |
| str | REFERENCE = RUNS / "20261002-231658-7e47d1.json" |
| dict | DOC |
Conservation checks on a Layer X burn (engine/layerx/diag/vv.py). What these check, and against what: * **Propellant mass** on a hand-built burn: the balance closes when the numbers do, and a leak shows as exactly its own size. The trapped liquid is checked by hand: pi/4 d^2 L of the drawing's tank-to-engine lines at CoolProp's saturated density, the fill and vent lines left out. * **Pressurant mass and gas-side energy** on a pressurisation integrated here, independently of the twin: a bottle feeds an ullage that grows as the liquid leaves, explicit Euler, every state from CoolProp's (rho, u). Mass is conserved by construction and the first law holds step by step, so the checks must close to the quadrature error of the boundary work (~1e-4 of it). Leaving the work out, or the ullage volume wrong, must not close. * **The 2026-10-02 reference run** (read only, skipped when absent): the twin's own bookkeeping closes, the pressurant to round-off.
|
protected |
Definition at line 65 of file test_layerx_vv.py.
Referenced by test_a_consistent_burn_closes_and_counts_its_lines_by_hand(), test_a_leak_shows_as_exactly_its_own_size(), test_the_burned_mass_counts_each_step_by_its_own_length(), and test_vapour_in_the_ullage_is_refused_rather_than_booked_as_error().
|
protected |
Definition at line 35 of file test_layerx_vv.py.
|
protected |
A bottle feeding one ullage that grows as the liquid leaves; adiabatic everywhere. The flow holds the ullage's density (what a regulator nearly does). Explicit Euler on (m, U) of each volume, h out of the bottle at the step's start, work p dV at the step's start.
Definition at line 120 of file test_layerx_vv.py.
References record().
Referenced by pressurised(), and test_heat_into_the_ullage_shows_as_the_unclosed_part().
| test_layerx_vv.pressurised | ( | ) |
Definition at line 172 of file test_layerx_vv.py.
References _pressurise().
| test_layerx_vv.test_a_consistent_burn_closes_and_counts_its_lines_by_hand | ( | ) |
Definition at line 79 of file test_layerx_vv.py.
References _burn().
| test_layerx_vv.test_a_leak_shows_as_exactly_its_own_size | ( | ) |
Definition at line 94 of file test_layerx_vv.py.
References _burn().
| test_layerx_vv.test_a_wrong_ullage_volume_does_not_close | ( | pressurised | ) |
Definition at line 185 of file test_layerx_vv.py.
| test_layerx_vv.test_check_never_raises_and_says_what_it_could_not_do | ( | ) |
Definition at line 244 of file test_layerx_vv.py.
References check().
| test_layerx_vv.test_convergence_lists_every_pass_against_its_tolerance | ( | ) |
Definition at line 253 of file test_layerx_vv.py.
References check().
| test_layerx_vv.test_heat_into_the_ullage_shows_as_the_unclosed_part | ( | pressurised | ) |
Warm the ullage gas at the end by 2 K at fixed density: that energy was never in the balance, so R falls by it (R is minus the heat the walls gave the gas).
Definition at line 209 of file test_layerx_vv.py.
References _pressurise().
| test_layerx_vv.test_limits_grade_the_balances | ( | pressurised | ) |
Definition at line 266 of file test_layerx_vv.py.
References check().
| test_layerx_vv.test_the_burned_mass_counts_each_step_by_its_own_length | ( | ) |
Each recorded flow is the end-of-step sample of its own step: mdot[i] * dt[i]. The flow climbs here (as it does when the tanks rise) so that pairing a flow with any other step's length -- the neighbour's, or a constant -- changes the sum; with a constant flow it would not.
Definition at line 102 of file test_layerx_vv.py.
References _burn().
| test_layerx_vv.test_the_energy_balance_closes_to_the_quadrature_of_the_work | ( | pressurised | ) |
Definition at line 192 of file test_layerx_vv.py.
| test_layerx_vv.test_the_feed_walk_takes_the_lines_to_the_engine_and_nothing_else | ( | ) |
Definition at line 58 of file test_layerx_vv.py.
| test_layerx_vv.test_the_pressurant_balance_closes_on_an_independent_integration | ( | pressurised | ) |
Definition at line 176 of file test_layerx_vv.py.
| test_layerx_vv.test_the_reference_run_conserves_what_it_must | ( | ) |
Definition at line 280 of file test_layerx_vv.py.
References check().
| test_layerx_vv.test_vapour_in_the_ullage_is_refused_rather_than_booked_as_error | ( | pressurised | ) |
Definition at line 230 of file test_layerx_vv.py.
References _burn().
| test_layerx_vv.CP = pytest.importorskip("CoolProp.CoolProp") |
Definition at line 25 of file test_layerx_vv.py.
| dict test_layerx_vv.DOC |
Definition at line 41 of file test_layerx_vv.py.
| float test_layerx_vv.PSI = 6894.757293168361 |
Definition at line 30 of file test_layerx_vv.py.
| str test_layerx_vv.REFERENCE = RUNS / "20261002-231658-7e47d1.json" |
Definition at line 32 of file test_layerx_vv.py.
| str test_layerx_vv.RUNS = Path(__file__).resolve().parents[1] / ".userdata" / "local" / "engine" / "layerx" / "runs" |
Definition at line 31 of file test_layerx_vv.py.