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

Functions

 test_column_inertance_only_is_the_linear_ramp ()
 test_column_with_loss_is_the_tanh_solution ()
 test_column_quasi_steady_without_inertance ()
 test_chamber_filling_time_constant_is_lstar_over_gamma2_cstar ()
 _const (v)
 _chamber (**kw)
 _line (key, **kw)
 test_no_gas_volume_means_no_priming_delay ()
 test_priming_time_and_ramp_of_an_inertance_only_line ()
 test_priming_against_a_borda_dump_runs_at_the_terminal_velocity ()
 test_priming_inertance_grows_with_the_filled_length ()
 test_primed_line_carries_the_orifice_inertance ()
 test_settled_state_is_the_algebraic_operating_point ()
 test_hard_start_pair_and_spike ()
 test_fixed_load_deficit_closed_forms ()
 _tail (key, **kw)
 test_wet_side_with_an_instant_shut_drains_exactly_its_downstream_liquid ()
 test_dry_side_pushes_its_whole_line_through_when_never_shut ()
 test_closing_valve_alone_delivers_half_the_travel ()
 test_mode_and_alone_mass_closed_form ()
 test_korteweg_wave_speed_against_the_audit_hand_value ()
 _pipe (**kw)
 test_moc_holds_a_steady_state ()
 test_moc_instant_closure_is_joukowsky ()
 test_moc_linear_velocity_closure_is_michaud ()
 test_opening_surge_boundary_limits_and_hand_case ()
 test_lubin_springer_constant_is_the_point_sink_minimum ()
 test_critical_height_scales_with_flow_gravity_and_density_ratio ()
 test_head_volumes_and_their_inverse ()
 test_onset_of_a_steady_drain_from_a_flat_tank ()
 le4 ()
 test_le4_feed_geometry_matches_the_audit_hand_values (le4)
 test_le4_diagnostics_run_on_the_golden_burn_and_leave_it_alone (le4)
 test_the_start_enters_the_manifold_through_the_valve_when_no_line_is_drawn ()

Variables

float PSI = 6894.757293168361
 LOX_RHO
 LOX_A
str GOLDEN = "1"
 slow = pytest.mark.skipif(not GOLDEN, reason="LE4 prepare + he_pad burn (~1-2 min); set LAYERX_GOLDEN=1")

Detailed Description

Layer X transient diagnostics against closed forms (engine/layerx/diag/{start,shutdown,waterhammer,outflow}.py).

Every test here checks the code against a hand calculation or a closed-form solution, never against
the code itself. The LE4 cases at the bottom need a prepared Layer X burn and are skipped unless
``LAYERX_GOLDEN=1``.

Function Documentation

◆ _chamber()

◆ _const()

test_layerx_transients._const ( v)
protected

Definition at line 75 of file test_layerx_transients.py.

Referenced by _chamber().

◆ _line()

◆ _pipe()

test_layerx_transients._pipe ( ** kw)
protected

◆ _tail()

◆ le4()

test_layerx_transients.le4 ( )

Definition at line 449 of file test_layerx_transients.py.

◆ test_chamber_filling_time_constant_is_lstar_over_gamma2_cstar()

test_layerx_transients.test_chamber_filling_time_constant_is_lstar_over_gamma2_cstar ( )
dPc/dt = (RT/V)(m - Pc At/c*), RT = (Gamma c*)^2: a first-order lag with tau = V/(Gamma^2 c* At).

Definition at line 55 of file test_layerx_transients.py.

◆ test_closing_valve_alone_delivers_half_the_travel()

test_layerx_transients.test_closing_valve_alone_delivers_half_the_travel ( )
Valve the only loss, linear Cv: the quasi-steady flow falls linearly with travel, so the
closure passes m0 * travel / 2, then the downstream liquid drains.

Definition at line 269 of file test_layerx_transients.py.

References _tail().

◆ test_column_inertance_only_is_the_linear_ramp()

test_layerx_transients.test_column_inertance_only_is_the_linear_ramp ( )
I dm/dt = dp with no loss: m = dp t / I, exactly, at any step.

Definition at line 24 of file test_layerx_transients.py.

◆ test_column_quasi_steady_without_inertance()

test_layerx_transients.test_column_quasi_steady_without_inertance ( )

Definition at line 50 of file test_layerx_transients.py.

◆ test_column_with_loss_is_the_tanh_solution()

