|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| _ns (**kw) | |
| _discharge (c) | |
| _feed_fittings_K (c) | |
| _feed (c) | |
| _cav (config) | |
| _fluid (f) | |
| _comb (eff) | |
| _cooling (cfg) | |
| _geom (cg) | |
| _pintle (geom) | |
| _imp (b) | |
| _net (config, side) | |
| build_state (config) | |
Variables | |
| dict | _PHI = {"none": 0, "sqrtP": 1, "logP": 2} |
| dict | _INJ = {"pintle": 0, "impinging": 1, "coaxial": 2} |
| dict | _EFF_MODEL = {"constant": 0, "linear": 1, "exponential": 2} |
| _PIN_ZERO | |
| _NET_ZERO | |
Config -> flat scalar state, in pure Python (no C dependency).
WHY THIS EXISTS
The Numba kernels used to read their inputs out of the C `EdEngineState`
struct (numba_eval.extract_params called native_injector.build_state), so
Numba could not run without the C library loaded. That made the C port
impossible to delete. This module reproduces that reconciliation with no
ctypes involved.
WHY IT IS A TRANSCRIPTION, NOT A REWRITE
`native_injector.build_state` encodes decisions that are NOT recoverable by
reading the config schema -- see the inline notes on smd_model and
we_corr_max below. Re-deriving "what the config means" from the YAML would
silently produce different numbers on some configs. So each field here is a
line-for-line transcription of the corresponding `_fill_*` helper, and
tests/test_accel_params_match_native_state.py asserts exact equality against
the real EdEngineState for every committed config while the C port still
exists to compare against.
The returned object mirrors EdEngineState's attribute paths exactly
(`st.fluid_O.density`, `st.injector.imp_O.d_jet`, ...) so the existing
param-vector mapping reads from either interchangeably.
|
protected |
Vena-contracta Cc per stream for the Nurick cavitation limit (discharge.contraction_coefficient).
Definition at line 95 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Mirrors native_injector._fill_comb.
Definition at line 123 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Mirrors native_injector._fill_cooling. The C struct is zero-initialised, so fields guarded by `if rg is not None` / `if ab is not None` stay 0.0 when that config block is absent. The defaults below reproduce that -- do not "improve" them into schema defaults.
Definition at line 144 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Mirrors native_injector._fill_discharge. When the config declares an orifice INLET geometry, resolve it here and hand the kernel the finished Cd_inf with the diameter scaling switched OFF. The kernel has no notion of inlet treatment, so passing the raw Cd_inf would leave it on the old diameter path while Python used the inlet value -- a fresh Python/kernel divergence of exactly the kind that the x_star evaporation split already cost this codebase 9.7% of thrust.
Definition at line 42 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Mirrors native_injector._fill_feed.
Definition at line 79 of file params.py.
References _feed_fittings_K(), and _ns().
Referenced by build_state().
|
protected |
|
protected |
Mirrors native_injector._fill_fluid. Note the `or` defaults: a missing OR zero temperature becomes 0.0, and a missing OR zero latent_heat becomes 300e3. Falsy checks, not `is None`.
Definition at line 103 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Mirrors native_injector._fill_geom. `cg` must come from ensure_chamber_geometry.
Definition at line 209 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Mirrors native_injector._fill_imp.
Definition at line 247 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
The stream's back-channel ring (impinging._RingManifold), read off the very object the Python injector builds, so the kernel marches the same branch; zeros for a plenum.
Definition at line 260 of file params.py.
References _ns().
Referenced by build_state().
|
protected |
Definition at line 38 of file params.py.
Referenced by _cav(), _comb(), _cooling(), _discharge(), _feed(), _fluid(), _geom(), _imp(), _net(), _pintle(), and build_state().
|
protected |
Pintle geometry, flattened. The area/hydraulic-diameter maths lives in engine.core.geometry and is called HERE, at the boundary, so the kernel sees scalars and the two implementations cannot drift on geometry.
Definition at line 226 of file params.py.
References _ns().
Referenced by build_state().
| engine.accel.params.build_state | ( | config | ) |
Pure-Python equivalent of native_injector.build_state. Returns a namespace with EdEngineState's attribute paths. Raises the same way build_state does on a config it cannot map (e.g. a pintle config, whose injector geometry has no .oxidizer/.fuel impinging branches).
Definition at line 276 of file params.py.
References _cav(), _comb(), _cooling(), _discharge(), _feed(), _fluid(), _geom(), _imp(), _net(), _ns(), _pintle(), and build_state().
Referenced by build_state().
|
protected |
|
protected |
|
protected |
|
protected |