|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| Optional[float] | contraction_ratio_of (cg) |
| float | nozzle_stagnation_loss (Optional[float] contraction_ratio, float gamma) |
| float | expansion_ratio_for_exit_pressure (CEACache cea_cache, float MR, float Pc, float Pe, Optional[float] contraction_ratio=None) |
| dict | calculate_thrust (float Pc, float MR, float mdot_total, CEACache cea_cache, Any config, float Pa=101325.0, Optional[Dict] reaction_progress=None, bool debug=False) |
Nozzle model: RPA delivered thrust + isentropic exit state.
This is the AUTHORITATIVE nozzle: every runner.evaluate() call uses it (flight sim,
time series, pintle, and Layer-1 finalization). Delivered thrust is the RPA basis
F(Pa) = zeta_n * Cf_vac * P0 * At - Pa * Ae
where Cf_vac is CEA's shifting-equilibrium vacuum thrust coefficient from the cache
tables, zeta_n = nozzle_efficiency, and combustion efficiency zeta_c (eta_c*) rides
in through the efficiency-reduced Pc from the chamber solve — so delivered
Isp = zeta_c * zeta_n * Isp_ideal. See docs/thrust_efficiency_bug_analysis.md for
why the former momentum-method reconstruction (ideal-Tc exhaust velocity) was
retired: it never applied combustion efficiency and over-predicted thrust by
~(1 - zeta_c*zeta_n). The exit state reported here (P_exit, T_exit, M_exit) is CEA's
shifting-equilibrium expansion at the same (P0, O/F, eps); thrust does not depend on it.
Pc is the injector-end pressure; the nozzle expands from P0 = Pc/kappa, the Rayleigh
stagnation loss of a finite-area combustor.
The numba accelerator (engine/accel/kernels.py) computes the SAME delivered
formula from the same tables for the Layer-1 inner loop; parity is enforced live by
tests/test_native_ab_parity.py.
| dict engine.core.nozzle.calculate_thrust | ( | float | Pc, |
| float | MR, | ||
| float | mdot_total, | ||
| CEACache | cea_cache, | ||
| Any | config, | ||
| float | Pa = 101325.0, | ||
| Optional[Dict] | reaction_progress = None, | ||
| bool | debug = False ) |
Calculate delivered engine thrust (RPA methodology).
F(Pa) = zeta_n * Cf_vac * P0 * At - Pa * Ae, P0 = Pc / kappa
Cf_vac is CEA's shifting-equilibrium vacuum thrust coefficient (cache lookup);
zeta_n is config.chamber_geometry.nozzle_efficiency; combustion efficiency
zeta_c (eta_c*) is already carried by the efficiency-reduced Pc from the
chamber solve, so delivered Isp = zeta_c * zeta_n * Isp_ideal. The exit state
also returned here (P_exit, T_exit, M_exit: CEA shifting equilibrium) is
reporting-only; thrust does not depend on it. See the module docstring and
docs/thrust_efficiency_bug_analysis.md.
Parameters:
-----------
Pc : float
Chamber pressure [Pa]
MR : float
Mixture ratio (O/F)
mdot_total : float
Total mass flow rate [kg/s]
cea_cache : CEACache
CEA cache for thermochemical properties
config : PintleEngineConfig
Complete engine configuration
Pa : float
Ambient pressure [Pa] (default: sea level)
reaction_progress : dict, optional
Chamber reaction progress; accepted for the call signature, not used
Returns:
--------
results : dict
Dictionary containing:
- F: Delivered thrust [N]
- F_momentum: vacuum term zeta_n*Cf_vac*P0*At [N]
- F_pressure: ambient back-pressure term -Pa*Ae [N]
- Cf / Cf_actual: delivered thrust coefficient F/(P0*At)
- Cf_ideal: CEA ambient thrust coefficient at this Pa
- P_exit, T_exit, M_exit: CEA shifting-equilibrium exit state; v_exit the ideal
exhaust velocity on the same basis (reporting-only)
- Pc_ns, stagnation_loss_kappa: nozzle stagnation pressure and Pc/Pc_ns
- Isp: Delivered specific impulse [s]
Definition at line 67 of file nozzle.py.
References contraction_ratio_of(), info, and nozzle_stagnation_loss().
| Optional[float] engine.core.nozzle.contraction_ratio_of | ( | cg | ) |
A_chamber/A_throat of a ChamberGeometryConfig, or None when the bore is not declared.
Definition at line 31 of file nozzle.py.
Referenced by calculate_thrust().
| float engine.core.nozzle.expansion_ratio_for_exit_pressure | ( | CEACache | cea_cache, |
| float | MR, | ||
| float | Pc, | ||
| float | Pe, | ||
| Optional[float] | contraction_ratio = None ) |
Area ratio whose CEA shifting-equilibrium exit pressure is Pe (optimum expansion is Pe = Pa, Sutton & Biblarz ch. 3). ``Pc`` is the injector-end pressure; with a declared contraction ratio the nozzle expands from Pc/kappa.
Definition at line 57 of file nozzle.py.
References nozzle_stagnation_loss().
| float engine.core.nozzle.nozzle_stagnation_loss | ( | Optional[float] | contraction_ratio, |
| float | gamma ) |
kappa = P_injector_end / P0_nozzle of a finite-area combustor (constant-area heat
addition, Rayleigh line; Huzel & Huang sec. 2, Sutton & Biblarz Table 3-2):
kappa = (1 + gamma M^2) / (1 + (gamma-1)/2 M^2)^(gamma/(gamma-1)),
M the chamber-end Mach number, A/A* = contraction ratio on the subsonic branch.
Reproduces CEA's finite-area "Pinj/Pinf" to 3e-5. 1.0 when the bore is unknown.
Definition at line 40 of file nozzle.py.
Referenced by calculate_thrust(), and expansion_ratio_for_exit_pressure().