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

Classes

class  TestEnvelope
class  TestContouredFace
class  TestChannels
class  TestHoleCd
class  TestInletShape
class  TestIgniter
class  TestOldFlatDesigns

Functions

 _cfg (**plate)
 _hole_ld (cfg, ld, **discharge)
 _texts (out)
 _codes (out)
 test_band_table (case)
 test_6500N_band_is_what_it_declares ()
 test_layer1_uses_the_resolver ()
 test_ring_geometry_default_band_is_inert ()
 test_default_constant_is_four ()
 _hand_6500N (exit_land=EXIT_LAND_DEFAULT)
 test_plenum_back_face_positions ()
 test_flat_face_drill_entry_is_flagged_as_off_square ()
 test_degenerate_rings ()
 _random_layouts (n=60, seed=7)
 _l1_kwargs (g)
 _hard_kwargs (g)
 test_centre_and_wall_clearance_flip_where_the_layout_says (path, contoured)
 test_channel_overlap_flips_where_the_layout_says ()
 test_worker_path_reads_the_plate_settings ()
 test_standoff_matches_the_physics_helper ()
 test_frontend_fixture_is_current ()
 test_an_undeclared_plate_draws_the_stands_plug_and_layer1_stays_as_it_was ()

Variables

 ROOT = Path(__file__).resolve().parents[1]
 CASES = json.loads((ROOT / "tests/impingement_ld_band_cases.json").read_text())["cases"]
str C6500 = ROOT / "configs/ethalox_6500N.yaml"
math T = lambda a.tan(math.radians(a))
math S = lambda a.sin(math.radians(a))
math C = lambda a.cos(math.radians(a))
 BEFORE
 AFTER
 REQS
int EPS = 1e-6
str FIXTURE = ROOT / "frontend/src/components/__fixtures__/layout_6500N.json"

Detailed Description

engine.core.injectors.layout -- the one place the injector's geometry is derived.

Reference engine: configs/ethalox_6500N.yaml (24 doublets, 43/46 deg, contoured face, channels
on the back, plug filling a 6.0 in sleeve bore). Every contoured-face and channel number below
is recomputed in the test from plain trigonometry, not read back from the module, so a wrong
formula in layout.py fails here rather than being agreed with.

Function Documentation

◆ _cfg()

test_injector_layout._cfg ( ** plate)
protected

Definition at line 30 of file test_injector_layout.py.

Referenced by test_injector_layout.TestInletShape._walls(), test_injector_layout.TestHoleCd.test_6500N_is_a_sharp_short_tube(), test_injector_layout.TestChannels.test_a_coned_floor_cannot_break_out_of_the_back(), test_injector_layout.TestHoleCd.test_a_drilled_plate_still_asks(), test_injector_layout.TestEnvelope.test_a_liner_that_does_not_fill_the_sleeve_is_called_out(), test_injector_layout.TestHoleCd.test_a_longer_hole_lowers_cd_under_lichtarowicz(), test_injector_layout.TestChannels.test_a_longer_passage_needs_a_thicker_plate(), test_injector_layout.TestIgniter.test_an_explicit_reservation_wins_and_is_called_oversized(), test_injector_layout.TestInletShape.test_an_inlet_too_big_for_the_channel_says_how_wide_to_go(), test_an_undeclared_plate_draws_the_stands_plug_and_layer1_stays_as_it_was(), test_injector_layout.TestHoleCd.test_channels_never_ask_to_couple_the_cd(), test_injector_layout.TestChannels.test_coned_floor_is_normal_to_the_passage(), test_injector_layout.TestIgniter.test_engagement_needs_the_centre_thicker(), test_flat_face_drill_entry_is_flagged_as_off_square(), test_injector_layout.TestContouredFace.test_flat_face_keeps_the_old_geometry(), test_injector_layout.TestChannels.test_flat_floor_leaves_an_acute_inlet_lip_and_no_short_wall_rule(), test_injector_layout.TestIgniter.test_half_inch_npt_keepout(), test_injector_layout.TestChannels.test_overlapping_channels_are_impossible(), test_plenum_back_face_positions(), test_injector_layout.TestEnvelope.test_the_plug_is_drawn_to_the_sleeve_bore(), test_injector_layout.TestHoleCd.test_the_reported_cd_is_the_solvers(), test_injector_layout.TestIgniter.test_the_section_says_why_the_port_is_red(), test_injector_layout.TestIgniter.test_the_thread_is_cut_into_the_plug_not_floating(), test_injector_layout.TestContouredFace.test_v_bottom_on_request(), and test_injector_layout.TestHoleCd.test_without_an_inlet_the_hole_length_does_not_enter_cd().

◆ _codes()

◆ _hand_6500N()

test_injector_layout._hand_6500N ( exit_land = EXIT_LAND_DEFAULT)
protected

Definition at line 113 of file test_injector_layout.py.

References C, max, S, and T.

Referenced by test_plenum_back_face_positions().

◆ _hard_kwargs()

test_injector_layout._hard_kwargs ( g)
protected

◆ _hole_ld()

◆ _l1_kwargs()

test_injector_layout._l1_kwargs ( g)
protected

◆ _random_layouts()

test_injector_layout._random_layouts ( n = 60,
seed = 7 )
protected

◆ _texts()

