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

Classes

class  InjectorBindings

Functions

InjectorBindings bindings_for (str injector_type)
dict default_geometry_for (str injector_type)
dict default_discharge_for (str injector_type)
List[str] frozen_param_fields_for (str injector_type)
List[str] validate_config_bindings (Any config)

Variables

dict INJECTOR_BINDINGS
dict INJECTOR_GEOMETRY_TEMPLATES
dict _GEOMETRY_CD_PARAMS
dict INJECTOR_DISCHARGE_BASELINES
list _FROZEN_COMMON
dict _FROZEN_INJECTOR

Detailed Description

Injector-type physics bindings — single source of truth (UNIFICATION_PLAN Phase 2b, decision D4).

Audited reality (2026-06-11), which these bindings encode rather than invent:
  * SMD: ``PintleInjector.solve`` hard-binds ``smd_pintle`` (``spray.smd.model`` is IGNORED on the
    pintle path); ``ImpingingInjector.solve`` hard-binds ``smd_impinging_tn4222`` (``spray.smd.model``
    is IGNORED — legacy lefebvre on doublets yielded bogus ~1 µm D32).
  * Geometry-Cd (``cd_inf_from_orifice_diameter``): called only on the impinging path; pintle keeps
    fixed ``Cd_inf`` semantics (this is WHY anchor A stayed bit-compatible with main).
  * Layer-1 design vector: pintle 10 DOF (integer dim [6]); impinging 13 DOF (integer dim [4]).

``validate_config_bindings`` flags physically-incoherent combos LOUDLY (log warnings at load time)
instead of letting them run silently — the hardcoded-Cd bug class. It does not mutate the config:
behavior changes only happen explicitly in Phase 3 with anchor verification.

Function Documentation

◆ bindings_for()

InjectorBindings engine.core.dispatch.bindings_for ( str injector_type)

Definition at line 54 of file dispatch.py.

◆ default_discharge_for()

dict engine.core.dispatch.default_discharge_for ( str injector_type)
Per-stream discharge-Cd baseline for a freshly-switched injector type. Empty for types without
a registered baseline (caller then leaves discharge untouched).

Definition at line 117 of file dispatch.py.

◆ default_geometry_for()

dict engine.core.dispatch.default_geometry_for ( str injector_type)
Default injector.geometry block for a freshly-switched injector type.

Definition at line 86 of file dispatch.py.

◆ frozen_param_fields_for()

List[str] engine.core.dispatch.frozen_param_fields_for ( str injector_type)
Frozen-param field names valid for this injector type (chamber-common + injector-specific).

Definition at line 137 of file dispatch.py.

◆ validate_config_bindings()

List[str] engine.core.dispatch.validate_config_bindings ( Any config)
Return human-readable warnings for combos that contradict the physics bindings.

Warn-only by design (Phase 2b): the loader logs these; nothing is mutated so golden anchors
cannot shift. Tightening to hard errors / auto-derivation is a Phase-3 decision.

Definition at line 145 of file dispatch.py.

Variable Documentation

◆ _FROZEN_COMMON

list engine.core.dispatch._FROZEN_COMMON
protected
Initial value:
1= ["A_throat_mm2", "Lstar_mm", "expansion_ratio", "D_chamber_outer_mm",
2 "P_O_start_psi", "P_F_start_psi"]

Definition at line 127 of file dispatch.py.

◆ _FROZEN_INJECTOR

dict engine.core.dispatch._FROZEN_INJECTOR
protected
Initial value:
1= {
2 "pintle": ["d_pintle_tip_mm", "h_gap_mm", "n_orifices", "d_orifice_mm"],
3 "impinging": ["n_doublets", "d_jet_O_mm", "d_jet_F_mm", "impingement_angle_O_deg",
4 "impingement_angle_F_deg", "spacing_O_mm", "spacing_F_mm"],
5 "coaxial": [],
6}

