Sie sind auf Seite 1von 10

World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 209

Enhanced Global Gradient Algorithm: a general formulation

L. Berardi1, O. Giustolisi2 and E. Todini3


Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

1
Technical University of Bari, Engineering Faculty of Taranto, Department of Civil
and Environmental Engineering, viale del Turismo 8, Taranto, Italy; e-mail:
l.berardi@poliba.it
2
Technical University of Bari, Engineering Faculty of Taranto, Department of Civil
and Environmental Engineering, viale del Turismo 8, Taranto, Italy; e-mail:
o.giustolisi@poliba.it
3
Department of Earth and Geo-Environmental Sciences, University of Bologna, Via
Zamboni, 67, Bologna, Italy; e-mail: ezio.todini@unibo.it

ABSTRACT

The behaviour of a looped water distribution network, operating under


pressure in steady flow conditions, can be modelled by imposing mass and
momentum conservation. When distributed demands along the pipes are present,
they tend to be represented as lumped withdrawals at the pipes ending nodes.
Although such simplification preserves mass balance, it might cause significant head
loss errors which may lead to inconsistent results. Giustolisi and Todini (2008)
recently proposed a correction scheme within a modified Global Gradient Algorithm
(GGA) under the common assumptions of Darcy-Weisbach head loss formula and
pipe friction factors independent from the flow regime.
This paper provides an extension of the mentioned approach to any generic
monomial head loss formula, so it can be easily incorporated into existing
commercial water distribution network simulators.

INTRODUCTION

The problem of identifying the hydraulic status of a looped pressurized water


distribution network (WDN) consists in determining pipe discharges and nodal heads
once network topology, pipe geometry, water demands and head value of at least one
node are assigned. In steady flow condition, solution of such a problem should obey
flow continuity (conservation of mass) at any point of the network and conservation
of momentum along any path. Although mass conservation is represented by linear
equations, usually referred to flow entering and exiting from each node, momentum
conservation law depends on head loss along a given path (at least one link in the
network) which is non-linear in flow.
On this premise, literature works on WDN hydraulic analysis follow two
distinct approaches, namely the direct solution of the resulting non-linear system of
equations or the use of optimization techniques. The first approach was introduced
by H. Cross (1936) is based on iterative solution of linear approximations of the

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 210

original equations with respect to closed loops. This method was extended to
simultaneously account for all the loops by using Newton-Raphson methods (Epp
and Forley, 1970; Kesavan and Chandrashekar, 1972). The Newton-Raphson method
was also used to calculate heads at nodes after non-linear transformation of pipe
discharges (Martin and Peters (1963), Shamir and Howard (1968); Mignosa, 1987).
Wood and Charles (1972) introduced the Linear Theory to provide the direct solution
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

of the original equations by calculating pipe discharges, after a linear transformation


of nodal heads. The second approach, based on optimization was introduced by
Collins at al. (1978) and is centred on the minimization of the “content” and “co-
content” models. Such a minimisation is performed by means of a network linear
programming (NLP) code. Despite the NPL was tested to be less efficient than the
GGA (Berghout and Kuczera, 1997), the optimization approach deserves attention as
it is based on the convexity of the “content” functional which is fundamental to
demonstrate the existence and uniqueness of the solution. Such a result is of crucial
importance for successive development of gradient methods proposed by Todini
(1979) and Todini and Pilati (1988). They used Collins et al. (1978) results to
demonstrate that the solution of the system of non linear equations obtained from the
minimization of a convex function (the Collins “content”) under linear constraints is
unique. On these grounds, they applied a Newton-Raphson gradient technique to
solve, both in terms of pipe discharges and nodal heads, the system of non-linear
equations, resulting from the minimization of the content. The resulting Global
Gradient Algorithm (GGA) has been recognised to be the most robust and fast
method for WDN analysis and it is considered to be a benchmark for any new WDN
hydraulic solver. Moreover, GGA is embedded in several commercial software
packages (e.g. EPANET2)
Irrespectively to the approach followed, a common assumption of all
abovementioned methods is the representation of pipe distributed demand as equal
lumped withdrawals at end nodes. It mainly descends from the poor knowledge of
actual pipe connection but is useful to reduce problem unknowns by simultaneously
preserving mass conservation at nodes. Recently, Giustolisi and Todini (2008)
demonstrated that such a simplification results in significant errors in momentum
balance which eventually impair correctness of the analyses performed for
calibration, system design, real-time operations, rehabilitation strategies, optimal
operation studies, reliability analyses, etc. They proved it considering the simple
assumption of uniformly distributed demands along the pipes by means of a uniform
function. In order to take advantage from the classical GGA they still assumed a
symmetric partition of pipe distributed demand as nodal withdrawals and introduced
a correction term of the hydraulic resistance coefficient. At the same time, they
provided similar corrections for all matrices involved in the classical GGA. The
mathematical development reported in that introductory work was based on Darcy-
Weisbach formula and did not account for other monomial head loss formulas widely
used by practitioners (e.g. Hazen-Williams).
This work is primarily aimed at filling in this gap by providing and extended
formulation of the enhanced GGA, to be easily implemented into the existing
algorithms or software packages.

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 211

