GunnsFluidSimpleQd - nasa/gunns GitHub Wiki

GunnsFluidSimpleQd

default_img

Background

This is a simple Quick-Disconnected link. It inherits GunnsFluidConductor and is identical to GunnsFluidValve except that its position is tracked as an CONNECTED/DISCONNECTED enumeration rather than the valve's (0-1) floating-point value, and it lacks a leak-thru malfunction. CONNECTED is equivalent to a valve position of 1, and DISCONNECTED is equivalent to a position of 0.

Like the valve, the simple QD models isentropic expansion and thermal convection effects, but does not modify the mixture of the fluid passing through it.

How To Use in GunnsDraw

The GunnsFluidSimpleQd can be hooked up to nodes in exactly the same way that regular fluid conductors 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):

Configuration Data Parameters:

Input Data Parameters:

  • malfBlockageFlag: Same as GunnsFluidConductor.
  • malfBlockageValue: Same as GunnsFluidConductor.
  • state (default = GunnsFluidSimpleQd::DISCONNECTED): Initial QD connection state.
    • CONNECTED is fully open (effective conductivity = maxConductivity), and DISCONNECTED is fully closed (effective conductivity = 0).
    • This link does not change its own state, and it must be updated from outside, like from a controller aspect via the sim bus, etc.
  • wallTemperature: Same as GunnsFluidValve.

Common Problems

  • Incompatible Types for QD State: The QD state is typically input from some controller via the Trick simbus. However, the simbus does not allow read/writes between different enumerated types, even if they have identical values. If the controller does not declare its state parameter as the GunnsFluidSimpleQdState enumeration type, simbus cannot interface directly between the controller and this link. To get around this, we typically use a custom GUNNS Spotter object to interface between the controller and the QD. The spotter is added to the same network containing the QD, reads the controller's state via simbus as the controller's type, converts it to the QD's GunnsFluidSimpleQdState type and sets the QD's state via a setter method. These spotter classes can be written for whatever controller type is needed in your sim environment.

References

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