Sie sind auf Seite 1von 30

Pipe Network Analysis

PIPE NETWORK ANALYSIS

Equations for steady flow in networks

System of Equations Governing Pipe Network

Q-equations (pipe charges are the unknowns)


H-equations (heads are the unknowns)
When the equations are established (nonlinear), may use Newton method to solve them

Dr. M. Osama El-Samadony


K

Q-equations (corrective discharges are the


unknowns) Classic, Hardy Cross iterative
method.

Assistant Professor of Mechanical Power,


Faculty of Engineering, KFS University,
Kafrelsheikh, Egypt.


afrelsheikh University

At each node
Junction Continuity Equations
(Node Law)

Q i = 0
Q out

+ ve

Q in

- ve

Definitions

At each loop
Energy Loop Equations
(Loop Law)

= K i Q i2 = 0

CW

(+)

: CCW

hL = head loss
Ki = coefficients

(-)

Fixed grade junction: is a pipes connecting point in the


network where energy or piezometeric head is known
(storage tank) [ NT number of tanks or FGJ in
network].
Node: is a point where two or more pipes join with
unknown elevation of energy (not FGJ) [ NJ number
of nodes in network].
Primary (real) loop: is a series of connected pipes that
begins and returns back to the same node. [NL
number of real loops in the system] .
N L = N P - N J
N L = N P - N J + 1

L
L

fo r N T 2
fo r N T < 2

Branched and looped systems

In branched system, NP = NJ 1 NL = 0
In looped system,

OR

NP > NJ

For NT < 2
Neqns = (NJ - 1)cont + (NL)energy

For NT 2
Neqns = (NJ )cont + (NL)energy

Storage Tanks

Pseudo loop: are imaginary loop that begins from one tank to the
other tank.
Pseudo loops are loops that do not close themself but considered for
solution to be energy consistent [ Nli number of pseudo loops
required.
Nli = NT 1
Pipes that was not appear in any energy equation in such networks
will appear in the pseudo-loop equation.
For pseudo loop the energy equation is:

= K i Q i2 = DWS

For NT < 2
Neqns = (NJ - 1)cont

For NT 2
Neqns = (NJ )cont

Quiz
Write the H-system of equations for the
previous example

OR

Neqns = (NL )energy

Loop 1-2-3: K 1 (Q o 1 + DQ1 ) n + K 2 (Qo 2 + DQ1 - DQ 2 ) n - K 3 (Q o 3 - DQ1 ) n = 0


Loop 4-5-2: K 4 (Qo 4 + DQ 2 ) n - K 5 (Q o 5 - DQ 2 ) n - K 2 (Q o 2 + D Q1 - DQ 2 ) n = 0

Q system of equations
F5=

F5 = K 2Q 2 n + K 3Q 3n - K 4Q 4 n = 0
F6 = K 1Q1n + K 4Q 4 n - K 5Q 5 n -WS1 +WS 2 = 0

H- system of equations

Example: Write down the Q system of equations for the


following network

Valves in pipe network

Example with pumps and valves

Example with pumps and valves


(Cont.)
Q- system of equations:

= ( K i + Kv / 2 gA 2v )Q i2 = 0

Example(Cont.)

Special Types of Valves

H- system of equations:

Back pressure valve


Pressure reducing valve

Example(Cont.)

Pressure Reducing Valve


(PRV)

Q- system of equations:

The PRV limits and maintains outlet (downstream)


pressure to lower preset value regardless of fluctuating
demand or varying upstream pressure
open

Low downstream pressure

closed

High downstream pressure

Valve will begin to open when the pressure


downstream is less than the set-point pressure
(determined by the force of the spring).

HGL of a Network Using PRV

Analysis of Network Having


PRV / BPV
(Q - equations)
1) Write the continuity equations for the network as usual (Not
effected with PRV / BPV).
2) Remove the PRV / BPV from the network replacing it with:
an artificial reservoir is placed at downstream / upstream
(set) point with known HGL = Hset , and,
a Demand node at the upstream / downstream point with
unknown outflow.
3) Write the energy equations around the loops of this modified
network.

