GunnsFluidSourceBoundary - nasa/gunns GitHub Wiki

GunnsFluidSourceBoundary

default_img

Background

This link forces a mass flow rate of fluid at a given mixture and temperature into or out of a single node. It is similar to GunnsFluidSource, but with these main differences:

  • It only attaches to and flows to/from a single node, whereas GunnsFluidSource flows from one node to another.
  • It defines the properties of the fluid that it adds/removes from the node, whereas GunnsFluidSource does not. GunnsFluidSource can only add the same fluid properties to the receiving node as what comes from the source node.
  • It can be configured to flip the sign of its flow direction relative to the given flow rate value.
  • It can flow Trace Compounds either by themselves, or as part of the configured fluid.
This link is an efficient way to model an 'infinite' source or sink of fluid with the given fluid properties.

How To Use in GunnsDraw

The source boundary link has only one port, Port 0. It can be attached to any kind of node, as shown below.

default_img

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:

  • flipFlowSign (default = false): This determines which direction (to or from the attached node) the link flows relative to the flowDemand value. When this term is false (the default), a positive value of flowDemand causes flow into the attached node, and a negative flowDemand causes flow out of the node. When this term is true, a positive value of flowDemand causes flow out of the node and a negative value flows into the node.
  • traceCompoundsOnly (default = false): This determines whether the link only flows Trace Compounds or not. A value of true will only flow the trace compounds defined in internalFluid and won't flow the regular fluid consituents. If this value is true, then the link requires there to be a Trace Config object in the network.

Input Data Parameters:

  • malfBlockageFlag (default = false): Initial state of the blockage malfunction activation flag. This malfunction reduces the actual flow rate to/from the link from the flowDemand value.
  • malfBlockageValue (default = 0.0, must be (0-1)): Initial state of the blockage malfunction activation value. A value of 0.0 is the same as no blockage at all, and 1.0 completely blocks all flow.
  • flowDemand (default = 0.0 (kg/s), and non-zero magnitudes should be kept between E-15 and E+15): This is the initial source mass flow rate. The direction of the flow to or from the node depends on the sign of this term and the flipFlowSign flag above.
  • internalFluid (default = 0, must not = 0): Pointer to a Fluid State drawing object (which is a PolyFluidInputData), which defines the properties of the fluid that is added to or removed from the node: specifically the fluid's mixture and temperature. For example, to use a Fluid State named fluidDefault, the syntax in this field would be: &fluidDefault.
    • The Fluid State's traceCompounds object determines how the Trace Compounds are handled, and this differs depending on the traceCompoundsOnly flag as follows:
      • If false, then this object defines the mole fraction of each TC present in the bulk fluid flow rate set by flowDemand, and these should all be >= 0.
      • If true, then this object defines the mass flow rate of each TC relative to the value of flowDemand, in (kg/s). These can have any positive or negative value, so that some TC's can flow into the node and some out at the same time. For instance, if flowDemand = 1.0 (kg/s) and the traceCompounds values are 0.1 and -0.5, then the TC's would flow into the node at 0.1 (kg/s) and out at 0.5 (kg/s), respectively.

Common Problems

  • Pressure Stability: this link is susceptible to the same stability problems in a network as the fluid source link. See the description of this problem in GunnsFluidSource.
  • Pulling Negative Masses: when used to flow fluid out of a node, care must be taken by the user to not set fluidDemand such that it can pull more mass out of the node than is present in the node or can be resupplied by the network. This applies to both the total mass and any individual fluid constituent's masses. This is the same general issue as the Pressure Stability disussed above, but in this case the specific results are:
    • Negative pressure in the node (which is bad), and
    • Non-conservation of mass (which is bad).

References

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