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

Functions

 test_pressurant_mass_flow_is_zero ()
 test_pressurant_still_counts_toward_wet_mass ()
 test_the_mass_ratio_error_this_caused ()
 test_zero_flow_cannot_empty_the_tank ()
 test_no_hardcoded_copv_density ()
 test_copv_geometry_follows_free_volume ()
 test_a_5L_copv_holds_what_a_5L_copv_holds ()
 test_gas_stub_comes_out_of_the_pressurant_mass ()
 test_solver_ullage_is_small_and_conserves_mass ()

Variables

str FLIGHT_SIM = Path(__file__).resolve().parents[1] / "ui" / "flight_sim.py"

Detailed Description

Pressurant gas is dead mass, not propellant.

ui.flight_sim used to drain the entire COPV over the burn
(``mdot = m_pressurant / burn_time``) and hand that to a RocketPy
MassFlowRateBasedTank as ``liquid_mass_flow_rate_out``, which subtracts it from vehicle
mass. But the gas moves from the COPV into the ullage the departing propellant leaves
behind -- it is still on board at burnout. Flying it as propellant over-stated the mass
ratio, and running the tank to exactly zero made RocketPy raise outright.

Function Documentation

◆ test_a_5L_copv_holds_what_a_5L_copv_holds()

test_pressurant_is_not_propellant.test_a_5L_copv_holds_what_a_5L_copv_holds ( )
The case that broke it: 5 L, 1.551 kg of GN2 at 4500 psi.

Definition at line 103 of file test_pressurant_is_not_propellant.py.

◆ test_copv_geometry_follows_free_volume()

test_pressurant_is_not_propellant.test_copv_geometry_follows_free_volume ( )
press_radius x press_h and free_volume_L could disagree; free_volume_L wins.

It is the number the operator specifies and the one a propellant-volume budget counts.

Definition at line 92 of file test_pressurant_is_not_propellant.py.

◆ test_gas_stub_comes_out_of_the_pressurant_mass()

test_pressurant_is_not_propellant.test_gas_stub_comes_out_of_the_pressurant_mass ( )
A flat 0.01 kg added ALONGSIDE the liquid over-filled the COPV.

With density derived as m_pressurant/V, the tank then held m_pressurant + 0.01 kg =
0.0050322 m3 in a 0.0050000 m3 bottle, and RocketPy rejected it:
  "Input Function image (0.00503...) must be within the domain (0.0, 0.005)".

Definition at line 111 of file test_pressurant_is_not_propellant.py.

◆ test_no_hardcoded_copv_density()

test_pressurant_is_not_propellant.test_no_hardcoded_copv_density ( )
Fluid(density=200) was a number with no source on it.

Real GN2 at 4500 psi / 293 K is 310 kg/m3 (CoolProp, Z = 1.150). At 200 a 5 L COPV
caps at 1.0 kg, and the 1.551 kg a 5 L bottle actually holds made RocketPy refuse the
tank as "overfilled" -- so the flight sim failed outright on a correctly specified COPV.

Definition at line 77 of file test_pressurant_is_not_propellant.py.

◆ test_pressurant_mass_flow_is_zero()

test_pressurant_is_not_propellant.test_pressurant_mass_flow_is_zero ( )

Definition at line 19 of file test_pressurant_is_not_propellant.py.

◆ test_pressurant_still_counts_toward_wet_mass()

test_pressurant_is_not_propellant.test_pressurant_still_counts_toward_wet_mass ( )
Dead mass, not absent mass. It must still be in the initial mass sum.

Definition at line 30 of file test_pressurant_is_not_propellant.py.

◆ test_solver_ullage_is_small_and_conserves_mass()

test_pressurant_is_not_propellant.test_solver_ullage_is_small_and_conserves_mass ( )
The 0.1 % lives in the density, never in the mass.

Definition at line 131 of file test_pressurant_is_not_propellant.py.

◆ test_the_mass_ratio_error_this_caused()

test_pressurant_is_not_propellant.test_the_mass_ratio_error_this_caused ( )
Quantifies the defect on the 180 lb / 11 L point, so the fix has a number on it.

Two different numbers, and they are not the same size -- worth keeping straight:

  * the IDEAL rocket equation gains ~51 m/s from flying 1.551 kg of gas as propellant;
  * the SIMULATED trajectory only gained 183 ft of apogee (12522 -> 12339 ft at
    eta_c* 0.9315, measured A/B on this vehicle).

The trajectory effect is far smaller because the mass comes off gradually and the
flight is drag-dominated at Mach 0.87. Do not quote the 51 m/s as an apogee error.

Definition at line 38 of file test_pressurant_is_not_propellant.py.

◆ test_zero_flow_cannot_empty_the_tank()

test_pressurant_is_not_propellant.test_zero_flow_cannot_empty_the_tank ( )
The old model hit exactly -0.000 kg at burnout and RocketPy raised on it.

Definition at line 66 of file test_pressurant_is_not_propellant.py.

Variable Documentation

◆ FLIGHT_SIM

str test_pressurant_is_not_propellant.FLIGHT_SIM = Path(__file__).resolve().parents[1] / "ui" / "flight_sim.py"

Definition at line 16 of file test_pressurant_is_not_propellant.py.