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

Functions

CylindricalTank geometry ()
Fluid lox ()
Fluid gn2 ()
None test_cylinder_volume_matches_closed_form (CylindricalTank geometry)
None test_hemispherical_heads_give_a_sphere ()
None test_flat_heads_give_a_cylinder ()
None test_volume_endpoints_are_exact (CylindricalTank geometry)
None test_level_inverts_volume (CylindricalTank geometry)
None test_cross_section_is_the_derivative_of_volume (CylindricalTank geometry)
None test_interface_shrinks_in_the_head (CylindricalTank geometry)
None test_tabulated_geometry_round_trips ()
None test_tabulated_geometry_rejects_a_shrinking_tank ()
None test_geometry_registry ()
None test_conduction_rate_integrates_to_the_closed_form (Fluid lox)
None test_penetration_depth_is_millimetres_over_a_burn (Fluid lox)
None test_collapse_flux_decays_with_contact_time (Fluid lox)
None test_no_collapse_is_a_named_model ()
None test_initial_state_round_trips_pressure (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_overfull_tank_refuses (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_outlet_pressure_includes_the_liquid_column (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_expulsion_matches_closed_form (Fluid lox, Fluid gn2, CylindricalTank geometry, float ullage_temperature)
None test_expulsion_deviation_is_the_compressibility (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_collapse_costs_pressurant_not_pressure (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_enhancement_increases_demand_monotonically (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_helium_needs_less_mass_than_nitrogen (Fluid lox, CylindricalTank geometry)
None test_liquid_in_the_ullage_refuses (CylindricalTank geometry)
None test_repressurisation_resets_the_interface_clock (Fluid lox, Fluid gn2, CylindricalTank geometry)
None test_a_step_carries_what_it_does_not_integrate (Fluid lox, Fluid gn2, CylindricalTank geometry)

Variables

 PSI = get_unit("psi").factor
float R_UNIVERSAL = 8.31446261815324

Detailed Description

Tank geometry, ullage collapse, and constant-pressure expulsion.

The headline check is :func:`test_expulsion_matches_closed_form`: for an ideal
gas with no interfacial loss, holding a tank at constant pressure while liquid
leaves needs exactly ``m = p dV / (R T_in)``, *independent of the ullage's
starting temperature*. That independence is a strong test -- it fails loudly if
the expansion-work term is missing or mis-signed, which is the single easiest
thing to get wrong in a tank model.

Function Documentation

◆ geometry()

CylindricalTank test_tank.geometry ( )
6 in. tank, 600 mm barrel, 2:1 ellipsoidal heads. The team's shape.

Definition at line 43 of file test_tank.py.

◆ gn2()

Fluid test_tank.gn2 ( )

Definition at line 54 of file test_tank.py.

◆ lox()

Fluid test_tank.lox ( )

Definition at line 49 of file test_tank.py.

◆ test_a_step_carries_what_it_does_not_integrate()

None test_tank.test_a_step_carries_what_it_does_not_integrate ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )
A field added to the state later rides through a step untouched.

Built field by field, the step returned a plain :class:`TankState` and
reset anything it did not list -- how ``vapour_mass`` was once zeroed every
step (docs/PHYSICS-BENCHMARK.md 4.3). A subclass stands in for that field.

Definition at line 417 of file test_tank.py.

◆ test_collapse_costs_pressurant_not_pressure()

None test_tank.test_collapse_costs_pressurant_not_pressure ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )
The point of the whole collapse model.

With the regulator holding tank pressure, interfacial heat loss does not
show up in the pressure trace at all -- both runs hold 500 psi exactly. It
shows up as extra pressurant, which drains the COPV faster, which lowers
regulator inlet, which moves the outlet through the supply coefficient.

Definition at line 304 of file test_tank.py.

◆ test_collapse_flux_decays_with_contact_time()

None test_tank.test_collapse_flux_decays_with_contact_time ( Fluid lox)
Why repressurising right before ignition helps: it resets the clock.

Definition at line 179 of file test_tank.py.

◆ test_conduction_rate_integrates_to_the_closed_form()

None test_tank.test_conduction_rate_integrates_to_the_closed_form ( Fluid lox)
The instantaneous flux must integrate to 2 A dT sqrt(k rho c t / pi).

Definition at line 146 of file test_tank.py.

◆ test_cross_section_is_the_derivative_of_volume()

None test_tank.test_cross_section_is_the_derivative_of_volume ( CylindricalTank geometry)
dV/dh must equal the horizontal area, or collapse gets the wrong area.

Definition at line 105 of file test_tank.py.

◆ test_cylinder_volume_matches_closed_form()

None test_tank.test_cylinder_volume_matches_closed_form ( CylindricalTank geometry)

Definition at line 61 of file test_tank.py.

◆ test_enhancement_increases_demand_monotonically()

None test_tank.test_enhancement_increases_demand_monotonically ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )

Definition at line 339 of file test_tank.py.

◆ test_expulsion_deviation_is_the_compressibility()

None test_tank.test_expulsion_deviation_is_the_compressibility ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )
The ~0.5% gap from ideal is Z, not numerical slop.

Definition at line 280 of file test_tank.py.

◆ test_expulsion_matches_closed_form()

None test_tank.test_expulsion_matches_closed_form ( Fluid lox,
Fluid gn2,
CylindricalTank geometry,
float ullage_temperature )
Constant-pressure expulsion needs ``m = p dV / (R T_in)``.

From the energy balance with ``p`` held: ``(cv/R) p Vdot = mdot cp T_in -
p Vdot`` reduces to ``mdot = p Vdot / (R T_in)``, which does **not** contain
the ullage's own temperature. Getting the same answer from a 150 K ullage
and a 400 K one is the real content of this test; a missing or mis-signed
expansion-work term breaks that independence immediately.

Definition at line 247 of file test_tank.py.

◆ test_flat_heads_give_a_cylinder()

None test_tank.test_flat_heads_give_a_cylinder ( )

Definition at line 83 of file test_tank.py.

◆ test_geometry_registry()

None test_tank.test_geometry_registry ( )

Definition at line 133 of file test_tank.py.

◆ test_helium_needs_less_mass_than_nitrogen()

None test_tank.test_helium_needs_less_mass_than_nitrogen ( Fluid lox,
CylindricalTank geometry )
Sanity on the pressurant choice: helium's R is 7x nitrogen's.

Definition at line 359 of file test_tank.py.

◆ test_hemispherical_heads_give_a_sphere()

None test_tank.test_hemispherical_heads_give_a_sphere ( )
Zero barrel with two hemispherical heads is a sphere, exactly.

Definition at line 67 of file test_tank.py.

◆ test_initial_state_round_trips_pressure()

None test_tank.test_initial_state_round_trips_pressure ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )

Definition at line 201 of file test_tank.py.

◆ test_interface_shrinks_in_the_head()

None test_tank.test_interface_shrinks_in_the_head ( CylindricalTank geometry)
A nearly-empty tank has far less interface than a half-full one.

Definition at line 114 of file test_tank.py.

◆ test_level_inverts_volume()

None test_tank.test_level_inverts_volume ( CylindricalTank geometry)

Definition at line 99 of file test_tank.py.

◆ test_liquid_in_the_ullage_refuses()

None test_tank.test_liquid_in_the_ullage_refuses ( CylindricalTank geometry)
A pressurant that condenses at tank conditions is not an ullage gas.

Definition at line 378 of file test_tank.py.

◆ test_no_collapse_is_a_named_model()

None test_tank.test_no_collapse_is_a_named_model ( )

Definition at line 188 of file test_tank.py.

◆ test_outlet_pressure_includes_the_liquid_column()

None test_tank.test_outlet_pressure_includes_the_liquid_column ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )

