STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
study_fixed_tanks_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)
Optional[float] _inj_diag (Dict[str, Any] res, str key)
Dict[str, Any] _evaluate_feed_row (Path cfg_template, Dict[str, Any] h, *, float P_tank_O_psi, float P_tank_F_psi, float dp_inj_pc_lo, float dp_inj_pc_hi)
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

Detailed Description

Fixed stagnation tanks + feed-system ΔP allocation study (impinging injector).

Tank pressures are **frozen** (not optimized). Layer‑1 searches throat + injector geometry only.

Hydraulic bookkeeping (matches ``engine/core/injectors/impinging.py`` / ``report_pressure_budget_breakdown.py``)::

    P_inj = P_tank − ΔP_feed          (feed model gives ΔP_feed ≥ 0 at the solution)
    ΔP_inj = max(0, P_inj − Pc)       ⇒  P_inj = Pc + ΔP_inj   when P_inj ≥ Pc

    P_tank − Pc = ΔP_feed + ΔP_inj

**Feed loss fraction** (share of tank→chamber static head on each propellant path)::

    f_feed = ΔP_feed / (P_tank − Pc)

Candidates with **effective** negative feed allocation are rejected::
``P_inj > P_tank`` (⇒ ΔP_feed = P_tank − P_inj < 0), or diagnostics ``ΔP_feed < 0``.

Does **not** change Cd discharge models or injector mass-flow equations.

Workflow
~~~~~~~~

1. Run ``run_layer1_optimization`` with ``frozen_parameters`` pinning ``P_O_start_psi`` /
   ``P_F_start_psi`` to the chosen tank pressures.

2. Re-evaluate `layer1_best` + diversified ``iteration_history`` rows at the **same**
   stagnation pressures; extract pressures from ``runner.evaluate`` output.

Example::

  python scripts/study_fixed_tanks_feed_allocation.py \\
    --p-tank-o-psi 644 --p-tank-f-psi 410 \\
    --skip-layer1

Function Documentation

◆ _apply_hist_to_cfg()

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

Definition at line 95 of file study_fixed_tanks_feed_allocation.py.

References _apply_throat_mm2().

Referenced by _evaluate_feed_row().

◆ _apply_throat_mm2()

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

Definition at line 69 of file study_fixed_tanks_feed_allocation.py.

References max.

Referenced by _apply_hist_to_cfg(), and main().

◆ _evaluate_feed_row()

Dict[str, Any] study_fixed_tanks_feed_allocation._evaluate_feed_row ( Path cfg_template,
Dict[str, Any] h,
* ,
float P_tank_O_psi,
float P_tank_F_psi,
float dp_inj_pc_lo,
float dp_inj_pc_hi )
protected

Definition at line 119 of file study_fixed_tanks_feed_allocation.py.

References _apply_hist_to_cfg(), _inj_diag(), and max.

Referenced by main().

◆ _hist_signature()

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

Definition at line 81 of file study_fixed_tanks_feed_allocation.py.

Referenced by main().

◆ _inj_diag()

Optional[float] study_fixed_tanks_feed_allocation._inj_diag ( Dict[str, Any] res,
str key )
protected

Definition at line 108 of file study_fixed_tanks_feed_allocation.py.

Referenced by _evaluate_feed_row().

◆ _strip_none_fp()

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

Definition at line 65 of file study_fixed_tanks_feed_allocation.py.

Referenced by main().

◆ main()

None study_fixed_tanks_feed_allocation.main ( )

Variable Documentation

◆ F_TARGET

float study_fixed_tanks_feed_allocation.F_TARGET = 8000.0

Definition at line 61 of file study_fixed_tanks_feed_allocation.py.

◆ MR_TARGET

float study_fixed_tanks_feed_allocation.MR_TARGET = 3.5

Definition at line 62 of file study_fixed_tanks_feed_allocation.py.

◆ PA_TO_PSI

float study_fixed_tanks_feed_allocation.PA_TO_PSI = 1.0 / PSI_TO_PA

Definition at line 60 of file study_fixed_tanks_feed_allocation.py.

◆ PSI_TO_PA

float study_fixed_tanks_feed_allocation.PSI_TO_PA = 6894.76

Definition at line 59 of file study_fixed_tanks_feed_allocation.py.

◆ ROOT

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

Definition at line 51 of file study_fixed_tanks_feed_allocation.py.