Definition at line 129 of file dispatch.py.

◆ _GEOMETRY_CD_PARAMS

dict engine.core.dispatch._GEOMETRY_CD_PARAMS
protected
Initial value:
1= { # only meaningful when use_geometry_cd=True (impinging)
2 "d_ref_m": 0.002, "cd_small_hole_exponent": 0.20, "cd_large_hole_log_gain": 0.015,
3 "cd_inf_max": 0.62, "cd_inf_min_geom": 0.48, "d_min_m": 0.0004,
4}

Definition at line 101 of file dispatch.py.

◆ INJECTOR_BINDINGS

dict engine.core.dispatch.INJECTOR_BINDINGS
Initial value:
1= {
2 "pintle": InjectorBindings(
3 injector_type="pintle",
4 expected_smd_model=None, smd_knob_ignored=True,
5 expected_use_geometry_cd=False,
6 layer1_dof=10, layer1_integer_dims=[6],
7 ),
8 "impinging": InjectorBindings(
9 injector_type="impinging",
10 expected_smd_model="ingebo", smd_knob_ignored=True,
11 expected_use_geometry_cd=True,
12 layer1_dof=13, layer1_integer_dims=[4],
13 ),
14 "coaxial": InjectorBindings(
15 injector_type="coaxial",
16 expected_smd_model=None, smd_knob_ignored=False,
17 expected_use_geometry_cd=False,
18 layer1_dof=None, layer1_integer_dims=None,
19 ),
20}

Definition at line 32 of file dispatch.py.

◆ INJECTOR_DISCHARGE_BASELINES

dict engine.core.dispatch.INJECTOR_DISCHARGE_BASELINES
Initial value:
1= {
2 "pintle": {
3 "oxidizer": {"Cd_inf": 0.40, "a_Re": 0.15, "Cd_min": 0.15, "use_geometry_cd": False},
4 "fuel": {"Cd_inf": 0.65, "a_Re": 0.20, "Cd_min": 0.20, "use_geometry_cd": False},
5 },
6 "impinging": {
7 "oxidizer": {"Cd_inf": 0.60, "a_Re": 0.18, "Cd_min": 0.35, "use_geometry_cd": True, **_GEOMETRY_CD_PARAMS},
8 "fuel": {"Cd_inf": 0.60, "a_Re": 0.18, "Cd_min": 0.35, "use_geometry_cd": True, **_GEOMETRY_CD_PARAMS},
9 },
10}

Definition at line 105 of file dispatch.py.

◆ INJECTOR_GEOMETRY_TEMPLATES

dict engine.core.dispatch.INJECTOR_GEOMETRY_TEMPLATES
Initial value:
1= {
2 "pintle": {
3 "lox": {"n_orifices": 14, "d_orifice": 0.00272, "theta_orifice": 90.0,
4 "A_entry": 5.81e-06, "d_hydraulic": 0.00272},
5 "fuel": {"d_pintle_tip": 0.028194, "d_reservoir_inner": 0.0292862, "h_gap": 0.0005461,
6 "A_entry": 0.000624314, "d_hydraulic": 0.0010922},
7 },
8 # NOTE: this template is injector-ONLY and is stamped on an injector-type switch (e.g.
9 # pintle -> impinging) onto the live chamber. The injector and chamber must be a feasible
10 # PAIR (jet area vs throat demand), so we keep the robust larger-area symmetric seed here;
11 # the curated good-basin methalox doublet (asymmetric jets + matched chamber) lives in
12 # configs/default.yaml, which is what the methalox button actually seeds from.
13 "impinging": {
14 "oxidizer": {"n_elements": 20, "d_jet": 0.002, "impingement_angle": 50.0, "spacing": 0.006},
15 "fuel": {"n_elements": 20, "d_jet": 0.002, "impingement_angle": 60.0, "spacing": 0.006},
16 },
17}

Definition at line 67 of file dispatch.py.