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

Functions

List[Tuple[float, float]] _parse_tank_scenarios (str s)
float _throat_center_mm2 (Any cfg)
None _apply_throat_mm2 (Any cfg, float mm2)
Dict[str, Any] _row_eval (PintleEngineRunner runner, float P_O_psi, float P_F_psi, float F_t, float MR_t)
Tuple[Optional[np.ndarray], float, int] _solve_pressures (PintleEngineRunner runner, float F_t, float MR_t, Tuple[float, float] b_o, Tuple[float, float] b_f, *, bool de_fallback, int de_maxiter, int de_pop, int maxfun_local, bool quick_local)
List[Dict[str, Any]] _pareto_nd (Sequence[Dict[str, Any]] rows, *, float m_err_cap)
None main ()

Variables

 ROOT = Path(__file__).resolve().parents[1]
float PSI_TO_PA = 6894.76

Detailed Description

Pareto-style trade study: throat area × tank-cap philosophy → ΔP/Pc (pressures solved).

Workflow (automates the recommendation: fix feed/tank envelope, sweep throat, *then*
interpret geometry):

1. Load YAML (default ``configs/impinging_lox_ch4_8000N.yaml``); **injector geometry** from
   config (unchanged unless you edit YAML first).
2. For each **tank scenario** ``lox_cap:fuel_cap`` [psi], build Layer-1-style **pressure bounds**
   ``[lo_frac, hi_frac]`` of each cap (defaults 0.62–0.92).
3. **1-D sweep** of ``A_throat`` [mm²] from ``center × (1 ± span)``.
4. For each grid point, **multi-start L-BFGS-B** on ``(P_O, P_F)`` [psi] minimizes
   ``(F/F_target−1)² + (MR/MR_target−1)²``. Optional **differential_evolution** polish if residual
   is still large (``--de-fallback``).
5. Writes ``output/pareto_throat_dp_pressures.csv`` and prints rows + a small **non-dominated**
   set on ``(mission_err, ΔP_F/Pc)`` among near-target points.

**Note:** Only ``chamber_geometry.A_throat`` is updated per row; chamber volume / L* are not
re-solved here—use for **trends** and pressure–throat coupling, not final hardware sign-off.
Exit area is scaled so ``A_exit / A_throat`` stays equal to YAML ``expansion_ratio``.

The pressure objective matches **F** and **MR** only; **momentum ratio R** is diagnostic.
Tune jets using ``feasibility_impinging_lox_ch4_sweep.py`` (or Layer‑1) after picking a throat
and tank-cap envelope from this script.

Examples::

  python scripts/pareto_throat_dp_pressures.py --quick
  python scripts/pareto_throat_dp_pressures.py --tank-scenarios 700:700,700:600,700:500 --n-throat 11

Function Documentation

◆ _apply_throat_mm2()

None pareto_throat_dp_pressures._apply_throat_mm2 ( Any cfg,
float mm2 )
protected
Set throat area and rescale exit area so ``A_exit/A_throat == expansion_ratio`` (runner consistency check).

Definition at line 80 of file pareto_throat_dp_pressures.py.

References max.

Referenced by main().

◆ _pareto_nd()

List[Dict[str, Any]] pareto_throat_dp_pressures._pareto_nd ( Sequence[Dict[str, Any]] rows,
* ,
float m_err_cap )
protected
Minimize both m_err and ΔP_F/Pc; keep non-dominated among m_err <= cap.

Definition at line 235 of file pareto_throat_dp_pressures.py.

Referenced by main().

◆ _parse_tank_scenarios()

List[Tuple[float, float]] pareto_throat_dp_pressures._parse_tank_scenarios ( str s)
protected

Definition at line 55 of file pareto_throat_dp_pressures.py.

Referenced by main().

◆ _row_eval()

Dict[str, Any] pareto_throat_dp_pressures._row_eval ( PintleEngineRunner runner,
float P_O_psi,
float P_F_psi,
float F_t,
float MR_t )
protected

Definition at line 101 of file pareto_throat_dp_pressures.py.

Referenced by _solve_pressures(), and main().

◆ _solve_pressures()

Tuple[Optional[np.ndarray], float, int] pareto_throat_dp_pressures._solve_pressures ( PintleEngineRunner runner,
float F_t,
float MR_t,
Tuple[float, float] b_o,
Tuple[float, float] b_f,
* ,
bool de_fallback,
int de_maxiter,
int de_pop,
int maxfun_local,
bool quick_local )
protected

Definition at line 137 of file pareto_throat_dp_pressures.py.

References _row_eval().

Referenced by main().

◆ _throat_center_mm2()

float pareto_throat_dp_pressures._throat_center_mm2 ( Any cfg)
protected

Definition at line 70 of file pareto_throat_dp_pressures.py.

Referenced by main().

◆ main()

None pareto_throat_dp_pressures.main ( )

Variable Documentation

◆ PSI_TO_PA

float pareto_throat_dp_pressures.PSI_TO_PA = 6894.76

Definition at line 52 of file pareto_throat_dp_pressures.py.

◆ ROOT

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

Definition at line 44 of file pareto_throat_dp_pressures.py.