◆ test_6500N_band_is_what_it_declares()

test_injector_layout.test_6500N_band_is_what_it_declares ( )

Definition at line 60 of file test_injector_layout.py.

◆ test_an_undeclared_plate_draws_the_stands_plug_and_layer1_stays_as_it_was()

test_injector_layout.test_an_undeclared_plate_draws_the_stands_plug_and_layer1_stays_as_it_was ( )
No injector.plate: the drawing is the contoured, channelled plug (what the stand machines)
and says so; Layer 1 keeps the flat-face, plenum constraints it always had until declared.

Definition at line 691 of file test_injector_layout.py.

References _cfg(), and _codes().

◆ test_band_table()

test_injector_layout.test_band_table ( case)

Definition at line 56 of file test_injector_layout.py.

◆ test_centre_and_wall_clearance_flip_where_the_layout_says()

test_injector_layout.test_centre_and_wall_clearance_flip_where_the_layout_says ( path,
contoured )

Definition at line 591 of file test_injector_layout.py.

References _hard_kwargs(), _l1_kwargs(), and _random_layouts().

◆ test_channel_overlap_flips_where_the_layout_says()

test_injector_layout.test_channel_overlap_flips_where_the_layout_says ( )
Widen both channels until they meet: Layer 1's channel term turns on exactly where the
layout starts calling them crossed.

Definition at line 616 of file test_injector_layout.py.

References _codes(), _l1_kwargs(), and _random_layouts().

◆ test_default_constant_is_four()

test_injector_layout.test_default_constant_is_four ( )

Definition at line 79 of file test_injector_layout.py.

◆ test_degenerate_rings()

test_injector_layout.test_degenerate_rings ( )

Definition at line 534 of file test_injector_layout.py.

References _texts().

◆ test_flat_face_drill_entry_is_flagged_as_off_square()

test_injector_layout.test_flat_face_drill_entry_is_flagged_as_off_square ( )

Definition at line 315 of file test_injector_layout.py.

References _cfg(), and _codes().

◆ test_frontend_fixture_is_current()

test_injector_layout.test_frontend_fixture_is_current ( )
Regenerate: python3 scripts/injector_layout.py --no-flows configs/ethalox_6500N.yaml > <fixture>

Definition at line 669 of file test_injector_layout.py.

◆ test_layer1_uses_the_resolver()

test_injector_layout.test_layer1_uses_the_resolver ( )

Definition at line 65 of file test_injector_layout.py.

◆ test_plenum_back_face_positions()

test_injector_layout.test_plenum_back_face_positions ( )

Definition at line 306 of file test_injector_layout.py.

References _cfg(), _hand_6500N(), and T.

◆ test_ring_geometry_default_band_is_inert()

test_injector_layout.test_ring_geometry_default_band_is_inert ( )

Definition at line 71 of file test_injector_layout.py.

◆ test_standoff_matches_the_physics_helper()

test_injector_layout.test_standoff_matches_the_physics_helper ( )

Definition at line 652 of file test_injector_layout.py.

References _random_layouts().

◆ test_worker_path_reads_the_plate_settings()

test_injector_layout.test_worker_path_reads_the_plate_settings ( )

Definition at line 643 of file test_injector_layout.py.

Variable Documentation

◆ AFTER

test_injector_layout.AFTER
Initial value:
1= dict(
2 oxidizer=dict(n_elements=27, d_jet=0.0017094, impingement_angle=40.0, spacing=0.0081070167),
3 fuel=dict(n_elements=27, d_jet=0.0015024, impingement_angle=50.0, spacing=0.0111428181),
4 bore_diameter=0.127,
5)

Definition at line 498 of file test_injector_layout.py.

◆ BEFORE

test_injector_layout.BEFORE
Initial value:
1= dict(
2 oxidizer=dict(n_elements=28, d_jet=0.0015821116699998301, impingement_angle=40, spacing=0.0030182972100858507),
3 fuel=dict(n_elements=28, d_jet=0.001375132476863662, impingement_angle=69, spacing=0.009875029755263455),
4 bore_diameter=0.127,
5)

Definition at line 493 of file test_injector_layout.py.

◆ C

◆ C6500

str test_injector_layout.C6500 = ROOT / "configs/ethalox_6500N.yaml"

Definition at line 24 of file test_injector_layout.py.

◆ CASES

test_injector_layout.CASES = json.loads((ROOT / "tests/impingement_ld_band_cases.json").read_text())["cases"]

Definition at line 23 of file test_injector_layout.py.

◆ EPS

int test_injector_layout.EPS = 1e-6

Definition at line 586 of file test_injector_layout.py.

◆ FIXTURE

str test_injector_layout.FIXTURE = ROOT / "frontend/src/components/__fixtures__/layout_6500N.json"

Definition at line 666 of file test_injector_layout.py.

◆ REQS

test_injector_layout.REQS
Initial value:
1= dict(center_clear_dia=0.0381, min_web=0.002, wall_clearance=0.008, ld_min=3, ld_max=5,
2 plate_thickness=0.0127, counterbore_dia=0.004, land_ld_O=4,
3 plate=dict(face="flat", back="plenum"))

Definition at line 503 of file test_injector_layout.py.

◆ ROOT

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

Definition at line 22 of file test_injector_layout.py.

◆ S

◆ T