Q-equations:
Continuity @ nodes (Step 1)
Energy @ loops (Step - 3 )

Back Pressure Valve


sets minimum pressure upstream
open

closed

High upstream pressure


Low upstream pressure
Valve will begin to open when the pressure upstream is
greater than the set-point pressure (determined by the
force of the spring).
Similar to pressure relief valve

Analysis of Network Having


PRV / BPV
(H - equations)
1) Write the continuity equations for the network as usual (Not
effected with PRV / BPV).
2) Remove the PRV / BPV from the network replacing it with:
an artificial reservoir is placed at downstream / upstream
(set) point with known HGL = Hset , and,
an unknown head Hv at the upstream / downstream point.
3) Additional proportionality equations are obtained by: head
losses in the upstream and downstream portions of the pipe
containing the valve are proportional to these two lengths.

H-equations:
Continuity @ nodes (Step 1) in terms of H.
Additional Proportionality eqn.

Analysis of Network Having


PRV / BPV
(Q - equations)
1) Find out the Q set of loops for the original network upon
which we know the discharge in each pipe.
2) Remove the PRV / BPV from the network replacing it with:
an artificial reservoir is placed at downstream / upstream
(set) point with known HGL = Hset , and,
a Demand node at the upstream / downstream point with
unknown outflow.
3) Write the energy equations around the loops of this modified
network but using the original-network corrective flow.
The Q loops ignore the presence
of the BPV in this network, but the
energy loops will be written for the
modified network

Q- system of equations
Step (1):
Write independent junction continuity equations according
to the usual rules:

Q-equations:
Energy @ loops for modified network
(Step - 3 ) but with flows of originalnetwork loop corrective flow (Step - 1).

Thus the energy set of loops will always contain more pseudo loops than does the Q
set of loops by the number of PRV's and/or BPV's that exist.

Example (PRV)

Q- system of equations (cont.)


Step (2):

For the 9 pipes and


6 nodes networks
shown, write the
system of :
Q-equations,
H-equations, and
Q equations.

Replace the PRV


with a reservoir at
the downstream (set)
point and a demand
at upstream side

Q- system of
equations (cont.)

Q- system of equations

Step (3):

Step (1):

Write
the
energy
equation for the loops
of
the
modified
network.

Find out the Q loops for


the network ignore the
presence of the PRV/BPV.

Loop 2-3-7
Loop 1-7-4
Loop 4-5-6

H- system of
equations

Pipe

Discharge

Q1 - Q3

Q2 +Q1- Q3

Q3 -Q1+ Q3

Q4 + Q3

Q5 + Q2

Q6 - Q2

Q7 -Q1+Q2

Q2

Q- system of equations (cont.)


Step (2):

H-equations:
Continuity @ nodes (Step 1) in
terms of H.
Additional Proportionality eqn.

Q1
Q3

Replace the PRV


with a reservoir at
the downstream (set)
point and a demand
at upstream side

Q- system of
equations (cont.)

Hardy Cross Method

Step (3):
Write
the
energy
equation for the loops of
the modified network
with Qs from step(1).
Loop I (2-3-7)

Loop II (1-7-4)

Loop III (4-5-6)

II

Q-equations (corrective discharges for


each loop)
III
Pipe

Discharge

Q1 - Q3

Q2 +Q1- Q3

Q3 -Q1+ Q3

Q4 + Q3

Q5 + Q2

Q6 - Q2

Q7 -Q1+Q2

Hardy Cross Method


for Pipe Network Analysis
1936

Guess the discharge Qi for each pipe in the


Network. Comply with Node rule .
Our Guess is noted (Q Q), where Q is the
error in our guess for each loop.
Apply with guessed discharge in loop law.

Mathematical Review
Finding Zeros (Roots) of a
function
Graphical Depiction:

f (x n ) - 0
= f '( x n )
x n - x n +1
f ( x n ) - 0 = f '( x n ) ( x n - x n +1 )

Dr. Mohammed Osama


Assistant Professor of Mechanical Power,
Faculty of Engineering, KFS University

Mathematical Review
Taylors Series