HEAD LOSS CONSIDERING UNIFORMLY DISTRIBUTED DEMAND

When a liquid flows through a pipeline, shear stresses develop between the
liquid and the pipe wall. This shear stress is a result of friction and its magnitude
depends upon the properties of the fluid that is passing through the pipe, the speed at
which it is moving, the pipe internal roughness, length and diameter. Under steady
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

flow conditions, the head losses slope J due to fiction along a pipe is described by the
Darcy-Weisbach formula (1) which is derived from the governing equations of the
physical phenomenon at hand.
dH 8 f ( Re, Ke )
J =− = Q Q = K ( Re, Ke, D ) Q Q (1)
dx gπ 2 D 5
x is a linear coordinate whose origin is at the beginning of the pipe (see Figure 1), Q
is the water discharge passing through the pipe with length L and diameter D, and f is
the pipe friction factor which depends on equivalent roughness Ke and flow regime
(i.e. Reynolds Number, Re); g is the gravitational acceleration constant and K is the
pipe unit hydraulic resistance. In Eq.(1) the minus sign underlines the fact that the
head always decreases in the direction of the flow (which can be either opposite or in
agreement with the assumed positive direction of coordinate x).
The Darcy-Weisbach formula can be potentially used to find the head losses
through pipe for any Newtonian fluid under any flow regime. However, in technical
practice, there are other empirical formulations of the head losses in pressurized
water pipeline that can be condensed into the generic monomial expression (2),
where K∞ usually does not depend on Re (i.e. fully turbulent flow is assumed)
dH n −1
J =− = K∞ ( Ke, D ) Q Q (2)
dx
n=2 is predominant in Europe while n=1.852 it represents the Hazen-Williams
expression, which nowadays is the most popular in the U.S. (Walski et al., 2001).
The empirical formulations have been developed from experimental data recorded
under fully turbulent flow regime, which is assumed to be the most common in water
distribution system. From a modelling point of view, the great advantage of using
such expressions descends from computing pipe unit hydraulic resistance K∞ only
once during the simulation, by assuming that the only existing flow regime is fully
turbulent irrespectively of the actual flow conditions.
Traditionally, actual demand is assumed to be uniformly distributed along the
pipe. Such a simplification usually accounts for the inaccurate knowledge of actual
connections.
In order to mathematically compute the head losses through a generic pipe
connecting nodes i and j in the network a positive direction for the pipe discharge Q
is assumed in the direction of coordinate x. Under the hypothesis of pressure
independent demand (generally assumed in “demand-driven” simulation models as
that originally discussed in Giustolisi and Todini (2008)) the functioning of such pipe
is represented in Figure 1, where Qi and Qj represent the flow at nodes i and j
respectively. Without loss of generality (considering the symmetry of the problem),
in both cases the flow Qi is assumed positive (in the same direction as abscissa x) and

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 212

the total uniformly distributed demand is designated as P=qL, with q, and


consequently P, non-negative quantities. The first figure (top-left) entails the case of
flow passing through the pipe in one direction (i.e. Qi ≥ Qj), meaning that inlet flow
entirely meet the distributed demand; the second drawing (top-right) refers to the
opposite condition, where water flow is entering from both nodes and a flow
inversion point (y) occurs within the pipe.
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

Figure 1. Uniformly distributed demand and its schematization in WDN model

