GunnsResistorPowerFunction - nasa/gunns GitHub Wiki

GunnsResistorPowerFunction

default_img

Background

This link is similar to GunnsBasicConductor except that it adds an exponent X on the flow (current) I. Written in terms of Ohm's Law (where X would be 1):

V = R·IX,

This is the form of a power function; hence the link's class name. In generic GUNNS terms, this takes the form:

w = (dp / R)1/X,

where w is generic flow, dp is generic potential difference across the link, and R is the link's resistance to flow.

With X = 2, this implements Bernoulli's principle for volumetric fluid flow in a basic network:

dP = K·Q2,

where dP is fluid delta-pressure (Pa), K is flow resistance (kg/m7) or (Pa/s2/m6), Q is volumetric flow rate (m3/s). In the network, generic potential is pressure, flux is volumetric flow, and KCL requires that net volume flow at a node is zero. Fluid properties are not considered. This allows for simple analysis of an incompressible fluid circuit in a basic network as an equivalent electrical circuit, without the overhead of using a full-blown fluid network and realistic fluid properties.

How To Use in GunnsDraw

This link can be placed in a network in the exact same ways as the GunnsBasicConductor.

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

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

Configuration Data Parameters:

  • resistance (default = 0.0, 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 flow resistance the link takes when it is not blocked. The blockage malfunction (described below) further reduces the effective conductance (1/R) used in the flow equation.
  • exponent (default = 0.0, must be > 0.001 or < -0.001): This sets the exponent X of the power function, described above.
  • useTangentLine (default = false): We recommend always using false here. Refer to code comments for an explanation of the true option.

Input Data Parameters:

  • malfBlockageFlag (default = false): Initial state of the blockage malfunction activation flag. This malfunction reduces the effective conductance (1/R) of the link.
  • 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 and isolates the port nodes from each other (although parallel flow paths still apply). For electrical networks, a blockage of 1.0 is an open-circuit.

Common Problems

  • N/A

References

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