Convergence

Local Convergence

Mathematical Derivation:
This can also be seen from Taylors Series.
Assume we have a guess, x0, close to the actual root.
Expand f(x) about this point.
x n +1 = x n + Dx
Dx 2
f ( x n + Dx ) = f ( x n ) + Dxf (x n ) +
f ( x n ) + L 0
2!

Convergence Depends on a Good Initial Guess


f(x)

x1

x1
x0

x2

x0

If dx is small, then dxn quickly goes to zero.


f (x n )
Dx x n +1 - x n = f (x n )

Mathematical Review
Finding Zeros of a function:
An illustrative Example

Hardy Cross Method (Cot.)


Based on Previous Numerical
Analysis Review
F (Q ) = K i (Q i ) n = 0
From numerical methods for finding zero,s (solving) a function
Q i +1 = Q i DQ = -

F (Q i )
F (Q i )

Q i +1 - Q i = -

F (Q i )
F (Q i )

F (Q i )
F (Q i )

K (Q )
n K (Q )

For each loop

DQ = -

n -1

=-

h
n h
i

L ,i

L ,i

/ Qi

Hardy Cross method


Calculation procedures

1-Loop Network Example

Steps in Hardy Cross Method:


1) Assume initial values Q 0 , for all pipes with continuity
satisfied at all nodes.
2) For each loop or path, calculate:
DQ =

-S (k i Q i n )
S(n i k i Q i n -1 )

3) Update Q in each pipe and in each loop by :


Q i = (Q 0 )i + DQ

4) Checking ( 0.01 < e < 0.05 )


Q i - (Q 0 )i

IF NO Repeat steps 2, 3
until satisfied
IF Yes Stop iterations

Construct the following Table


for each loop

Loop 1-2-3-4: K 1 (Qo 1 + DQ1 ) n + K 2 (Qo 2 + DQ1 ) n


+ K 3 (Qo 3 + DQ1 ) n - K 4 (Qo 4 - DQ1 ) n = 0

1-Loop Network Example


Solution

1-Loop Network Example


Solution (cont.)

1-Loop Network Example


Solution (cont.)
Modify the flow rates for solution after 2 iterations

First trial
Pipe

Q (L/s)

HL (m)

AB

60

2.0

0.033

BC

40

0.886

0.0222

CD

AD

-40

-0.886

0.0222

2.00

0.0774

HL/Q

1-Loop Network Example


Solution (cont.)
Second trial

Pipe

Q (L/s)

HL (m)

HL/Q

AB
BC

47.08

1.23

0.0261

27.08

0.407

0.015

CD

-12.92

-0.092

0.007

AD

-52.92

DQ = -

h
2 h /Q

=-

-1.555

0.0294

0.0107-

0.07775

- 0.0107
= 0.0688
2 (0.07775)

Pipe
AB

Discharge
(L/s)
47.15

BC

27.15

CD

-12.22

AD

-52.22

2-Loops Network Example


of Hardy Cross Method

Pipe Network Analysis


Sheet (3)

Solutions

0.2

More Examples on Hardy


Cross Method

0.12

0.08

0.22
Given that preasure at junction (a) is 3 bar

0.2

0.12

0.08

0.22

0.2

0.12

0.08

0.22

K 1 (Qo 1 + DQ I ) n1 - K 2 (Qo 2 - DQ I ) n 2 - K 3 (Q o 3 - DQ I ) n 3 - K 4 (Q o 4 - DQ I ) n4 = 0

Given that preasure at junction (a) is 3 bar

K1 (Qo1 + DQ )n - hp - K2 (Qo 2 - DQ )n - K3 (Qo 3 -DQ )n - K 4 (Qo 4 -DQ )n = 0


1

Substitute with hp as a function of Q, thus,


F (Q) = K1 (Qo1 + DQ )n - (40 -160 (Qo1 + DQ )2 ) - K2 (Qo 2 -DQ )n - K3 (Qo 3 -DQ )n - K4 (Qo 4 - DQ )n = 0
1

F (Q) = n1 K1 (Qo 1 + DQ )