It can be easily proved that the following equality holds irrespectively of the sign of
actual flows Qi and Qj (with respect to the assumed positive sign)
Qi − Q j = P (3)
Unfortunately, the existence of a uniformly distributed demand and variable
discharge along the pipe prevent from using straightway the generic head loss
formulation (2) unless it is referred to the head loss slope Jx occurring into each
infinitesimal pipe element of length dx, carrying flow Qx at distance x from the origin
of the axis.
dH
= K ∞ ( Ke, D ) Qx Q x
n −1
Jx = − (4)
dx
Furthermore, the mass balance equation (3) written for section x (i.e. Qx= Qi – qx)
allows deriving the linear variation Qx with x (again independent on actual flow
direction): dQx/dx = -q. Such a result is used to analytically compute the actual head
loss through the pipe in the case of no flow inversion (Case (A) of Figure 1).
L L L
K∞ dQx
(H i −Hj) actual
= ∫ J x dx = ∫ K ∞ Qx Qx
n −1
dx = ∫
−q
Qx Qx
n −1

dx
dx =
0 0 0

n +1 Qi n +1 n +1 (5)
K
Qj
n
⎡Q ⎤ L Qi − Q j L
=− ∞ ∫Q d Qx =K ∞ = K∞
x
x ⎢ ⎥
q Qi ⎢

n +1 ⎥
⎦Q
P n +1 P
j

It can be easily demonstrated that Equation (5), obtained for one-direction flow,
holds irrespectively on the sign of flows Qi and Qj as well as in the case of flow

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 213

inversion. In fact, the existence of inversion point y factually divides pipe into two
sub-portions connecting nodes i and j to the fictitious node y (with Qy=0) having the
same positive direction assumed for pipe discharges. Head loss between nodes i and j
can be computed by summing the head losses though the two sub-portions 0 – y and
y – L (from 0 to y and from y to L) respectively by using Eq.(5).
In order to take advantage from the original formulation of the problem
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

proposed by Giustolisi and Todini (2008), let’s introduce the dimensionless quantity
δ, which is the ratio between the inlet flow Q and the total distributed discharge P.

δ=
Q
P
; Qi = P + Q j ⇒ QP = δ −1j
(6)

The head loss can be re-written accordingly.


n +1 n +1
δ − δ −1
(H i − H j )actual = K ∞
n +1
Pn L (7)

Thus, under fully turbulent flow and uniformly distributed demand Equation (7)
represents the actual pipe head loss.

ENHANCED WDN SIMULATION MODEL

Usually, WDS simulation models represent distributed demands as two equal


lumped demands at the terminal nodes. The two figures at the bottom of Figure 1
represent the effect of schematization in the two opposite cases considered, where the
discharge through the modelled k-th pipe is constant (Qk=Qi – Pk/2) and head loss is
computed by using Eq. (2).
n −1
1⎞ 1
( Hi − H j ) simulation model
= K∞ ⎜ δ −


⎟δ −
2⎠ 2
Pk n L (8)

It is clearly different from the head loss in the original demand configuration (7).
Giustolisi and Todini (2008) proposed to use a correction of hydraulic resistance R
(=KL) to compensate the error of momentum balance due to schematisation, while
preserving the symmetrical partition of distributed demand into the two end nodes.
In order to introduce such a correction into the existing algorithms, both
Equations (7) and (8) are re-written in terms of the dimensionless parameter δk =
Qk/Pk= δ − 1/2 as follows.
n +1 n +1
1 1
δk + − δk −
2 2
(H i − H j ) actual = K k ,∞
n +1
Pk n L (9)

(H i − H j ) simulation model = K k ,∞δ k δ k


n −1
Pk n L

Thus, the correction εk of pipe hydraulic resistance is obtained by equating the two
head loss expressions in Equation (9)

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 214

n +1 n +1
1 1
δk + − δk −
K k ,∞ (1 + ε k ) δ k δ k
n −1
Pk n L = K k ,∞
2
n +1
2
Pn L ⇒
n +1 n +1 (10)
1 1
δk + − δk −
⇒ εk =
2 2
−1
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

( n + 1) δ k δ k
n −1

It is worth noting that Eq. (10) always returns a positive correction for both negative
and positive δk as shown in Figure 2, which represents εk for three significant values
of n. It is also noteworthy that the correction is null when the exponent n equals 1, as
happens for laminar flow regime.

Figure 2. Representation of εk as a function of ratio δk for different values of n

