Lecture 5 (Water Distribution and Supply)
Lecture 5 (Water Distribution and Supply)
Lecture 5 (Water Distribution and Supply)
Hydraulic Modelling
ECMM133
Outline
• Introduction
• Steady-state hydraulics:
– Hardy-Cross method (incl. example)
– Linear Theory method (incl. example)
– Other methods
– Tree-like networks method
• Extended period simulation
• EPANET2 software demo
Pressurised Fluid Flow
Energy Components
Small!
Head (m) Symbol EGL
v2/2g
HGL
Elevation head Z
p/rg
Pressure head p/rg
Ground
Velocity head v2/2g E H Small!
Pipe
(Piezometric) H = z + p/rg centreline
Head
Z
Energy E = H+ v2/2g
Datum
Generalised Pipe Headloss
Equation (SI Units)
n 1
h f RQ R Q
n
Q
Formulation R n
Hazen- 10.648L
10.67 1.852
RHW
Williams C1.852 D 4.871
Pipe Network Hydraulics
• Problem: Given network
configuration, L, D and k
(or C or n) for each pipe,
Z and Qd for each node
and at least one Hf for a
fixed head node, find the
unknown Q (or v) in each
pipe and H (or P) at each
node
• Example: 12 unknowns
(7 pipe flow rates Q and 5
nodal heads H)
Hardy-Cross Method
• Proposed by Hardy and Cross (1936) and
updated by Cornish (1939)
• Mass balance equation for each node i:
Qd,i
Ni i
Q
Q1
m Qd ,i 0 QNi
m 1 Qm
Hardy-Cross Method (cont.)
• Energy balance equation for each loop l:
hf,1
Nl
h
j 1
f,j 0
Loop l
hf,Nl
hf,j
Qd
Hardy-Cross Procedure
1. Identify loops in the network. Set iteration
counter k=1.
2. Assume flows in each pipe (must be
balanced at each node). Assign the flow
signs based on the ‘clockwise convention’.
Hardy-Cross Procedure (cont.)
3. Calculate the headloss in each pipe.
Qi
( k 1)
Q
i
(k )
Q l
(k )
l i
10 l/s 22 l/s
10 l/s
18 l/s 15 l/s
Hardy-Cross Example:
Assumed Flow Values
50 l/s 22 l/s
10 l/s
25 l/s 20 l/s
20 l/s 2 l/s
10 l/s
18 l/s 15 l/s
15 l/s
17 l/s
Hardy-Cross Example: Iteration 1
=-(-147.16)/(2*6700.54)*(1000)
= 20+(10.98-1.27)
= 50+10.98
Loop Pipe Q │v│ Re hf │hf/Q│ Q
(l/s) (m/s) (-) (-) (m) (s/m2) (l/s)
1 1 60.98 1.24 2.72E+05 0.018 2.98 48.86
4 29.71 0.95 1.66E+05 0.019 2.77 93.14
6 -4.02 0.51 4.49E+04 0.025 -1.77 440.12
3 -14.02 1.78 1.57E+05 0.022 -41.96 2993.23
Sum: -37.98 3575.35 5.31
= 50 - 3.75
= 46.25 -12
• Pros:
– Smaller number of principal unknowns (flow
corrections in loops), hence simpler to use if doing
calculations manually
• Cons:
– Identification of (independent) network loops
(including pseudo loops) may not be so simple in
larger networks
– The above is also not easy to code in a computer
programme
Linear Theory Method
• Developed by Wood and Charles (1972)
• Equations:
– Mass balance equation for each node I (flow going
out of node is positive):
Ni
Q
j 1
ij Qd ,i 0
(where Uij=RijQijn-1)
Linear Theory Method (cont.)
H i( k 1) H (j k 1)
Hi H j Uij Qij Qij( k 1) (k )
(1)
U ij
Ni
Hi H j Ni
1 Ni
Hj
j 1 U ij
Qd ,i H i
j 1 U ij
j 1 U ij
Qd ,i f ( H i ) 0
Newton-Raphson method:
H ( k 1)
H (k )
f H i( k )
f H
i i ' (k )
i
Linear Theory Method (cont.)
H (j k ) Ni
Ni Ni
1
1
H ( k ) Qd ,i
(k ) (k ) ' (k )
f H i i (k )
f H i (k )
j 1 U ij j 1 U ij j 1 U ij
Ni
1 Ni
H (j k )
H i
(k )
(k )
j 1 U ij
( k ) Qd ,i
j 1 U ij
H i( k 1) H i( k ) Ni
1
U
j 1
(k )
ij
Ni
H (j k )
Uj 1
(k )
Qd ,i
H i( k 1)
ij
Ni
(2)
1
(k )
j 1 U ij
Linear Theory Method Procedure
1. Initialise iteration counter k=0. Initialise nodal heads by
assuming Hi(0) and calculate the corresponding pipe
flows Qij(0). Alternatively, assume Qij(0) (by assuming
velocities vij(0)) and calculate Hi(0). Calculate Uij(0).
H i( k 1) H (j k 1)
Qij( k 1) (k )
U ij
max H i( k 1) H i( k ) e H
i
If converged, stop. If not, go back to step 2.
Linear Theory Example: Data
22 l/s
10 l/s
10 l/s
18 l/s 15 l/s
LT Method Example: Iteration 0
Pipe v Q Re R U hf
(-) (m/s) (l/s) (-) (-) (s2/m5) (s/m2) (m)
1 1.00 49.09 2.19E+05 0.018 8.17E+02 40.11 1.97
2 1.00 17.67 1.32E+05 0.020 9.15E+03 161.62 2.86
3 1.00 7.85 8.77E+04 0.023 2.24E+05 1762.34 13.84
4 1.00 31.42 1.75E+05 0.019 3.12E+03 97.95 3.08
5 1.00 7.85 8.77E+04 0.023 1.94E+05 1527.36 12.00
6 1.00 7.85 8.77E+04 0.023 1.01E+05 793.05 6.23
7 1.00 17.67 1.32E+05 0.020 1.29E+04 228.63 4.04
Node Head
(-) (m)
1 50.00
2 48.03
3 45.18
4 36.16
=50.00-1.97
5 44.95
6 40.91
LT Method Example: Iteration 1
Ni
H (j k )
U
j 1
(k )
Qd ,i
H i( k 1)
ij
Ni
1 Node Head Error =48.03-47.79
(k )
j 1 U ij (-) (m) (m)
Calculated 1 50.00 0.00
using 2 47.79 0.24
equation 3 44.13 1.04
(2), i.e. by 4 41.05 4.89
using H(0) 5 43.99 0.97
for nodes 1,
6 42.00 1.09
3 and 5, U(0)
for pipes 1, Max: 4.89
2 and 4 and
Pipe Q v Re R U
demand at
node 2 (-) (l/s) (m/s) (-) (-) (s /m5)
2
(s/m2)
1 55.12 1.12 2.46E+05 0.018 8.08E+02 44.56
2 22.61 1.28 1.68E+05 0.020 8.94E+03 202.16
Calculated 3 5.08 0.65 5.67E+04 0.024 2.36E+05 1197.61
using
4 38.83 1.24 2.17E+05 0.019 3.06E+03 118.76
equation (1),
5 -1.40 0.18 1.56E+04 0.030 2.54E+05 355.12
i.e. by using
H(1) for 6 -3.70 0.47 4.13E+04 0.025 1.11E+05 410.15
nodes 1 and 7 8.68 0.49 6.47E+04 0.022 1.41E+04 122.25
2 and U(0) for
pipe 1 ( k 1)
H i( k 1) H (j k 1)
Q ij
U ij( k )
LT Method Example: Iteration 2
Node Head Error
(-) (m) (m)
1 50.00 0.00
2 47.50 0.29
3 42.85 1.28
4 42.46 1.41
5 43.49 0.49
6 42.66 0.66
Max: 1.41
Pipe Q v Re R U
(-) (l/s) (m/s) (-) (-) (s /m5)
2
(s/m2)
1 56.19 1.14 2.51E+05 0.018 8.07E+02 45.35
2 22.96 1.30 1.71E+05 0.020 8.93E+03 205.00
3 6.29 0.80 7.03E+04 0.023 2.30E+05 1446.00
4 33.71 1.07 1.88E+05 0.019 3.10E+03 104.39
5 -0.55 0.07 6.15E+03 0.037 3.17E+05 174.78
6 -2.51 0.32 2.80E+04 0.026 1.18E+05 295.86
7 6.82 0.39 5.08E+04 0.023 1.46E+04 99.50
LT Method Example: Iteration 32
Node Head Error
(-) (m) (m)
1 50.00 0.00
2 46.28 0.00
3 41.20 0.01
4 41.03 0.00
5 42.58 0.01
6 40.31 0.00
Max: 0.01
Pipe Q
(-) (l/s)
1 68.38
2 23.90
3 6.27
4 34.64
5 -1.92
6 -3.70
7 12.99
LT Example: Results
• Pros:
– Relatively easy to code in a computer
programme (no need to identify loops, etc.)
• Cons:
– Larger number of unknowns than in the
Hardy-Cross method
– Requires larger number of iterations to
converge
Todini & Pilati (1987) Method
• Global Gradient Algorithm (GGA)
• Based on the Newton-Raphson technique
• Equations:
– Mass balance for nodes and
– Energy balance pipes (i.e. links)
• Used in Epanet2 software (Rossman
2000)
GGA: System Equations
A11 A12 Q A10H 0
A 21 0 H q
Node inflow
where: assumed positive
QT [Q1 , Q2 , , QNp ] unknown pipe flows
n 1
A11 i, i R Qij (diagonal matrix)
Node 2 3 4 5 6 1 Pipe
22 l/s 1 0 0 0 0 1 1
10 l/s
1 1 0 0 0
0 2
0 0 1 0 0 1 3
10 l/s
A12 1
18 l/s 15 l/s
0 0 1 0 0 4
0 1 0 0 1 0 5
Assumed flow directions!
0 0 1 1 0 0 6
0 0 1 1 0 7
0
System of Equations (1): Example
10 l/s
22 l/s
10 l/s
18 l/s 15 l/s
R1 Q1
n 1
0 0 0 0 0 0 1 0 0 0
0
n 1
Q1 50
0 R2 Q2 0 0 0 0 0 1 1 0 0 0 Q 0
n 1 2
0 0 R3 Q3 0 0 0 0 0 0 1 0 0 Q3 50
n 1
0 0 0 R4 Q4 0 0 0 1 0 0 1 0 Q4 0
n 1
0 0 0 0 R5 Q5 0 0 0 1 0 0 1 Q5 0
1 1 0 6
n 1 Q 0
0 0 0 0 0 R6 Q6 0 0 0
Q 0
0 1 1
n 1 7
0 0 0 0 0 0 R7 Q7 0 0
H 2 0.010
1 1 0 0 0
0.022
1 0 0 0 0 0 0
H3
0 1 0 0 1 0 0 0 0 0 0 0
H 2 0.010
0 0 1 0 0 1 0 0 0 0 0 0
H 5 0.018
0 0 0 1 0 1 1 0 0 0 0 0
H 6 0.015
0 0 0 0 1 ECMM123
0 1 0 0 0 0 0
GGA Method
Differentiate system of equations (1) with respect to unknowns Q and H:
B 21 A 21D 1 A 12
1
A 21D 1
B 22 A 21D 1 A 12 1
GGA Method (cont.)
The solution of (2) now becomes:
dQ B11dE B12dq
dH B 21dE B 22dq
Therefore:
A 21D A12 A 21D1 A11Q ( k ) A12 H ( k ) A10 H 0
( k 1) 1 1
dH H (k )
H
A 21D A12 A q
1 1 (k )
21Q
dQ Q( k ) Q( k 1) D1 A11Q ( k ) A12 H ( k ) A10 H 0
A
1
D1
A A I D 1
A Q (k )
q A D 1
A10 H 0
21 12 21 11 21
A A 21D A12 1
1 1
F A 21Q (k )
q A 21D A11Q (k )
A 21D A10 H 0
Finally:
Q ( k 1)
Q(k )
D1
A
11Q
(k )
A12 H ( k 1)
A10 H0 (4)
GGA Procedure
1. Initialise iteration counter k=0. Initialise Q(0) (by
e.g. assuming velocities v(0)) and calculate
H(0).
2. Update nodal heads by using equation (3).
3. Update pipe flows by using equation (4).
4. Increase k by 1 and check for convergence,
e.g.:
max Q i
( k 1)
Q
i
(k )
eQ
i
D1,L1,k1 Q1 D Q2 B
hA Q3 D2,L2,k2
QC
D3,L3,k3
C
D1,L1,k1 Q1 D Q2 B
hA Q3 D2,L2,k2
QC
D3,L3,k3
C
• Solution:
1. Phase I (upstream direction):
a) Calculate flows in all pipes: Q3=QC, Q2=QB and Q1=QD+QC+QB
b) Calculate headloss in each pipe hfi (i=1,2,3) using e.g. D-W
equation
2. Phase II (downstream direction):
a) Calculate nodal heads: hD=hA-hf1, hB=hD-hf2 and hC=hD-hf3
Extended Period Simulation (EPS)
Modelling
• Adds time dimension to the analysis
• Modelled as a sequence of steady-state
conditions in the networks
• Initial conditions:
– Water level in all tanks at t=0
– Status of all automatically regulated devices at t=0
• Boundary conditions:
– Water level with time at all reservoirs (i.e. sources)
– Status of time controlled devices
General EPS
Computational Algorithm
1. Initialise simulation time t=0. Find heads and
flows in the network given the initial conditions.
2. Increase t by t and update reservoir water
levels and statuses of time controlled devices by
using the boundary conditions. Update tank
water levels by using the flow rates from the
previous time step.
3. Solve network hydraulics for unknown junction
heads, pipe/link flows and statuses of
automatically regulated devices.
4. If t>tmax stop. Otherwise, return to step 2.
EPS: Tank Level Updating
Differential equation:
dV (t )
Qin (t ) Qout (t )
z dt
Zmax
Initial condition: V (t0 ) V0
zt+t Boundary condition: Vmin V (t ) Vmax
zt
V(z) Solution using the Euler’s (first-order)
Zmin
Qin Qout explicit approximation:
Vt t Vt Qin,t Qout ,t t t=0,1,2,…