n1 -1

- (-2 160 (Qo1 + DQ )) - n2 K2 (Qo 2 -DQ )

n2 -1

n3 -1

- n3 K3 (Qo 3 - DQ )

- n4 K4 (Qo 4 -DQ )n -1 = 0
4

F (Q)
DQ = F (Q)

K 1 (Qo 1 + DQ I ) n1 + K 6 (Q o 6 + DQ I - DQ II )n 6 - K 5 (Qo 5 - DQ I ) n 5 - K 7 (Q o 7 - DQ I ) n 7 = 0
K 2 (Qo 2 + DQ II ) n 2 + K 3 (Qo 3 + DQ II )n 3 - K 4 (Qo 4 - DQ II ) n 4 - K 6 (Q o 6 + DQ I - DQ II )n 6 = 0

K 2 (Q o 2 + DQ I + DQ II ) n 2 + K 3 (Q o 3 + DQ I + DQ II ) n 3 + K 4 (Qo 4 + DQ I ) n 4 = 0
K 1 (Q o 1 + DQ II ) n1 + K 2 (Q o 2 + DQ I + DQ II ) n 2
+ K 3 (Q o 3 + DQ I + DQ II ) n 3 + K 5 (Q o 5 + DQ II ) n 5 - 40 = 0

Solution of the Q-Method


using Linearization
Lets formulate the governing equations of the
given network using the Q-method then lets
solve
the
obtained
equations
using
linearization.

Linearization Theory
Linear Theory Method
(Simultaneous Pipe Method)
Wood - Charles 1972

Dr. Mohammed Osama


Assistant Professor of Mechanical Power,
Faculty of Engineering, KFS University

Solution of the Q-Method


using Linearization (Cont.)
List all the governing equations to solve the
below network using the Q-method.

K i Q i n K i Qo i n -1 Q i K ioQ i
where
K io = K i Qo i n -1

Solution of the Q-Method


using Linearization (Cont.)
Some of the governing equations are linear and
others are non-linear.

We have two avenues for the solution,:


To deal with the set of equations as non-linear and to use NewtonRaphson or other iterative solvers to solve the equations (will be
discussed later)
or,
To linearize the equations and to make use of the efficient linear solvers.

Solution of the Q-Method


using Linearization (Cont.)
Let us carry out linearization of the following
set of equations:

Linearization: Substitute each non-linear term K i Q i n with K i Q i n -1 Q i


Loop1 - 2 - 3 : K 1 Q1n -1 Q1 + K 2 Q 2 n -1 Q 2 - K 3 Q 3 n -1 Q 3 = 0
Loop4 - 5 - 2 : K 4 Q 4 n -1 Q 4 - K 5 Q 5 n -1 Q 5 - K 2 Q 2 n -1 Q 2 = 0
Then guess an intial value for Q i in the K i Q i n -1 term

Solution of the Q-Method


using Linearization (Cont.)
The set of equations eventually reduces to the
following linear system:

Solution of the Q-Method


using Linearization (Cont.)
The value of the unknown {Qnew} can be obtained
using iteration as follow:
Where

Loop 1 - 2 - 3 : K 1 Q o 1n -1 Q1 + K 2 Q o 2 n -1 Q 2 - K 3 Q o 3 n -1 Q 3 = 0
Loop 4 - 5 - 2 : K 4 Q o 4 n -1 Q 4 - K 5 Q o 5n -1 Q 5 - K 2 Q o 2 n -1 Q 2 = 0

Solution of the Q-Method


using Linearization (Cont.)
The above linear set of equations can be written in
a matrix format as:

Procedure for analysis by the


linear theory method
Step 1: Write Q-equations system
Step 2: Linearize the loop energy equation.

K i Q i n K i Q o i n -1 Q i K io Q i
where ,

Where:

K io = K i Q o i n -1

Step 3: Assume initial pipe discharges Qo1, Qo2, Qo3, . . . . It is not


necessary to satisfy continuity equations. Then, find K io .
Step 4: Calculate pipe discharges. The equation generated is of the form
AX = B, which can be solved for Qi.
o
Step 5: Recalculate coefficients K i from the obtained Qi values.

