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

Functions

dict _dump (path)
dict _ui_switch (dict cfg, **body)
dict _new_ethalox_doublet ()
 test_new_ethalox_doublet_gets_the_ethalox_design_point ()
 test_chamber_gas_follows_the_o_f_target_from_cea ()
 test_preset_lox_properties_are_coolprop_oxygen (preset)
 test_new_design_lox_is_the_presets ()
 test_session_start_config_names_its_propellant_and_the_switch_flags_the_seed ()
 test_a_preset_less_config_is_recognised_from_its_fluids ()
 test_reselecting_the_live_propellant_keeps_the_users_o_f ()
 test_doublet_keeps_the_chosen_propellant_and_the_users_requirements ()
 test_ethalox_round_trip_through_pintle_stays_ethalox ()
 test_custom_propellant_survives_an_injector_swap ()
 test_a_measured_cd_survives_propellant_switches ()
dict _blank_via_canonical ()
 test_new_doublet_has_the_injector_face_guards (build)
 test_momentum_weight_is_the_code_default_not_a_ban ()
 test_session_start_and_canonical_doublet_agree_on_the_objective ()
 test_included_angle_band_stays_inside_the_face_heating_limit ()
 test_shipped_dp_band_is_written_as_used ()
 test_schema_description_states_the_code_fallback (field, code_default)
 test_every_new_requirement_field_is_documented ()
 test_legacy_dp_band_rewrite_is_not_silent (caplog)
 test_chamber_gas_derivation_never_opens_a_table_it_would_rebuild (monkeypatch)

Variables

 REPO = Path(__file__).resolve().parents[1]
float CEA_ETHALOX_OF15_430_TC = 3225.45
float CEA_ETHALOX_OF15_430_R = 373.71
tuple COOLPROP_LOX_K = (0.938e9, 0.983e9)
float COOLPROP_LOX_CP = 1698.6
tuple COOLPROP_LOX_MU = (1.957e-4, 2.034e-4)
tuple GUARDS

Detailed Description

What a user gets from a NEW design: session start, Doublet, Ethalox (DEF-01..12 defaults).

The UI builds a new design through the backend's own sequence: a fresh session loads
configs/default.yaml, each dropdown is POST /api/config/switch (config_to_dict -> switch_config ->
PintleEngineConfig), and the Layer 1 "Run" on a pintle design switches to impinging the same way.
These tests build the design exactly so, and check it against numbers that do not come from this
codebase: CEA (rocketcea) and CoolProp, quoted with the conditions they were read at.

Function Documentation

◆ _blank_via_canonical()

dict test_new_design_defaults._blank_via_canonical ( )
protected

Definition at line 177 of file test_new_design_defaults.py.

References _ui_switch().

◆ _dump()

◆ _new_ethalox_doublet()

◆ _ui_switch()

◆ test_a_measured_cd_survives_propellant_switches()

test_new_design_defaults.test_a_measured_cd_survives_propellant_switches ( )

Definition at line 153 of file test_new_design_defaults.py.

References _dump(), and _ui_switch().

◆ test_a_preset_less_config_is_recognised_from_its_fluids()

test_new_design_defaults.test_a_preset_less_config_is_recognised_from_its_fluids ( )

Definition at line 97 of file test_new_design_defaults.py.

References _dump().

◆ test_chamber_gas_derivation_never_opens_a_table_it_would_rebuild()

test_new_design_defaults.test_chamber_gas_derivation_never_opens_a_table_it_would_rebuild ( monkeypatch)
CEACache deletes and rebuilds a table whose grid differs from the request; a dropdown
toggle must not trigger that (minutes of CEA, and the shipped table gone).

Definition at line 264 of file test_new_design_defaults.py.

References _new_ethalox_doublet().

◆ test_chamber_gas_follows_the_o_f_target_from_cea()

test_new_design_defaults.test_chamber_gas_follows_the_o_f_target_from_cea ( )

Definition at line 66 of file test_new_design_defaults.py.

References _new_ethalox_doublet().

◆ test_custom_propellant_survives_an_injector_swap()

test_new_design_defaults.test_custom_propellant_survives_an_injector_swap ( )

Definition at line 142 of file test_new_design_defaults.py.

References _dump(), and _ui_switch().

◆ test_doublet_keeps_the_chosen_propellant_and_the_users_requirements()

test_new_design_defaults.test_doublet_keeps_the_chosen_propellant_and_the_users_requirements ( )

Definition at line 115 of file test_new_design_defaults.py.

References _ui_switch().

◆ test_ethalox_round_trip_through_pintle_stays_ethalox()

test_new_design_defaults.test_ethalox_round_trip_through_pintle_stays_ethalox ( )

Definition at line 133 of file test_new_design_defaults.py.

References _dump(), and _ui_switch().

◆ test_every_new_requirement_field_is_documented()

