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

Functions

Dict[str, Any] _strip_none_fp (Dict[str, Any] fp)
None _apply_throat_mm2 (Any cfg, float mm2)
Tuple[Any,...] _hist_signature (Dict[str, Any] h)
None _apply_hist_to_cfg (Any cfg, Dict[str, Any] h)
 _inj_diag (Dict[str, Any] res, str key)
Dict[str, Any] _evaluate_row_equal_tanks (Path cfg_template, Dict[str, Any] h, *, float P_equal_psi, float dp_inj_pc_lo, float dp_inj_pc_hi, float max_feed_fraction)
List[Dict[str, Any]] _run_one_pressure_level (*, Path cfg_path, float P_equal_psi, float throat_lo_mm2, float throat_hi_mm2, int layer1_max_iterations, int layer1_cma_restarts, float dp_lo, float dp_hi, float max_pressure_cap_margin_psi, float max_feed_fraction, int history_pick)
None main ()

Variables

 ROOT = Path(__file__).resolve().parents[1]
float PSI_TO_PA = 6894.76
float PA_TO_PSI = 1.0 / PSI_TO_PA
float F_TARGET = 8000.0
float MR_TARGET = 3.5
float PC_MARGIN_PA = 2.0

Detailed Description

Equal LOX/fuel stagnation tanks + modeled feed ΔP allocation (three pressure levels).

For each stagnation pressure **P_tank_O = P_tank_F = P₀** ∈ {700, 800, 900} psi:

* Tanks are **frozen** in Layer‑1 (not optimized).
* **Different injector inlets** arise from hydraulic feed losses: ``P_inj = P_tank − ΔP_feed``.
* **Reject** evaluation rows when any of:

  - ``P_inj ≤ Pc`` on either stream (no meaningful injector ΔP toward the chamber).
  - **Negative feed** (diagnostic ``ΔP_feed < 0`` or ``P_inj > P_tank``).
  - Chamber/nozzle reported **unchoked**: ``chamber_intrinsics["is_choked"] is False`` (see
    ``calculate_chamber_intrinsics`` — uses ``P_back/Pc`` vs critical ratio).
  - **Feed loss fraction** ``f_feed = ΔP_feed / (P_tank − Pc)`` exceeds ``--max-feed-fraction``
    on **either** stream (default ``0.60`` captures “>&nbsp;50–60 % extreme” envelope).

Hydraulic bookkeeping matches ``study_fixed_tanks_feed_allocation.py``.

Does **not** change Cd / injector equations.

Outputs one CSV aggregating every replay row with ``P_equal_psi`` and rejection flags.

Example::

  python scripts/study_equal_tank_pressure_feed_allocation.py \\
    --output-csv output/study_equal_tank_pressure_feed_allocation.csv

Function Documentation

◆ _apply_hist_to_cfg()

None study_equal_tank_pressure_feed_allocation._apply_hist_to_cfg ( Any cfg,
Dict[str, Any] h )
protected

◆ _apply_throat_mm2()

None study_equal_tank_pressure_feed_allocation._apply_throat_mm2 ( Any cfg,
float mm2 )
protected

Definition at line 61 of file study_equal_tank_pressure_feed_allocation.py.

References max.

Referenced by _apply_hist_to_cfg(), and _run_one_pressure_level().

◆ _evaluate_row_equal_tanks()

Dict[str, Any] study_equal_tank_pressure_feed_allocation._evaluate_row_equal_tanks ( Path cfg_template,
Dict[str, Any] h,
* ,
float P_equal_psi,
float dp_inj_pc_lo,
float dp_inj_pc_hi,
float max_feed_fraction )
protected

◆ _hist_signature()

Tuple[Any, ...] study_equal_tank_pressure_feed_allocation._hist_signature ( Dict[str, Any] h)
protected

◆ _inj_diag()

study_equal_tank_pressure_feed_allocation._inj_diag ( Dict[str, Any] res,
str key )
protected

◆ _run_one_pressure_level()

List[Dict[str, Any]] study_equal_tank_pressure_feed_allocation._run_one_pressure_level ( * ,
Path cfg_path,
float P_equal_psi,
float throat_lo_mm2,
float throat_hi_mm2,
int layer1_max_iterations,
int layer1_cma_restarts,
float dp_lo,
float dp_hi,
float max_pressure_cap_margin_psi,
float max_feed_fraction,
int history_pick )
protected

◆ _strip_none_fp()

Dict[str, Any] study_equal_tank_pressure_feed_allocation._strip_none_fp ( Dict[str, Any] fp)
protected

◆ main()

None study_equal_tank_pressure_feed_allocation.main ( )

Definition at line 447 of file study_equal_tank_pressure_feed_allocation.py.

References _run_one_pressure_level(), and main().

Referenced by main().

Variable Documentation

◆ F_TARGET

float study_equal_tank_pressure_feed_allocation.F_TARGET = 8000.0

Definition at line 52 of file study_equal_tank_pressure_feed_allocation.py.

◆ MR_TARGET

float study_equal_tank_pressure_feed_allocation.MR_TARGET = 3.5

Definition at line 53 of file study_equal_tank_pressure_feed_allocation.py.

◆ PA_TO_PSI

float study_equal_tank_pressure_feed_allocation.PA_TO_PSI = 1.0 / PSI_TO_PA

Definition at line 51 of file study_equal_tank_pressure_feed_allocation.py.

◆ PC_MARGIN_PA

float study_equal_tank_pressure_feed_allocation.PC_MARGIN_PA = 2.0

Definition at line 54 of file study_equal_tank_pressure_feed_allocation.py.

◆ PSI_TO_PA

float study_equal_tank_pressure_feed_allocation.PSI_TO_PA = 6894.76

Definition at line 50 of file study_equal_tank_pressure_feed_allocation.py.

◆ ROOT

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

Definition at line 42 of file study_equal_tank_pressure_feed_allocation.py.