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

Functions

 _x (eps=EPS, lstar=LSTAR, ang=(43.0, 46.0), n=24, P=583.1)
 _constants (**over)
 _req (**over)
 _result (**over)
 _hand_lengths (theta=math.radians(45.0))
 test_objective_scores_the_chamber_the_config_builds ()
 test_engine_length_is_face_to_throat_plus_the_rao_bell ()
 test_bell_length_matches_the_drawn_rao_contour (eps)
 test_inline_objective_is_the_worker_objective ()
 test_mass_term_without_pc_target_does_not_crash ()
 test_configured_momentum_band_reaches_the_objective ()
 test_require_stable_state_rejects_marginal ()
 test_signoff_rejects_a_chug_margin_below_the_floor ()
 test_free_jet_beyond_sp8089_is_infeasible ()
 test_failed_evaluations_never_score_as_feasible ()
 test_closure_plate_is_sized_by_roark_fixed_edge ()

Variables

 ROOT = Path(__file__).resolve().parents[1]
float AT = 1.533694488707181e-3
float BORE = 0.127
float WALL = 0.0381
float LSTAR = 1.0000002573548417
float EPS = 5.598521540485944
float PC = 2.972e6

Detailed Description

One Layer-1 objective, scored on the chamber and engine that are actually drawn.

L1-03 / CN-3: the worker and inline objectives were two implementations that disagreed by
~300 points on one design (worker cone to R_t, clipped at 1 m; config cone to r_tan). Both now
call ``_compute_objective_value``. CN-9: engine length was cone + 0.8 D_exit instead of
face-to-throat + the 80 % Rao bell the contour draws. L1-06, L1-09, L1-10, L1-11 and INJ-7 are
defects in the same scoring function.

Expected numbers come from hand geometry (frustum + entrance arc, H&H ch. 4) and the Rao
contour generator, never from the function under test.

Function Documentation

◆ _constants()

◆ _hand_lengths()

test_layer1_objective_unified._hand_lengths ( theta = math.radians(45.0))
protected
Frustum-plus-arc chamber, by hand (H&H ch. 4 geometry), independent of the module.

Definition at line 78 of file test_layer1_objective_unified.py.

Referenced by test_engine_length_is_face_to_throat_plus_the_rao_bell(), and test_objective_scores_the_chamber_the_config_builds().

◆ _req()

◆ _result()

◆ _x()

◆ test_bell_length_matches_the_drawn_rao_contour()

test_layer1_objective_unified.test_bell_length_matches_the_drawn_rao_contour ( eps)

Definition at line 129 of file test_layer1_objective_unified.py.

◆ test_closure_plate_is_sized_by_roark_fixed_edge()

test_layer1_objective_unified.test_closure_plate_is_sized_by_roark_fixed_edge ( )
The face-closure thickness in the chamber-mass proxy used t = a sqrt(0.3 p / sigma),
37 % thinner than Roark's fixed-edge plate, sigma_max = 3 p a^2 / (4 t^2).

Definition at line 244 of file test_layer1_objective_unified.py.

◆ test_configured_momentum_band_reaches_the_objective()

test_layer1_objective_unified.test_configured_momentum_band_reaches_the_objective ( )
L1-09: the free band was [1/1.05, 1.05] whatever impinging_momentum_R_min/max said.

Definition at line 149 of file test_layer1_objective_unified.py.

References _constants(), _req(), _result(), and _x().

◆ test_engine_length_is_face_to_throat_plus_the_rao_bell()

test_layer1_objective_unified.test_engine_length_is_face_to_throat_plus_the_rao_bell ( )
CN-9: face-to-exit length of the drawn engine is 244.1 mm here (CN-1 contour
integration); the estimate used 214-224 mm and let a 240 mm limit through.

Definition at line 114 of file test_layer1_objective_unified.py.

References _constants(), _hand_lengths(), _req(), _result(), and _x().

◆ test_failed_evaluations_never_score_as_feasible()

test_layer1_objective_unified.test_failed_evaluations_never_score_as_feasible ( )
L1-11: after 200 consecutive failures the inline objective returned 1e5, which
counts as feasible and beats every infeasible-but-evaluable design.

Definition at line 207 of file test_layer1_objective_unified.py.

References min.

◆ test_free_jet_beyond_sp8089_is_infeasible()

test_layer1_objective_unified.test_free_jet_beyond_sp8089_is_infeasible ( )
INJ-7: axial standoff 4 d_avg at 60/60 deg is 8 d along each jet (> 7 d).

Definition at line 187 of file test_layer1_objective_unified.py.

References _constants(), _req(), _result(), and _x().

◆ test_inline_objective_is_the_worker_objective()

test_layer1_objective_unified.test_inline_objective_is_the_worker_objective ( )
L1-03: the closure must not keep a second scoring (obj_quality sum of its own).

Definition at line 135 of file test_layer1_objective_unified.py.

◆ test_mass_term_without_pc_target_does_not_crash()

test_layer1_objective_unified.test_mass_term_without_pc_target_does_not_crash ( )
L1-06: Pc_actual was bound only inside the Pc-target branch (UnboundLocalError).

Definition at line 142 of file test_layer1_objective_unified.py.

References _constants(), _req(), _result(), and _x().

◆ test_objective_scores_the_chamber_the_config_builds()

test_layer1_objective_unified.test_objective_scores_the_chamber_the_config_builds ( )
CN-3: the mass term uses the chamber length _layer1_apply_chamber_geometry_to_config
writes. The worker used a cone to R_t (140.2 mm here) against 130.5 mm built.

Definition at line 95 of file test_layer1_objective_unified.py.

References _constants(), _hand_lengths(), _req(), _result(), and _x().

◆ test_require_stable_state_rejects_marginal()

test_layer1_objective_unified.test_require_stable_state_rejects_marginal ( )
L1-10: 'Require stable (not just marginal)' allowed {'stable', 'marginal'}.

Definition at line 163 of file test_layer1_objective_unified.py.

References _constants(), _req(), _result(), and _x().

◆ test_signoff_rejects_a_chug_margin_below_the_floor()

test_layer1_objective_unified.test_signoff_rejects_a_chug_margin_below_the_floor ( )
L1-10: a hidden 5 % let a chug gate margin of 0.9975 pass a 1.05 floor.

Definition at line 173 of file test_layer1_objective_unified.py.

Variable Documentation

◆ AT

float test_layer1_objective_unified.AT = 1.533694488707181e-3

Definition at line 28 of file test_layer1_objective_unified.py.

◆ BORE

float test_layer1_objective_unified.BORE = 0.127

Definition at line 29 of file test_layer1_objective_unified.py.

◆ EPS

float test_layer1_objective_unified.EPS = 5.598521540485944

Definition at line 32 of file test_layer1_objective_unified.py.

◆ LSTAR

float test_layer1_objective_unified.LSTAR = 1.0000002573548417

Definition at line 31 of file test_layer1_objective_unified.py.

◆ PC

float test_layer1_objective_unified.PC = 2.972e6

Definition at line 33 of file test_layer1_objective_unified.py.

◆ ROOT

test_layer1_objective_unified.ROOT = Path(__file__).resolve().parents[1]

Definition at line 25 of file test_layer1_objective_unified.py.

◆ WALL

float test_layer1_objective_unified.WALL = 0.0381

Definition at line 30 of file test_layer1_objective_unified.py.