The correct head loss term is the sum of the head loss resulting from the
schematization plus the correction Ekε introduced to take into account the “actual”
uniformly distributed demand.
n −1 n −1
Ekε = ε k Rk ,∞ Qk Qk = ε k Rk ,∞δ k δ k Pkn = zk Rk ,∞ Pkn
n +1 n +1
1 1 (11)
δk + − δk −
n −1 2 2 n −1
zk = ε k δ k δ k = − δk δk
n +1
where Rk,∞ (=LkKk,∞) is k-th pipe hydraulic resistance. The dimensionless parameter
zk is instrumental to introduce the correction into the existing WDN simulation
algorithms by using the same schematization of distributed demand as concentrated
withdrawals at end nodes. Figure 3 plots the parameter zk as a function of δk for
different n values. As reported in the same figure, the head loss correction Ekε

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 215

numerically coincides with zk under the hypothesis of Pk=1m3s-1 and Rk,∞ =1snm1-3n
(Giustolisi and Todini, 2008).
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

Figure 3. Representation of zk for different values of exponent n.

In particular for exponent n=1 the correction is always null as the scenarios of both
distributed and concentrated demands are equivalent in terms of head loss (due to the
model linearity). In the case of n=2, the correction term increases up to the value
1/12 until pipe discharge is half of the distributed demand (δk = 0.5), from this point
on it remains constant (Giustolisi and Todini, 2008). When other head loss monomial
formulations are used, with n<2 (e.g. Hazen-Williams expression - n=1.852), the
correction parameter zk reaches a maximum value (lower than 1/12) for δk ≤ 0.5.
Finally, the zk curves obtained for n>2 (i.e. n=2.1) shows that the error due to
the schematization increases with δk towards infinity. This suggests that, apart from
its physical meaning, the exponent n=2 leads to the maximum finite value of
correction needed and should be considered as an upper bound of n to ensure the
convergence of automatic algorithms.

GENERAL FORMULATION OF ENHANCED GGA

When the functioning of a WDN comprised of np unknown discharges (i.e.


pipes), nn unknown heads (i.e. internal nodes) and n0 known heads (e.g. water tanks)
is simulated following a demand-driven approach mass and momentum balance
equations (12) must be simultaneously satisfied.
A pp Q + A pn H = -A p0 H0
(13)
A np Q = d
Where matrix Apn=ATnp and Ap0 are the topological incidence sub-matrices of size
[np, nn] and [np, n0], respectively, derived from the general topological matrix
Āpn=[Apn ¦ Ap0] of size [np, nn+ n0], as defined in Todini and Pilati (1988); d is the
column vector of pipe demands lumped at nodes; Q and H are the vectors of pipe
discharges and nodal heads respectively.

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 216

The generic iteration (iter) of the Global Gradient Algorithm, as described in


Giustolisi and Todini (2008), provides an approximated solution of the non-linear
system of equations (12)

pp = ( D pp ) A pp
−1
Biter iter iter

Fiter = A np ( Qiter − Biter Qiter ) − d − A np ( Diter


pp ) (A H0 )
−1
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

p0
(13)
( )
-1
H iter +1
= A np ( D pp )
iter −1
A pn F iter

Qiter +1 = ( Qiter − BiterQiter ) − ( Diter


pp ) (A H0 + A pn H iter +1 )
−1
p0

To solve the system of equations (13) it is necessary to compute the diagonal


matrices Dpp (containing the derivatives of the head losses with respect of the k-th
pipe discharge Qk) and App together with their product Bpp =App(Dpp)-1.
Equation (14) reports the expression of the dimensionless parameter zDk for any n
and discharge condition (δk). zDk is represented in Figure 6. In particular, the
negative values zDk are due to the existence of a maximum value of zk for n<2.

D pp ( k , k ) =
d ⎡ Rk ,∞ Qk Qk

( n −1
+ zk Pkn )⎤⎦ = R ⎛ n −1
+
dzk n −1 ⎞
Pk ⎟ =
k ,∞ ⎜n Qk
dQk ⎝ dδ k ⎠

= Rk ,∞ n δ k ( n −1
+ zDk Pkn −1 ) (14)
n −1 n −1
dzk ⎛ 1⎞ 1 ⎛ 1⎞ 1 n −1
zDk = = ⎜δk + ⎟ δk + − ⎜δk − ⎟ δk − − n δk
dδ k ⎝ 2⎠ 2 ⎝ 2⎠ 2
From a numeric point of view, it is important to note that for δk approaching zero,
zDk>0. This fact assures robustness of the developed GGA.
Equation (15) reports the elements of the diagonal matrix App which are the ratio
between pipe head losses and relevant discharges; their expression is a function of
the dimensionless parameter zAk.

