# How Can I Determine Multiple Discharges from a Pipe Network? (Knowing the Inlet Conditions)

I have little/no experience with pipe networks and have been searching for a methodology to calculate the discharge from multiple outlets of an oil pipe network with a single inlet. As far as i can tell I have too many unknowns to use something like the Hardy Cross method (and often i don't have loops, just multiple branches and outlets as shown below), and Hardy-Cross seems to be used to find flows in pipes with known inflows and outflows, which I don't have.

A good example may be something like this:

• Inlet flow rate is known
• Fluid Properties are known
• Geometry of all pipes/bends/outlets are known
• The height above a datum of all pipes and outlets are known
• Flow is each pipe branch is UNKNOWN
• Discharge from each outlet is UNKNOWN (ext. pressure can be assumed ambient)
• I have target outflows, and could modify pipe length/diameters to obtain them

See my very crude diagram: Can anybody suggest an analytical method I can use to calculate the outflows and/or optimise the pipe lengths to obtain a set of target outflows?

A worked example of a similar problem would also be appreciated.

The person who tried to solve this problem before me just divided the inflow up based on the area of the outlets, without considering losses, bends or even the lengths of the pipes anywhere in the network. I have been searching for a while with limited resources for a worked example or solution method for this.

I will probably write a code to solve these problems if I find an appropriate methodology. (I'm aware commercial software does exist that could calculate this, but I don't have access).

• These calculations become non-trivial and error prone fast. If you need a more accurate result than dividing areas, I'd encourage you to consider the commercial solutions. You can download a trial to ensure your calculation validates against it especially if this is for "real" engineering. Also, attempting to use pipe length or diameter alone to control flow in a branched system is nearly impossible. The best you can hope for is the ability to deliver some range of flows at some nominal inlet pressure. Large branched systems adapt flow rapidly to changes and can be very unstable... – Byron Wall Jan 18 '18 at 1:35
• ...Generally if the system is sized correctly, the flow roughly portions out by the areas of the outlets. To get an idea of "correct' sizing, consult a table like the one by Crane for water. It gives minimum pipe sizes to accommodate a given flow at a given pressure drop. You make the runs large enough to accommodate a given combined flow and then size the outlet for the actual flow you want for some estimated pressure. Then you put a valve at the end of the line (or somewhere before it) if you actually need to control flow. gilsoneng.com/reference/velocity%20to%20flow.pdf – Byron Wall Jan 18 '18 at 1:39
• I started writin an answer, but I think you just need to start with en.wikipedia.org/wiki/Pipe_network_analysis I havent done this myself but it looks like the hardy cross method could be done in a spreadsheet en.wikipedia.org/wiki/Hardy_Cross_method – mart Sep 2 '19 at 7:55

The flow of current in a circuit is broadly analogous to fluid down a pipe, with the resistance of wires/resistors combining according to standard laws. If you can break your pipe network down into small segments of known "resistance", then you can use current laws, and widely available circuit simulators to get a good approximation of the outlet flow (or at least, much better than your predecessor).

I have taken your diagram, and approximated the lengths of each discrete segment, and given them a relative resistance value. Clearly those segments with corners in might have a higher resistance than a straight of equivalent length - It's up to you to determine the correct values here. You can make an equivalent circuit using http://www.falstad.com/circuit/, Screenshot below Once your resistances are set, you can adjust the input voltage until you get a nice 'round' current value at the input (e.g. 100mA), and then see the percentage flow at each outlet by reading the current at those points.

You can also add a "Current Source" at any outlets where there is a known flow rate, e.g. provided by some sort of limiting device, and all the other outlets will calculate accordingly.

• In the days before computers, this technique was used to model fluid flow in networks, whether it was liquid in pipes or air in ducts or tunnels. In those days a physical analog was made using resistors and actually measuring the current in all the branches of the simulated network. – Fred Jan 11 '18 at 11:40
• Some building codes (I know specifically the Etiopian code) specifies that you can replace fittings (bends, junctions, valves, etc.) with an equivalent length of pipe to plug into your headloss equations. – ChP Jan 11 '18 at 12:56
• @CharlPretorius It was my intention when I was looking at a direct fluid solution to use the equivalent length of pipe method to simplify the calculations where possible. But I like the hydraulic analogy having read more detail on it. I have good experimental data sets for various networks of this type, so I will build some circuits based on this analogy and test the accuracy. The equivalent length of pipe method may well be part of the method I use to convert the physical pipe characteristics into a 'resistance'. – Petrichor Jan 11 '18 at 13:37
• Jonathan - How can I can calculate the resistance values of each pipe / output orifice etc? I do not see this explanation in your answer unfortunately but it would help me solve my current problem – Marek Urbanowicz Mar 21 '18 at 10:29
• @JonathanRSwift - the issue with the resistance method which we found with my collegue is that loses in lines f(R) are linear to flow, while the loses through orrifice are squared to flow change... Is there any known way to solve it? – Marek Urbanowicz Mar 22 '18 at 9:00

You have 9 unknown values you are seeking (the flow at each of 9 outlets), and one that you need to find in the process (the total pressure drop) From the given information, you can assemble equations that you can solve using linear algebra methods.

The sum of the flows at the outlets will equal the inlet flow:

$$Q_t = Q_a + Q_b + Q_c + Q_d + Q_e + Q_f + Q_g + Q_h + Q_j$$

You can also set up equations based on the fact that the pressure drop will be equal along any path from a given node to an outlet.

Pressure drop in any segment can be found using many methods. In this case, the Darcy-Weisbach equation would probably be most useful:

$$h_f = f\cdot\dfrac{L}{D}\cdot\dfrac{v^2}{2g}$$

where:

• $h_f$ = head loss (m)
• $f$ = friction factor
• $L$ = length of pipe work (m)
• $d$ = inner diameter of pipe work (m)
• $v$ = velocity of fluid (m/s)
• $g$ = acceleration due to gravity (m/s²)

Equivalent length information for fittings can be found here: https://www.engineeringtoolbox.com/resistance-equivalent-length-d_192.html

An excel template for using this method can be found here: https://www.engineeringtoolbox.com/equivalent-pipe-length-method-d_804.html

Your example is much more complex than the example given at that page (9 paths vs. 2), but the spreadsheet is scaleable.

• My typical problem will have 20-30+ outlets. Currently the hydraulic analogy above appeals more, from a simplicity perspective. That first pipe segment is the only place that velocity is known in the entire network, as soon as I hit the first T-junction every flow property is unknown; although I appreciate that I can substitute in Q/A for velocity in each equation. Assembling such a series of equations, and then solving them, for a system with 30 or so outlets could be very time consuming. – Petrichor Jan 11 '18 at 14:57
• If you know the pipe characteristics (which you say are a given) then velocity will be a function of flow rate. The downside of using the electrical circuit analogy is that you will have to assign resistance values for each segment arbitrarily. I use a similar spreadsheet for fire sprinkler piping calculations, where flow can be leaving the system thru many outlets (sprinklers, hose connections, etc). It can be complex, but it yields very valuable information, like a close approximation of pressure drop- will you have enough head to provide the flow rate needed? – Scott B Jan 11 '18 at 15:06
• If I understand your wording correctly I will have 1 eqn for the sum of Q as you give in your answer, plus 9 eqns relating to the path from the inlet to each of my outlets. e.g., the equation for the outlet E would consist of a pipe with an equivalent length to the path 1-2-9 on my diagram. My immediate thought is that each of the segments can have a different cross sectional area, also v (and Q) vary along a path. Which velocity would go into the headloss equation for a path? Unless I have misunderstood & you're suggesting that I would have 16 headloss eqns, one for each pipe segment... – Petrichor Jan 11 '18 at 15:37
• You will have 16 headloss equations (one for each segment), but in solving for the 9 flow rates and total head loss, they are useful only as a portion of the loss along a path. For each segment, the loss depends on the flow in that segment, which is the sum of the flows in the downstream outlets (e.g. q2=qD+qE+qF+qG+qH+qJ). You have 16 segments (loss thru each is dependent on various sums of 9 independent variables), and 9 paths which all have equal total head loss (h for 1-2-9 is equal to h for 1-2-8, , 1-3-4, 1-3-5-6, 1-3-5-7, etc.). – Scott B Jan 11 '18 at 16:47
• I'll give both methods a go tomorrow/next week on the simplest example I have data for and update my question/answers accordingly :) thanks for your help – Petrichor Jan 11 '18 at 17:00