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

Functions

 parts ()
Tank build (parts, **kwargs)
TankState loaded (parts, *, float vapour_mass=0.0, float wall=293.15)
None test_the_default_tank_is_unchanged (parts)
None test_with_no_vapour_all_interfacial_heat_warms_the_liquid (parts)
None test_chilldown_is_off_until_given_a_conductance (parts)
None test_a_saturated_surface_boils_instead_of_warming (parts)
None test_the_boil_off_rate_is_the_heat_over_the_latent_heat (parts)
None test_latent_heat_matches_the_handbook (parts)
None test_boil_off_is_lost_from_the_liquid (parts)
None test_vapour_adds_partial_pressure (parts)
None test_chilldown_boils_the_propellant (parts)
None test_a_trace_of_vapour_does_not_invert_the_tank_pressure (parts)
None test_vapour_carries_no_foreign_enthalpy_into_the_ullage (parts)
None test_the_step_carries_vapour_forward (parts)
None test_vapour_mass_cannot_go_negative (parts)
None test_models_are_named_and_registered ()
tuple[Tank, TankState] primed (parts, **kwargs)
None test_a_dry_prime_is_unchanged (parts)
None test_a_held_interface_starts_at_its_saturation_pressure (parts)
None test_a_dry_prime_boils_onto_lockup_and_a_held_one_does_not (parts)
None test_no_ambient_is_exactly_the_old_tank (parts)
 leaky (parts, **kwargs)
TankState vented (tank, parts)
None test_a_lox_tank_at_atmosphere_with_the_vent_shut_climbs (parts)
None test_a_pressed_lox_tank_does_not_boil_at_the_wall (parts)
None test_wall_boiling_off_is_the_old_tank (parts)
None test_a_vent_takes_the_vapour_with_the_pressurant (parts)
None test_ethanol_vapour_is_priced_as_a_gas ()
object _exchange (float q, float partial_over_sat)
None test_heat_into_a_subsaturated_surface_evaporates_it ()
None test_a_subsaturated_surface_losing_heat_does_not_condense ()
None test_a_supersaturated_surface_losing_heat_condenses ()
None test_a_supersaturated_surface_gaining_heat_warms_and_does_not_condense ()
None test_a_vented_ethanol_tank_losing_heat_makes_no_liquid ()

Variables

float PSI = 6894.757293168361

Detailed Description

Phase 14: propellant vapour in the ullage, and chilldown.

Both are opt-in. The first thing every test here establishes is that turning
them off leaves the tank exactly as it was, because a physics option that
perturbs the default is not an option, it is a regression.

Function Documentation

◆ _exchange()

object test_vapour._exchange ( float q,
float partial_over_sat )
protected

◆ build()

◆ leaky()

test_vapour.leaky ( parts,
** kwargs )
A LOX tank someone loaded a while ago: chilled wetted wall, the room
leaking in through the skin, the wall allowed to boil what reaches it.

Definition at line 298 of file test_vapour.py.

References build().

Referenced by test_a_lox_tank_at_atmosphere_with_the_vent_shut_climbs(), and test_a_pressed_lox_tank_does_not_boil_at_the_wall().

◆ loaded()

◆ parts()

test_vapour.parts ( )

Definition at line 31 of file test_vapour.py.

◆ primed()

◆ test_a_dry_prime_boils_onto_lockup_and_a_held_one_does_not()

None test_vapour.test_a_dry_prime_boils_onto_lockup_and_a_held_one_does_not ( parts)
The symptom. Primed dry, saturated LOX boils its vapour *after* the
regulator has locked up at the total, and the tank ends above it. Primed
with the interface in equilibrium, the vapour is already there and only
the collapse cooling moves the pressure -- downward, as it should.

Definition at line 262 of file test_vapour.py.

References primed().

◆ test_a_dry_prime_is_unchanged()

None test_vapour.test_a_dry_prime_is_unchanged ( parts)
No vapour model, or an interface a moment old: no vapour, as before.

Definition at line 231 of file test_vapour.py.

References build(), and primed().

◆ test_a_held_interface_starts_at_its_saturation_pressure()

None test_vapour.test_a_held_interface_starts_at_its_saturation_pressure ( parts)
Loaded LOX has been boiling into its ullage the whole hold. The tank
starts with that vapour in it, and the *total* is still what was asked.

Definition at line 248 of file test_vapour.py.

References primed().

