Escolar Documentos
Profissional Documentos
Cultura Documentos
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
(-)
L
L
fo r N T 2
fo r N T < 2
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
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
= ( K i + Kv / 2 gA 2v )Q i2 = 0
Example(Cont.)
H- system of equations:
Example(Cont.)
Q- system of equations:
closed
Q-equations:
Continuity @ nodes (Step 1)
Energy @ loops (Step - 3 )
closed
H-equations:
Continuity @ nodes (Step 1) in terms of H.
Additional Proportionality eqn.
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.)
Q- system of equations
Step (3):
Step (1):
Write
the
energy
equation for the loops
of
the
modified
network.
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
H-equations:
Continuity @ nodes (Step 1) in
terms of H.
Additional Proportionality eqn.
Q1
Q3
Q- system of
equations (cont.)
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)
II
Discharge
Q1 - Q3
Q2 +Q1- Q3
Q3 -Q1+ Q3
Q4 + Q3
Q5 + Q2
Q6 - Q2
Q7 -Q1+Q2
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 )
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!
x1
x1
x0
x2
x0
Mathematical Review
Finding Zeros of a function:
An illustrative Example
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 )
DQ = -
n -1
=-
h
n h
i
L ,i
L ,i
/ Qi
-S (k i Q i n )
S(n i k i Q i n -1 )
IF NO Repeat steps 2, 3
until satisfied
IF Yes Stop 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
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
Solutions
0.2
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
F (Q) = n1 K1 (Qo 1 + DQ )
n1 -1
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
Linearization Theory
Linear Theory Method
(Simultaneous Pipe Method)
Wood - Charles 1972
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
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
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 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
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.)
Solution (cont.)
Repeating the
coefficients are:
process,
the
revised
Thus, the above are the final pipe discharges as the two
iterations provide the same solution.
Matrix Multiplication(A-1 B) ?!
Inverse of
Matrix A-1 ?!
(cont.)
Newton Method
Features
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
1
1
=
f df dx
in the Newton-Raphson
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
[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:
Solution (cont.)
(Q-eqns. System)
Solution (cont.)
(Q-eqns. System)
(1)
Substitute with Q
[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:
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]
[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.
Solution (cont.)
(H-eqns. System)
With the solution of the 1st iteration:
[H]
(1 )
= [H]
(0)
- [ D]
-1
[F]
(0)
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]
m+1
=H
dF
- 1 F1m
dH 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)
Solution (cont.)
(Q-eqns. System)
Solution
(Q-eqns. System)
The system of Q -equations are:
Solution (cont.)
(Q-eqns. System)
The Jacobian matrix [D] and the initial estimate
of flow rates Q(s) are:
[Q ]
m +1
= [ Q ] - [ D]
m
-1
[F]
Solution (cont.)
(Q-eqns. System)