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

Functions

Dict[str, Any] fit_feed (Prepared prep, Dict[str, Any] result, Any config)
Optional[str] _refusal (str label, float k0, float k_line, float k_supply, float line_psi, float line_design_psi, float tank_psia, float lockup_psia)
Dict[str, Any] design_update (Dict[str, Any] fit, str run_id, Optional[float] when=None)
List[Dict[str, Any]] summary_rows (Dict[str, Any] fit)

Variables

float SETTLED_S = 0.3
tuple SIDES = (("ox", "oxidizer", "LOX"), ("fuel", "fuel", "Fuel"))

Detailed Description

The drawing's feed, in the form the injector is designed with.

EngineDesign sizes the injector (Layer 1, forward mode) at a tank pressure, less one loss per side,
``K0`` velocity heads of the line plus the exit dump (``engine/pipeline/feed_loss.py``). The drawing
says otherwise in two places, measured on the 6.8 kN stand burn:

* **The tank does not hold its lockup while firing.** It holds lockup less the regulator's droop
  and the press line's loss into the ullage, partly given back by the supply-pressure effect as
  the bottle falls: 13 psi below lockup on average on the LOX side, 25 psi at worst. EngineDesign's
  tank pressure is the regulator's set point, flowing nothing.
* **The lines lose more than their K0 says**, because the drawing has the valves, the bends and
  the lengths: LOX 0.728 velocity heads against 0.643, fuel 2.16 against 2.02.

Together the manifolds sit 13–15 psi below what the injector was sized for, about 11 % of its
drop, and not by the same amount on the two sides.

``fit_feed`` reads both from a Layer X burn, per side, against EngineDesign's own velocity head
(its density, its ``A_hydraulic``) so the numbers drop straight into ``K0``:

* ``K_line``: the drawing's lines, tank to line exit, least squares over the settled burn. A
  velocity-head law is the lines' own form (Darcy plus fittings), so this one is physical.
* ``K_supply``: the burn-mean fall of the tank below lockup, expressed in the same velocity heads at
  the burn's mean flow. This one is not a velocity-head law (droop goes with flow, the
  supply-pressure effect with time), so it is exact at the flow it was fitted at and approximate
  away from it: a design that moves the flow 5 % moves it ~0.7 psi. Fit again after resizing the
  injector, and the two converge.

``K0 = K_line + K_supply`` is the whole loss from the lockup to the line exit at the design flow:
the drawing's, in the form Layer 1's solver already reads. The exit dump stays EngineDesign's
``K_exit``, which is the term the engine card uses too. Written into the design, it carries a
``derived_from`` record saying which drawing, which run and which flow.

Function Documentation

◆ _refusal()

Optional[str] engine.layerx.feedfit._refusal ( str label,
float k0,
float k_line,
float k_supply,
float line_psi,
float line_design_psi,
float tank_psia,
float lockup_psia )
protected
Why a side's fitted K0 cannot go into the design, or ``None`` when it can. K0 is a loss in
velocity heads; at or below zero the fit is saying the feed *adds* pressure, which a loss
coefficient cannot hold. Said by its parts: the lines (a side drawn with no line loses nothing
between the tank and the injector) and the supply (the regulator's outlet climbs as the bottle
empties, the supply-pressure effect, so the tank sits above its T-0 pressure while firing).

Definition at line 136 of file feedfit.py.

Referenced by design_update(), and fit_feed().

◆ design_update()

Dict[str, Any] engine.layerx.feedfit.design_update ( Dict[str, Any] fit,
str run_id,
Optional[float] when = None )
The ``feed_system`` update that writes the fit into the design: K0 per side on the lumped
path (the method ladder's "measured K", here fitted from the drawing), with its record.
Refused (``ValueError``) when a side's K0 is not a loss (:func:`_refusal`).

Definition at line 155 of file feedfit.py.

References _refusal(), max, and time.time().

◆ fit_feed()

Dict[str, Any] engine.layerx.feedfit.fit_feed ( Prepared prep,
Dict[str, Any] result,
Any config )
Per side: the drawing's feed against the design's, and the K0 that makes them agree.

Definition at line 47 of file feedfit.py.

References _refusal(), and max.

◆ summary_rows()

List[Dict[str, Any]] engine.layerx.feedfit.summary_rows ( Dict[str, Any] fit)
Flat rows for a report.

Definition at line 196 of file feedfit.py.

Variable Documentation

◆ SETTLED_S

float engine.layerx.feedfit.SETTLED_S = 0.3

Definition at line 42 of file feedfit.py.

◆ SIDES

tuple engine.layerx.feedfit.SIDES = (("ox", "oxidizer", "LOX"), ("fuel", "fuel", "Fuel"))

Definition at line 44 of file feedfit.py.