test_layerx_transients.test_column_with_loss_is_the_tanh_solution ( )
I dm/dt = dp - R m^2 from rest: m = m_inf tanh(t/tau), m_inf = sqrt(dp/R), tau = I/sqrt(R dp).

Definition at line 33 of file test_layerx_transients.py.

◆ test_critical_height_scales_with_flow_gravity_and_density_ratio()

test_layerx_transients.test_critical_height_scales_with_flow_gravity_and_density_ratio ( )

Definition at line 402 of file test_layerx_transients.py.

◆ test_dry_side_pushes_its_whole_line_through_when_never_shut()

test_layerx_transients.test_dry_side_pushes_its_whole_line_through_when_never_shut ( )

Definition at line 259 of file test_layerx_transients.py.

References _tail().

◆ test_fixed_load_deficit_closed_forms()

test_layerx_transients.test_fixed_load_deficit_closed_forms ( )

Definition at line 200 of file test_layerx_transients.py.

◆ test_hard_start_pair_and_spike()

test_layerx_transients.test_hard_start_pair_and_spike ( )
Both primed at Fire (no gas volume), ignition delayed by tau: the pair injected before ignition,
burned at once in the chamber volume, gives a spike m (Gamma c*)^2 / V.

Definition at line 181 of file test_layerx_transients.py.

References _chamber(), _line(), and min.

◆ test_head_volumes_and_their_inverse()

test_layerx_transients.test_head_volumes_and_their_inverse ( )

Definition at line 411 of file test_layerx_transients.py.

◆ test_korteweg_wave_speed_against_the_audit_hand_value()

test_layerx_transients.test_korteweg_wave_speed_against_the_audit_hand_value ( )
AUDIT 9.5 §5 by hand: LOX in 1/2 x 0.035 in 316 tube, a = 897 m/s.

Definition at line 317 of file test_layerx_transients.py.

◆ test_le4_diagnostics_run_on_the_golden_burn_and_leave_it_alone()

test_layerx_transients.test_le4_diagnostics_run_on_the_golden_burn_and_leave_it_alone ( le4)

Definition at line 492 of file test_layerx_transients.py.

◆ test_le4_feed_geometry_matches_the_audit_hand_values()

test_layerx_transients.test_le4_feed_geometry_matches_the_audit_hand_values ( le4)
AUDIT 9.5 §1, by hand from the drawing: line inertance sum L/A = 1495 (LOX, 0.14 m) and
10297 1/m (fuel, 0.964 m) of 10.92 mm bore; orifice passages 163 / 200 1/m (24 x 8.16 mm).

Definition at line 472 of file test_layerx_transients.py.

◆ test_lubin_springer_constant_is_the_point_sink_minimum()

test_layerx_transients.test_lubin_springer_constant_is_the_point_sink_minimum ( )
h(z) = z + Q^2/(8 pi^2 g z^4) over a hemispherical sink: its minimum is h_c; the constant
0.69 of Lubin & Springer is that minimum over (Q^2/g)^(1/5).

Definition at line 388 of file test_layerx_transients.py.

◆ test_moc_holds_a_steady_state()

test_layerx_transients.test_moc_holds_a_steady_state ( )

Definition at line 332 of file test_layerx_transients.py.

References _pipe().

◆ test_moc_instant_closure_is_joukowsky()

test_layerx_transients.test_moc_instant_closure_is_joukowsky ( )

Definition at line 338 of file test_layerx_transients.py.

References _pipe().

◆ test_moc_linear_velocity_closure_is_michaud()

test_layerx_transients.test_moc_linear_velocity_closure_is_michaud ( )
Frictionless, the velocity at the valve brought down linearly over t_c > 2L/a: peak 2 rho L v0 / t_c.

Definition at line 353 of file test_layerx_transients.py.

References _pipe(), and max.

◆ test_mode_and_alone_mass_closed_form()

test_layerx_transients.test_mode_and_alone_mass_closed_form ( )
LOX runs dry with no downstream volume and a late command D: LOX ends at rho V_up / m_ox, fuel
flows until D then drains rho_f V_dn_f. Fuel alone = m_f (D - t_ox) + rho_f V_dn_f.

Definition at line 285 of file test_layerx_transients.py.

References _tail().

◆ test_no_gas_volume_means_no_priming_delay()

test_layerx_transients.test_no_gas_volume_means_no_priming_delay ( )

Definition at line 94 of file test_layerx_transients.py.

References _chamber(), and _line().

◆ test_onset_of_a_steady_drain_from_a_flat_tank()

