Vol. 4 No. 01 (2023)

Python Routine for an Easy Visualization of the Influence of Supply Network Characteristics on the Hydraulic Behavior of a Small Closed Loop

Henrique da Silva Pizzo
College of Civil Engineering, Estácio University of Juiz de Fora
Kamil Pochwat
Rzeszow University of Technology
Victor Rezende dos Santos
Federal University of Juiz de Fora

Published 2023-04-15


  • network characteristics,
  • fictitious sectioning ,
  • python programming,
  • Water Supply,
  • Fictitious Sectioning Method

How to Cite

H. da Silva Pizzo, K. . Pochwat, and V. . Rezende dos Santos, “Python Routine for an Easy Visualization of the Influence of Supply Network Characteristics on the Hydraulic Behavior of a Small Closed Loop”, JoCEF, vol. 4, no. 01, pp. 8-18, Apr. 2023.


A routine coded in Python aiming at a quick detection of the hydraulic behavior of a closed supply network as a function of the variation of the input data is presented. Such variables are lengths and diameters of the sections, roughness coefficients of the pipes, terrain elevations, flow distributed in the section and residual flow, and pressure at the upstream node. After a review of the literature on the subject of hydraulic supply models, the process of the fictitious sectioning point is used, so that the closed circuit network can have its behavior assimilated as that of branched network sections, and its calculation be performed as such. This arrangement is achieved by matching head losses between sections. In order to demonstrate the functionality of the routine, 12 simulations are exposed, 06 in each particular sectioning condition, with different input data and respective influences on the network operating conditions, notably, the positioning of the fictitious sectioning point and the contribution of each stretch to the residual flow node.


