Skip to main content
Log in

Convergence of a Hydraulic Solver with Pressure-Dependent Demands

  • Published:
Water Resources Management Aims and scope Submit manuscript

Abstract

This paper analyzes the convergence of a pressure-driven analysis (PDA) model of a water distribution network solver based on Todini’s global gradient algorithm. The PDA model is constructed by embedding a pressure−demand relationship in the EPANET simulator code. To avoid spurious convergence, a residual-based convergence error was used. The introduction of pressure-dependent demands is shown to result in a far poorer convergence. The study of solver convergence as a function of the smoothness of the pressure−demand curve has demonstrated that, statistically, a smooth pressure−demand relationship gives a somewhat better convergence. To improve convergence, use was made of a quadratic approximation of the Hazen–Williams head loss−flow relationship in the vicinity of zero and the correct implementation of the Darcy−Weisbach formula in the solver. To further improve convergence, an iteration step control technique called the line search was used. The analysis of solver convergence for different line search variants has shown that the line search in its usual form is not efficient enough and may result in poorer convergence. A necessary error decrease algorithm, whose use in the line search improves solver convergence, is proposed. It is shown that due to the convergence improvement methods the convergence of the PDA solver is somewhat better than that of the demand-driven analysis solver and sufficient for direct problems such as design, for example.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  • Ang WH, Jowitt PW (2006) Solution for water distribution systems under pressure-deficient conditions. J Water Resour Plann Manag, ASCE 132(3):175–182

    Article  Google Scholar 

  • Bhave PR (1991) Analysis of flow in water distribution networks. Technomic, Lancaster

    Google Scholar 

  • Cheung PB, Van Zyl JE, Reis LFR (2005) Extension of EPANET for pressure driven demand modeling in water distribution system. CCWI2005 water management for the 21st century, Exeter, UK

  • Elhay S, Simpson AR (2011) Dealing with zero flows in solving the nonlinear equations for water distribution systems. J Hydraul Eng 137(10):1216–1224

    Article  Google Scholar 

  • Giustolisi O, Savic DA, Kapelan Z (2008) Pressure-driven demand and leakage simulation for water distribution networks. J Hydraul Eng 134(5):626–635

    Article  Google Scholar 

  • Gorev NB, Kodzhespirova IF, Kovalenko Y, Álvarez R, Prokhorov E, Ramos A (2011) Evolutionary testing of hydraulic simulator functionality. Water Resour Manag 25(8):1935–1947

    Article  Google Scholar 

  • Kelley CT (1987) Solving nonlinear equations with Newton’s method. Volume 1 of fundamentals of algorithms. SIAM, Philadelphia

    Google Scholar 

  • Kovalenko Y, Gorev N, Kodzhespirova I, Alvarez R, Prokhorov E (2012) Zero flow problem in the EPANET solver. Proceedings of the 14th Annual Water Distribution Systems Analysis Conference, WDSA 2012, September 24–27, Adelaide, South Australia

  • Liu J, Yu G, Savic D (2011) Deficient-network simulation considering pressure-dependent demand. In: Sustainable solutions for water, sewer, gas, and oil pipelines (ICPTT 2011): 886–900. ASCE. doi:10.1061/41202(423)94

  • Press WH, Teukolsky SA, Vetterling WT, Flannery BP (1992) Numerical recipes in FORTRAN: The art of scientific computing. Cambridge University Press, New York

    Google Scholar 

  • Rivera JJ, Kovalenko Y, Álvarez R, Ramos A, Gorev N, Kodzhespirova I, Prokhorov E (2010) Hydraulic simulator testing: Methods, tools, and results. Proceedings of the 12th Annual Water Distribution Systems Analysis Conference, WDSA 2010, September 12–15, Tucson, Arizona

  • Rossman L (2000) EPANET 2 users manual. U.S. Environmental Protection Agency, Risk Reduction Engineering Laboratory, Cincinnati

  • Siew C, Tanyimboh TT (2012) Pressure-dependent EPANET extension. Water Resour Manag 26(6):1477–1498

    Article  Google Scholar 

  • Simpson A, Elhay S (2010) Jacobian matrix for solving water distribution system equations with the Darcy-Weisbach head-loss model. J Hydraul Eng 137(6):696–700

    Article  Google Scholar 

  • Todini E (2003) A more realistic approach to the “extended period simulation” of water distribution networks. In: Maksimovic C, Butler D, Memon FA (eds) Advances in water supply management. Swets & Zeitlinger, Lisse, pp 173–184

    Google Scholar 

  • Todini E, Pilati S (1988) A gradient algorithm for the analysis of pipe networks. In: Coulbeck B, Orr C-H (eds) Computer applications in water supply, vol 1. Research Studies Press, England

    Google Scholar 

  • Wagner JM, Shamir U, Marks DH (1988) Water distribution reliability: simulation methods. J Water Resour Plann Manag, ASCE 114(3):276–294

    Article  Google Scholar 

  • Wu Z, Wang R, Walski T, Yang S, Bowdler D, Baggett C (2008) Efficient pressure dependent demand model for large water distribution system analysis. Proc Water Distrib Syst Anal Symp 2006:1–15. doi:10.1061/40941(247)39

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported by the National Council of Science and Technology (CONACYT) of Mexico.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yu. Kovalenko.

Appendix

Appendix

