## Abstract

Weirs are one of the most common hydraulic structures used in water engineering projects. In this research, a group method of data handling (GMDH) was developed to estimate the energy dissipation of the flow passing over the labyrinth weirs with triangular and trapezoidal plans. To compare the performance of this model with other types of soft computing models, a multilayer perceptron neural network (MLPNN) was developed. The dimensionless parameters derived from dimensional analysis, including the relative upstream head (*h*_{o}/*P*), the number of cycles (*N*_{cy}), the Froude number ( *F _{r}*), and the magnification ratio (

*M*) were used as input variables. The error statistical indicators of the GMDH model in the training phase were R

_{r}^{2}= 0.913, RMSE = 0.010, and in the testing phase were R

^{2}= 0.829, RMSE = 0.015. The error statistical indicators of the MLPNN in the training phase were R

^{2}= 0.957, RMSE = 0.007, and in the testing phase were R

^{2}= 0.945, RMSE = 0.009. Examining the structure of the GMDH network shows that

*h*/

_{o}*P*,

*N*, and

_{cy}*M*play more meaningful roles in the development network.

_{r}## HIGHLIGHTS

Development of GMDH to predict the energy dissipation of the flow passing over the labyrinth weirs.

Developing the MLPNN model to predict the energy dissipation of the flow passing over the labyrinth weirs.

Definition of most effective parameters on the mechanism of energy dissipation of flow.

Comparison of the performance of MLPNN and GMDH models based on the Taylor diagram.

## NOTATIONS

Relative upstream head

Head of flow over the crest

Froude number

Total crest length

Length of one key-cycle

Magnification ratio

Number of cycles

Coefficient of determination

- Cd
Discharge coefficient

*E*Total flow energy

- EDR
Energy dissipation ratio

*g*Acceleration due to gravity

- GMDH
Group method of data handling

- MLPNN
Multilayer perceptron neural network

*P*Weir height

- RMSE
Root mean square error

*V*Flow velocity

Discharge per channel unit width

Density

## INTRODUCTION

Weirs are one of the most commonly used hydraulic structures for flow measurement, water level regulation, flow control in water conveyance channels and irrigation and drainage networks, and water desalination and brine treatment applications (Waller & Yitayew 2015; Panagopoulos & Giannika 2022). The weirs should be chosen based on their discharge capacity and their ability to dissipate energy. The discharge capacity of weirs is proportional to the crest length, upstream head, and discharge coefficient (Parsaie & Haghiabi 2019). One way to increase the discharge capacity of weirs based on the crest length is to use nonlinear weirs. Usually, due to the limitation of the width of the waterway, the crest length is increased (increasing the crest length at a fixed width of the waterway) (Carollo Francesco *et al.* 2012). Recently, various types of labyrinth weirs such as triangular, trapezoidal, diagonal, and parabolic have been proposed. Such weirs are usually made of one or more key cycles. Tullis *et al.* (2007) conducted several experimental studies on the labyrinth weirs with a trapezoidal plan and crest angles of 6–18 degrees. They derived the stage-discharge curve and proposed a formula for discharge coefficient (Cd) as a function of the upstream head, weir height, crest length, and angle between the key cycles. Kumar *et al.* (2011) conducted an experimental study on a triangular plan labyrinth weir. They demonstrated that, by decreasing the angle of the weir crest, the length of the interference zone increases, and the Cd decreases significantly. They also presented a formula for calculating the Cd under different vertex angles.

However, weirs create a local disturbance in the flow structure, which causes flow energy dissipation. Estimating this feature helps to calculate the amount of flow energy downstream of the weir, which is necessary for the design of the downstream concrete slab (Haghiabi *et al.* 2022). The flow energy dissipation mechanism has been investigated in many hydraulic structures such as stepped spillways (Salmasi & Abraham 2023) and ski jump buckets (Daneshfaraz *et al.* 2021; Mollazadeh Sadeghion *et al.* 2022). Mohammadzadeh-Habili *et al.* (2018) investigated the energy dissipation mechanism of the flow regime on labyrinth weirs. They declared that the flow energy dissipation decreases linearly with increasing critical depth. Ghaderi *et al.* (2020) investigated the discharge coefficient and the flow energy dissipation of the labyrinth weir using the computational fluid dynamics technique using flow-3D software. They stated that the discharge coefficient varies between 0.4 and 0.8 considering the range of relative upstream head between 0.15 and 0.7. The labyrinth weir can dissipate between 0.6 and 0.3 of the upstream energy.

Literature review shows that a few studies have been conducted on the performance of soft computing models to estimate the energy dissipation of flow passing over labyrinth weirs. Therefore, in this research, the soft computing models including the group method of data handling (GMDH) and the artificial neural network (ANN) model are developed to estimate the performance of labyrinth weirs with triangular and trapezoidal plans. Noted that the mentioned soft computing models have already been successfully used in other aspects of hydraulic engineering (Singh *et al.* 2021), especially the energy dissipation of flow over the other hydraulic structures such as stepped spillways(Parsaie *et al.* 2018; Parsaie & Haghiabi 2021).

## MATERIALS AND METHODS

*q*is the unit discharge per channel width. and are the total flow energy upstream and downstream of the weir. The performance of labyrinth weirs in terms of energy dissipation ratio (EDR) is estimated using Equation (3):

*P*as repeated parameters, the dimensionless parameters are obtained as Equations (5) and (6). Therefore, Equation (6) can be rewritten as Equation (7):

In Equation (6), , , and , respectively, indicate the ratio of flow head to weir height (relative upstream head), number of cycles, and magnification ratio.

### Group method of data handling

In this equation, and are inputs and *y* is the output. The external criterion for determining the network structure is defined using root mean square error (RMSE).

The six coefficients of the governing function of each neuron in the network are derived using the least squares approach. These steps (Assigning pairs of input variables to each neuron and deriving their coefficients) are repeated for all the neurons of the first layer and also for all the neurons of the next layers. After obtaining the coefficients from the training data, the accuracy of the neurons is calculated using the RMSE index (RMSE is calculated using the GMDH outputs and the observed data). Only the neurons with higher accuracy than the threshold of error-index value are selected to contribute to the network making (Parsaie *et al.* 2021; Yonesi *et al.* 2022).

### Multilayer perceptron neural network

*et al.*2022; Shen

*et al.*2022). An example of an MLPNN model is shown in Figure 3.

