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

Public Member Functions

None __init__ (self, ComponentInstance instance, list[ManifoldPort]|None ports=None)
list[ManifoldPort] flow_ports (self)
list[ManifoldPort] dead_ports (self)
float pressure_drop (self, float mdot, FlowConditions flow)
list[Violation] check (self)
str __repr__ (self)
Public Member Functions inherited from feedtwin.comps.base.HydraulicComponent
None __init__ (self, ComponentInstance instance)
str id (self)
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)
dict[str, float] diagnostics (self, float mdot, FlowConditions flow)
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

 ports = list(ports or [])
 flow_ports
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

A manifold body: a plenum with ports tapped into it.

Not itself a branch. It has no single inlet-to-outlet pressure drop, which
is why :meth:`pressure_drop` refuses rather than returning zero -- a
manifold that silently costs nothing is a manifold whose port losses have
gone missing. Use :func:`expand_manifold` to turn one into the node and
branches a solver consumes.

Args:
    instance: The configured component. Reads ``bore`` (the plenum's own
        flow diameter) and ``volume`` (used by transient work, not by a
        steady solve).
    ports: The tappings.

Definition at line 150 of file manifold.py.

Constructor & Destructor Documentation

◆ __init__()

None feedtwin.comps.manifold.Manifold.__init__ ( self,
ComponentInstance instance,
list[ManifoldPort] | None ports = None )

Definition at line 166 of file manifold.py.

References __init__().

Referenced by __init__().

Member Function Documentation

◆ __repr__()

str feedtwin.comps.manifold.Manifold.__repr__ ( self)

Definition at line 220 of file manifold.py.

References ports.

◆ check()

list[Violation] feedtwin.comps.manifold.Manifold.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 193 of file manifold.py.

◆ dead_ports()

list[ManifoldPort] feedtwin.comps.manifold.Manifold.dead_ports ( self)

Definition at line 182 of file manifold.py.

References ports.

◆ flow_ports()

list[ManifoldPort] feedtwin.comps.manifold.Manifold.flow_ports ( self)

Definition at line 178 of file manifold.py.

References ports.

◆ pressure_drop()

float feedtwin.comps.manifold.Manifold.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 185 of file manifold.py.

Member Data Documentation

◆ flow_ports

feedtwin.comps.manifold.Manifold.flow_ports

Definition at line 195 of file manifold.py.

◆ ports

feedtwin.comps.manifold.Manifold.ports = list(ports or [])

Definition at line 170 of file manifold.py.

Referenced by __repr__(), dead_ports(), and flow_ports().


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