1.1 Implementation of the Darcy−Weisbach Formula in the EPANET Solver

Using the Darcy−Weisbach formula, the frictional head loss ΔH for incompressible flow Q in a pipe can be written as (Bhave 1991)

$$ \varDelta H=\frac{8L}{\pi g{D}^5}f{Q}^2, $$

where L is the pipe length, g is the gravitational acceleration, D is the pipe diameter, and f = f(Q) is the friction factor. As in EPANET, we introduce the resistance coefficient

$$ r=\frac{8L}{\pi g{D}^5}. $$

Then the frictional head loss with the inclusion of the minor loss m in the pipe is

$$ \varDelta H=\left( rf+m\right){Q}^2. $$

The calculation of the matrix D 11 in (2) calls for the calculation of the flow derivative of the head loss. With the inclusion of the flow dependence of the friction factor, the derivative of the head loss will be

$$ \frac{d\kern0.1em \varDelta H}{ dQ}=r{Q}^2\frac{ df}{ dQ}+2Q\left( rf+m\right). $$

According to the EPANET manual, the friction factor f is computed depending on the flow’s Reynolds Number (Re):

For laminar flow (Re < 2, 000) as

$$ {f}_1=\frac{64}{ Re}=\frac{16\pi D\nu}{Q}, $$
(A1)

where \( Re=\frac{4Q}{\pi D\nu} \) is the Reynolds Number, and ν is the kinematic viscosity.

For fully turbulent flow (Re > 4, 000) as

$$ {f}_3=\frac{0.25}{{\left[{ \log}_{10}\left(\frac{\varepsilon }{3.7D}+\frac{5.74}{R{e}^{0.9}}\right)\right]}^2}=\frac{{ \ln}^2(10)}{4{ \ln}^2\left[\frac{\varepsilon }{3.7D}+\frac{5.74}{{\left(\frac{4Q}{\pi D\nu}\right)}^{0.9}}\right]} $$
(A2)

For transitional flow (2, 000 < Re < 4, 000) the friction factor f 2 is calculated using a cubic interpolation from the Moody Diagram.

Let

$$ {f}_2={a}_0+{a}_1x+{a}_2{x}^2+{a}_3{x}^3 $$
(A3)

where

$$ x=\frac{ Re}{2000}-1=\frac{Q}{500\pi D\nu}-1 $$
(A4)

The coefficients of the polynomial are determined from the continuity of the functions f 1(Q L ) = f 2(Q L ), f 2(Q R ) = f 3(Q R ) and their derivatives \( {\left.\frac{d{f}_1}{ dQ}\right|}_{Q_L}={\left.\frac{d{f}_2}{ dQ}\right|}_{Q_L} \), \( {\left.\frac{d{f}_2}{ dQ}\right|}_{Q_R}={\left.\frac{d{f}_3}{ dQ}\right|}_{Q_R} \) at the left (Q L  = 500πνD) and right (Q R  = 1000πνD) boundaries. The derivatives are

$$ \frac{d{f}_1}{ dQ}=\frac{-16\pi D\nu}{Q^2} $$
(A5)
$$ \frac{d{f}_2}{ dQ}=\frac{a_1+2{a}_2x+3{a}_3{x}^2}{500\pi \nu D} $$
(A6)
$$ \frac{d{f}_3}{ dQ}=\frac{2\cdot 5.74\cdot 0.9\cdot { \ln}^2(10)}{4Q{\left(\frac{4Q}{\pi \nu D}\right)}^{0.9}\left[\frac{\varepsilon }{3.7D}+\frac{5.74}{{\left(\frac{4Q}{\pi D\nu}\right)}^{0.9}}\right]{ \ln}^3\left[\frac{\varepsilon }{3.7D}+\frac{5.74}{{\left(\frac{4Q}{\pi D\nu}\right)}^{0.9}}\right]} $$
(A7)

Then the coefficients will be

$$ {a}_0=\frac{64}{2000},\kern1em {a}_1=\frac{-64}{2000} $$
$$ {a}_2=-\frac{5.74\cdot 0.9\;{ \ln}^2(10)}{4\cdot {4000}^{0.9}\ c\kern0.24em { \ln}^3c}+\frac{3\;{ \ln}^2(10)}{4\ { \ln}^2c}-{a}_0\kern1em {a}_3=\frac{5.74\cdot 0.9\;{ \ln}^2(10)}{4\cdot {4000}^{0.9}\ c\ { \ln}^3c}-\frac{{ \ln}^2(10)}{2\;{ \ln}^2c}+{a}_0 $$

where \( c=\frac{\varepsilon }{3.7D}+\frac{5.74}{4000^{0.9}}. \)

However, the resulting expressions for the friction factor and its derivative as they are cannot be used in the EPANET solver. As is evident from Eqs. (A1) and (A5), zero flows will result in division by zero. To avoid this, the source code of the solver should be modified so that the functions return the products Q f(Q) and \( {Q}^2\frac{ df(Q)}{ dQ} \) instead of f(Q) and \( \frac{ df(Q)}{ dQ} \).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kovalenko, Y., Gorev, N.B., Kodzhespirova, I.F. et al. Convergence of a Hydraulic Solver with Pressure-Dependent Demands. Water Resour Manage 28, 1013–1031 (2014). https://doi.org/10.1007/s11269-014-0531-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11269-014-0531-4

Keywords

Navigation