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

Functions

 _session (tuple[str,...] flip=(), **setup)
 _burn (bool network, tuple[str,...] flip=(), **setup)
 recorded ()
None test_off_is_the_old_trace_and_on_changes_no_physics ()
None test_run_burn_records_the_network_only_when_asked ()
None test_each_path_runs_bottle_to_chamber_and_telescopes (recorded)
None test_every_rung_is_its_own_component_at_the_recorded_flow (recorded)
None test_tank_head_carries_the_outflow_and_is_a_gain (recorded)
None test_metadata_reads_the_drawing (recorded)
str e_tank (list[str] path)
None test_a_line_drawn_backwards_is_reported_along_the_feed (recorded)

Variables

 STAR = Path(__file__).resolve().parents[3]
str STAND = STAR / "feed-twin" / "backend" / "diagrams" / "ethalox_stand.json"
str TABLES = STAR / "feed-twin" / "backend" / "statemachines"
str ENGINE = STAR / "EngineDesign" / "configs" / "ethalox_doublet_7000N.yaml"
str CEA = STAR / "EngineDesign" / "output" / "cache" / "cea_cache_LOX_Ethanol_3D.npz"
 pytestmark
 PLAN
dict TIGHT

Detailed Description

The opt-in full-network recorder (``Probes(network=True)``).

Two claims to hold it to. Off, a burn's trace is exactly what it always was, and
on, recording changes no physics: every probe column is bit-for-bit the same.
And the ladder it records is one solve's: along each side's path the rungs
telescope to the first node minus the last, the path really is contiguous from
a bottle to the chamber, and every rung's drop is what its own component gives
at the flow recorded beside it -- which is the check that flows, pressures and
orientation were read off the same solve and the same way round.

Function Documentation

◆ _burn()

test_network_trace._burn ( bool network,
tuple[str, ...] flip = (),
** setup )
protected

◆ _session()

test_network_trace._session ( tuple[str, ...] flip = (),
** setup )
protected
A session on the stand; ``flip`` names lines to draw the other way round.

Definition at line 52 of file test_network_trace.py.

Referenced by _burn(), and test_run_burn_records_the_network_only_when_asked().

◆ e_tank()

str test_network_trace.e_tank ( list[str] path)
The tank a path's head element belongs to.

Definition at line 254 of file test_network_trace.py.

◆ recorded()

test_network_trace.recorded ( )

Definition at line 87 of file test_network_trace.py.

References _burn().

◆ test_a_line_drawn_backwards_is_reported_along_the_feed()

None test_network_trace.test_a_line_drawn_backwards_is_reported_along_the_feed ( recorded)
The bottle's line drawn manifold-to-bottle: the network branch runs
against the feed, so the path must report it the feed's way round -- from
the bottle, positive flow, positive drop -- and flag it, with the same
numbers the line drawn the right way gives.

Definition at line 260 of file test_network_trace.py.

References _burn().

◆ test_each_path_runs_bottle_to_chamber_and_telescopes()

None test_network_trace.test_each_path_runs_bottle_to_chamber_and_telescopes ( recorded)

Definition at line 123 of file test_network_trace.py.

◆ test_every_rung_is_its_own_component_at_the_recorded_flow()

None test_network_trace.test_every_rung_is_its_own_component_at_the_recorded_flow ( recorded)
The drop recorded across a line or valve is the component's own loss at
the flow recorded beside it, priced at the upstream node of the same solve.
Reading a vessel node's post-step state instead, or a flow the wrong way
round, fails here.

The recorded temperature is the step's enthalpy walk, which runs *after* its
solve: the solve priced gas at the previous walk's temperature. So samples
where a gas node is still cooling fast (the first 0.1 s after Fire, 10-25 K a
step) are left out; elsewhere the two agree to ~0.1 %.

Definition at line 149 of file test_network_trace.py.

◆ test_metadata_reads_the_drawing()

None test_network_trace.test_metadata_reads_the_drawing ( recorded)

Definition at line 221 of file test_network_trace.py.

◆ test_off_is_the_old_trace_and_on_changes_no_physics()

None test_network_trace.test_off_is_the_old_trace_and_on_changes_no_physics ( )

Definition at line 91 of file test_network_trace.py.

References _burn().

◆ test_run_burn_records_the_network_only_when_asked()

None test_network_trace.test_run_burn_records_the_network_only_when_asked ( )

Definition at line 110 of file test_network_trace.py.

References _session().

◆ test_tank_head_carries_the_outflow_and_is_a_gain()

None test_network_trace.test_tank_head_carries_the_outflow_and_is_a_gain ( recorded)

Definition at line 202 of file test_network_trace.py.

Variable Documentation

◆ CEA

str test_network_trace.CEA = STAR / "EngineDesign" / "output" / "cache" / "cea_cache_LOX_Ethanol_3D.npz"

Definition at line 39 of file test_network_trace.py.

◆ ENGINE

str test_network_trace.ENGINE = STAR / "EngineDesign" / "configs" / "ethalox_doublet_7000N.yaml"

Definition at line 38 of file test_network_trace.py.

◆ PLAN

test_network_trace.PLAN
Initial value:
1= BurnPlan(
2 tank_psi=550.0, loads={"OXT": 6.0, "FUT": 4.0}, settle=False, lead_in_s=0.1,
3 horizon_s=0.3,
4)

Definition at line 46 of file test_network_trace.py.

◆ pytestmark

test_network_trace.pytestmark
Initial value:
1= pytest.mark.skipif(
2 not (STAND.exists() and TABLES.is_dir() and ENGINE.exists() and CEA.exists()),
3 reason="stand drawing, tables, engine config or CEA table absent",
4)

Definition at line 41 of file test_network_trace.py.

◆ STAND

str test_network_trace.STAND = STAR / "feed-twin" / "backend" / "diagrams" / "ethalox_stand.json"

Definition at line 36 of file test_network_trace.py.

◆ STAR

test_network_trace.STAR = Path(__file__).resolve().parents[3]

Definition at line 35 of file test_network_trace.py.

◆ TABLES

str test_network_trace.TABLES = STAR / "feed-twin" / "backend" / "statemachines"

Definition at line 37 of file test_network_trace.py.

◆ TIGHT

dict test_network_trace.TIGHT
Initial value:
1= {
2 "network_tolerance": 1.0e-7,
3 "chamber_tolerance_psi": 0.02,
4}

Definition at line 80 of file test_network_trace.py.