test_new_design_defaults.test_every_new_requirement_field_is_documented ( )
Fields added tonight by the flight and Layer 1 owners must say what they do.

Definition at line 245 of file test_new_design_defaults.py.

◆ test_included_angle_band_stays_inside_the_face_heating_limit()

test_new_design_defaults.test_included_angle_band_stays_inside_the_face_heating_limit ( )

Definition at line 216 of file test_new_design_defaults.py.

◆ test_legacy_dp_band_rewrite_is_not_silent()

test_new_design_defaults.test_legacy_dp_band_rewrite_is_not_silent ( caplog)
DEF-10 (partial): until the schema and optimizer rewrites are removed together, the rewrite
of a typed 0.15-0.35 band must at least be reported.

Definition at line 255 of file test_new_design_defaults.py.

◆ test_momentum_weight_is_the_code_default_not_a_ban()

test_new_design_defaults.test_momentum_weight_is_the_code_default_not_a_ban ( )

Definition at line 199 of file test_new_design_defaults.py.

◆ test_new_design_lox_is_the_presets()

test_new_design_defaults.test_new_design_lox_is_the_presets ( )

Definition at line 83 of file test_new_design_defaults.py.

References _new_ethalox_doublet().

◆ test_new_doublet_has_the_injector_face_guards()

test_new_design_defaults.test_new_doublet_has_the_injector_face_guards ( build)

Definition at line 182 of file test_new_design_defaults.py.

◆ test_new_ethalox_doublet_gets_the_ethalox_design_point()

test_new_design_defaults.test_new_ethalox_doublet_gets_the_ethalox_design_point ( )

Definition at line 55 of file test_new_design_defaults.py.

References _new_ethalox_doublet().

◆ test_preset_lox_properties_are_coolprop_oxygen()

test_new_design_defaults.test_preset_lox_properties_are_coolprop_oxygen ( preset)

Definition at line 74 of file test_new_design_defaults.py.

◆ test_reselecting_the_live_propellant_keeps_the_users_o_f()

test_new_design_defaults.test_reselecting_the_live_propellant_keeps_the_users_o_f ( )

Definition at line 106 of file test_new_design_defaults.py.

References _new_ethalox_doublet().

◆ test_schema_description_states_the_code_fallback()

test_new_design_defaults.test_schema_description_states_the_code_fallback ( field,
code_default )

Definition at line 240 of file test_new_design_defaults.py.

◆ test_session_start_and_canonical_doublet_agree_on_the_objective()

test_new_design_defaults.test_session_start_and_canonical_doublet_agree_on_the_objective ( )

Definition at line 205 of file test_new_design_defaults.py.

◆ test_session_start_config_names_its_propellant_and_the_switch_flags_the_seed()

test_new_design_defaults.test_session_start_config_names_its_propellant_and_the_switch_flags_the_seed ( )

Definition at line 90 of file test_new_design_defaults.py.

References _dump().

◆ test_shipped_dp_band_is_written_as_used()

test_new_design_defaults.test_shipped_dp_band_is_written_as_used ( )
DEF-10: the loader no longer has to rewrite default.yaml's band to make it the one used.

Definition at line 223 of file test_new_design_defaults.py.

Variable Documentation

◆ CEA_ETHALOX_OF15_430_R

float test_new_design_defaults.CEA_ETHALOX_OF15_430_R = 373.71

Definition at line 30 of file test_new_design_defaults.py.

◆ CEA_ETHALOX_OF15_430_TC

float test_new_design_defaults.CEA_ETHALOX_OF15_430_TC = 3225.45

Definition at line 29 of file test_new_design_defaults.py.

◆ COOLPROP_LOX_CP

float test_new_design_defaults.COOLPROP_LOX_CP = 1698.6

Definition at line 34 of file test_new_design_defaults.py.

◆ COOLPROP_LOX_K

tuple test_new_design_defaults.COOLPROP_LOX_K = (0.938e9, 0.983e9)

Definition at line 33 of file test_new_design_defaults.py.

◆ COOLPROP_LOX_MU

tuple test_new_design_defaults.COOLPROP_LOX_MU = (1.957e-4, 2.034e-4)

Definition at line 35 of file test_new_design_defaults.py.

◆ GUARDS

tuple test_new_design_defaults.GUARDS
Initial value:
1= (
2 "layer1_injector_spray_radius_frac", "layer1_injector_spray_radius_tol",
3 "layer1_injector_plate_thickness_m", "layer1_injector_min_web_m",
4 "layer1_injector_wall_clearance_m", "layer1_injector_min_face_incidence_deg",
5 "layer1_injector_counterbore_dia_m", "layer1_impinging_jet_angle_min_deg",
6 "layer1_max_element_pitch_m",
7)

Definition at line 168 of file test_new_design_defaults.py.

◆ REPO

test_new_design_defaults.REPO = Path(__file__).resolve().parents[1]

Definition at line 26 of file test_new_design_defaults.py.