### Approaches of modeling and data

Soft computing models are data-driven models. This means that to use a soft computing model, information and data related to the under-study phenomenon be collected. In this regard, the results of Mohammadzadeh-Habili *et al.* (2018) were used to develop (calibration: training and validation: testing) both applied soft computing models. The collected data was divided into two categories: training and testing. According to the nature of the problem, data can be randomly assigned to each category. Usually, 80% of the data is allocated to training and the remainder (20%) to testing. The range of collected data in the training and testing phases of the model is presented in Table 1.

Parameters . | Min . | Max . | Average . | St. Dev. . |
---|---|---|---|---|

Training | ||||

0.012 | 0.063 | 0.034 | 0.015 | |

1.000 | 2.000 | 1.488 | 0.503 | |

1.000 | 4.570 | 2.899 | 1.249 | |

Fr | 0.490 | 2.800 | 0.783 | 0.526 |

0.670 | 0.862 | 0.748 | 0.032 | |

Testing | ||||

0.013 | 0.062 | 0.037 | 0.016 | |

1.000 | 2.000 | 1.333 | 0.483 | |

1.000 | 4.570 | 2.849 | 1.102 | |

Fr | 0.490 | 2.620 | 0.806 | 0.545 |

0.701 | 0.820 | 0.754 | 0.031 |

Parameters . | Min . | Max . | Average . | St. Dev. . |
---|---|---|---|---|

Training | ||||

0.012 | 0.063 | 0.034 | 0.015 | |

1.000 | 2.000 | 1.488 | 0.503 | |

1.000 | 4.570 | 2.899 | 1.249 | |

Fr | 0.490 | 2.800 | 0.783 | 0.526 |

0.670 | 0.862 | 0.748 | 0.032 | |

Testing | ||||

0.013 | 0.062 | 0.037 | 0.016 | |

1.000 | 2.000 | 1.333 | 0.483 | |

1.000 | 4.570 | 2.849 | 1.102 | |

Fr | 0.490 | 2.620 | 0.806 | 0.545 |

0.701 | 0.820 | 0.754 | 0.031 |

## RESULTS AND DISCUSSION

In this section, the results of modeling and estimating the energy dissipation of the flow passing over the labyrinth weirs with triangular and trapezoidal plans using GMDH and MLPNN are presented. As mentioned, soft computing models are data-driven, so in the first step, the statistical characteristics of the data collected from the desired phenomenon and the correlation between the input and output variables should be determined. Statistical characteristics are given in Table 1 and the correlation coefficient is given in Table 2.

