|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| STAR = Path(__file__).resolve().parents[3] | |
| str | STAND = STAR / "feed-twin" / "backend" / "diagrams" / "copv_study_gn2.json" |
| str | TABLES = STAR / "feed-twin" / "backend" / "statemachines" |
| str | ENGINE = STAR / "EngineDesign" / "configs" / "ethalox_doublet_7000N.yaml" |
| needs_stand | |
Engine cards: another tool's injector and chamber, tabulated (feedtwin.engine.card). Checked against things the card cannot fake: * the interpolant reproduces its nodes and any linear function exactly; * ``dp = (mdot/phi)^2`` holds for any flow, signed; * ``F + p_a A_e`` is the same at every ambient pressure; * ``p_c = mdot c*/A_t`` holds without a fixed point; * a burn on a card with constant tables gives exactly that chamber pressure, step by step, through the twin's network and chamber closure. And the opt-in rule: an injector without a card behaves exactly as before.
|
protected |
A short GN2 burn on a constant card: phi 1.6e-3, c* 1520 m/s.
Definition at line 273 of file test_engine_card.py.
References constant_card().
Referenced by test_a_burn_off_the_injector_card_counts_as_extrapolated(), test_a_burn_on_a_card_runs_the_cards_engine_at_every_step(), and test_a_caller_can_ask_the_network_for_the_cards_drop_to_the_closures_tolerance().
| EngineCard test_engine_card.constant_card | ( | float | cstar = 1550.0, |
| float | vvac = 2600.0, | ||
| float | phi = 1.7e-3, | ||
| float | throat = 1.8e-3, | ||
| float | exit_area = 8.7e-3, | ||
| tuple[tuple[float, float], ...] | injector_hull = ( (0.0, 0.0), (100.0, 0.0), (100.0, 1e8), (0.0, 1e8), ) ) |
Definition at line 52 of file test_engine_card.py.
Referenced by _card_burn(), test_a_card_chamber_off_its_hull_says_so(), test_a_card_refuses_a_design_with_a_different_throat(), test_a_card_round_trips_through_json(), test_an_injector_leg_off_its_card_says_so(), test_an_injector_leg_uses_its_card_and_only_when_it_has_one(), test_card_chamber_pressure_and_thrust_follow_the_tables(), test_fill_time_uses_the_cards_cstar(), test_injector_card_is_the_orifice_relation_on_its_capacity(), test_reverse_flow_through_a_carded_leg_loses_pressure_backwards(), and test_thrust_plus_ambient_times_exit_area_does_not_depend_on_ambient().
| Table2D test_engine_card.table | ( | fn, | |
| x = (0.0, 1.0, 5), | |||
| y = (0.0, 2.0, 4) ) |
Definition at line 34 of file test_engine_card.py.
| None test_engine_card.test_a_burn_off_the_injector_card_counts_as_extrapolated | ( | ) |
Every injector lookup of this burn is below the card's sampled inlet pressures, so every firing step is outside what the card knows, and the step's flag says so as it does for the chamber's own table.
Definition at line 428 of file test_engine_card.py.
References _card_burn().
| None test_engine_card.test_a_burn_on_a_card_runs_the_cards_engine_at_every_step | ( | ) |
Constant tables make the chamber closed-form: p_c = mdot c*/A_t, and the injector drop is (mdot/phi)^2. Every firing step of a burn through the twin's network and chamber closure has to satisfy both, to the closure's tolerance.
Definition at line 316 of file test_engine_card.py.
References _card_burn().
| None test_engine_card.test_a_caller_can_ask_the_network_for_the_cards_drop_to_the_closures_tolerance | ( | pytest.MonkeyPatch | monkeypatch | ) |
Opting into a tight network tolerance has to buy the injector drop, not a burn of held flows. At 1e-5 this burn used to fail 36 of 45 solves: the regulator's outlet stepped 1.7 kPa across zero flow with the tanks primed inside the step, and a carded leg run backwards gained pressure. Both rows had no root, and the residual floor was 2.5e-5. With both closed it converges at every step, and what is left of the injector error is the chamber closure's own 0.01 psi against ~0.9 MPa of drop.
Definition at line 340 of file test_engine_card.py.
References _card_burn().
| None test_engine_card.test_a_card_chamber_off_its_hull_says_so | ( | ) |
Definition at line 230 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_a_card_refuses_a_design_with_a_different_throat | ( | ) |
Definition at line 186 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_a_card_round_trips_through_json | ( | ) |
Definition at line 249 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_an_injector_leg_off_its_card_says_so | ( | ) |
The leg reports whether its lookup was inside the hull the card was fitted to, as the chamber does; Table2D clamps silently outside its box.
Definition at line 400 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_an_injector_leg_uses_its_card_and_only_when_it_has_one | ( | ) |
Definition at line 122 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_card_chamber_pressure_and_thrust_follow_the_tables | ( | ) |
Definition at line 206 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_fill_time_uses_the_cards_cstar | ( | ) |
Definition at line 241 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_injector_card_is_the_orifice_relation_on_its_capacity | ( | ) |
Definition at line 105 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_reverse_flow_through_a_carded_leg_loses_pressure_backwards | ( | ) |
``total_dp`` is what the network solves with, and run backwards an orifice drops pressure backwards: it is odd in the flow, carded or not. The card's own relation is signed, and the leg used to hand that signed drop to a base class that signs it again, so reverse flow came out as a pressure *rise*, ``+(mdot/phi)^2``. A chamber closure that brackets the chamber up to the higher tank's pressure asks the other leg to run backwards; it had no root there, and a network solve asked for better than ~3e-5 stalled at the bottom of the parabola.
Definition at line 153 of file test_engine_card.py.
References constant_card().
| None test_engine_card.test_table_clamps_outside_its_box | ( | ) |
Definition at line 90 of file test_engine_card.py.
| None test_engine_card.test_table_refuses_values_that_do_not_match_its_axes | ( | ) |
Definition at line 97 of file test_engine_card.py.
| None test_engine_card.test_table_reproduces_its_nodes_and_any_linear_function | ( | ) |
Definition at line 79 of file test_engine_card.py.
| None test_engine_card.test_the_hull_includes_its_own_edges | ( | ) |
Every sample the card was built from is inside its hull, the corners and the far edges included; a hair outside is not. Plain ray casting kept only two of a square's four edges.
Definition at line 379 of file test_engine_card.py.
| None test_engine_card.test_thrust_plus_ambient_times_exit_area_does_not_depend_on_ambient | ( | ) |
Definition at line 218 of file test_engine_card.py.
References constant_card().
| str test_engine_card.ENGINE = STAR / "EngineDesign" / "configs" / "ethalox_doublet_7000N.yaml" |
Definition at line 264 of file test_engine_card.py.
| test_engine_card.needs_stand |
Definition at line 267 of file test_engine_card.py.
| str test_engine_card.STAND = STAR / "feed-twin" / "backend" / "diagrams" / "copv_study_gn2.json" |
Definition at line 262 of file test_engine_card.py.
| test_engine_card.STAR = Path(__file__).resolve().parents[3] |
Definition at line 261 of file test_engine_card.py.
| str test_engine_card.TABLES = STAR / "feed-twin" / "backend" / "statemachines" |
Definition at line 263 of file test_engine_card.py.