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

Functions

 cea ()
 rc ()
 _rc_isp (rc, pc_psi, of, eps)
 _constants (**over)
 _setup ()
 test_objective_prefers_the_engine_that_delivers_more_isp ()
 test_isp_merit_holds_the_required_of (cea, rc)
 test_isp_merit_holds_a_pc_target_to_its_band (cea, rc)
 test_default_weights_price_chamber_mass_like_propellant (cea, rc)
 test_blank_design_lstar_is_no_longer_a_flat_direction (cea)
 test_out_of_table_of_target_designs_to_peak_isp (cea, rc)
 test_layer1_does_not_abort_on_an_out_of_table_of_target ()
 test_derived_expansion_ratio_puts_the_table_exit_pressure_at_ambient (cea, rc)

Variables

 rocketcea = pytest.importorskip("rocketcea.cea_obj")
 ROOT = Path(__file__).resolve().parents[1]
float PSI = 6894.757
float PA = 94070.0
float G0 = 9.80665

Detailed Description

Layer 1's figure of merit: delivered Isp against chamber mass (L1-02, DEF-07).

With no performance term the blank ethalox objective reached exactly 0 for any feasible engine,
so six seeds returned six engines (Pc 368-405 psia, L* 1.14-1.49 m, n 6-12). The term is the
propellant the delivered Isp costs for the required total impulse, I/(g0 Isp) (Sutton &
Biblarz ch. 2), relative to an ideal engine, and it is blind to the requirement-pinned O/F and
Pc so it cannot pull them off target. Also L1-12 (an O/F outside the CEA table no longer
aborts) and L1-13 (expansion ratio from the table's own exit pressure).

Independent references: rocketcea (NASA CEA, shifting equilibrium) and hand arithmetic.

Function Documentation

◆ _constants()

test_layer1_figure_of_merit._constants ( ** over)
protected

◆ _rc_isp()

◆ _setup()

test_layer1_figure_of_merit._setup ( )
protected

◆ cea()

test_layer1_figure_of_merit.cea ( )

Definition at line 31 of file test_layer1_figure_of_merit.py.

◆ rc()

test_layer1_figure_of_merit.rc ( )

Definition at line 38 of file test_layer1_figure_of_merit.py.

◆ test_blank_design_lstar_is_no_longer_a_flat_direction()

test_layer1_figure_of_merit.test_blank_design_lstar_is_no_longer_a_flat_direction ( cea)
DEF-07 test (b): L* 1.14 and 1.49 m scored identically (0.0) on the blank config.

Definition at line 110 of file test_layer1_figure_of_merit.py.

References _constants(), and _setup().

◆ test_default_weights_price_chamber_mass_like_propellant()

test_layer1_figure_of_merit.test_default_weights_price_chamber_mass_like_propellant ( cea,
rc )
DEF-07: a blank design (W_MASS null) had W_MASS = W_LSTAR = 0 and nothing to choose L*
with. The defaults price a kilogram of chamber like a kilogram of propellant.

Definition at line 91 of file test_layer1_figure_of_merit.py.

References _rc_isp().

◆ test_derived_expansion_ratio_puts_the_table_exit_pressure_at_ambient()

test_layer1_figure_of_merit.test_derived_expansion_ratio_puts_the_table_exit_pressure_at_ambient ( cea,
rc )
L1-13: the chamber-gamma isentrope gave eps 5.60 at 433.9 psia, Pe/Pa 0.93 in CEA;
rocketcea's matched eps there is 5.30.

Definition at line 175 of file test_layer1_figure_of_merit.py.

◆ test_isp_merit_holds_a_pc_target_to_its_band()

test_layer1_figure_of_merit.test_isp_merit_holds_a_pc_target_to_its_band ( cea,
rc )
With a Pc target the merit sees at most the +0.8 % aim band (inside the 1 % gate).

Definition at line 82 of file test_layer1_figure_of_merit.py.

References _rc_isp().

◆ test_isp_merit_holds_the_required_of()

test_layer1_figure_of_merit.test_isp_merit_holds_the_required_of ( cea,
rc )
O/F is a requirement: a design that runs at 1.6 against 1.5 gets no thermodynamic
credit for the 1.6 (ideal Isp 1.1 % higher there). Ratio from rocketcea.

Definition at line 69 of file test_layer1_figure_of_merit.py.

References _rc_isp().

◆ test_layer1_does_not_abort_on_an_out_of_table_of_target()

test_layer1_figure_of_merit.test_layer1_does_not_abort_on_an_out_of_table_of_target ( )
L1-12, end to end: run_layer1_optimization raised ValueError before any work.

Definition at line 138 of file test_layer1_figure_of_merit.py.

◆ test_objective_prefers_the_engine_that_delivers_more_isp()

test_layer1_figure_of_merit.test_objective_prefers_the_engine_that_delivers_more_isp ( )
Two designs that differ only in delivered Isp must not tie (they did: 0 and 0).

Definition at line 56 of file test_layer1_figure_of_merit.py.

References _constants(), and _setup().

◆ test_out_of_table_of_target_designs_to_peak_isp()

test_layer1_figure_of_merit.test_out_of_table_of_target_designs_to_peak_isp ( cea,
rc )
L1-12: the blank impinging template keeps O/F 2.8; ethalox's table stops at 2.5 and
Layer 1 aborted every run. It now designs to the peak ideal Isp O/F (rocketcea) and says so.

Definition at line 121 of file test_layer1_figure_of_merit.py.

References _rc_isp().

Variable Documentation

◆ G0

float test_layer1_figure_of_merit.G0 = 9.80665

Definition at line 27 of file test_layer1_figure_of_merit.py.

◆ PA

float test_layer1_figure_of_merit.PA = 94070.0

Definition at line 26 of file test_layer1_figure_of_merit.py.

◆ PSI

float test_layer1_figure_of_merit.PSI = 6894.757

Definition at line 25 of file test_layer1_figure_of_merit.py.

◆ rocketcea

test_layer1_figure_of_merit.rocketcea = pytest.importorskip("rocketcea.cea_obj")

Definition at line 22 of file test_layer1_figure_of_merit.py.

◆ ROOT

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

Definition at line 24 of file test_layer1_figure_of_merit.py.