Step 6: Repeat the process again until the calculated Qi values in two
consecutive iterations are close to predefined limits.

Q i - Q o i 1 10-3

Solution

The nodal discharge functions, and

loop head-loss function

Example
A single looped network as shown in figure has to be
analyzed by the Linear Theory Method for given inflow
and outflow discharges. The pipe diameters D and
lengths L are shown in the figure. Use DarcyWeisbach
head lossdischarge relationship assuming a constant
friction factor f = 0.02.

Solution (cont.)
loop head-loss function is linearized as:
F4 = K o 1 Q 1 + K o 2 Q 2 - K o 3 Q 3 - K o 4 Q 4 = 0
Assuming initial pipe discharges as 0.1 m3/s in all the
pipes, the coefficients for head-loss function are
calculated as:

Solution (cont.)

Solution (cont.)

Thus the matrix of the form Ax = B can be written as :

Solving the above set of linear equations, the pipe


discharges obtained are:

Solution (cont.)
Repeating the
coefficients are:

process,

the

revised

Solving the above set of linear equations, the pipe


discharges obtained are

Thus, the above are the final pipe discharges as the two
iterations provide the same solution.

Inverse of Matrix A-1 ?!


head-loss

Solving the above set of linear equations, the pipe


discharges obtained are:

Matrix Multiplication(A-1 B) ?!
Inverse of
Matrix A-1 ?!
(cont.)

Inverse of Matrix A-1 ?!


(one more example)

Newton Raphson Method


or simply

Newton Method

Dr. Mohammed Osama


Assistant Professor of Mechanical Power,
Faculty of Engineering, KFS University

Features

Jacobian Matrix [D]

It is a numerical method for solving a large system of


non-linear equations simultaneously.
It is applicable for the solution of all system-ofequations:

It represents the following matrix of


derivatives:

Q equations,
H equations, or
Q equations.

Faster Convergence
The primary unknown variable will be called the vector
{ x }. Where x is Q, H, or Q according to the used
analysis system for the network.

Procedure
The Newton iterative formula for solving a system of
equations can be written as

[ X]

m+1

= [ X] - [ D]
m

-1

[F]

Where,
x

[x] is an entire column vector of unknowns,


[F] is an entire column vector of equations,
and
[ D ]-1 is the inverse of Jacobian matrix [ D ].

Recall slides 40 and 41 for solving a single non-linear equation:


The unknown vectors {x} and {F} replace the single variable x and function f and
the inverse of the Jacobian [ D ]-1 , replace
formula for solving a single equation.

1
1
=
f df dx

in the Newton-Raphson

Solving the Q-equations


by Newton method
If solving the equation with the heads as the
unknown, the vector [x] becomes the vector
[Q]. And, the Jacobian [ D ] is,

Q1
Q
2
[Q ] = Q 3 ,

M
Q j

[Q ]

m +1

F1
Q
1
F 2

[ D ] = Q 1
M

F j
Q
1

= [Q ] - [ D]
m

-1

F1
Q 2
F2
Q 2
M
F j
Q 2

[F]

F1
Q j

F 2
L

Q j
M
M

F j
L
Q j
L

Example
(Q-eqns. System)
For the simple one loop network shown in figure,
find out the head at each node using the Newton
Method.

Solution (cont.)
(Q-eqns. System)
The Jacobian matrix [D]
F1
Q
1
F 2
Q
1
F
D
=
[ ] Q3
1
F 4

Q 1
F
5
Q1

F1
Q 2

F1
Q 3

F1
Q 4

F2
Q 2

F2
Q 3

F2
Q 4

F3
Q 2

F3
Q 3

F3
Q 4

F4
Q 2

F4
Q 3

F4
Q 4

F5
Q 2

F5
Q 3

F5
Q 4

F1
Q 5

F2
Q 5
F3
=
Q 5
F4

Q 5
F5

Q 5

Implementing the Newton method,

[Q ]

m+1

Solution
(Q-eqns. System)

= [ Q ] - [ D]
m

-1

