Modeling and Simulation of Water Hammer Phenomena Using Artificial Neural Networks (ANN)
Abstract
:1. Introduction
2. Mathematical Model and Resolution Methods
2.1. Mathematical Model
2.2. Resolution of the Transient Flow Problem by the MacCormack Method
- Predictor step:
- Corrector step:
- Predictor step: This step allows the prediction of the values of H and Q at time (t + Δt). The results of applying this step are represented in the following equations:
- Corrector step: This step allows the correction of the values of H and Q at time (t + Δt) obtained in the prediction step. So, applying this step gives the following equations:
- Corrector step
- Predictor step
2.3. Solving the Transient Flow Problem Using the (ANN)
3. Problem Statement and Boundary Conditions
3.1. Problem Statement
3.2. Boundary Conditions and Stability Criterion
3.2.1. At the Outlet of the Reservoir
3.2.2. At the Valve
4. Results and Discussions
4.1. Database Creation
4.2. Database Utilization and ANN Architecture Optimization for Pressure Prediction
4.3. Choice of Performance Evaluation Criteria
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Lagrange, J.L. Méchanique Analytique; La Veuve Desaint: Paris, France, 1788. [Google Scholar]
- Wood, F. History of Water-Hammer; Queen’s University: Kingston, ON, Canada, 1970. [Google Scholar]
- Bergeron, L. Variation de Régime dans les Conduites d’eau; Comptes rendus des travaux de la Société hydrotechnique de France; Société hydrotechnique de France: Paris, France, 1931. [Google Scholar]
- Joukowsky, N. On the hydraulic hammer in water supply pipe. Proc. Am. Water Work. Assoc. 1904, 24, 341–424. [Google Scholar]
- Wylie, E.B.; Streeter, V.L.; Suo, L. Fluid Transients in Systems; Prentice Hall: Englewood Cliffs, NJ, USA, 1993. [Google Scholar]
- Twyman, J. Water hammer in a pipe network due to a fast valve closure. Rev. Ing. Constr. 2018, 33, 193–200. [Google Scholar] [CrossRef]
- Han, Y.; Shi, W.; Xu, H.; Wang, J.; Zhou, L. Effects of closing times and laws on water hammer in a ball valve pipeline. Water 2022, 14, 1497. [Google Scholar] [CrossRef]
- Bazargan-Lari, M.R.; Kerachian, R.; Afshar, H.; Bashi-Azghadi, S.N. Developing an optimal valve closing rule curve for real-time pressure control in pipes. J. Mech. Sci. Technol. 2013, 27, 215–225. [Google Scholar] [CrossRef]
- Sanghyun, K. Valve Maneuver Prediction in Simple and Complicated Pipeline Systems. Water Resour. Manag. 2019, 33, 4671–4685. [Google Scholar]
- Bettaieb, N.; Haj Taieb, E. Assessment of Failure Modes Caused by Water Hammer and Investigation of Convenient Control Measures. J. Pipeline Syst. Eng. Pract. 2020, 11, 04020006. [Google Scholar] [CrossRef]
- Chen, Y.; Zhao, C.; Guo, Q.; Zhou, J.; Feng, Y.; Xu, K. Fluid-Structure Interaction in a Pipeline Embedded in Concrete During Water Hammer. Front. Energy Res. 2022, 10. [Google Scholar] [CrossRef]
- Abdelouaheb, T.; Fateh, S.; Afoufou, F. Transient Flow in Pressurized Pipes: A Comparative Study of Five Resolution Methods. J. Civ. Eng. 2024, 19. [Google Scholar] [CrossRef]
- Streeter, V.L.; Wylie, E.B. Fluid Mechanics; McGraw-Hill: Ann Arbor, MI, USA, 1983; 206p. [Google Scholar]
- Neyestanaki, M.K.; Dunca, G.; Jonsson, P.; Cervantes, M.J. A Comparison of Different Methods for Modelling Water Hammer Valve Closure with CFD. Water 2023, 15, 1510. [Google Scholar] [CrossRef]
- Moser, A.P. Buried Pipe Design, 2nd ed.; McGraw-Hill: Ann Arbor, MI, USA, 2001. [Google Scholar]
- Özkal, İ.; Özkan, İ.A.; Başçiftçi, F. Metaverse token price forecasting using artificial neural networks (ANNs) and Adaptive neural fuzzy inference system (ANFIS). Neural Comput. Applic. 2024, 36, 3267–3290. [Google Scholar] [CrossRef]
- Van Hilten, A.; Katz, S.; Saccenti, E.; Niessen, W.J.; Roshchupkin, G.V. Designing interpretable deep learning applications for functional genomics: A quantitative analysis. Brief. Bioinform. 2024, 25, bbae449. [Google Scholar] [CrossRef] [PubMed]
- Najjar, Y.; Ali, H. On the use of BPNN in liquefaction potential assessment tasks. Artificial Intelligence and Mathematical Methods in Pavement and Geomechanical Systems. Attoh-Okine 1998, 75, 55–63. [Google Scholar]
- Najjar, Y.; Zhang, X.C. Characterizing the 3D stress-strain behavior of sandy soils: A neuro-mechanistic approach. In Numerical Methods in Geotechnical Engineering; American Society of Civil Engineers: Reston, VA, USA, 2000; pp. 43–57. [Google Scholar]
- Riad, S.; Mania, J.; Bouchaou, L.; Najjar, Y. Predicting catchment flow in a semi-arid region via an artificial neural network technique. Hydrol. Process. 2004, 18, 2387–2393. [Google Scholar] [CrossRef]
- Santos, C.A.; Freire, P.K.; Silva, R.M.D.; Akrami, S.A. Hybrid wavelet neural network approach for daily inflow forecasting using tropical rainfall measuring mission data. J. Hydrol. Eng. 2019, 24, 04018062. [Google Scholar] [CrossRef]
- Poonia, V.; Tiwari, H.L. Rainfall-runoff modeling for the Hoshangabad Basin of Narmada River using artificial neural network. Arab. J. Geosci. 2020, 13, 944. [Google Scholar] [CrossRef]
- Provenzano, P.G.; Baroni, F.; Aguerre, R.J. The closing function in the water hammer modeling. Lat. Am. Appl. Res. 2011, 41, 43–47. [Google Scholar]
- Subani, N.; Norsarahaida, A. Analysis of Water Hammer with Different Closing Valve Laws on Transient Flow of Hydrogen-Natural Gas Mixture. Hindawi Publishing Corporation. In Abstract and Applied Analysis; Hindawi Publishing Corporation: London, UK, 2015; p. 510675. [Google Scholar]
- Shampine, L.F. Two-step Lax–Friedrichs method. Appl. Math. Lett. 2005, 18, 1134–1136. [Google Scholar] [CrossRef]
- Goldberg, D.E.; Benjamin, W.E. Characteristics method using time-line interpolations. J. Hydraul. Eng. 1983, 109, 670–683. [Google Scholar] [CrossRef]
- Hecht-Nielsen, R. Kolmogorov’s mapping neural network existence theorem. In Proceedings of the First IEEE International Conference on Neural Networks, San Diego, CA, USA, 21–24 June 1987; pp. 11–14. [Google Scholar]
- Wu, G.D.; Lo, S.L. Predicting real-time coagulant dosage in water treatment by artificial neural networks and adaptive network-based fuzzy inference system. Eng. Appl. Artif. Intell. 2008, 21, 1189–1195. [Google Scholar] [CrossRef]
- Benchaiba, L.; Moussouni, A.; Zeghmar, A.; Maaliou, A. Wavelet and AI-based reservoir evaporation modeling for optimized water management: A case study of Koudiat Acerdoun Dam. Theor. Appl. Climatol. 2025, 156, 219. [Google Scholar] [CrossRef]
- Parmar, K.S.; Bhardwaj, R. River Water Prediction Modeling Using Neural Networks, Fuzzy and Wavelet Coupled Model. Water Resour. Manag. 2015, 29, 17–33. [Google Scholar] [CrossRef]
Operation Number | Diameter (m) | Length (m) | Flow Rate (m3/s) | Roughness (m) | Thickness(m) | α Angle (degree) | Total Reservoir Load (m) | Valve Level (m) | Valve Closing Time (s) | Optimal Pressure (bar) |
---|---|---|---|---|---|---|---|---|---|---|
1 | 0.6 | 1000 | 0.35 | 0.00003 | 0.0175 | 10 | 200 | 50 | 1.819 | 28.126 |
2 | 1.04 | 375 | 1.1 | 0.000088 | 0.057 | 17.4 | 200 | 110 | 2.174 | 12.673 |
i | … | … | … | … | … | … | … | … | … | … |
i + 1 | … | … | … | … | … | … | … | … | … | … |
636 | 0.6 | 204 | 0.282 | 0.000084 | 0.00175 | 13 | 213.5 | 63.5 | 0.756 | 18.998 |
637 | 0.61 | 205 | 0.292 | 0.000085 | 0.00175 | 13 | 213.75 | 63.75 | 0.767 | 18.937 |
Input and Output Parameters | Statistical Parameters | ||||
---|---|---|---|---|---|
Average | Standard Deviation | Coefficient of Variation | Min | Max | |
Diameter (m) | 0.74997 | 0.5394 | 0.7192 | 0.04 | 2 |
Length (m) | 736.96 | 475.38 | 0.6450 | 50 | 2000 |
Flow rate (m3/s) | 0.8463 | 1.2078 | 1.4270 | 0.00095 | 4.71 |
Roughness (m) | 0.0003 | 0.00064 | 2.10907 | 0.000007 | 0.00233 |
Thickness (m) | 0.0217 | 0.02273 | 1.04327 | 0.001 | 0.1 |
α angle (degree) | 17.259 | 14.5781 | 0.84465 | 0 | 90 |
Total reservoir load (m) | 263.77 | 103.404 | 0.39201 | 25 | 500 |
Valve level (m) | 99.938 | 61.6406 | 0.6167 | 0 | 284 |
Valve closing time (s) | 10.599 | 11.6079 | 1.09518 | 0.2746 | 88.998 |
Optimal pressure (bar) | 18.824 | 7.16268 | 0.38050 | 2.0559 | 47.985 |
Number of Neurons in Artificial Neural Network Structure | Phase | RMSE | NSE | R |
---|---|---|---|---|
1 | Training | 2.0264 | 0.9311 | 96.629 |
Validation | 1.1302 | 0.9564 | 97.815 | |
Test | 2.9651 | 0.4131 | 79.067 | |
. . . | Training | . | . | . |
Validation | . | . | . | |
Test | . | . | . | |
15 | Training | 0.9305 | 0.9855 | 0.9927 |
Validation | 0.0891 | 0.9997 | 0.9998 | |
Test | 0.0685 | 0.9997 | 0.9998 | |
. . . | Training | . | . | . |
Validation | . | . | . | |
Test | . | . | . | |
19 | Training | 2.0626 | 0.9286 | 0.9656 |
Validation | 0.2467 | 0.9979 | 0.9990 | |
Test | 0.1337 | 0.9988 | 0.9994 |
Phases | Flows | Mean | STD | CV | Min | Max |
---|---|---|---|---|---|---|
Training | Calculated | 17.7063 | 7.7263 | 0.4364 | 2.0560 | 47.9853 |
Simulated | 17.7537 | 7.6772 | 0.4324 | 2.2656 | 47.8965 | |
Validation | Calculated | 21.7625 | 5.4414 | 0.2500 | 6.6753 | 33.9110 |
Simulated | 21.7493 | 5.4434 | 0.2503 | 6.5143 | 33.7136 | |
Test | Calculated | 21.1043 | 3.8909 | 0.1844 | 15.5423 | 33.8230 |
Simulated | 21.0972 | 3.8970 | 0.1847 | 15.5878 | 33.8346 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Afoufou, F.; Abda, Z.; Toumi, A.; Sekiou, F. Modeling and Simulation of Water Hammer Phenomena Using Artificial Neural Networks (ANN). Water 2025, 17, 1617. https://doi.org/10.3390/w17111617
Afoufou F, Abda Z, Toumi A, Sekiou F. Modeling and Simulation of Water Hammer Phenomena Using Artificial Neural Networks (ANN). Water. 2025; 17(11):1617. https://doi.org/10.3390/w17111617
Chicago/Turabian StyleAfoufou, Fateh, Zaki Abda, Abdelouaheb Toumi, and Fateh Sekiou. 2025. "Modeling and Simulation of Water Hammer Phenomena Using Artificial Neural Networks (ANN)" Water 17, no. 11: 1617. https://doi.org/10.3390/w17111617
APA StyleAfoufou, F., Abda, Z., Toumi, A., & Sekiou, F. (2025). Modeling and Simulation of Water Hammer Phenomena Using Artificial Neural Networks (ANN). Water, 17(11), 1617. https://doi.org/10.3390/w17111617