Fluid_Aspect_Course_5_3 - nasa/gunns GitHub Wiki

Fluid Aspect Course 5.3: Tuning Conductors

Start with x-section area

Here we tune all the conductor links’ conductances until we get the correct flows & pressures. In runtime, we tweak the conductors’ mMaxConductivity term. This comes from the maxConductivity term in the link’s GunnsDraw shape data, so when we have our final tuning, we’ll update the drawing with the new values.

Unless you have better data, a good first guess at what a conductor link’s conductivity should be is the flow path’s cross-sectional area (in m2) at its narrowest point. This would be the inner area of a pipe, or the throat area of a valve, etc. You can usually find data on pipe & valve sizes and derive the area from it. The link tends to overestimate flow for a given area, so you usually tune this value downward from the initial guess. Your final tuning will almost always be within an order of magnitude of the real hardware’s cross-section area.

Alternative initial guesses

You can use Bernoulli’s equation to find conductivity G from a given delta-pressure dp and flow rate , if you know them.

G = ṁ / (dp·ρ_avg) 1/2

with units: G (m2), dp (Pa), and ρ_avg (kg/m3) is the average density of the 2 nodes.

We also have a tuning helper spreadsheet in the gunns/ repo that predicts the conductivity for a pipe. It is at: gunns/aspects/fluid/tuning/Gunns_Pipe_Tuning_Helper.xlsx.

Reduce branches to simpler equivalents

A good trick for reducing the variables is to reduce branches of links into simpler equivalents. Multiple conductors in series can be reduced to a single equivalent conductor. Multiple conductors in parallel can also be reduced to a single conductor. Once all branches have been reduced, tune that system. Then the branches are expanded back out by the reverse process and the new equivalent branch conductances are spread out among the original links.

Parallel conductances:

  • N parallel conductances G1, G2, … Gn can be replaced by a single equivalent conductance Geq:
Geq = G1 + G2 + … + Gn.
  • X equal parallel conductances Gx can be replaced by Y equal parallel conductances Gy:
Gy = Gx * X/Y.

Series conductances:

  • N series conductances G1, G2, … Gn can be replaced by a single equivalent conductance Geq:
Geq = 1 / (1/G1 2 + 1/G2 2 + … + 1/Gn 2) 1/2.
  • X equal series conductances Gx can be replaced by Y equal series conductances Gy:
Gy = Gx * (Y/X) 1/2.

Moving links in run-time

We don’t have to do all this branch reducing & expanding in the GunnsDraw drawing — we can do it in run-time by moving around the existing links. We use the link dynamic node mapping controls to move them about.

For example, say we have 3 conductors G1, G2, G3 in series between Nodes 0, 1, 2, 3 and we want to reduce to 1 equivalent conductor in run-time. They start off arranged like this:

We use G1’s node mapping controls to move its port 1 from Node 1 to Node 3. Then the arrangement will be this:

Constrain pressure, tune for flow

Say we know that the branch is supposed to flow 0.1 kg/s at a delta-pressure of 10 kpa. Well, at what total pressure and temperature is that data point for? Because flow rate is a function of delta-pressure and density, and density is a function of total pressure and temperature, by the equation of state. Usually we assume that the total pressure and temperature are the normal operating conditions of the system. So when we tune the branch, we need to constrain both the delta-pressure across it and the total pressures at the end-points.

Here’s where having a couple of spare GunnsFluidPotential links in the network comes in handy. We’re trying to tune to an exact design point of flow and delta-pressure and total pressures across a reduced equivalent branch. To do so, we need to constrain the total pressure at each end of the branch and then tune Geq until the flow rate is correct. The delta-pressure is just the difference in total pressures of the end-points.

During run-time, we can use the node mapping controls in the spare potential links to connect them to the end-points of our branch, like so:

We give the potential links a large conductance so that they act like ideal pressure sources, and we set the mSourcePressure terms to the total pressures we want. Then we adjust G1’s conductance until it flows the desired rate.

Auto-tune feature

GunnsFluidConductor links and derived types (GunnsFluidValve, GunnsFluidHeatExchanger, etc.) contain an ‘auto-tune’ feature that makes it easy to tune the conductance of an individual link when its bounding pressures are constrained.

  1. First, constrain the link’s port node pressures, as described above.
  2. For valves, constrain the valve position to the desired value (full open, etc.) for which you wish to tune. For externally-actuated valves (GunnsFluidValve), constrain its mPosition term to the desired value. For self-actuating valves (GunnsFluidCheckValve, etc.) use the valve’s ‘fail-to’ malfunction to freeze its position to the desired value.
  3. Set one of these desired flow rate terms in the link to the rate value you want to tune to:
    1. mTuneMassFlow (The desired fluid mass flow rate in kg/s – use mTuneMode = MASS in Step 4 below)
    2. mTuneVolFlow (The desired fluid volumetric flow rate in m3/s – use mTuneMode = TRUE_VOL or STD_VOL in Step 4 below)
  4. Set the link’s mTuneMode value to one of these enumeration values:
    1. GunnsFluidUtils::MASS (mass flow rate)
    2. GunnsFluidUtils::TRUE_VOL (true volumetric flow rate)
    3. GunnsFluidUtils::STD_VOL (standard volumetric flow rate)
  5. The link’s mMaxConductivity value is automatically updated and you should see the desired mass flow rate in mFlowRate or volumetric flow rate in mVolFlowRate.
  6. Update the link’s max conductivity configuration data in your source drawing or input file with the new conductance value.

Expand branches back out

We’ve tuned G1’s conductance in the system to get the equivalent conductance Geq. Once G1 is behaving correctly in the system, we can move it back to Node 1, and change all 3 link’s conductances to G1 = G2 = G3 = Geq * sqrt(3), since we’re going from 1 to 3 series links.

Previous Page / Next Page

⚠️ **GitHub.com Fallback** ⚠️