You are on page 1of 14

SALGADO 49

5. Extended Gradient Method for Fully


Non-linear Head and Flow Analysis in
Pipe Networks
R. Salgado, J. Rojo andS.Tnpeda

I. INTRODUCTION
In pipe network modelling it is normally assumed that water withdrawal takes place
at t}te nodes, with fixed and known values. The fint assumption is aimed at
simplifying the mathematical solution of the problem, while the second has been a
standard practice, although not always adequate, since it is well known that
consumption is also a function of pressures.
There are a number of networks, particulady irigation and even water supply
networks which do not follow these assumptions. For example, in irrigation systems
with sprinklers, drippers or porous devices (pots, strips) water is released in a
pressure-dependent fashion; clearly in such systems the pressure-discharge relationship
cannot be ignored [5]. One exception could be some pressure-compensated drippers,
which provide a constant oudlow within a range of pressures [6].
In water supply networks, problems such as leakage modelling and extended period
simulation are also pressuredependent. As a matter of fact most of the network
operators do know that if they reduce the pressure in the distribution system the total
water consumption oudlow will be reduced. This leads to the standard practice of
reducing night pressures in order to control system leakages [5,9,17,24].
Industrial applications, such as fire prctection systems, mining heap leaching, all
of them based on sprinklers also deliver water in an amount that is
pressure-dependent.
A common feature of all the previously mentioned devices is that the relationship
between pressure and discharge is non-linear, which makes the problem difficult to
solve.
As a result, it has become necessary to develop a network analysis methodology
that explicitly and automatically takes into account the non-linear variation of oudlows
with pressure.
The Gradient Method (GM), was originally developed by Todini and Pilati [11,19],
for networks with pipes only, and subsequently extended by Salgado et al. [2,13] to
include pumps and pressure regulating valves, respectively. The GM operates
SALGADO 50

simultaneously on the nodal piezometric heads and pipe flows, in contrast to other
methods which operate on one of the previous variables only. The advantages of the
GM have been displayed by Pilati and Todini [11] and Salgado [14].
In the literature, different authors [1,4,5,7,8,10,17], have referred to
pressure-dependent nodal discharges, although within the context of different network
analysis approaches.
The present work, deals with the extension of Todini's Gradient Method to include
nodal discharges that are non-linear functions of pressure. Furthermore, the velocity
head is kept in the total head.

2. GENERAL OUTFLOW.PRESSURE MODEL


Zepeda and Rojo [23] have considered a number of altematives to include the pressure
effects on nodal outflows. They choose the standard model proposed by Karmeli et
al. [6] for irrigation emitters

q=ap: (1), (2)

where the characteristic coefficients 'a' and 'x' are normally provided by the emitters
manufacturers, or obtained via least squares fitting to field or laboratory data.
Zepeda and Rojo [23] re-derived the GM algorithm for such nodal discharges,
recognising explicitly the influence 6f pressure on the outflows.

3. PROBLEM FORMULATION
For a network with given physical characteristics (layout, connectivity, topography,
pipe lengths, diameters, roughnesses and reservoir levels) and, for known nodal
demands characteristics coefficients, its total head (B) and pipe flow (O) must be
determined. Both variables are related through Darcy-Weisbach or Hazen-Williams
equations (turbulent flow) or Poiseuille laminar flow formula. The head loss or gain
in a network reach is [23,24]

hi:Bi-B* (3)

with
Yj'
B:: Hr+Q- (4)
2g
and
P:
Ht: -F DL-
(s)

where:
hi: head loss in the reach 'i', connecting nodes 'j' and 'k'
SALGADO 5I

\: Total head for node J'.


