|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
The mixture-ratio split: is it exact, and does it blame the right half? The claim :mod:`feedtwin.engine.balance` makes is unusually strong for a diagnostic -- not "this correlates with" but "this is identically equal to". So the tests are correspondingly strict: the identity is checked to machine precision rather than to a tolerance, and the two terms are checked to be *independent* in the way the claim requires. A face ratio that moved when the plumbing changed would make the whole decomposition a lie, and it would be a comfortable lie -- the numbers would still add up.
|
protected |
A balance built from flows that genuinely obey the orifice law.
Definition at line 45 of file test_balance.py.
References _design(), and _orifice().
Referenced by test_a_leg_inside_its_band_draws_no_comment(), test_equal_drop_is_the_face_ratio(), test_face_ratio_does_not_move_with_the_plumbing(), test_face_ratio_matches_its_closed_form(), test_identity_is_exact(), test_notes_blame_the_face_when_the_face_is_wrong(), test_notes_blame_the_stand_when_the_face_is_right(), test_soft_leg_is_reported_and_stiff_one_is_not(), test_symmetric_injector_on_one_propellant_is_unity(), test_the_configs_band_is_used_over_the_rule_of_thumb(), test_the_rule_of_thumb_is_named_as_such_when_there_is_no_band(), test_too_stiff_is_reported_too(), test_trim_is_zero_when_already_on_design(), and test_trim_pressure_lands_on_the_design_ratio().
|
protected |
Definition at line 253 of file test_balance.py.
References _design().
Referenced by test_a_leg_inside_its_band_draws_no_comment(), test_the_configs_band_is_used_over_the_rule_of_thumb(), and test_too_stiff_is_reported_too().
|
protected |
A two-side engine with nothing in it but the areas that matter here.
Definition at line 27 of file test_balance.py.
Referenced by _balance(), _banded(), test_a_dead_leg_does_not_raise(), test_a_leg_flowing_backwards_does_not_raise(), test_face_ratio_matches_its_closed_form(), test_notes_blame_the_face_when_the_face_is_wrong(), test_notes_blame_the_stand_when_the_face_is_right(), test_symmetric_injector_on_one_propellant_is_unity(), test_trim_is_zero_when_already_on_design(), and test_trim_pressure_lands_on_the_design_ratio().
|
protected |
Definition at line 41 of file test_balance.py.
Referenced by _balance().
| None test_balance.test_a_band_is_read_off_the_real_config | ( | ) |
The end-to-end claim: this number comes out of EngineDesign's own file.
Definition at line 297 of file test_balance.py.
| None test_balance.test_a_dead_leg_does_not_raise | ( | ) |
Zero fuel flow is a real state during an ox lead. It must report zero rather than divide, because the start transient is sampled through it.
Definition at line 210 of file test_balance.py.
References _design().
| None test_balance.test_a_leg_flowing_backwards_does_not_raise | ( | ) |
An Engine Abort with the mains open trickles: the chamber can sit above the ox injector inlet while fuel still drops forwards. sqrt(dp_ox/dp_fuel) of that raised a math domain error, and the cockpit's /history failed on every frame until the stand was reset (D-53).
Definition at line 229 of file test_balance.py.
References _design().
| None test_balance.test_a_leg_inside_its_band_draws_no_comment | ( | ) |
Definition at line 282 of file test_balance.py.
References _balance(), and _banded().
| None test_balance.test_equal_drop_is_the_face_ratio | ( | ) |
With both legs at the same drop, the stand contributes exactly nothing.
Definition at line 103 of file test_balance.py.
References _balance().
| None test_balance.test_face_ratio_does_not_move_with_the_plumbing | ( | ) |
Change only the pressure split; the face term must not budge. The independence claim. If the face ratio drifted with the feed system, the split would still sum correctly and would no longer localise the fault -- which is the only reason to compute it.
Definition at line 90 of file test_balance.py.
References _balance().
| None test_balance.test_face_ratio_matches_its_closed_form | ( | ) |
``Cd A sqrt(rho)`` on each side, computed independently.
Definition at line 110 of file test_balance.py.
References _balance(), and _design().
| None test_balance.test_feed_loss_never_goes_negative | ( | ) |
A supply below the chamber is a nonsense operating point, not a negative loss that would read as the plumbing adding pressure.
Definition at line 140 of file test_balance.py.
| None test_balance.test_identity_is_exact | ( | float | dp_ox, |
| float | dp_fuel ) |
``O/F == face_ratio * feed_term``, to floating point and no further. This is the whole basis of the decomposition. A tolerance here would hide exactly the algebra slip the test exists to catch, so it is checked at 1e-12 relative -- the residual on real solves comes out at 1e-16.
Definition at line 76 of file test_balance.py.
References _balance().
| None test_balance.test_notes_blame_the_face_when_the_face_is_wrong | ( | ) |
A face drilled off-design at a perfectly balanced stand must not be reported as a plumbing problem -- that sends the wrong person to work.
Definition at line 160 of file test_balance.py.
References _balance(), and _design().
| None test_balance.test_notes_blame_the_stand_when_the_face_is_right | ( | ) |
Definition at line 169 of file test_balance.py.
References _balance(), and _design().
| None test_balance.test_soft_leg_is_reported_and_stiff_one_is_not | ( | ) |
Definition at line 150 of file test_balance.py.
References _balance().
| None test_balance.test_stiffness_is_the_share_of_chamber_pressure | ( | ) |
Definition at line 134 of file test_balance.py.
| None test_balance.test_symmetric_injector_on_one_propellant_is_unity | ( | ) |
Same area, same fluid, same drop -- there is nowhere for a ratio to come from, and a decomposition that produced one would be inventing it.
Definition at line 120 of file test_balance.py.
References _balance(), and _design().
| None test_balance.test_the_configs_band_is_used_over_the_rule_of_thumb | ( | ) |
EngineDesign states injector_dp_ratio_{O,F}_min in its own config. That
is what the optimiser was constrained by; the 20% rule is only the fallback
for a config that says nothing.
Definition at line 264 of file test_balance.py.
References _balance(), and _banded().
| None test_balance.test_the_rule_of_thumb_is_named_as_such_when_there_is_no_band | ( | ) |
Definition at line 276 of file test_balance.py.
References _balance().
| None test_balance.test_too_stiff_is_reported_too | ( | ) |
The band has an upper bound and the rule of thumb does not. Past it the injector is spending tank pressure the design did not mean to spend.
Definition at line 288 of file test_balance.py.
References _balance(), and _banded().
| None test_balance.test_trim_is_zero_when_already_on_design | ( | ) |
Definition at line 196 of file test_balance.py.
References _balance(), and _design().
| None test_balance.test_trim_pressure_lands_on_the_design_ratio | ( | ) |
Apply the recommended fuel-side drop and the O/F must come out right. Checked by rebuilding the balance at the trimmed drop rather than by re-deriving the formula, so an algebra error in :meth:`trim_pressure` cannot be reproduced by the test that is supposed to catch it.
Definition at line 179 of file test_balance.py.
References _balance(), and _design().