STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.engine.component.InjectorLeg Class Reference
Inheritance diagram for feedtwin.engine.component.InjectorLeg:
[legend]
Collaboration diagram for feedtwin.engine.component.InjectorLeg:
[legend]

Public Member Functions

None __init__ (self, ComponentInstance instance, InjectorSide side)
str id (self)
float effective_area (self, float mdot, FlowConditions flow)
float pressure_drop (self, float mdot, FlowConditions flow)
bool off_card (self, float mdot, FlowConditions flow)
dict[str, float] diagnostics (self, float mdot, FlowConditions flow)
list[Violation] check (self)
Public Member Functions inherited from feedtwin.comps.base.HydraulicComponent
None __init__ (self, ComponentInstance instance)
str type (self)
float static_head (self, FlowConditions flow)
float total_dp (self, float mdot, FlowConditions flow)
float signal (self, FlowConditions flow, str name, float default=1.0)
bool isolates (self, Mapping[str, float]|None signals=None)
float|None flow_ceiling (self, FlowConditions flow)
float|None pinned_flow (self, float dp_available, FlowConditions flow)
bool is_choked (self, float dp_available, FlowConditions flow)
int n_residuals (self)
Sequence[float] residuals (self, EvalContext ctx)
Mapping[str, float] outputs (self, EvalContext ctx)
FlowConditions conditions (self, PortState port, Mapping[str, float] signals)
str __repr__ (self)

Public Attributes

 side = side
Public Attributes inherited from feedtwin.comps.base.HydraulicComponent
 instance = instance
 p = instance.si_params()
 opt = dict(instance.options)

Additional Inherited Members

Static Public Attributes inherited from feedtwin.comps.base.HydraulicComponent
str inlet_port = "inlet"
str outlet_port = "outlet"
bool symmetric = False
 conditions_provider = None

Detailed Description

One propellant's path through the injector face.

``dp = mdot^2 / (2 rho (Cd A)^2)`` -- the orifice relation, with ``Cd``
coming from the Reynolds-dependent model in the engine config rather than
being a constant. That dependence is not decoration: at low flow during
startup the discharge coefficient is materially below its high-Reynolds
value, and an injector modelled at a fixed ``Cd`` opens too fast.

Built from an :class:`~feedtwin.engine.design.InjectorSide` rather than from
a component config, because the whole point of Phase 08 is that these
numbers arrive from Layer 1 and are not retyped.

Definition at line 49 of file component.py.

Constructor & Destructor Documentation

◆ __init__()

None feedtwin.engine.component.InjectorLeg.__init__ ( self,
ComponentInstance instance,
InjectorSide side )

Definition at line 63 of file component.py.

References __init__().

Referenced by __init__().

Member Function Documentation

◆ check()

list[Violation] feedtwin.engine.component.InjectorLeg.check ( self)
Design limits this component's configuration breaks.

Configuration only -- nothing here depends on the operating point, so it
can be run the moment a network is loaded and long before it is solved.
Bend radius is the case that motivated it: a line bent tighter than its
tube allows is a fabrication problem, and finding out at the bender is
expensive.

Reimplemented from feedtwin.comps.base.HydraulicComponent.

Definition at line 134 of file component.py.

References _USBD_HandleTypeDef.id, anonymous_namespace{idle_e2e.cpp}::Check.id, check_t.id, feedtwin.comps.elements.OrificeISO5167.id, feedtwin.comps.gas.GasOrifice.id, feedtwin.comps.manifold.Manifold.id, feedtwin.comps.regulator.Regulator.id, feedtwin.comps.relief.ReliefValve.id, id, and side.

◆ diagnostics()

dict[str, float] feedtwin.engine.component.InjectorLeg.diagnostics ( self,
float mdot,
FlowConditions flow )
Derived quantities worth reporting: velocity, Reynolds number, K.

Never consumed by a solver. This is what a frame and a report show, and
what makes a result inspectable rather than just a number.

Reimplemented from feedtwin.comps.base.HydraulicComponent.

Definition at line 116 of file component.py.

References feedtwin.engine.balance.SideBalance.effective_area(), effective_area(), off_card(), feedtwin.comps.base.HydraulicComponent.pressure_drop(), and side.

◆ effective_area()

float feedtwin.engine.component.InjectorLeg.effective_area ( self,
float mdot,
FlowConditions flow )
``Cd . A`` at this operating point [m^2].

With an engine card it is recovered from the card's pressure drop at the
density this leg sees, so the diagnostics and the mixture balance read
the same injector the solve used.

Definition at line 71 of file component.py.

References side.

Referenced by diagnostics(), and pressure_drop().

◆ id()

str feedtwin.engine.component.InjectorLeg.id ( self)

◆ off_card()

bool feedtwin.engine.component.InjectorLeg.off_card ( self,
float mdot,
FlowConditions flow )
True when this lookup is outside the hull the leg's card was fitted to.

The card's table clamps outside its box, which keeps the number
physical and says nothing; the hull is how a trace learns it left what
the card knows (:func:`fold_injectors`). No card, nothing to be off.

Definition at line 104 of file component.py.

References side.

Referenced by diagnostics().

◆ pressure_drop()

float feedtwin.engine.component.InjectorLeg.pressure_drop ( self,
float mdot,
FlowConditions flow )
Flow-dependent pressure loss [Pa]. Always non-negative.

A *loss*: it opposes the flow, so it lowers the downstream pressure
whichever way the fluid is going. Reverse flow is each component's own
business -- symmetric for a pipe, very much not for a check valve.

Anything that does **not** depend on the direction of flow belongs in
:meth:`static_head`, not here. See that method for why the distinction
is load-bearing rather than tidy.

Reimplemented from feedtwin.comps.base.HydraulicComponent.

Definition at line 84 of file component.py.

References feedtwin.engine.balance.SideBalance.effective_area(), effective_area(), and side.

Member Data Documentation

◆ side

feedtwin.engine.component.InjectorLeg.side = side

Definition at line 65 of file component.py.

Referenced by check(), diagnostics(), effective_area(), off_card(), and pressure_drop().


The documentation for this class was generated from the following file: