GunnsBasicSocket - nasa/gunns GitHub Wiki

GunnsBasicSocket

default_img

Background

This link works in conjunction with GunnsBasicJumpers. It extends GunnsBasicConductor 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.

See GunnsFluidSocket for more information. The GunnsBasicSocket is the version used for electrical or thermal networks. An example of the electrical analogy of a socket is an electrical wall outlet - it controls access of an electrical plug (on the end of a cable -- see GunnsBasicJumper) to a building's power circuit. When you unplug the plug from the socket and hold it in your hand, it is electrically isolated from any other part of the circuit (in GUNNS it might connect to Ground but be "self-sealing" so it doesn't flow). You can then plug it into another socket, etc.

The socket itself is a link between the node it controls access of the plug to, and and ambient node (which would usually be Ground in the electrical sense). If the socket is given a conductivity, this creates an electrical short between the circuit and Ground, as if there were frayed insulation, etc. This is analogous to a leaky fluid socket that can't make a good seal when connected and leaks fluid to the ambient node.

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 (electrically insulated or open-circuit). Not self-sealing means that when there's no jumper plug connected, the link is open to flow between the two nodes. Most electrical socket/jumper applications will be self-sealing, but the option is there just in case.

How To Use in GunnsDraw

The basic socket link can be connected to nodes in the same ways that a GunnsFluidSocket can.

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):

  • N/A

Configuration Data Parameters:

  • defaultConductivity Same as GunnsBasicConductor. 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.
  • selfSealing (default = false): True means the socket is self-sealing (see the description above). Most electrical applications will be self-sealing when disconnected (open circuit).

Input Data Parameters:

Common Problems

  • N/A

References

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