STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.pid.roles Namespace Reference

Functions

frozenset[str]|None vehicle_ids (Diagram diagram)
None _clip_with (Diagram diagram, set[str] members)
frozenset[str] ground_ids (Diagram diagram)
str _mate (PidNode node)
frozenset[str] vent_branches (Diagram diagram)
set[str] _off_vehicle_branch (str start, frozenset[str] vehicle, dict[str, set[str]] adjacent, set[str] ids)
list[str] unpaired_vents (Diagram diagram)
tuple[Diagram, tuple[str,...]] vehicle_only (Diagram diagram)

Variables

 ENGINE_TYPES = frozenset({"ENGINE", "INJECTOR"})
 VESSEL_TYPES = frozenset({"TANK", "KBOTTLE", "DEWAR"})
 SUPPLY_TYPES = VESSEL_TYPES | frozenset({"PR", "PUMP", "QD"})
 VENTING_TYPES = frozenset({"SOL", "MOV", "ROT", "RV", "VENT"})

Detailed Description

Which part of a drawing is the vehicle, and which is the ground support.

pid-designer draws a stand on pages -- the rocket on one, the GSE on another --
joined only by quick-disconnects paired across the pages (``options.pairedWith``).
The twin mates those pairs into one network, because filling the vehicle is what
the GSE is for. But a vessel's *job* depends on which side of the couplings it
sits: a TANK on the vehicle is a load the engine burns, a TANK on the cart is
where a load comes from; a KBOTTLE on the vehicle is the pressurant the burn
spends, a 49 L K-bottle on the cart is delivered full and charges it.

The vehicle is everything joined to the engine by a drawn line, walked through
any symbol. A paired disconnect is not a drawn line, so the walk stops at the
coupling, which is where the vehicle ends. A drawing with no engine, or whose
GSE is drawn with lines into the vehicle, is one piece: the whole drawing is the
vehicle, and every drawing that read before reads exactly as it did.

Shared by the cockpit and Layer X (``EngineDesign/engine/layerx``), so the two
never disagree about which tank is which.

Function Documentation

◆ _clip_with()

None feedtwin.pid.roles._clip_with ( Diagram diagram,
set[str] members )
protected
Add to ``members`` every probe clipped to one of them, or to a line both
of whose ends are among them (pid-designer clips probes to lines too).

Definition at line 56 of file roles.py.

Referenced by vehicle_ids(), and vent_branches().

◆ _mate()

str feedtwin.pid.roles._mate ( PidNode node)
protected

Definition at line 94 of file roles.py.

Referenced by unpaired_vents(), vehicle_only(), and vent_branches().

◆ _off_vehicle_branch()

set[str] feedtwin.pid.roles._off_vehicle_branch ( str start,
frozenset[str] vehicle,
dict[str, set[str]] adjacent,
set[str] ids )
protected

Definition at line 142 of file roles.py.

Referenced by unpaired_vents(), and vent_branches().

◆ ground_ids()

frozenset[str] feedtwin.pid.roles.ground_ids ( Diagram diagram)
Every symbol that is ground support: off the vehicle. Empty for a drawing
that is one piece (or has no engine to say which piece is the vehicle).

Definition at line 71 of file roles.py.

References vehicle_ids().

◆ unpaired_vents()

list[str] feedtwin.pid.roles.unpaired_vents ( Diagram diagram)
What to say when the cart draws a vent line whose coupling is paired
with nothing while the rocket has a coupling paired with nothing: they are
likely the vent's two halves, and as drawn the vent valve behind the cart's
half is never reached (the tank vents through the rocket's half as a
stand-in). Said, not guessed: which half goes with which is the drawing's
to state (``options.pairedWith`` in pid-designer).

Definition at line 155 of file roles.py.

References _mate(), _off_vehicle_branch(), and vehicle_ids().

◆ vehicle_ids()

frozenset[str] | None feedtwin.pid.roles.vehicle_ids ( Diagram diagram)
Every symbol joined to an ENGINE by drawn lines, or ``None`` without one.

Instruments clipped to a vehicle symbol (an RTD on a tank, a TC on the
engine) belong with it.

Definition at line 32 of file roles.py.

References _clip_with().

Referenced by ground_ids(), unpaired_vents(), vehicle_only(), and vent_branches().

◆ vehicle_only()

tuple[Diagram, tuple[str, ...]] feedtwin.pid.roles.vehicle_only ( Diagram diagram)
The drawing with its ground support cut away, and the labels of the
vessels that went with it.

What a stand with its GSE unplugged is: every symbol off the vehicle is
gone, with every line that touches one, and each vehicle disconnect whose
mate was cut is a capped half -- which is how a one-page drawing of the
rocket reads its fill and vent ports. The cart's vent lines stay
(:func:`vent_branches`): they are plugged into the rocket until launch.
A drawing that is one piece comes back as the same object, with nothing
cut.

Definition at line 199 of file roles.py.

References _mate(), vehicle_ids(), and vent_branches().

◆ vent_branches()

frozenset[str] feedtwin.pid.roles.vent_branches ( Diagram diagram)
The cart's vent lines: every off-vehicle symbol behind a vehicle
disconnect whose far side is only a vent.

The vents sit on the GSE, but they are a small part of it that stays
plugged into the rocket until the last moment before launch (the team,
2026-10-10): with the rest of the cart unplugged a tank still vents
through its own line and valve. A branch is a vent when the walk from the
mate along drawn lines, off the vehicle, finds a valve or an outlet and
nothing that holds or sets a pressure (``SUPPLY_TYPES``: a vessel, a
regulator, another coupling). Instruments clipped to it come with it. A
coupling with nothing drawn behind it, or only a hand valve, is no vent
line: it stays capped.

Definition at line 99 of file roles.py.

References _clip_with(), _mate(), _off_vehicle_branch(), and vehicle_ids().

Referenced by vehicle_only().

Variable Documentation

◆ ENGINE_TYPES

feedtwin.pid.roles.ENGINE_TYPES = frozenset({"ENGINE", "INJECTOR"})

Definition at line 29 of file roles.py.

◆ SUPPLY_TYPES

feedtwin.pid.roles.SUPPLY_TYPES = VESSEL_TYPES | frozenset({"PR", "PUMP", "QD"})

Definition at line 85 of file roles.py.

◆ VENTING_TYPES

feedtwin.pid.roles.VENTING_TYPES = frozenset({"SOL", "MOV", "ROT", "RV", "VENT"})

Definition at line 91 of file roles.py.

◆ VESSEL_TYPES

feedtwin.pid.roles.VESSEL_TYPES = frozenset({"TANK", "KBOTTLE", "DEWAR"})

Definition at line 81 of file roles.py.