Metrics Loading ...


  1. K. Joseph, A. K. Sharma, and R. van Staden, “Development of an intelligent urban water network system,” Water, vol. 14, no. 9, 2022, pp. 1–17. https://doi.org/10.3390/w14091320.
  2. T. M. Walski, D. V. Chase, D. A. Savic, W. Grayman, S. Beckwith, and E. Koelle, Advanced Water Distribution Modeling and Management. Haestad Press, 2004, pp. 297–303, 417–497.
  3. R. A. Wurbs, Computer Models for Water Resources Planning and Management, IWR Report 94-NDS-7. Texas A&M University, Texas, USA, 1994.
  4. A. Kimura, Computing Applied to Reinforced Concrete Structures. São Paulo: Oficina de Textos, 2018 [Informática Aplicada a Estruturas de Concreto Armado].
  5. O. K. M. Amin, M. Z. Akkad, and T. Bányai, “Designing of water distribution system,” Multidisciplinary Sciences, vol. 11, no. 3, 2021, pp. 55–63. https://doi.org/10.35925/j.multi.2021.3.7.
  6. S. P. Boindala, G. Jaykrishnan, and A. Ostfeld, “Robust multi-objective optimization of water distribution systems,” Proceedings of EWRI Congress, USA, 2022. http://dx.doi.org/10.1061/9780784484258.099.
  7. M. Hajibabaei, A. Yousefi, S. Hesarkazzazi, A. Roy, M. A. Hummel, O. Jenewein, M. Shahandashti, and R. Sitzenfrei, “Identification of critical pipes of water distribution networks using a hydraulically informed graph-based approach,” Proceedings of EWRI Congress, USA, 2022. http://dx.doi.org/10.1061/9780784484258.097.
  8. M. Niazkar and S. H. Afzali, “Analysis of water distribution networks using MATLAB and Excel spreadsheet: h-based methods,” Computer Applications in Engineering Education , vol. 25, no. 1, 2017, pp. 129–141. https://doi.org/10.1002/cae.21786.
  9. M. Niazkar and S. H. Afzali, “Analysis of water distribution networks using MATLAB and Excel spreadsheet: Q-based methods,” Computer Applications in Engineering Education, vol. 25, no. 2, 2017, pp. 277–289. https://doi.org/10.1002/cae.21796.
  10. E. Luvizotto Jr., Computer-aid operational control of water supply systems, Ph.D. Thesis. University of São Paulo, Brazil, 1995 [Controle operacional de redes de abastecimento de água auxiliado por computador]. https://repositorio.usp.br/item/000742270.
  11. M. Shimada, “Time-marching approach for pipe steady flows,” J Hydraul Eng, vol. 114, no. 11, 1988, pp. 1301–1320. https://doi.org/10.1061/(ASCE)0733-9429(1988)114:11(1301).
  12. V. P. Ta, D. N. Truong, and N. T. Nhan, “An innovative approach for water distribution systems,” Intelligent Automation & Soft Computing, vol. 32, no. 3, 2022, pp. 1605–1615. https://doi.org/10.32604/iasc.2022.022374
  13. H. S. Pizzo, J. P. C. Ignácio, and M. V. Nascimento. “Review of water network analysis and validation of SCALER hydraulic simulator,” Journal of Civil Engineering Frontiers, vol. 3, no. 1, 2022, pp. 1–11. https://doi.org/10.38094/jocef30142.
  14. K. Sugishita, N. Abdel-Mottaleb, Q. Zhang, N. Masuda, “A growth model for water distribution networks with loops,” Proc. R. Soc. A 477: 20210528, 2021. https://doi.org/10.1098/rspa.2021.0528.
  15. A. A. D. Bello, W. A. Alayande, J. A. Otun, A. Ismail, and U. F. Lawan, “Optimization of the designed water distribution system using MATLAB,” International Journal of Hydraulic Engineering, vol. 4, no. 2, 2015, pp. 37–44.
  16. M. E. Shafiee, A. Berglund, E. Z. Berglund, E. D. Brill Jr., and G. Mahinthakumar, “Parallel evolutionary algorithm for designing water distribution networks to minimize background leakage,” J. Water Resour. Plann. Manage., vol. 142, no. 5, 2016, pp. C4015007-1–C4015007-7. https://doi.org/10.1061/(ASCE)WR.1943-5452.0000601
  17. M. Zeidan, J. Chen, A. Geletu, P. Li, and A. Ostfeld, “Clustering and multi-objective operation of water distribution systems: water age, leakage and cost trade-off,” Proceedings of 1st International WDSA / CCWI Joint Conference, Canada, 2018.
  18. F. Yazdandoost and A. Izadi, “A decision-making framework for designing water distribution networks based on multi-objective optimisation,” Int. J. Multicriteria Decision Making, vol. 6, no. 4, 2017, pp 269–289. https://dx.doi.org/10.1504/IJMCDM.2016.081379.
  19. F. Martínez, V. Bou, V. Hernández, F. Alvarruiz, and J. M. Alonso, “Ann architectures for simulating water distribution networks,” Proceedings of 8th Int. Conf. on Computing and Control for the Water Industry, vol. 1, 2005, pp. 251–256. https://doi.org/10.13140/RG.2.1.1653.0967
  20. Q. Wang, D. A. Savi?, and Z. Kapelan, “GALAXY: a new hybrid MOEA for the optimal design of water distribution systems,” Water Resour. Res., vol. 53, no. 3, 2017, pp. 1997–2015. https://doi.org/10.1002/2016WR019854.
  21. D. Bri? and P. Praks, “An efficient iterative method for looped pipe network hydraulics free of flow-corrections,” Fluids, vol. 4, no. 2, 2019, pp. 1–19. https://doi.org/10.3390/fluids4020073.
  22. M. Niazkar and G. E. Türkkan, “Application of third-order schemes to improve the convergence of the Hardy Cross method in pipe network analysis,” Advances in Mathematical Physics, vol. 2021, pp. 1–12. https://doi.org/10.1155/2021/6692067.
  23. M. Niazkar and S. H. Afzali, “Modified Hardy-Cross methods with fifth-order convergence,” Proceedings of 9th National Congress on Civil Engineering, Iran, 2016.
  24. S. Demir, N. M. Demir, and A. Karadeniz. “An MS Excel tool for water distribution network design in environmental engineering education,” Computer Applications in Engineering Education, vol. 26, no. 2, 2017, pp. 203–214. https://doi.org/10.1002/cae.21870.
  25. O. Gokyay, “An easy MS Excel software to use for water distribution system design: A real case distribution network design solution,” Journal of Applied Water Engineering and Research, vol. 8, no. 4, 2020, pp. 1–8. https://doi.org/10.1080/23249676.2020.1831975.
  26. R. M. R. Silva, C. B. M. Ribeiro, and H. S. Pizzo, “Flow – integrated hydraulic calculation software for water supply systems,” J. multidiscip. eng. sci. technol., vol. 8, no. 1, 2021, pp. 13386–13399. https://www.jmest.org/wp-content/uploads/JMESTN42353658.pdf.
  27. M. Bermúdez , J. Puertas, and L. Cea, “Introducing Excel spreadsheet calculations and numerical simulations with professional software into an undergraduate hydraulic engineering course,” Computer Applications in Engineering Education, vol. 28, no. 1, 2020, pp. 193–206. https://doi.org/10.1002/cae.22185.
  28. St?nescu, M., A. Constantin, C. ?t. Ni?escu, L. Ro?u, and A. M. Dobre, “Comparative analysis of the hydraulic parameters of steady water flow in a looped pipe network.” International Journal of Mathematical Models and Methods in Applied Sciences, vol. 5, no. 8, 2011, pp. 1301–1309. https://www.naun.org/main/NAUN/ijmmas/2011.html.
  29. H. Pizzo, V. Santos, and M. Evagelista, “Algorithm in Python for simulating hydraulic network for educational purposes,” Hidraulica Magazine, vol. 2022, no. 3, pp. 13–19. https://doi.org/10.6084/m9.figshare.21207254.v1
  30. H. Zhang, X. Zhou, L. Wang, K. Wang, and W. Wang, “Development of a software tool for teaching realtime state simulation of water distribution networks,” Computer Applications in Engineering Education, vol. 26, no. 3, 2018, 577–588. https://doi.org/10.1002/cae.21909.
  31. Y. A. Türkkan, G. E. Türkkan, and H. Y?lmaz, “A visual application for teaching pipe flow optimization in engineering curricula,” Computer Applications in Engineering Education, vol. 28, no. 1, 2020, pp. 154–159. https://doi.org/10.1002/cae.22181.
  32. K. Yetilmezsoy, “IMECE – Implementation of mathematical, experimental, and computer-based education: a special application of fluid mechanics for civil and environmental engineering students,” Computer Applications in Engineering Education, vol. 25, no. 5, 2017, pp. 833–860. https://doi.org/10.1002/cae.21871.