App ( k , k ) =
(
Rk ,∞ Qk Qk
n −1
+ zk Pkn )=R ⎛ n −1
+
zk Pkn ⎞
k ,∞ ⎜ Qk ⎟=
Qk ⎝ Qk ⎠

= Rk ,∞ ⎜ δ k


n −1
+
zk
δk
⎞ n −1
⎟ Pk

= Rk ,∞ δ k ( n −1
)
+ zAk Pkn −1 (15)

n +1 n +1
1 1
δk + − δk −
zk 2 2 n −1
zAk = = − δk
δk ( n + 1) δ k
Finally, the elements of the diagonal matrix representing the term Bpp are reported in
Equation (16).

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 217

App ( k , k )
n −1
δk + zAk
= = zBk (16)
D pp ( k , k ) n δk
n −1
+ zDk
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

Figure 4: Representation of parameters zDk , zAk and zBk for different exponents n

CONCLUSIONS

Giustolisi and Todini (2008) introduced an enhanced Global Gradient


Algorithm which allows for correcting head loss error due to representation of
uniformly distributed demands as nodal concentrated withdrawals. This paper
provides an extension of the enhanced Global Gradient Algorithm aimed at using any
empirical monomial formulation for describing pipe head loss. The resulting
formulation represents a valuable basis for further investigations on WDN
functioning by using the existing simulation algorithms.

World Environmental and Water Resources Congress 2009


World Environmental and Water Resources Congress 2009: Great Rivers © 2009 ASCE 218

REFERENCES

Berghout B.L., and Kuczera G. (1997) “Network linear programming as pipe


network hydraulic analysis tool”, J.of Hydraulic Engineering, ASCE, 123(6),
549-559.
Collins, M., Cooper, L., Helgason, R., Kenningston, J. and LeBlanc, L. (1978)
Downloaded from ascelibrary.org by North Carolina State University on 01/10/13. Copyright ASCE. For personal use only; all rights reserved.

“Solving the pipe network analysis problem using optimization techniques”,


Management Science, 24 (7), 747-760.
Cross H. (1936) “Analysis of flow in networks of conduits or conductors”, Bulletin
no.286, University of Illinois Engineering Experimental Station, Urbana
Illinois, USA, 1-29.
Epp, R. and Fowler, A.G. (1970) “Efficient Code for steady-state flows in networks”,
J. of Hydr. Div., ASCE, 96 (11), 3-56.
Giustolisi, O., and Todini, E. (2008) “Pipe hydraulic resistance correction in WDN
analysis”, Special Issue on WDS Model Calibration, Urban Water Journal,
Taylor & Francis, UK, No. 4, Vo. 5.
Kesavan, H.K. and Chandrashekar, M. (1972) “Graph-theoretic models for pipe net-
work analysis”, J. of Hydr. Div., ASCE, 98 (2), 345-364.
Martin, D.W. and Peters, G. (1963) “The application of Newton's method to network
analysis by digital computers”, J. Inst. of Water Engrs., (17). 115-129.
Mignosa, P. (1987) “Sui problemi di verifica delle reti di distribuzione idrica
complesse”, Idrotecnica, (6), 257-273 (in Italian).
Shamir, U. and Howard, C.D.D. (1968) “Water distribution network analysis”, J. of
Hydr. Div., ASCE, 94 (1), 219-234.
Todini, E. (1979). Un metodo del gradiente per la verifica delle reti idrauliche.
Bollettino degli Ingegneri della Toscana, 11, 11–14 (in Italian).
Todini, E. and Pilati, S. (1988) “A gradient method for the solution of looped pipe
networks”, Computer Applications in Water Supply, John Wiley & Sons,
Vo.1, 1-20.
Walski, T.M., Chase, D.V. and Savic, D.A. (2001) Water Distribution Modeling,
Haestad Methods, Inc.
Wood, D.J. and Charles, C.O.A. (1972) “Hydraulic network analysis using linear
theory”, J. of Hydr. Div., ASCE, 98 (7), 1157-1170.

World Environmental and Water Resources Congress 2009

Das könnte Ihnen auch gefallen