Switch - nasa/gunns GitHub Wiki

Switch

Background

This is a utility class that is imbedded in several types of GUNNS links. It is not a GUNNS link in itself.

The Switch class emulates an electrical switch, either physical or transistor. The switch can be configured to trip open at variable electrical current levels in either direction. The current trip function can also be disabled so the switch can handle infinite current. The switch incorporates a trip priority function to model the staggered trip times in some electrical networks, such as in the International Space Station. This system ensures that the switch closest to a short circuit or trip condition is the one that opens, minimizing the impact to the overall network as intended.

The switch class used to have capability to trip on an input under-voltage, but this function is no longer present. Its configuration data attributes are still in the class but aren't used.

How To Use in Gunnshow

This class is not a GUNNS link, but is rather imbedded in another link class. Because it isn't a link it doesn't have ports or associated port connection rules. It does have configuration and input data, which are discussed below.

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

  • N/A

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

  • N/A

Configuration Data Parameters:

  • defaultSwitchResistance (default = 0.0668 (ohm), must be > 0 and in general you should limit non-zero values to be between 1.0E-15 and 1.0E+15): This is the minimum resistance the switch has when it is closed. The inverse of this resistance becomes a conductance used in the parent class.
  • overCurrentProtection (default = true): When true, this boolean enables the over-current trip logic in the switch. When false, the switch will not trip due to over-current.
  • underVoltProtection (default = true): This flag is not used in the model.
  • minVoltage (default = 105.0 (V)): This term is not used in the model.
  • isTwoPortSwitch (default = false): When true, this flag indicates to the parent link that the switch creates a flow path between the input node and an output node - in other words between two of the parent link's ports. The switch must then be assigned an output port in the parent link via the portAssigned term. When false, the parent link may treat the switch as an internal connection and built-in load from the input node to Ground.
  • portAssigned (default = 0, must be > 0 when isTwoPortSwitch = true): This defines which output port in the parent link the switch connects to. It is only relevent when the switch is configured as a two-port switch.
  • tripPriority (default = 1, must be > 0): This assigns a priority level to the switch's trip functions. In a network, trips between multiple objects are handled in order of ascending priority, i.e. objects with priority 1 can trip first, then objects with priority 2, etc. This allows multiple objects in a circuit to be configured to trip in a realistic sequence. Usually circuits are designed such that the object nearest a fault tips first, to localize the impact to the overall circuit.
  • reversed (default = false): This flag tells the parent link whether to reverse the sign of current given to the switch for evaluating the switch's trip logic.

Input Data Parameters:

  • switchMalfFlag (default = false): This flag is not used in the model.
  • switchMalfValue (default = 0): This term is not used in the model.
  • switchIsClosed (default = false): When true, this flag sets the switch's initial state to closed. When false, the switch is initially open.
  • posTripLimit (default = 3.5 (amp), must be >= 0): This defines the positive current limit. When actual current through the switch is greater than this limit, the over-current logic will attempt to trip the switch open. To prevent trips in this direction from occurring, set this limit to a larger positive value than would ever occur, such as 1.0E15.
  • negTripLimit (default = -0.1 (amp), must be <= 0): This defines the negative current limit. When actual current through the switch is less than this limit, the over-current logic will attempt to trip the switch open. To prevent trips in this direction from occurring, set this limit to a larger negative value than would ever occur, such as -1.0E15.

Common Problems

  • N/A

References

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