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

Classes

Functions

Dict[str, float] _reference (EngineSampler sampler, float p_O, float p_F)
Any _constant_cd (float value)
Any _chamber (Any design, Any table, float ambient_pa, **float losses)
EngineLink link_engine (Any config, *, float tank_pa_O, float tank_pa_F, Optional[Path] cea_path, float ambient_pa, Any fluid_at, str mode="card", Optional[float] card_center_pa=None)
Dict[str, Tuple[float, float]] twin_injector_check (EngineLink link, Any fluid_at)

Variables

float PSI = 6894.757293168361
tuple MODES = ("card", "calibrated", "native")

Detailed Description

The engine on the end of the feed system: EngineDesign's, as the twin runs it.

The twin's own engine is simple:
* an orifice leg per side, with the config's Reynolds-law Cd;
* ``p_c = mdot c* eta / A_t`` on the CEA table, with ``eta_c* = 1``. Its importer says
  that chamber pressure is an upper bound.

EngineDesign's engine has much more in it:
* a plate-passage Cd and a ring-network manifold;
* the Borda dump of the feed line into that manifold;
* a spray/mixing/heat-loss c* efficiency;
* a stagnation loss and the real nozzle exit.

On the 6.8 kN engine at 578 psia the two differ by ~14 % in flow. Three ways to put
an engine on the end of the twin, as ``mode``:

``card`` (default, phase 2)
    EngineDesign sampled across the burn envelope and tabulated as an engine card
    (:mod:`engine.layerx.card`, :mod:`feedtwin.engine.card`). The twin evaluates
    EngineDesign's injector and chamber at every coupling step, everywhere the
    burn goes. The card carries its own measured error.

``calibrated`` (phase 1)
    The twin's engine, with four constants set so that it reproduces EngineDesign
    at one point, T-0:
    * a Cd per side;
    * ``eta_c*``;
    * ``eta_n``.

    Away from T-0 they are held constant. Kept for comparison.

``native``
    The twin's engine as imported. For seeing what the other two change.

Both EngineDesign modes put the boundary at the **line exit**. EngineDesign is
solved with its feed-line losses zeroed and its exit dump kept
(:func:`engine.layerx.card.line_exit_config`), because the drawing's lines carry
every loss upstream of the injector face and none downstream of it.

Phase 1 calibrated against EngineDesign's still-manifold injector drop, which
left that ~26 psi LOX dump on neither side.

Function Documentation

◆ _chamber()

Any engine.layerx.link._chamber ( Any design,
Any table,
float ambient_pa,
**float losses )
protected

Definition at line 93 of file link.py.

Referenced by link_engine().

◆ _constant_cd()

Any engine.layerx.link._constant_cd ( float value)
protected
A discharge model that is ``value`` at every Reynolds number.

Definition at line 86 of file link.py.

References max, and min.

Referenced by link_engine().

◆ _reference()

Dict[str, float] engine.layerx.link._reference ( EngineSampler sampler,
float p_O,
float p_F )
protected

Definition at line 77 of file link.py.

Referenced by link_engine().

◆ link_engine()

EngineLink engine.layerx.link.link_engine ( Any config,
* ,
float tank_pa_O,
float tank_pa_F,
Optional[Path] cea_path,
float ambient_pa,
Any fluid_at,
str mode = "card",
Optional[float] card_center_pa = None )
The live config as the twin's engine, in ``mode`` (see the module docstring).

``fluid_at(side, pressure_pa) -> (rho, mu)`` is the twin's own propellant state at the
injector inlet, used where a Cd has to be recovered at the density the twin's leg sees.
``card_center_pa`` centres the engine card somewhere other than this burn's T-0, so that
burns at several tank pressures share one card (the optimiser); the card's own envelope
check and the run's ``card_outside_steps`` say whether the burn stayed inside it.

Definition at line 100 of file link.py.

References _chamber(), _constant_cd(), and _reference().

◆ twin_injector_check()

Dict[str, Tuple[float, float]] engine.layerx.link.twin_injector_check ( EngineLink link,
Any fluid_at )
At EngineDesign's T-0 flows, the twin's line-exit-to-chamber pressure drop per side
against EngineDesign's: ``side -> (twin_dp, ed_dp)`` [Pa]. Equal by construction when
calibrated, equal to the card's error with a card, the gap they close when native.

Definition at line 226 of file link.py.

Variable Documentation

◆ MODES

tuple engine.layerx.link.MODES = ("card", "calibrated", "native")

Definition at line 55 of file link.py.

◆ PSI

float engine.layerx.link.PSI = 6894.757293168361

Definition at line 53 of file link.py.