A Machine Learning-Based Approach for Precise Estimation of Discharge Coefficient in Labyrinth and Piano Key Weirs
Received: 30-10-2025
Revised: 01-02-2026
Accepted: 02-02-2026
Published in Issue 30-09-2026
Published Online: 14-02-2026
Copyright (c) 2025 Mohsen Dorfeshan, Alireza Masjedi, Mohammad Heidarnejad, Amin Bordbar (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.
Abstract
Nonlinear weirs are widely used to increase spillway discharge capacity under constrained footprints; however, accurate estimation of the discharge coefficient (Cd) remains challenging due to highly nonlinear hydraulic behavior. This study experimentally and numerically evaluates the hydraulic performance of rectangular piano key weirs (RPKW) and rectangular labyrinth weirs (RLW) using physical modeling and advanced machine‑learning techniques. A total of 90 steady‑flow laboratory experiments were conducted, covering relative crest length (L/B=0.8–1.2), relative width (W/B=0.2–0.4), and relative upstream head (HT/P<=0.6 ). Experimental results showed that Cd initially increases with and then decreases due to flow interference, while increasing and significantly enhances discharge efficiency. A 1.5‑fold increase in resulted in approximately 43% and 25% increases in Cd for RPKW and RLW, respectively. For predictive modeling, regression, Gene Expression Programming (GEP), and a hybrid Particle Swarm Optimization–GEP (PSO‑GEP) approach were developed and evaluated using RMSE, MAE, coefficient of determination (R2), and the Developed Discrepancy Ratio (DDR). The PSO‑GEP model exhibited superior performance, achieving (R2=0.988) and RMSE ≤ 0.0023 in the testing phase for both weir types. Moreover, the highest Cd(DDR)max values (12.58 for RPKW and 13.03 for RLW) were obtained by PSO‑GEP, indicating enhanced reliability in predicting extreme discharge conditions. The proposed hybrid framework provides accurate, robust, and explicit predictive formulations suitable for practical spillway design and optimization.
Keywords
- Piano key weir,
- Discharge coefficient,
- Stream,
- Crest length
References
- Alam J, Muzzammil M, Raza MA. Prediction of coefficient of discharge (CPK) of A-type piano key weir using ANN and hybrid ANFIS models. Modeling Earth Systems and Environment. 2025 Jun;11(3):224. DOI: https://doi.org/10.1007/s40808-25-02400-4.
- Fuladipanah M, Panda S, Rathnayake N, Rathnayake U, Azamathulla HM, Hoshino Y. Artificial Intelligence for Hydraulic Engineering: Predicting discharge coefficients in trapezoidal side weirs. Mathematical Biosciences and Engineering: MBE. 2025 Nov 1;22(12):3236-61. DOI: https://doi.org/10.3934/mbe.2025119
- Schleiss AJ. From labyrinth to piano key weirs: A historical review. In Proc. Int. Conf. Labyrinth and Piano Key Weirs. 2011;3-15, Liège, Belgium.
- Kula H, Yarar A. Experimental analysis of discharge capacity of ogee type side weirs. Flow Measurement and Instrumentation. 2025 Dec 1;106:102986. DOI: https://doi.org/10.1016/j.flowmeasinst.2025.102986.
- Crookston BM. Labyrinth weirs. Ph.D. Dissertation. 2010; Utah State University, Logan, Utah, US. DOI: https://doi.org/10.26076/ef89-525e
- Blancher B, Montarros F, Laugier F. Hydraulic comparison between piano-keys weir and labyrinth spillways. Proc. International Workshop on Labyrinth and Piano Key Weirs, 2011, Liège, Belgium. DOI: https://doi.org/10.1201/b12349-22
- Laugier F, Lochu A, Gille C, Leite Ribeiro M, Boillat JL. Design and construction of a labyrinth PKW spillway at St-Marc dam, France. Hydropower & Dams. 2009; 16(5), 100-107.
- Laugier F. Design and construction of the first Piano Key Weir (PKW) spillway at the Goulours dam. Hydropower & Dams. 2007;14(5): 94-101.
- Vermeulen J, Laugier F, Faramond L, Gille C. Lessons learnt from design and construction of EDF first Piano Key Weirs. Proc. International Workshop on Labyrinth and Piano Key Weirs. 2011; Liège, Belgium. DOI: https://doi.org/10.1201/b12349-33
- Leite Ribeiro M, Bieri M, Boillat JL, Schleiss AJ, Singhal G, Sharma N. Discharge capacity of piano key weirs. Journal of Hydraulic engineering. 2012 Feb 1;138(2):199-203. DOI: https://doi.org/10.1061/(ASCE)HY.1943-7900.000049
- Singh D, Kumar M. Hydraulic design and analysis of piano key weirs: a review. Arabian Journal for Science and Engineering. 2022 Apr;47(4):5093-107. https://doi.org/10.1007/s13369-021-06370-4
- Chooplou CA, Ghodsian M, Vaghefi M. Influence of outlet keys slope on downstream bed topography in trapezoidal piano key weirs: An experimental investigation. Results in Engineering. 2024 Dec 1;24:103173. DOI: https://doi.org/10.1016/j.rineng.2024.103173.
- International Commission on Large Dams (ICOLD). 1994; Technical Dictionary on Dams.
- Anderson RM, Tullis B.P. 2011 Influence of Piano-Key Weir Geometry on Discharge. Proc. International Workshop on Labyrinth and Piano Key Weirs, 2011, p. 42, Liège, Belgium. DOI: https://doi.org/10.1201/b12349-12
- Kumar B, Pandey M, Ahmad Z. Flow field and sediment passing capacity of type-a piano key weirs. International Journal of Sediment Research. 2024 Aug 1;39(4):540-51. DOI: https://doi.org/10.1016/j.ijsrc.2024.04.005.
- Rdhaiwi AQ, Khoshfetrat A, Fathi A. Experimental comparison of flow energy loss in type-B and-C Trapezoidal Piano Key Weirs (PKWS). Journal of Engineering and Sustainable Development. 2024 Jan 1;28(1):55-64. DOI: https://doi.org/10.31272/jeasd.28.1.4
- Ouamane A, Lempérière F. Design of a new economic shape of weir. Proc., International Symposium on Dams in the Societies of the 21st Century. 2006;1:463-470, Barcelona, Spain.
- Selim T, Hamed AK, Elkiki M, Eltarabily MG. Numerical investigation of flow characteristics and energy dissipation over piano key and trapezoidal labyrinth weirs under free-flow conditions. Modeling Earth Systems and Environment. 2024 Feb;10(1):1253-72. DOI: https://doi.org/10.1007/s40808-023-01844-w
- Lux F, Hinchliff D. Design and construction of labyrinth spillways. 15th Congress ICOLD. 1985;4:249-274, Lausanne, Switzerland.
- Crookston BM, Flake LK, Felder S. Flow nonuniformity and energy dissipation in moderate-sloped stepped chutes with a labyrinth crest. Journal of Hydraulic Engineering. 2024 Sep 1;150(5):04024024. DOI: https://doi.org/10.1061/JHEND8.HYENG-1388
- Houston K. Hydraulic model study of Ute dam labyrinth spillway Report No. GR-82-7. 1982; U.S. Bureau of Reclamation, Denver, Colorado, US.
- Hay N, Taylor G. Performance and design of labyrinth weirs. Journal of the Hydraulics Division. 1970 Nov;96(11):2337-57. DOI: https://doi.org/10.1061/JYCEAJ.000276
- Lempérière F, Vigny JP, Ouamane A. General comments on Labyrinth and Piano Key Weirs: The past and present. In Proceedings of the international conference labyrinth and piano key weirs. 2011;17-24. DOI: https://doi.org/10.1201/b12349-4
- Henderson FM. Open Channel Flow. Gene Nordby, Macmillan, NY; 1966, 174 p.
- Tullis JP, Amanian N, Waldron D. Design of labyrinth spillways. Journal of hydraulic engineering. 1995 Mar;121(3):247-55. DOI: https://doi.org/10.1061/(ASCE)0733-9429(1995)121:3(247)
- Darvas LA. Discussion of “Performance and design of labyrinth weirs”. Journal of the Hydraulics Division. 1971 Aug;97(8):1246-51.
- Melo J, Ramos C, Magalhães A. Descarregadores com soleira em labirinto de um ciclo em canais convergentes.
- Elshaarawy MK, Hamed AK. Stacked ensemble model for optimized prediction of triangular side orifice discharge coefficient. Engineering Optimization. 2025;57(8):2289-319.DOI: https://doi.org/10.1080/0305215X.2024.2397431
- Asgharzadeh-Bonab A, Bijanvand S, Parsaie A, Afaridegan E. Machine learning-based estimation of discharge coefficient for semicircular labyrinth weirs. Scientific Reports. 2025 Sep 26;15(1):33002. DOI: https://doi.org/10.1038/s41598-025-18230-4
- Heidarnejad M, Feili J, Fuladipanah M, Rathnayake U. Machine learning-based discharge coefficient estimation in trapezoidal-arched labyrinth weirs. Asian Journal of Water, Environment and Pollution. 2025;22(6):73-88. DOI: https://doi.org/10.36922/AJWEP025120081
- Elshaarawy MK, Hamed AK. Predicting discharge coefficient of triangular side orifice using ANN and GEP models. Water Science. 2024;38(1):1-20. DOI: https://doi.org/10.1080/23570008.2023.2290301
- Gharehbaghi A, Ghasemlounia R, Afaridegan E, Haghiabi A, Mandala V, Azamathulla HM, Parsaie A. A comparison of artificial intelligence approaches in predicting discharge coefficient of streamlined weirs. Journal of Hydroinformatics. 2023;25(4):1513-1530. DOI: https://doi.org/10.2166/hydro.2023.063
- Simsek O, Gumus V, Ozluk A. Prediction of discharge coefficient of the trapezoidal broad-crested weir flow using soft computing techniques. Neural Computing and Applications. 2023;35(24):17485-17499. DOI: https://doi.org/10.1007/s00521-023-08615-9
- Majedi-Asl M, Fuladipanah M, Arun V, Tripathi RP. Using data mining methods to improve discharge coefficient prediction in Piano Key and Labyrinth weirs. Water Supply. 2022;22(2):1964-1982. DOI: https://doi.org/10.2166/ws.2021.304
- Sihag P, Nouri M, Ahmadpari H, Seyedzadeh A, Kisi O. Approximation of the discharge coefficient of radial gates using metaheuristic regression approaches. Sustainability. 2022;14(22):15145. DOI: https://doi.org/10.3390/su142215145
- Fuladipanah M, Majedi-Asl M. Soft Computing Application to Amplify Discharge Coefficient Prediction in Side Rectangular Weirs. Irrigation and Water Engineering. 2022;12(4):213-233. DOI: https://doi.org/10.22125/iwe.2022.150692
- Parsaie A, Haghiabi AH. Assessment of some famous empirical equation and artificial intelligent model (MLP, ANFIS) to predicting the side weir discharge coefficient. Journal of Applied Research in Water and Wastewater. 2014;2, 75-79.
- Majedi Asl M, Fuladipanah M, Daneshfaraz R, Jannat K. Modeling and assessment of discharge coefficient of arc labyrinth weir using experimental and meta-model methods. Iranian Journal of Soil and Water Research. 2021;52(7):1987-2000. DOI: https://doi.org/10.22059/ijswr.2021.322432.668943
- Olyaie E, Heydari M, Banejad H, Chau KW. A laboratory investigation on the potential of computational intelligence approaches to estimate the discharge coefficient of piano key weir. Journal of Rehabilitation in Civil Engineering. 2018;6(11):1-20. DOI: https://doi.org/10.22075/JRCE.2018.13233.1241
- Ebtehaj I, Bonakdari H, Gharabaghi B. Development of more accurate discharge coefficient prediction equations for rectangular side weirs using adaptive neuro-fuzzy inference system and generalized group method of data handling. Measurement. 2018; 116:473-482. DOI: https://doi.org/10.1016/j.measurement.2017.11.023
- Parsaie A, Haghiabi AH. Mathematical expression for discharge coefficient of Weir-Gate using soft computing techniques. Journal of Applied Water Engineering and Research. 2021;9(3):175-183. DOI: https://doi.org/10.1080/23249676.2020.1787250
- Karami H, Karimi S, Bonakdari H, Shamshirband S. Predicting discharge coefficient of triangular labyrinth weir using extreme learning machine, artificial neural network and genetic programming. Neural Computing and Applications. 2018;29:983-989. DOI: https://doi.org/10.1007/s00521-016-2588-x
- Roushangar K, Alami MT, Majedi Asl M, Shiri J. Modeling discharge coefficient of normal and inverted orientation labyrinth weirs using machine learning techniques. ISH Journal of Hydraulic Engineering. 2017;23(3):331-340. DOI: https://doi.org/10.1080/09715010.2017.1327333
- Azamathulla H Md, Haghiabi AH, Parsaie A. Prediction of side weir discharge coefficient by support vector machine technique. Water Science & Technology: Water Supply. 2016;16(4):1002-1016. DOI: https://doi.org/10.2166/ws.2016.014
- Parsaie A, Azamathulla HM, Haghiabi AH. Prediction of discharge coefficient of cylindrical weir–gate using GMDH-PSO. ISH Journal of Hydraulic Engineering. 2018;24(2):116-123. DOI: https://doi.org/10.1080/09715010.2017.1372226
- Fuladipanah M., Azamathulla H.M., Tota-Maharaj K., Mandala V., Chadee A. Precise forecasting of scour depth downstream of flip bucket spillway through data-driven models. Results in Engineering. 2023; 20, 101604. DOI: https://doi.org/10.1016/j.rineng.2023.101604
- Ferreira C. Gene expression programming: a new adaptive algorithm for solving problems, Complex Syst. 2001;13:87-129. DOI: https://doi.org/10.48550/arXiv.cs/0102027
- Noori R, Khakpour A, Omidvar B, Farokhnia A. Comparison of ANN and principal component analysis-multivariate linear regression models for predicting the river flow based on developed discrepancy ratio statistics. Expert Systems with Applications. 2010;37: 5856-5862.
10.57647/ijm2c.2026.1603.20
