GunnsFluidSocket - nasa/gunns GitHub Wiki

GunnsFluidSocket

default_img

Background

This link works in conjunction with GunnsFluidJumpers. It extends GunnsFluidConductor with the ability to control the jumpers' access to a node. A socket link allows one jumper plug (one end of a jumper link) to attach that port of the jumper to the control node. A socket that already has a jumper plug connected does not allow other jumper plugs to connect until the first plug has disconnected. When a plug disconnects, that port of the jumper moves to the socket's ambient node.

To help you visualize this, imagine your car is in the garage and it has a flat tire. There is an air compressor with an attached hose. You want to connect the loose end of the air compressor's hose to the valve stem on the tire so you can fill the tire up. The valve stem is our socket -- it controls access of the hose to the inside of the tire. When you connect the end of the hose (the plug) to the valve stem (socket), the hose (jumper) is connected to the insides of the tire (control node). After you've filled up the tire, you disconnect the hose from the tire. The loose end of the hose is now open to the garage, and the garage in this case is the socket's ambient node. So the hose is now really connected to the garage node. Furthermore, the socket itself is also a link between its control node (inside of the tire) and its ambient node (garage) so that it can leak between them (maybe that's how the tire went flat in the first place!)

Sockets can either be self-sealing or not. Self-sealing means that when there's no jumper plug connected, the link is closed and can't flow (the way a tire valve stem is supposed to work -- it holds the air inside the tire when there's no hose attached). Not self-sealing means that when there's no jumper plug connected, the link is open to flow between the two nodes. An example of a non self-sealing socket is a fire hydrant. When the fire department takes the cap off it gushes water into the street. That opening in the hydrant is a socket between the water main (control node) and the outside (ambient node). When they hook up a fire hose to the socket, the socket seals so that it doesn't flow between the water main and outside, and the jumper (hose) link takes over to flow from the water main into your burning house (maybe that air compressor overheated).

Whether or not the socket is self-sealing, it can also leak between the control node and the ambient node. This would simulate a bad seal between the jumper plug and the control node. This is controlled with a leak-thru malfunction in the socket link.

Historical perspective: sockets & jumpers fulfill the same function as Config Valves from legacy SSTF's PFN.

Like the fluid conductor, this link models gas isentropic expansion, but does not model any other thermal effects and does not modify the mixture of the fluid passing through it.

How To Use in GunnsDraw

This picture shows the various ways sockets can be connected to nodes, and one way they can't. The first example is the most typical application we use - this socket controls access of one jumper at a time to Node 0, and its ambient Node 1 is the surrounding room/cabin/etc. The second example shows how the ambient node can be Ground (pure vacuum) which we can use a lot in space applications. Putting both ports on Ground is a good way to store spare links.

default_img

Port Connection Rules (These are limitations on the port connection to nodes that the link enforces in run-time):

  • Ports 0 and 1 cannot connect to the same non-Ground node.

Other Rules (These are extra rules you should always try to follow):

  • Do not mix fluid phases across the link. That is, both nodes should contain the same phase (gas or liquid), and not different phases.

Configuration Data Parameters:

  • maxConductivity (default = 0.0 m2, must be >= 0 and in general you should limit non-zero values to be between 1.0E-15 and 1.0E+15): Same as GunnsFluidConductor. This only governs the flow between the control node and the ambient node when the socket is not self-sealing and there is no jumper connected.
  • expansionScaleFactor (default = 0.0, must be (0-1)): Same as GunnsFluidConductor.
  • selfSealing (default = false): True means the socket is self-sealing (see the description above).

Input Data Parameters:

  • malfBlockageFlag (default = false): Same as GunnsFluidConductor.
  • malfBlockageValue (default = 0.0, must be (0-1)): Same as GunnsFluidConductor.
  • malfLeakRateFlag (default = false): Initial state of the leak-thru malfunction activation flag. This controls the leak rate between the control and ambient nodes. The leak applies when there is a jumper connected (self-sealing or not) and also when there is no jumper connected and the socket is self-sealing.
  • malfLeakRateValue (default = 0.0 (kg/s)): The initial flow rate of the leak-thru malfunction.

Common Problems

  • N/A

References

  • N/A
⚠️ **GitHub.com Fallback** ⚠️