I{: Piezometric head at node 'j'.
P; : Pressure at node 'j'.
z,: Geometric head at node 'j'.
f : Unit (specific) weight of water.
V.,: Mean velocity at section 'j'.
Q: Coriolis coefficient at section 'j', (approximately 1 for turbulent flow or 2 for
laminar flow).
g : Cravity constant.
A parameter O, is defined as O., = Q when section 'j'
is close to a non-source node
and as O., =6 when close to a source node, such that equation (4) becomes

Bi:Hi*O''-3 (6)
2Ar'g
with
Q: Flowrate at link 'i', between nodes 'j' and 'k'.
A,: Area of link 'i'.
Introducing the general model used in the previous version of the GM ll2,l3l,
which relates head losses and flowrates, Eq. (3) becomes

hr : B: - Br : a.lQrl"t-t Q, * F, (7)

where
q: Characteristic parameter for link 'i', depending on the flow regime and
hydraulic formula.
/
ni: Flow exponenq formula and regime dependent, for link 'il.
F,: Characteristic parameter of link 'i', defining pump head at zero flow.
Equation (7) represents the loss or gain of energy (per unit of weight) at each link,
and it can be written in a compact form via vector notation, applying connectivity
matrices akeady defined in Salgado et al. [12,13]. Then, Eq. (7) can be re-written as

h --ArzE-Aro&. (8)

where
h: Column vector of head losses per link, (NP x 1)
B: Column vector of total head for non-source nodes, (NH x 1) .

Bo: Column vector of total head at source nodes, (NS x 1) .


NP: Number of links (pipes, valves, pumps).
NN: Number of nodes.
NS: Number of source-nodes (reservoirs).
NH : Number of non source nodes (NN-NS).
SALGADO 52

Furlhermore, the second part of (7) can be written as

h- Art I (e)

where
A' is a diagonal matrix computed as

F*
A1, : diag (sr I Or l"r-r +-) ; i=1, . . rNP (10)
Q;.

Todini [19] and others [2,18,20,221,have demonstrated that the steady flow solution
within networks can be found by solving simultaneously the continuity equation at
each node and the head loss-flow relationship for each link, which, in a compact
forrnat can be written as follows

( 11)

now with
A,, a diagonal matrix, which incorporates the nodal discharge dependency with
pressures, defined as

qi
Ar, - diag ) i=1,...,NH
Bi (t2t
or by
ArrE:-9
Because a direct solution of simultaneous non-linear equations is not possible, a
numerical one must be found, involving successive approximations.
The upper part of (11) rcprcsents the relationship between head loss and flowrate,
while the lowerpart establishes the continuity law. System (11) is non{inear, both
in the flows (Q) and in the total heads (!), due to the fact that matrices A,, and A,
depend on the flows and heads, respectively (see Eqs. (10) and (12)). The non-linear
system (11) formulates the notwork flow problem in terms of the state variables Q
and B through a unique matrix equation.
Q and B are dual variables, in the sense that any one of them can be expressed as
a function of the other, which means that the problem can be projected either in the
flow or in the total head subspace.
Unlike other available methodologies, the GM formulates the problem explicitly in
the state variables B and Q, leading to the solution of a system of NP+NH linear
equations.
SALGADO 53

4. ALGORITHM DERIVATION
Znpedz and Rojo [23] have re-derived the GM algorithm, incorporating the pressure
effect on the nodal consumptions. To ease the derivation, Eq. (l l) is decomposed into
two vectorial functions

& ArrQ*A12B+A10&. 0 (13)

E = AzrQ+AzzE 0 (14)

representing the head loss-flow relationship and nodal continuity, respectively.


Introducing Eq.(4) and bearing in mind that the nodal outflows are pressure-dependent,
Eqs. (13) and (14) can be transformed into

E, : (A11+ C) I + A' H + A1o Ho : 0 (1s)

E-2.:Azt Q-s(H) =0 (16)

with
(o, - Q.l
C: diag(Qr-) (1? )
2Attg
The system (15) and (16) is non-linear both in Q and B, and its solution has to be
found iteratively, as a sequence of linear problems. The linearization is carried out
by expanding the vectorial functions E, and E, by Taylor series, retaining fust order
terms only. This expansion for any function ! is expressed as

(18)

where the index 'k' refers to ttre previous iteration. The solution is found by imposing
the condition F(Q,D**t = 0. The system (18) is linear in dQ and dH.
Taking derivatives of !, and E , from Eqs. (15) and (16), we get

oFt ? 1er. + c1
=9 + (A11+ C) (L9)
Dq 0q
dg.
Arz (20)
De

dg
Azr. (2L')
0q
SALGADO

Ee, Es
(22t
Ett Ett

Furthermore, taking derivatives of (10) and (17) with respect to Q and replacing in
(19), after some reordering, we obtain

dg.
= diag ( crr nr lo. l"t-t | +2 c (23 )
?g

To compute (22),it must be remembered that the piezometric head is the summation
of the geometric head (a constant) and the pressur€ head, which means dll = dp.
Hence

09, Eg Eq
(241
Eg Dg Ep

To simplify the notation, let us define

DE1
(25)
Eq

and

EF"
R (26)
dg

and applying (18) to (15) and (16), the following linear system can be obtained

iLArr:
:..,'. lt'l.t1?.1
R I LdgJ
= r1l
LgtJ
t (27',)

with
&.k : (Arr+ C) 9[ + Arz ![ + Ar&. (28')

Erk= Ar'9|- d t$l (29',)

dQ =g -e. (30 )

dII =Hk -Hk+l (3r1


SALGADO J)

The linear system (2i7) can be solved via Gaussian elimination, multiplying the upper
part of (27) by A,G-t and subtracting with the lower part, we get

G:
IL 'o'' o,, l.[dql: t .t-,* ] (32t
,'R_A;,;:,;;; .l L';E'l L eLC;i i;e .l

Back substituting in the previous system and defining

W=AaG-tAu (33)

we obtain

(R - W) dH : &* - A21G-1d3r (34 )

and

dQ : e-1 (E.t* - Ar. dE) (3s )

Substituting (28),(29), (30) and (31) in (34) and (35), andreordering, we get

(w-R)g:*1:Arr[ (r-c-l All+c) lqf -c-larono]-R S -dt$l (36)

d*1:[r-G-1 (A11+ c)] Q, - c-t (A12 H:+1+A1o Ho) (37 )

Equation (36) represents an NH equations linear system in Et*t, which corresponds


to the vector of piezometric heads at the iteration 'k+1' (unknown value). The matrix
(W-R) and the right hand side vector of (36) depend on the system state at the
previous iteration 'k' (known values).
In other words, (36) is the typical linear problem Axd To compute ff*t, H*'
from (36) must be replaced in (37), which represents simple matrix operations only
(multiplications and summations), since Ar, , C and G are diagonal matrices.
The GM algorithm is based on equations (36) and (37), applied in this order.
Starting from an arbitrary initial conCition, say Qo, Ho *dS.o, the values of f;, $ and
gt are computed via (36) and (37), respectively, and so forth, until some accuracy
criterion is met. Equation (37) guarantees that the continuity condition at node level
is always satisfred, since by pre-multiplying it by Ar,, and considering (36), we
recover the nodal consumptions qk.
Using sparse techniques, the GM is efficiently implemented at PC level. The direct
one-way dissection algorithm of George and Liu [3] is used in solving such linear
systems (36).

5. LEAKAGE MODELLING
To effect of pressure on leakages, field experiments must be carried out,
assess the
operating sectors of the network under different pressure levels and registering the
SAI-GADO 56

network flows [2U. A response curve is obtained, representative of this particular


network. From these measrue[Fnts a general pressure-leakages rclationship proposed
by [4,5,10,17] can be fitted

!trrr g Lrl ( (P'") r: )


- (38 )

where
qtj = water leakage in the prpe connecting nodes 'i' and 'j'.
11
v Lrakage constant, network-dependent
t-
-tj Length of the prpe connecting nodes 'i' and J'.
(P)ti = Mean pressure between nod€s 'i' and 'j'.
X= Exponent reflecting ttre non-linearity betrveen leakages and
pressurc, network dependent.

TABLE I EXAMPLE NETWORK DATA (FIc. 1)


a)LINK DATA

EACH NODES LENGTH DIATIETER COEF. TYPE g LrJ


No. INI FIN (m) (run) H-w
1 t 2 1000 200 100 1 0.500E-01 0.1
2 1 5 1000 200 100 1 0.500E-01 0.1
3 2 3 L200 150 100 I 0. 6008-01 0.1
4 5 4 r.000 150 100 I 0.500E-01 0.1
5 2 4 r.000 200 100 1 0.500E-01 0.1
6 4 6 2000 150 100 1 0. 1008+00 0.1
7 4 3 r.500 r.50 100 1 0.750E-01 0.1
Link Type : 1 Pipe
2 Val-ve or pump
3 Check valve
4 PRV
5 PSV
b) NODE DATA

NODE TYPE GROI,ND LEV, PIEZ. HEAD ai xi


(n) (m) (I/s)
t 1 1_0. 000 90. 000
2 0 r_0. 000 20.0 0. 1008-01
3 1 10. 000 80. 000
4 0 10. 000 10. 0 0. r.008-01
5 0 10. 000 20.0 0. 100E-01
6 0 10. 000 10.0 0. 1008-01
Type of Node: 1 Reservoir
2 Common Node
56 SALGADO 57

It has been found that the exponent 'x' in Eq. (7) is about 1.18 [4,10] or 1.15 [17].
It is srongly advised to carry out fiold experiments to find out the real exponent of
a particular system under study.
The pipe leakage is loaded into the border nodes on a 50- 50 7o basis or any other
suitable criterion.

6, EXAMPLE OF APPLICATION
For illustrative pulposes, a dmall water supply network is presented, with a leakage
constant C=5x105. Figure I prcsents the network structure and Table 1 includes the
network data. The results obtained with the extended GM are presented in Table 2.
From the results it can be seen that the program delivers the nodal consumptions
and the presstue heads at each node automatically, without any user assumption or
intervention.
From these results it would be straightforward to compute the total amount of
leakages, in order to assess the effectiveness of the leakage control plan (through
PRV's, for example) [16].
of leakage prone geogmphic areas
The identification is also straightforward,
valuable information for the system's operator.

7. CONCLUSIONS
An efficient numerical algorithm has been developed for automatically modelling
water supply networks where the nodal ourflows are pressure-dependent. The
computer implementation is at PC level, since adequate numerical techniques have
been used, taking advantage of matrix sparsity. The tests ca:ried out during the past
two years, both for small and large examples of water supply and automatic irigation
networks have proved the methodology to be reliable and efficient, without the
convergence problems affecting other methods 112,18,221. Even with some unusual
irrigators, like porous pots, the program has worked without problem. In the future,
a leakage minimisation routine will be added, thus expanding the program potential
for real world applications.
The program is easy to use, since the data structures are simple (see Table 1).
There is no need for the user to define loops or initial flows. The present program is
also able to automatically add nodes and sub-links, useful for infroducing large
quantities of emitters in lateral configurations.
The methodology is sufficiently general, including pumps, PRV's, PSV's, check
valves, etc., thus allowing the modelling of real systems without gross simplifications.
SALGADO 58

TABLE 2 EXAMPLE RESIJLTS WTTI{ EXTENDED GRADIENT MBTHOD

a) NODE RESULTS

NODE TYPE PIEZ. I1EAD GROUND LEV. PRESSURE OUTFLOW


(m) (m) (m) (1/s)
1 1 90.000 10. 000 80.000
2 0 80.291 r_0.000 70.29L 2r_ .033
3 1 80. 000 10.000 70 - 000
4 0 79.265 L0.000 69.26s 10.6?1
5 0 82.2s9 10.000 72.2s9 20.9?0
6 0 69.877 10.000 59. 877 r.0 .493

b) LINK RESULTS

LINK INI FIN TYPE FLOW HEAD LOSS VEL C. STATUS LEAKAGE
(1/s ) (m) (m/s) 11/s)
1 1 2 32.998 9.708 1 .050
1 0 0.7?0E-0r.
2 1 5 29.202 7 .740 0.929
1 0 0. ?718-01
3 2 3 1 2.L25 0 .291 0.720 0 0.918E-0L
4 5 4 1 8.231 2.994 0.465 0 0.766E-01
5 2 4 1 9.840 L.026 0. 313 0 0.764E-0L
6 4 6 1 r.0.493 9.388 0. 593 0 0.152E+00
7 4 3 1 -3.093 -0.734 -0. 1_75 0 0.1158+00
STATUS : Indicates the state of the link:
0 : Wide open
]. : CHECK VALVE & LINK: Fully closed
PRV E PSV : Partly closed
2:PRV&PSV: Fully Closed

ACKNOWLEDGEMENTS
This work has been carried out with the financial support of the Research Directorate
of the University of La Serena (Project DILJLS L3O-2-39).

REFERENCES
tll BHAVE P. 1981. 'Node Flow Analysis of Water Disribution Systems'. Tlansportation Eneineering
Joumal. ASCE, Vol. 107, No. TE4, pp 457467.
l2l COLLINS M. A. 1980. 'Pitfalls in pipe network analysis techniques', Transponation Eneineering
Joumal, ASCE Vol. 106, No. TE5, pp.507-521.
l3l GEORGE A. & Lru J.W-H. 1981. 'Computer solution of large sparse positive definite systems',
Prentice- IIall, New Jersey.
il SALGADO 59

t41 GERMANOPOIILOS G. &JOWITP.W. 1989.'kakagereductionby excesspressureminimization


in a water supply network', Proc. Insm Civ. Ensrs, Paft2,87, June, pp. 195-214. (Paper 9404).
I51 JOWTTT P. W. & XLJ C. 1990. 'Optimal Valve Conrol in Water-Distribution Networks'. Joumal
of Water Resources Planninq and Management- ASCE, Vol. 116, No. 4, July/August.
t61 KARMELI D., PERI G. & TODES M. 1985. 'Inigation Systems: Design and Operation', Oxford
University Press, Cape Town.
t7l LAM C. F. & WOLLA M. L. 19'12.'Computer analysis of water disribution systems: Part I -
Formulation of equations', J. Hydraulics Division, ASCE, Vol, 98, No. lIY2, pp.335-344.
181 LAM C. F.& WOLLA M. L. 1972. 'Computer analysis of water distibution systems: Part tr -
Numerical solution', J. Hvdraulics Division, ASCE, Vol. 98, No. I{Y3, pp.47460.
te1 LONSDALE B. SC, 1985. 'Automatic control of pressure in disribution system'; The Water Officers
Joumal. January.
ll0l MryAOKA S. & FUNABASHI M. 1984. 'Optimal Control of Water Disuibution Systems by
Network Flow Theory'. IEEE Transactions on Automatic Control, Vol. AC-29, No.4, April.
tl tl PILATI S. & TODIM E. 1984. 'la veri{ica delle reti idrauliche in pressione', Istituto di Costruzioni
Idrauliche, Facolta D'Ingegrcria dell'Universita di Bologna, Italia.
lt2l SALGADO R., TODINI E. & O'CONNELL P. E. 1988. 'Comparison of lhe gradient method with
some traditional methods for the analysis of water supply disribution networks', Computer
Ap,plications in Wat€r Supply, Vol.l, Systems Analysis and Simulation, edited by B. Coulbeck and
C.H. O,n, Research Studies Press Ltd.
t13l SALGADO R., TODIM E. & O'CONNELL P. E. 1988. 'Extending the gadient method to include
pressue regulating valves in pipe networks', Computer Applications in Water Supply, Vol. 1,
Systems Analysis and SimulatiorL edited by B. Coulbeck and CJI. Orr. Research Snrdies Press Ltd.
t14l SALGADO R. 1988. 'Computer modelling of water supply distribution networks using the gadient
method', Ph. D. Thesis, Civil Engineering Department, University of Newcastle-upon-Tyne, U. K.
llsl SALGADO R., CASTRO L., MANSILLA R. & ZLrfr[GA H. 1991. 'Hydraulic characterisation of
irrigation systems appropriate for small rural communities and its computer modelling',l!$ag!944!
Conqress. Hydraulics Chilean Societv. Valparalso, November.
l16l SHORE D. 1988. 'Economic Optimization of Distribution Leakage Control'. LI{E$ October, pp.
545-55 1.
t17l STERLINC M. & BARGTFT A A. 1984. 'Leakage reduction by optimised control of valves in water
networks'.@@!l[..1Q, Vo1 6, No.6, Oct-Dec, pp.293-298.
tl8l STMSON K. & BRAMELLER A. 1981.' An integrated mesh-modal method for steady state water
distribution network analysis', J. Institution of Water Enqineers and Scientists. 35, 2, p. 186. (full
paper).
t19l TODINI E. 1979.'Un metodo del gradiente per la verifica delle reti idrauliche', Bolletino deeli
Inseqneri della Toscana. No. ll , pp. 11-14.
t201 TODINI E. & PILATI S. 1988. 'A gadient algorithm for the analysis of pipe networks', Computer
Applications in Water Supply, Vol. 1, Systems Analysis and Simulation, edited by B. Coulbeck and
C.H. Orr, Research Studies Press Ltd.
I2tl Water Authorities Association 1986. 'Leakage Control Policy ard Practice, ISBN 0 904561 95 X.
London.
Inl WOOD D. J. 1981. 'Algorithms for pipe network analysis and their reliability', Research Repon No.
127, Water Resources Research Institute, University of Kentucky.
t23l ZEPEDA M.S. & ROJO J. 1991. 'Extending the Gradient Method to include the nodal discharge
variation with pressure in water supply and irrigation networks'. Civil Engineering Dissertation, Civil
Engineering Deparunent, University of La Serena Chile.
I'ul ZEPEDA M.S., SALGADO R. & ROJO C. 1991. 'Applying the extended Gradient Method to
modelling leakages in water supply distribution networks', @
Societv.Valparafso, November.
SALGADO

10 (l/s)

Figure I Network Sketch


lntegrated
Computer Applications
in Water Supply
VOLUME 1 - METHODS AND PROCEDURES
FOR SYSTEMS SIMULATION AND CONTROL

Edited by
Bryan Goulbeck
Water Software Systems, School of Engineering and
Manufacture, De Monfort University, Leicesten tJK

RESEARCH STUDIES PRESS LTD.


nton, Somerset, England
Tau

JOHN WILEY & SONS INC.


New York . Chichester 'Toronto ' Brisbane . Singapore
RESEARCH STUDIES PRESS LTD.
24 Belvedere Road, Taunton, Somerset, England TA1 1HD

Copyright @ 1993 by Research Studies Press Ltd.

All rights reserved.

No part of this book may be reproduced by any means'


nor transmitted, nor translated into a machine language
without the written permission of the publisher.

Marketing and Distributlonr

Australia and New Zealand:


Jacaranda Wiley Ltd.
GPO Box 859, Brisbane, Queensland 4001, Australia

Canada:
JOHN WLEY & SONS CANADA LIMITED
22 Worcester Road, Rexdale. Ontario, Canada

Europe, Africa, Middle East and Japan:


JOHN WILEY & SONS LIMITED
Baffins Lane, Chichester, West Sussex, England

Nofth and South America:


JOHN WILEY & SONS INC.
605 Third Avenue, New York, NY 10158, USA

South East Asia:


JOHN WILEY & SONS (SEA} PTE LTD.
37 Jalan Pemimpin 05-04
Block B Union lndustrial Building, Singapore 2057

Library of Congress Gataloging-in-Publication Data

Available.

Brltish Library Gataloguing in Publication Data

A catalogue record for this book


is available from the British Library.

ISBN 0 86380 154 4 (Research Srudies press Ltd.)


ISBN 0 471 94232 4 (John Wiley & Sons lnc.)

Printed in Great Britain by SRP Ltd., Exeter

You might also like