◆ test_a_lox_tank_at_atmosphere_with_the_vent_shut_climbs()

None test_vapour.test_a_lox_tank_at_atmosphere_with_the_vent_shut_climbs ( parts)
Wall a few kelvin above saturation at one atmosphere: it boils at the
wall and the shut tank climbs -- a few psi a second on a small ullage,
slowing as the rising pressure lifts the saturation temperature toward
the wall's. Without the leak the wall cools to the liquid and it stops.

Definition at line 327 of file test_vapour.py.

References build(), leaky(), and vented().

◆ test_a_pressed_lox_tank_does_not_boil_at_the_wall()

None test_vapour.test_a_pressed_lox_tank_does_not_boil_at_the_wall ( parts)
At 38 bar of helium the liquid is a hundred kelvin subcooled: a wall a
few kelvin warm grows no bubbles, the leak warms the bulk, and the tank
holds. That is why a pressed LOX tank does not run away.

Definition at line 364 of file test_vapour.py.

References leaky(), and primed().

◆ test_a_saturated_surface_boils_instead_of_warming()

None test_vapour.test_a_saturated_surface_boils_instead_of_warming ( parts)
One statement: a liquid at saturation cannot warm, so heat boils it.

Definition at line 99 of file test_vapour.py.

References build(), and loaded().

◆ test_a_subsaturated_surface_losing_heat_does_not_condense()

