GunnsFluidPressureHead - nasa/gunns GitHub Wiki

Background

This spotter calculates the pressure head of a fluid column under acceleration, and passes that pressure value to an attached GunnsFluidPotential or GunnsFluidAccum link to create the pressure in the network. This is used to model the effect of differing fluid elevations relative to a terrestrial gravity field, or in an accelerating vehicle such as with the rocket pogo effect.

The GunnsFluidPotential and GunnsFluidAccum (and derived) links represent a length of fluid and can create pressure in the network. For the Potential, this is normally some pipe or duct. For the Accumulator, which is used for liquid tanks, this is the distance from the liquid port to the top of the liquid surface, or bellows, at maximum capacity.

This spotter is configured with a 3-vector that represents the fluid length in a structural reference frame. During runtime, it is supplied with an acceleration vector that describes the acceleration field that is acting on the fluid. This acceleration vector can be expressed in a different reference frame, and a rotation direction cosine matrix can be provided to rotate it into the fluid column's reference frame. The orientation of the acceleration vector, and the direction of the rotation (accel to structure or structure to acceleration frame) can be reversed if needed, to accomodate the convention of the supplied acceleration vector and rotation DCM. This is explained in more detail below.

The spotter calculates the pressure head as the fluid density times the dot product of the acceleration and fluid column vectors, or dP = ρ * ĝ˙ĥ This assumes constant fluid density, so it's more appropriate for liquids. This could not, for instance, calculate the 14.7 psi at sea level due to the column of earth's atmosphere, since that column has a large change in the gas density from top to bottom.

How To Use in GunnsDraw

You'll find this spotter in the gunns/draw/libraries/GUNNS_Spotters.xml shape library. This is a spotter, so doesn't have port connections to nodes or links in the drawing. Rather, it is associated with a GunnsFluidPotential or GunnsFluidAccum (or derived link) by name, in its ConstructorArgs parameter, below.

ConstructorArgs Parameter:

This should be the name of the GunnsFluidPotential or GunnsFluidAccum link that this spotter object services. Any link that inherits either of those link types will also work. The link will throw an exception and the network will abort its initialization if an invalid link type is provided.

Configuration Data Parameters:

  • fluidColumnX (default 0.0 m): This is the x-component of the fluid column vector in the structure reference frame. For a GunnsFluidPotential link, this vector would be between the link's end points. For a GunnsFluidAccum, this vector is from the liquid port (Port 1) to the height of the liquid at maximum capacity (bellows position = 1). Normally you won't initialize an accumulator with initial bellows position = 1, but this vector should represent the height of the liquid as if it were = 1.
  • fluidColumnY (default 0.0 m): This is the y-component of the fluid column vector in the structure reference frame.
  • fluidColumnZ (default 0.0 m): This is the z-component of the fluid column vector in the structure reference frame.
  • acceleration (default 0): This is a pointer to the acceleration vector. Normally this acceleration vector will reside outside of the fluid network, in some other dynamics model, so we point to it rather than storing it in this spotter. Usually, all of these spotters in the same network would see the same acceleration vector. The spotter will throw an exception and the network will abort its initialization if this pointer is not set, but you don't have to set it here in this drawing. Since this configuration data can only see the network's scope, you can't set this in the drawing to a vector residing outside the network anyway. Rather, set the pointer in the configuration data object from your sim input file process prior to network initialization.
  • reverseAcceleration (default false): This is a boolean that tells the spotter whether to reverse the acceleration vector's direction. By default (false), the acceleration vector points from the 'bottom' of the column to the 'top'. For example a water tower on earth's surface, this acceleration vector (9.81 m/s2) points upwards from the base of the tower at the ground, to the top of the tower. You can set this flag true if your acceleration vector is in the opposite sense.
  • rotationDcm (default 0): This is an optional pointer to the 3x3 rotation direction cosine matrix for rotating the acceleration vector to the fluid column's reference frame. If your acceleration vector is already expressed in the same reference frame as your fluid column, you can leave this 0. As with the accerlation pointer above, this matrix will usually reside outside your network, in which case you can't set it here in the drawing -- use the sim input process to set the config data term directly.
  • transposeRotation (default false): This boolean tells the spotter whether the provided rotation DCM rotates from the acceleration frame to the structure frame (false) or from the structure frame to the acceleration frame (true). Use this to match the convention of your DCM as needed.

Input Data Parameters:

This spotter has no input data.

Common Problems

  • N/A.

References

  • N/A.