Definition at line 230 of file test_tank.py.

◆ test_overfull_tank_refuses()

None test_tank.test_overfull_tank_refuses ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )

Definition at line 217 of file test_tank.py.

◆ test_penetration_depth_is_millimetres_over_a_burn()

None test_tank.test_penetration_depth_is_millimetres_over_a_burn ( Fluid lox)
The physical claim behind using a transient model at all.

Definition at line 166 of file test_tank.py.

◆ test_repressurisation_resets_the_interface_clock()

None test_tank.test_repressurisation_resets_the_interface_clock ( Fluid lox,
Fluid gn2,
CylindricalTank geometry )

Definition at line 390 of file test_tank.py.

◆ test_tabulated_geometry_rejects_a_shrinking_tank()

None test_tank.test_tabulated_geometry_rejects_a_shrinking_tank ( )

Definition at line 128 of file test_tank.py.

◆ test_tabulated_geometry_round_trips()

None test_tank.test_tabulated_geometry_round_trips ( )

Definition at line 119 of file test_tank.py.

◆ test_volume_endpoints_are_exact()

None test_tank.test_volume_endpoints_are_exact ( CylindricalTank geometry)

Definition at line 92 of file test_tank.py.

Variable Documentation

◆ PSI

test_tank.PSI = get_unit("psi").factor

Definition at line 38 of file test_tank.py.

◆ R_UNIVERSAL

float test_tank.R_UNIVERSAL = 8.31446261815324

Definition at line 39 of file test_tank.py.