None test_vapour.test_a_subsaturated_surface_losing_heat_does_not_condense ( )
No vapour at all over the surface, and the surface losing 3 W to a
colder gas: it cools. It used to condense 3.3 mg/s of vapour that was not
there -- liquid out of nothing (LE4 (3)'s vented ethanol tank).

Definition at line 460 of file test_vapour.py.

References _exchange().

◆ test_a_supersaturated_surface_gaining_heat_warms_and_does_not_condense()

None test_vapour.test_a_supersaturated_surface_gaining_heat_warms_and_does_not_condense ( )
Heat arriving cannot pay for condensation; it warms the surface until
its own vapour pressure meets the partial pressure.

Definition at line 474 of file test_vapour.py.

References _exchange().

◆ test_a_supersaturated_surface_losing_heat_condenses()

None test_vapour.test_a_supersaturated_surface_losing_heat_condenses ( )

Definition at line 468 of file test_vapour.py.

References _exchange().

◆ test_a_trace_of_vapour_does_not_invert_the_tank_pressure()

None test_vapour.test_a_trace_of_vapour_does_not_invert_the_tank_pressure ( parts)
A microgram of oxygen in half a litre is 0.002 kg/m^3, and CoolProp's
Helmholtz formulation returns **-6057 psi** there. One such sample used to
take the whole tank pressure negative and every solve after it with it.

Below ~1 kg/m^3 the gas is ideal to well under a tenth of a percent, so the
ideal answer is the better number, not a fallback.

Definition at line 155 of file test_vapour.py.

References build(), and loaded().

◆ test_a_vent_takes_the_vapour_with_the_pressurant()

None test_vapour.test_a_vent_takes_the_vapour_with_the_pressurant ( parts)
A well-mixed ullage leaves through the vent as it is: the caller splits
the outflow by mass fraction and hands the vapour share here.

Definition at line 400 of file test_vapour.py.

References build(), and primed().

◆ test_a_vented_ethanol_tank_losing_heat_makes_no_liquid()

None test_vapour.test_a_vented_ethanol_tank_losing_heat_makes_no_liquid ( )
LE4 (3)'s fuel tank in Ox Fill: vented at atmosphere, no vapour, gas 3 K
under the liquid and the wall a tenth of a kelvin under it, with the
cockpit's surface layer. The liquid gained 3.3 mg/s and the layer warmed
above the bulk, the gas, the wall and the room.

Definition at line 481 of file test_vapour.py.

◆ test_boil_off_is_lost_from_the_liquid()

None test_vapour.test_boil_off_is_lost_from_the_liquid ( parts)
A tank that has been boiling has less in it than the load sheet says.

Definition at line 123 of file test_vapour.py.

References build(), and loaded().

◆ test_chilldown_boils_the_propellant()

None test_vapour.test_chilldown_boils_the_propellant ( parts)
The two features are one phase because they are one mechanism: a warm
wall under the liquid is what boils a cryogen off during a load.

Definition at line 139 of file test_vapour.py.

References build(), and loaded().

◆ test_chilldown_is_off_until_given_a_conductance()

None test_vapour.test_chilldown_is_off_until_given_a_conductance ( parts)

Definition at line 90 of file test_vapour.py.

References build(), and loaded().

◆ test_ethanol_vapour_is_priced_as_a_gas()

None test_vapour.test_ethanol_vapour_is_priced_as_a_gas ( )
R/M, not the equation of state at a state where ethanol is a liquid: a
fuel tank primed at 293 K holds a fraction of a gram of vapour, not a
hundred and twenty.

Definition at line 411 of file test_vapour.py.

◆ test_heat_into_a_subsaturated_surface_evaporates_it()

None test_vapour.test_heat_into_a_subsaturated_surface_evaporates_it ( )
The case 1.5 checks: unchanged.

Definition at line 453 of file test_vapour.py.

References _exchange().

◆ test_latent_heat_matches_the_handbook()

None test_vapour.test_latent_heat_matches_the_handbook ( parts)
LOX at its normal boiling point is about 213 kJ/kg.

Definition at line 115 of file test_vapour.py.

◆ test_models_are_named_and_registered()

None test_vapour.test_models_are_named_and_registered ( )

Definition at line 206 of file test_vapour.py.

◆ test_no_ambient_is_exactly_the_old_tank()

None test_vapour.test_no_ambient_is_exactly_the_old_tank ( parts)

Definition at line 286 of file test_vapour.py.

References build(), and primed().

◆ test_the_boil_off_rate_is_the_heat_over_the_latent_heat()

None test_vapour.test_the_boil_off_rate_is_the_heat_over_the_latent_heat ( parts)
`mdot = q / h_fg`, checked against the latent heat directly.

Definition at line 107 of file test_vapour.py.

References build(), and loaded().

◆ test_the_default_tank_is_unchanged()

None test_vapour.test_the_default_tank_is_unchanged ( parts)

Definition at line 73 of file test_vapour.py.

References build(), and loaded().

◆ test_the_step_carries_vapour_forward()

None test_vapour.test_the_step_carries_vapour_forward ( parts)
A `TankState` rebuilt field by field silently drops anything added to the
dataclass later, which is how this reset to zero every step.

Definition at line 187 of file test_vapour.py.

References build(), and loaded().

◆ test_vapour_adds_partial_pressure()

None test_vapour.test_vapour_adds_partial_pressure ( parts)
Dalton: the ullage is pressurant plus vapour, not one or the other.

Definition at line 130 of file test_vapour.py.

References build(), and loaded().

◆ test_vapour_carries_no_foreign_enthalpy_into_the_ullage()

None test_vapour.test_vapour_carries_no_foreign_enthalpy_into_the_ullage ( parts)
`ullage.energy` is the *pressurant's* internal energy in the pressurant's
reference state. Saturated LOX sits at -133.7 kJ/kg while helium at ullage
conditions is +628.6 kJ/kg -- adding one into the other is a category error,
and with two grams of helium in the ullage it inverts the state in one step.

So boil-off contributes mass and partial pressure, never an energy term.

Definition at line 172 of file test_vapour.py.

References build(), and loaded().

◆ test_vapour_mass_cannot_go_negative()

None test_vapour.test_vapour_mass_cannot_go_negative ( parts)

Definition at line 196 of file test_vapour.py.

References build(), and loaded().

◆ test_wall_boiling_off_is_the_old_tank()

None test_vapour.test_wall_boiling_off_is_the_old_tank ( parts)

Definition at line 382 of file test_vapour.py.

References build(), and vented().

◆ test_with_no_vapour_all_interfacial_heat_warms_the_liquid()

None test_vapour.test_with_no_vapour_all_interfacial_heat_warms_the_liquid ( parts)
The old behaviour, stated as a property rather than left implied.

Definition at line 82 of file test_vapour.py.

References build(), and loaded().

◆ vented()

TankState test_vapour.vented ( tank,
parts )
Loaded, at atmosphere with the vent just shut, wall a hair above the
liquid: the state a tank is in the moment somebody closes its vent.

Definition at line 312 of file test_vapour.py.

Referenced by test_a_lox_tank_at_atmosphere_with_the_vent_shut_climbs(), and test_wall_boiling_off_is_the_old_tank().

Variable Documentation

◆ PSI

float test_vapour.PSI = 6894.757293168361

Definition at line 27 of file test_vapour.py.