Intro_Course_7_2_1 - nasa/gunns GitHub Wiki
Here’s a network drawing implementing the circuit, with the shapes used in green and the link’s configuration data in red:
Here’s the output of the network, minus the 1st frame at t = 0.1 which has a spiky run transient (this is normal):
Here is the process I went through to tune this:
- First, I’ll say that valve1 & valve2 are physically identical, so the 2:1 ratio in their flow rates is due to valve2 being closed 50%. So valve1’s position = 1.0 and valve2’s position = 0.5.
- We want the pressure at node 0 P0 = 100 and P1 = 105, which means half of the source pressure created by the fan will be dissipated through the filter + valves, and the other half through the fan’s internal conductance. So the fan’s source pressure will be 2 * (105 – 100) = 10 kPa.
- Initial guess at all conductances G = 0.001. (Just a WAG from experience, doesn’t really matter.)
- I want to reduce the filter/valve1/valve2/ branch to 1 equivalent conductor (the filter), so I use dynamic port mapping controls to move filter1’s port 1 to node 0 temporarily. Now the circuit is just the fan + filter in series.
- Result: P1 = 105 kPa (good), ṁ filter = 0.0766.
- Want ṁ filter = 0.003, so new G of fan & filter = 0.001 * 0.003 / 0.0766 = 3.916e-5.
- Result: P1 = 105 kPa (good), ṁ filter = 0.003001 (good).
- Fan’s G is now final = 3.916e-5.
- Now reconnect filter’s port 1 to node 2 and close valve2. Now the circuit is fan + filter + valve1. We want filter + valve1 in series to have the same equivalent G as the fan = 3.916e-5. From the conductor’s help page, (G_x / G_y) = sqrt( x / y ). Going from our single (y = 1) filter G to two conductors in series (x = 2): (G2/G1) = sqrt(2), so G of filter & valve1 = 3.916e-5 * sqrt(2) = 5.538e-5.
- Result: P1 = 105 kPa (good), P2 = 102.5 kPa, ṁ filter = 0.003001 (good).
- TODO explain why I did this and that it’s a throw-away…
- Want P2 = 104, so we have to give filter higher G than valve1.
- mdot ~ G*sqrt(dp), so:
- G filter * sqrt(105 – 104) = G valve * sqrt(104 – 100)
- G filter = 2 * G valve
- Now we iterate new values of G valve and G filter = 2 * G valve until we reach target P1 = 104:
- Result: G valve = 4.37e-5, G filter = 8.74e-5, P1 = 105.0 (good), P2 = 104.0 (good), ṁ filter = 0.003001 (good)
- Filter’s G is now final = 8.74e-5.
- Now we need to split G valve up between valve1 & valve2. They’re in parallel, so G eq = 4.37e-5 = G valve1 + G valve2 / 2 (since valve2 position = 0.5), and G valve1 = G valve2, so:
- 4.37e-5 = G valve * 3/2,
- G valve = 2.913e-5
- Result: P0 = 100 (good), P1 = 105 (good), P2 = 104 (good), ṁ valve1 = 0.002 (good), ṁ valve2 = 0.001 (good)
- Valve’s G is now final = 2.913e-5
- We’re done!
This illustrates several key points about tuning fluid networks:
- Even though GUNNS linearizes the fluid conductance to be solved in the linear system of equations, the flow rate settles out at steady-state in proportion to the square root of dp. So you can’t use the linear circuit theory (ṁ = G*dp) to predict the response of the network.
- Notice how whenever you change a conductance, there are a few frames of changing pressures and flows as the network reaches the new steady-state at a new ṁ ~ G · dp 1/2.
- Our circuit predictions must include the square root on dp, which makes the algebra more complicated. Sometimes it’s faster just to trial-and-error values by hand in run-time than to do the pages & pages of algebra required.
- Reducing groups of conductors to smaller equivalent circuits is crucial.