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

Functions

TankSim _sim (float liquid_kg)
float _held (TankState state)
float _drain (TankSim sim, float dt, float mdot)
None test_asked_for_more_than_it_holds_it_gives_all_and_books_the_rest ()
None test_the_last_gram_is_delivered_not_dropped ()
None test_a_tank_with_enough_is_untouched ()

Detailed Description

A tank gives what it holds, and books what it was asked for beyond that.

``TankSim.advance`` used to stop the outflow altogether once a tank was down
to a gram, while the network that asked for it went on delivering it: up to a
step of propellant the engine burned and no vessel gave. The session now ends
a coupling step where a tank runs out (``Session._dry_cut``); this is the
vessel's backstop under it. Checked against the arithmetic of the inputs:
what left the tank plus what was booked is what was asked for.

Function Documentation

◆ _drain()

float test_tank_runs_dry._drain ( TankSim sim,
float dt,
float mdot )
protected
Advance with only a liquid outflow; return the mass that left [kg].

Definition at line 49 of file test_tank_runs_dry.py.

References _held().

Referenced by test_a_tank_with_enough_is_untouched(), test_asked_for_more_than_it_holds_it_gives_all_and_books_the_rest(), and test_the_last_gram_is_delivered_not_dropped().

◆ _held()

float test_tank_runs_dry._held ( TankState state)
protected

Definition at line 45 of file test_tank_runs_dry.py.

Referenced by _drain().

◆ _sim()

◆ test_a_tank_with_enough_is_untouched()

None test_tank_runs_dry.test_a_tank_with_enough_is_untouched ( )

Definition at line 82 of file test_tank_runs_dry.py.

References _drain(), and _sim().

◆ test_asked_for_more_than_it_holds_it_gives_all_and_books_the_rest()

None test_tank_runs_dry.test_asked_for_more_than_it_holds_it_gives_all_and_books_the_rest ( )

Definition at line 62 of file test_tank_runs_dry.py.

References _drain(), and _sim().

◆ test_the_last_gram_is_delivered_not_dropped()

None test_tank_runs_dry.test_the_last_gram_is_delivered_not_dropped ( )
Below DRY_MASS the tank is empty to the panel, but what it holds still
flows: zeroing it -- what this did -- refused the step without booking.

Definition at line 71 of file test_tank_runs_dry.py.

References _drain(), and _sim().