test_layerx_transients.test_onset_of_a_steady_drain_from_a_flat_tank ( )
Constant flow from a flat-bottomed tank: the level falls linearly and h_c is constant, so the
dip forms at t = (M - rho pi R^2 h_c) / mdot with rho pi R^2 h_c left.

Definition at line 423 of file test_layerx_transients.py.

◆ test_opening_surge_boundary_limits_and_hand_case()

test_layerx_transients.test_opening_surge_boundary_limits_and_hand_case ( )

Definition at line 369 of file test_layerx_transients.py.

◆ test_primed_line_carries_the_orifice_inertance()

test_layerx_transients.test_primed_line_carries_the_orifice_inertance ( )
Primed at Fire, no loss: the whole column, tube and orifice passages, ramps at dp / (I_up + I_dn + I_inj).

Definition at line 149 of file test_layerx_transients.py.

References _chamber(), and _line().

◆ test_priming_against_a_borda_dump_runs_at_the_terminal_velocity()

test_layerx_transients.test_priming_against_a_borda_dump_runs_at_the_terminal_velocity ( )
No inertance upstream, no loss but the K velocity heads at the front: the growing column starts
at its terminal velocity v = sqrt(2 dp / (rho K)) (Liou & Hunt's rigid-column equation with
l = 0) and fills a tube of length L at t = L / v.

Definition at line 118 of file test_layerx_transients.py.

References _chamber(), and _line().

◆ test_priming_inertance_grows_with_the_filled_length()

test_layerx_transients.test_priming_inertance_grows_with_the_filled_length ( )
No loss, a column of fixed length L_u filling a tube of the same bore: rho (L_u + x) dv/dt = dp,
so v^2 = (2 dp / rho) ln((L_u + x)/L_u) and the tube of length L_d fills at
t = L_u sqrt(rho / (2 dp)) sqrt(pi) erfi(sqrt(ln((L_u + L_d)/L_u))).

Definition at line 132 of file test_layerx_transients.py.

References _chamber(), and _line().

◆ test_priming_time_and_ramp_of_an_inertance_only_line()

test_layerx_transients.test_priming_time_and_ramp_of_an_inertance_only_line ( )
No loss, no valve travel, no dump: m = dp t/I, so the volume V fills at t = sqrt(2 I rho V / dp),
and the column keeps ramping at dp/I once it is primed (no injector loss, no ignition).

Definition at line 103 of file test_layerx_transients.py.

References _chamber(), and _line().

◆ test_settled_state_is_the_algebraic_operating_point()

test_layerx_transients.test_settled_state_is_the_algebraic_operating_point ( )
With the valves full open, the start settles on m_s = sqrt((p_T - Pc)/R_s) and Pc At/c* = m_o + m_f.

Definition at line 159 of file test_layerx_transients.py.

References _chamber(), and _line().

◆ test_the_start_enters_the_manifold_through_the_valve_when_no_line_is_drawn()

test_layerx_transients.test_the_start_enters_the_manifold_through_the_valve_when_no_line_is_drawn ( )
LE4's LOX side has no drawn line (tank outlet, OM-R, injector): the start took the manifold's
entry area from a line that is not there, indexed an empty list, and the whole start went
missing from the run ("Start not computed"). With no line it is the main valve's own bore; with
a line, the line's, exactly as before; with neither, it says so rather than guess.

Definition at line 529 of file test_layerx_transients.py.

References feed().

◆ test_wet_side_with_an_instant_shut_drains_exactly_its_downstream_liquid()

test_layerx_transients.test_wet_side_with_an_instant_shut_drains_exactly_its_downstream_liquid ( )

Definition at line 248 of file test_layerx_transients.py.

References _tail().

Variable Documentation

◆ GOLDEN

str test_layerx_transients.GOLDEN = "1"

Definition at line 444 of file test_layerx_transients.py.

◆ LOX_A

test_layerx_transients.LOX_A

Definition at line 314 of file test_layerx_transients.py.

◆ LOX_RHO

test_layerx_transients.LOX_RHO

Definition at line 314 of file test_layerx_transients.py.

◆ PSI

float test_layerx_transients.PSI = 6894.757293168361

Definition at line 18 of file test_layerx_transients.py.

◆ slow

test_layerx_transients.slow = pytest.mark.skipif(not GOLDEN, reason="LE4 prepare + he_pad burn (~1-2 min); set LAYERX_GOLDEN=1")

Definition at line 445 of file test_layerx_transients.py.