[F]

Solution (cont.)
(Q-eqns. System)
With an initial estimate of pipes flow rates as:

The system of H-equations are:

Substitute with guessed values in [D] and [F]:

Solution (cont.)
(Q-eqns. System)

Solution (cont.)
(Q-eqns. System)

(1)

Substitute with Q

values in [D] and [F]:

For finding the inverse of the Jacobian matrix,

Thus, the inverse of the Jacobian [D] matrix is:


-1

With the solution of the 2nd iteration:

[Q ]

(2)

Solution (cont.)
(Q-eqns. System)
With the solution of the 1st iteration

= [ Q ] - [ D]
(1)

-1

[F]

(1)

Solution (cont.)
(Q-eqns. System)
One more cycle (3rd iteration) would yield the
final solution:

Solving the H-equations


by Newton method
If solving the equation with the heads as the
unknown, the vector [x] becomes the vector
[H]. And, the Jacobian [ D ] is,
F1
F1
F1
H1
L
H
H 2
H j
H
1

F2
F2
F2
2
L

H j
[ H ] = H 3 , [D] = H 1 H 2
M

M
M
M
M


F j
F j
F j
L
H j
H
H j

1 H 2

[H]

m+1

= [ H ] - [ D]
m

-1

Solution
(H-eqns. System)
The system of H-equations are:

[F]

Example - 1
(H-eqns. System)
For the simple one loop network shown in figure,
find out the head at each node using the Newton
Method.

Solution (cont.)
(H-eqns. System)
The Jacobian matrix [D]

Implementing the Newton method,

[H]

m+1

= [ H ] - [ D]
m

-1

[F]

Solution (cont.)
(H-eqns. System)
With an initial estimate of the nodal heads as:

Example - 2
(H-eqns. System)
For the branched three reservoirs network shown,
find out the head at the junction and the flow
discharge in each pipe.

From which we find that:

Solution (cont.)
(H-eqns. System)
With the solution of the 1st iteration:

[H]

(1 )

= [H]

(0)

- [ D]

-1

[F]

(0)

After completing 5 iterations the solution become

Solution
(H-eqns. System)
The system of H-equations are:

Solution (cont.)
(H-eqns. System)
Implementing the Newton method,

[H]

m+1

= [ H ] - [ D]
m

-1

[F]

As there is only one equation, the Jacobian


matrix [D] reduces to the derivative dF1 dH 1 and
the will be:
-1

m+1

=H

dF
- 1 F1m
dH 1

Solving the Q-equations


by Newton method
If solving the equation with the heads as the
unknown, the vector [x] becomes the vector
[Q]. And, the Jacobian [ D ] is,
F1
F1
F1
DQ1
L
H
H 2
H L
DQ
1

F2
F2 F2
2
L
H L
[Q] = DQ 3 , [ D] = H 1 H 2

M
M
M
M

M
FL FL L FL
DQ j
H 1 H 2
H L

[Q ]

m +1

Solution (cont.)
(H-eqns. System)

= [ Q ] - [ D]
m

-1

[F]

Example
(Q-eqns. System)

The derivative is:


For the same one loop network shown in figure,
analyze using discharge-correction equations
system and the Newton Method.

With an initial estimate of the nodal head H1= 85,


the first two iteration produce:

Solution (cont.)
(Q-eqns. System)

Solution
(Q-eqns. System)
The system of Q -equations are:

Starting with Q1 = Q2 =0, from which we find


that:

The energy equation around the pseudo loop becomes:

From which the solution becomes:

The energy equation around the real loop is:

Solution (cont.)
(Q-eqns. System)
The Jacobian matrix [D] and the initial estimate
of flow rates Q(s) are:

Implementing the Newton method,

[Q ]

m +1

= [ Q ] - [ D]
m

-1

[F]

Solution (cont.)
(Q-eqns. System)

After completing 3 iterations the


solution becomes:

From these results, we can


compute the flow rates in each
pipe by adding these corrective
flow rates to the initially assumed
values of Q(s), which satisfy the
junction continuity equations.

Das könnte Ihnen auch gefallen