. | . | N_{cy}
. | L_{cy}/W_{cy}
. | Fr . | EDR . |
---|---|---|---|---|---|

1 | |||||

N_{cy} | 0.109 | 1 | |||

L_{cy}/W_{cy} | 0.115 | 0.886 | 1 | ||

Fr | 0.010 | −0.290 | −0.489 | 1 | |

EDR | −0.325 | −0.155 | −0.103 | −0.417 | 1 |

. | . | N_{cy}
. | L_{cy}/W_{cy}
. | Fr . | EDR . |
---|---|---|---|---|---|

1 | |||||

N_{cy} | 0.109 | 1 | |||

L_{cy}/W_{cy} | 0.115 | 0.886 | 1 | ||

Fr | 0.010 | −0.290 | −0.489 | 1 | |

EDR | −0.325 | −0.155 | −0.103 | −0.417 | 1 |

As it is clear from Table 2, the correlation coefficients of EDR (as the output variable) and independent dimensionless parameters including , , , and Fr (as input parameters) is negative. In other words, the relationship between EDR and other parameters is inverse and as these parameters increase, the EDR decreases.

*R*

^{2}= 0.913, RMSE = 0.010, and in the test phase

*R*

^{2}= 0.829, RMSE = 0.015. Examining the structure of GMDH shows that the , , and play the greatest role in the development and formation of the GMDH network.

To compare the performance of the GMDH model with other soft computing models, the MLPNN model was chosen and developed in this regard. To establish the logical conditions of comparison, the MLPNN model with two hidden layers was considered; so that there are four and two neurons in the first and second hidden layers, respectively.

The structure of the MLPNN model is shown in Figure 3. In the development of the MLPNN, the sigmoid tangent function was used as the activation function for the neurons. The performances of the MLPNN model in the training and testing phases are shown in Figures 4 and 5. The statistical indices of the MLPNN in the training phase are *R*^{2} = 0.957, RMSE = 0.007 and in the testing phase, they are *R*^{2} = 0.945 and RMSE = 0.009. Comparing the performance of these two models shows that, in the training phase, the performance of the models is almost close together. However, in the testing phase, the accuracy of the GMDH model is slightly reduced. Of course, the GMDH structure has a lower computational cost compared to the MLPNN.

### Comparing the performance of soft computing models used in this study with models used in previous studies

Mahdavi-Meymand & Sulisz (2022) developed a support vector machine (SVM) to predict the energy dissipation downstream of labyrinth weirs. To train the SVM model, they applied three modern optimization techniques including multi-tracker optimization algorithm (MTOA), particle swarm optimization (PSO), and differential evolution (DE) algorithms. They declared that the average *R*^{2} of SVM models is 0.98 which is close to the MLPNN model and is more accurate than the GMDH model.

Dutta *et al.* (2020) prepared three statistical and machine learning models including multiple linear regression (MLR), SVM, and ANN to predict the performance of triangular plan labyrinth weirs regarding energy dissipation (). They stated that the best accuracy is related to the SVM model such as away its average value of *R*^{2} is 0.96 which like the results of Mahdavi-Meymand & Sulisz (2022) is close to the MLPNN model and is more accurate than the GMDH model.

## CONCLUSION

The performance of a labyrinth weir with triangular and trapezoidal plans in the energy dissipating of the passing current was modeled and estimated using both a GMDH and an MLPNN. Our results showed that the GMDH model with two hidden layers, in which there are four and two neurons in the first and second hidden layers respectively, can predict the flow energy dissipation of such weirs in the validation phase with acceptable statistical indicators of *R*^{2} = 0.829, RMSE = 0.015. The MLPNN model also like the GMDH model has two hidden layers where the first and the second layers contain four and two neurons, respectively. Examining the performance of the MLPNN model shows that this model, with the sigmoid tangent function as the activation function of the neurons, can predict the flow energy dissipation with the statistical indices *R*^{2} = 0.945 and RMSE = 0.009. In general, it was found that both models have an acceptable accuracy in estimating the flow energy dissipation, however, the GMDH model is slightly less accurate.

## FUNDING

The funding of this research was provided by the Research Council of Shahid Chamran University of Ahvaz (Grant number: SCU.WH1401.72091).

## DATA AVAILABILITY STATEMENT

All relevant data are available from an online repository or repositories. Available from: https://link.springer.com/article/10.1007/s40996-017-0088-6.

## CONFLICT OF INTEREST

The authors declare there is no conflict.