|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| __init__ (self, PintleEngineConfig config, CEACache cea_cache) | |
| float | residual (self, float Pc, float P_tank_O, float P_tank_F) |
| Tuple[float, Dict[str, Any]] | solve (self, float P_tank_O, float P_tank_F, float Pc_guess=None, bool debug=False, bool silent=False) |
Public Attributes | |
| config = config | |
| cea_cache = cea_cache | |
| bool | spray_quality_good = True |
Protected Member Functions | |
| _accel_chamber_pc (self, float P_tank_O, float P_tank_F) | |
| _raise_supply_exceeds_demand (self, P_tank_O, P_tank_F, Pc_max, residual_min, residual_max, debug) | |
| Dict[str, float] | _extract_and_validate_mixture_diagnostics (self, Dict[str, Any] closure_diag, bool strict=True) |
| None | _log_mixture_diagnostics (self, Dict[str, float] diag) |
| float | _compute_cooling_efficiency (self, Dict[str, Any] cooling_results, float mdot_total, float Tc, float gamma, float R) |
| Tuple[Dict[str, Any], float, float] | _evaluate_cooling_models (self, float Pc, float mdot_O, float mdot_F, Dict[str, float] cea_props, Dict[str, Any] closure_diag, bool with_profile=True) |
| _wall_contour (self) | |
| float | _liner_end (self, contour) |
| float | _infer_injector_diameter (self) |
| Dict[str, float] | _get_chamber_geometry (self) |
| float | _rupe_R_opt (self) |
| Optional[Dict[str, float]] | _fluid_props (self, str which) |
| Optional[Dict[str, float]] | _get_fuel_props (self) |
| Optional[Dict[str, float]] | _get_ox_props (self) |
Static Protected Member Functions | |
| _highest_sign_change (f, float Pc_min, float Pc_max, float r_min, float r_max, int n=PC_BRACKET_SCAN_POINTS) | |
Protected Attributes | |
| _debug | |
| _silent = silent | |
| _wall_contour_cache = cached | |
Solves for chamber pressure by balancing supply and demand
Definition at line 73 of file chamber_solver.py.
| engine.core.chamber_solver.ChamberSolver.__init__ | ( | self, | |
| PintleEngineConfig | config, | ||
| CEACache | cea_cache ) |
Definition at line 76 of file chamber_solver.py.
|
protected |
Solve Pc with the native C kernel (whole residual loop + Brent) when native is enabled and can handle this config; otherwise return None so the Python Brent solver runs. Pure capability routing — no runtime parity self-check or process latch. Parity is enforced by the golden test suite and the load-time ABI assert in the accelerator. A solve that raises or returns a non-finite Pc falls back to the Python solver for that call.
Definition at line 265 of file chamber_solver.py.
References cea_cache, backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
|
protected |
Definition at line 860 of file chamber_solver.py.
References backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, StarOTA::Server.config, and max.
Referenced by _evaluate_cooling_models().
|
protected |
Definition at line 888 of file chamber_solver.py.
References _compute_cooling_efficiency(), _get_chamber_geometry(), _liner_end(), _wall_contour(), cea_cache, backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, StarOTA::Server.config, and max.
Referenced by residual().
|
protected |
Extract and validate mixture quality diagnostics from closure diagnostics. DIAGNOSTICS-ONLY - no efficiency impact. Physics comes from: - eta_Lstar: actual SMD via gasification model - eta_mixing: actual turbulence/velocities via diffusion - eta_kinetics: actual T/P via Damköhler number Parameters: - closure_diag: Injector diagnostics dict - strict: If True, raise on missing critical data. If False, warn. Returns: Dict with actual_smd_microns, x_star_mm, We_O, We_F, etc.
Definition at line 680 of file chamber_solver.py.
|
protected |
Liquid properties of ``fluids.<which>`` for the c* vaporization march: exactly what the config declares (no substituted RP-1 values). Missing keys are left out, and the march records each one it has to assume.
Definition at line 1188 of file chamber_solver.py.
References backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
Referenced by _get_fuel_props(), and _get_ox_props().
|
protected |
Extract physical chamber geometry from configuration. Returns a dictionary with: - length: Total physical length [m] - diameter: Chamber inner diameter [m] - area_cross: Cross-sectional area [m²] - circumference: Chamber circumference [m] - area: Total wetted surface area [m²] (cylindrical + contraction)
Definition at line 1103 of file chamber_solver.py.
References backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, StarOTA::Server.config, and max.
Referenced by _evaluate_cooling_models(), _infer_injector_diameter(), _raise_supply_exceeds_demand(), and residual().
|
protected |
Fuel liquid properties for the c* model (see ``_fluid_props``), plus the fuel-interface temperature cap the legacy gasification helper reads.
Definition at line 1206 of file chamber_solver.py.
References _fluid_props(), backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
Referenced by _raise_supply_exceeds_demand(), and residual().
|
protected |
Oxidizer liquid properties for the c* model (see ``_fluid_props``).
Definition at line 1215 of file chamber_solver.py.
References _fluid_props().
Referenced by _raise_supply_exceeds_demand(), and residual().
|
staticprotected |
[lo, hi] holding the HIGHEST-Pc sign change of the residual on [Pc_min, Pc_max], or (None, None). Equal steps scanned from the top; ``r_min``/``r_max`` are reused at the ends. Verbatim mirror of the scan in accel.kernels.evaluate_core (parity).
Definition at line 295 of file chamber_solver.py.
|
protected |
Estimate a characteristic injector diameter for mixing models.
Definition at line 1083 of file chamber_solver.py.
References _get_chamber_geometry(), backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, StarOTA::Server.config, and max.
Referenced by _raise_supply_exceeds_demand(), and residual().
|
protected |
Throat-frame x where the ablative liner stops: the graphite insert's upstream edge, or the throat when there is no insert.
Definition at line 1074 of file chamber_solver.py.
References backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
Referenced by _evaluate_cooling_models().
|
protected |
Log mixture quality diagnostics for informational purposes. DIAGNOSTICS-ONLY - no efficiency impact.
Definition at line 831 of file chamber_solver.py.
References info.
|
protected |
Supply > demand even at the ceiling: injector oversized / throat undersized for these pressures. Raise with the supply/demand numbers at Pc_max so the message is actionable.
Definition at line 309 of file chamber_solver.py.
References _get_chamber_geometry(), _get_fuel_props(), _get_ox_props(), _infer_injector_diameter(), cea_cache, backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
|
protected |
Momentum-ratio optimum for the Rupe mixing model. Honors an explicit ``combustion.efficiency.R_opt`` override; otherwise derives it from the impinging-doublet geometry (``sqrt(sin(theta_F)/sin(theta_O))``), falling back to 1.0 (balanced) for pintle/coaxial or when angles are absent.
Definition at line 1168 of file chamber_solver.py.
References backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
Referenced by residual().
|
protected |
The drawn gas-side contour for this geometry (cached per geometry).
Definition at line 1063 of file chamber_solver.py.
References backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, and StarOTA::Server.config.
Referenced by _evaluate_cooling_models().
| float engine.core.chamber_solver.ChamberSolver.residual | ( | self, | |
| float | Pc, | ||
| float | P_tank_O, | ||
| float | P_tank_F ) |
Calculate residual: supply(Pc) - demand(Pc)
Residual = 0 when supply equals demand.
Parameters:
-----------
Pc : float
Chamber pressure guess [Pa]
P_tank_O : float
Oxidizer tank pressure [Pa]
P_tank_F : float
Fuel tank pressure [Pa]
Returns:
--------
residual : float [kg/s]
Definition at line 86 of file chamber_solver.py.
References _evaluate_cooling_models(), _get_chamber_geometry(), _get_fuel_props(), _get_ox_props(), _infer_injector_diameter(), _rupe_R_opt(), cea_cache, backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, StarOTA::Server.config, and spray_quality_good.
| Tuple[float, Dict[str, Any]] engine.core.chamber_solver.ChamberSolver.solve | ( | self, | |
| float | P_tank_O, | ||
| float | P_tank_F, | ||
| float | Pc_guess = None, | ||
| bool | debug = False, | ||
| bool | silent = False ) |
Solve for chamber pressure.
Parameters:
-----------
P_tank_O : float
Oxidizer tank pressure [Pa]
P_tank_F : float
Fuel tank pressure [Pa]
Pc_guess : float, optional
Initial guess for chamber pressure [Pa]
Returns:
--------
Pc : float [Pa]
Solved chamber pressure
diagnostics : dict
Solution diagnostics
Definition at line 379 of file chamber_solver.py.
References _debug, backend.routers.documents.CreatePayload.config, backend.routers.documents.ReleasePayload.config, backend.state.AppState.config, board_simulator.SimulatedBoard.config, calibration_robustness.AnomalyDetector.config, calibration_robustness.BackupManager.config, calibration_robustness.CalibrationValidator.config, calibration_robustness.HealthMonitor.config, calibration_robustness.RobustnessManager.config, combined_fsw_gui.ConfigManager.config, combined_gui.ConfigManager.config, emmc_log_t.config, engine.control.robust_ddp.engine_wrapper.EngineWrapper.config, config, idle_t.config, self_test_t.config, solenoid_characterization_gui.ConfigManager.config, StarOTA::Server.config, max, and min.
|
protected |
Definition at line 222 of file chamber_solver.py.
Referenced by solve().
|
protected |
Definition at line 427 of file chamber_solver.py.
|
protected |
Definition at line 1071 of file chamber_solver.py.
| engine.core.chamber_solver.ChamberSolver.cea_cache = cea_cache |
| engine.core.chamber_solver.ChamberSolver.config = config |
Definition at line 77 of file chamber_solver.py.
Referenced by engine.layerx.card.EngineSampler.__call__(), _accel_chamber_pc(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._advance_walls(), engine.pipeline.cea_cache.CEACache._build_cache(), engine.pipeline.cea_cache.CEACache._build_cache_parallel(), engine.pipeline.cea_cache.CEACache._build_cache_sequential(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._build_walls(), _compute_cooling_efficiency(), _evaluate_cooling_models(), engine.core.runner.PintleEngineRunner._evaluate_internal(), _fluid_props(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._geometry(), engine.core.runner.PintleEngineRunner._get_ambient_pressure(), _get_chamber_geometry(), engine.core.runner.PintleEngineRunner._get_elevation(), _get_fuel_props(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._graphite_layers(), _infer_injector_diameter(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._insert_backing(), _liner_end(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._liner_layers(), engine.pipeline.cea_cache.CEACache._load_cache(), _raise_supply_exceeds_demand(), _rupe_R_opt(), engine.pipeline.cea_cache.CEACache._save_cache(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._station_loads(), _wall_contour(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver._wall_report(), engine.pipeline.cea_cache.CEACache.aux(), engine.pipeline.system_diagnostics.SystemDiagnostics.diagnose_all(), engine.pipeline.cea_cache.CEACache.eval(), engine.pipeline.cea_cache.CEACache.eval_cf_vac(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver.liner_end(), residual(), solve(), engine.pipeline.time_varying_solver.TimeVaryingCoupledSolver.solve_time_step(), test_robust_ddp_constraints.TestConstraints.test_all_constraints_safe(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_cache_stats(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_caching(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_clear_cache(), test_robust_ddp_constraints.TestConstraints.test_constraint_summary(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_convenience_function(), test_robust_ddp_constraints.TestConstraints.test_copv_minimum_constraint(), test_robust_ddp_constraints.TestConstraints.test_edge_cases(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_estimate_error_handling(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_estimate_from_pressures_mock(), test_robust_ddp_engine_wrapper.TestEngineWrapper.test_estimate_without_stability(), test_robust_ddp_constraints.TestConstraints.test_headroom_constraints(), test_robust_ddp_constraints.TestConstraints.test_injector_stiffness_constraints(), test_robust_ddp_constraints.TestConstraints.test_mixture_ratio_constraints(), test_robust_ddp_robustness.TestRobustness.test_multiple_updates_convergence(), test_robust_ddp_constraints.TestConstraints.test_multiple_violations(), test_robust_ddp_constraints.TestConstraints.test_nan_handling(), test_robust_ddp_dynamics.TestDynamics.test_regulator_behavior(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_basic(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_validation(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_widens(), test_robust_ddp_robustness.TestRobustness.test_tube_propagate_with_large_w_bar(), test_robust_ddp_constraints.TestConstraints.test_ullage_maximum_constraints(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_basic(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_beta(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_ema_behavior(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_inflation(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_requires_mass_flow(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_residual_spike(), test_robust_ddp_robustness.TestRobustness.test_update_bounds_with_engine_wrapper(), and test_robust_ddp_engine_wrapper.TestEngineWrapper.test_wrapper_initialization().
| bool engine.core.chamber_solver.ChamberSolver.spray_quality_good = True |
Definition at line 84 of file chamber_solver.py.
Referenced by residual().