Experimental study and modelling discharge coefficient of trapezoidal and rectangular piano key weirs

Crest length is an important parameter in influencing the discharge handling capacity of a weir. Nonlinear weirs with longer crests are cost effective alternatives for those existing dam structures which are more susceptible to failure due to loss of storage capacity by reservoir silting problem, and insufficiency of the structure in evacuating the updated flow due to the limited space. Piano key weir is a type of nonlinear weir designed in the form of piano keys, over-hanged from both the upstream and the downstream with sloping floors founded on a base or footprint. These weirs can be easily placed over gravity dams due to smaller footprint than labyrinth weirs. The present study’s focus is on the comparative analysis of identical configurations of trapezoidal and rectangular piano key (PK) weirs. The importance of (crest length to width) L/W ratio and weir height (P) in affecting the discharge efficiency of both types of PK weirs is investigated in the experimental study. Furthermore, soft computing approaches are applied to the current data set obtained from both types of weirs by considering discharge coefficient (Cd\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_{\text{d}}$$\end{document}) as a function of dimensionless geometric variables of PK weirs. The modelling performance of random forest regression and M5 tree approach is tested in order to estimate the values of discharge coefficient. The results conclude higher predictive accuracy of random forest model over M5 tree model.


Introduction
Increase in the reservoir water level of many existing dam structures necessitates the reassessment of flood discharge and requires rehabilitation of the structures in order to pass the updated flood to ensure dam safety (Ouamane and Lempérière 2006). Piano key weir is a form of nonlinear weir designed to improve the hydraulic capacity of existing dams and spillway structures. It is modified form of labyrinth weir which requires a smaller footprint with less space requirement than labyrinth weir with an added advantage of improved hydraulic efficiency (Anderson and Tullis 2011). The major difference between the both types is that PK weir has sloping floors with upstream and downstream overhang apexes rather than straight walls. The discharge capacity of both weirs is higher than a simple rectangular weir due to the increased crest length relative to its total width, while, the crest length of the sharp crested weir is limited to its width. A significant research has been carried out on PK weirs to improve the hydraulic performance by varying its dimensional configurations and shapes. A brief description of naming convention of PK weir parameters presented by Pralong et al. (2011) is referred in the current study. A Lot of researchers conducted the parametric studies since the development of PK weirs. Kabiri-Samani and Javaheri (2012) conducted parametric study to comprehend the effect of dimensionless parameters and proposed correlations to calculate the value of discharge coefficient for free flow and submerged flow conditions over PK weir in terms of dimensionless geometrical parameters. Ribeiro et al. (2012b) suggested a simplified relationship to calculate 1 3 43 Page 2 of 9 discharge enhancement ratio (r) relative to the linear sharp crested weir, and furthermore, they identified primary and secondary parameters influencing the discharge efficiency of PK weirs. In another paper by Ribeiro et al. (2012a), the role of outlet key is signified as quite influencing at high discharge condition in affecting the hydraulic efficiency of PK weirs. Machiels et al. (2012) tested the impact of parapet walls, extended over PK weir crest by keeping constant slope of apexes. Trapezoidal-shaped PK weir is tested by Cicero et al. (2013), and the results are found encouraging in terms of discharge evacuation capacity as compared to conventional rectangular-shaped PK weir. The discharge capacity of trapezoidal PK weir ( W i ∕W o > 1 ) is improved within the range of 5 to 25%. Mehboudi et al. (2016Mehboudi et al. ( , 2017 added useful contribution to the field of trapezoidal piano key (TPK) weirs by comprehensively analysing various geometrical aspects of TPK weirs and evaluating their hydraulic performances. From their study, L/W ratio has been observed as the most influencing parameter in improving the discharge capacity; moreover, higher efficiencies are recorded at lower H/P ratios with nappe and transition flows. Karimi Chahartaghi et al. (2019) investigated the effect of a parapet wall on the hydraulic performance of an arced PK weir.
Involvement of several geometric parameters in affecting the hydraulic performance of labyrinth and PK weirs demands higher prediction accuracy in modelling. Many researchers recognized the application of soft computing techniques in order to predict the hydraulic characteristics of nonlinear weirs. Zaji et al. (2016) and Zaji and Bonakdari (2017) modelled the discharge coefficient of modified labyrinth side weirs with support vector regression method by using various kernel functions. Multiple combinations of input variables are tried in order to obtain maximum accuracy in output estimation; the results were found encouraging with RBF and polynomial kernels. Azamathulla et al. (2016) compared the performance of support vector machines (SVM), artificial neural network (ANN), and adaptive neuro-fuzzy interference systems (ANFIS) in estimating the discharge coefficient of side weirs. The investigation yielded accurate results with RBF kernel-based SVM in comparison with other approaches. Haghiabi et al. (2018) predicted discharge coefficient of triangular labyrinth weirs in relation with non-dimensional input parameters by using ANFIS and ANN and reported suitability of both computing techniques in modelling. The modelling study conducted by Olyaie et al. (2019) accessed the predictive capability of machine learning approaches viz. least-square support vector machine, extreme learning machine, Bayesian ELM and logistic regression in determining the discharge coefficient of PK weirs. Mehri et al. (2019) predicted the coefficient of discharge for piano key side weirs using GMDH (group method of data handling) and DGMDH (combination of GMDH and ANN) techniques.  evaluated the performance and validity of relationships proposed for determining the discharge coefficient from previous studies. The potential of multilayer perceptron neural network (MLPNN) and adaptive neuro-fuzzy inference system (ANFIS) with the combination of four meta-heuristic optimization algorithms (particle swarm optimization, genetic algorithm, firefly algorithm and moth-flame optimization) are assessed in the study of Zounemat-Kermani and Mahdavi-Meymand (2019) for predicting the PKW's flow rate.
To sum up, there are a lot of studies available to analyse the hydraulic aspect of PK weirs, and a few studies available in the literature which deal with the application of soft computing approaches to this field. So, the present study reviews and compares the performance of trapezoidalshaped configuration PK weirs relative to rectangular PK weirs with varying L/W ratio and height of the weir, and furthermore, random forest regression and M5 tree modelling techniques are employed to predict the discharge coefficient of PK weirs.

Experimental setup and measurement of discharge
The experimental facility consists of a rectangular flume having a cross-sectional area of 40 × 90 cm, and a total length of 12 m (Fig. 1). The water is supplied to the flume with a pump, delivering discharge up to a maximum capacity of 30 L/s. Water entered into the flume through a stilling head box. The upstream entry of the flume is equipped with a metal screen ensuring uniform flow conditions. A platform of height 30 cm from the base of the flume and of width 40 cm is made to install piano key weir over it. The PK weir models are installed at 6 m from water entering head box. The flow into the flume is controlled through a regulating valve. The water level head (H) is measured upstream of piano key weir crest using a point gauge with a minimum accuracy of ± 1 mm. The flow passing through PK weirs is measured by a sharp crested weir installed at the end of the flume. As mentioned in the previous studies, a physical overview of geometrical parameters of both trapezoidal and rectangular PK weir is illustrated in Figs. 2 (Mehboudi et al. 2017) and 3 (Pralong et al. 2011), respectively. The flow over both PK weirs is displayed in Fig. 4.
Two types of piano key weir models, rectangular piano key weir (RPKW) and trapezoidal piano key weir (TPKW), having almost identical L/W (crest length to width) ratio and same no. of keys (N) are used in this study. The wall thickness ( T s ) and width (W) of PK weir models are kept as 0.5 cm and 40 cm, respectively, during model fabrication. The description of the geometrical parameters of the PK weir models (six models) is given in Table 1. Where B is the total length of weir, P is the total height of weir, W i is the inlet key (cycle) width, W o is outlet key width, L is the total crest length, B o is the outlet key overhang crest length and B i is the inlet key overhang crest length and W is the total width of PK weir (Table 1).
Discharge coefficient of PK weir is computed by a common weir equation as where Q is the discharge passing over PK weir, C d is the PK weir discharge coefficient, g is the acceleration due to gravity, W is the total width of PK weir, and H is the upstream head over PK weir crest.
Discharge enhancement ratio (r), the ratio of flow over PK weir ( Q PK ) and flow over sharp crested weir ( Q W ) are represented as: The value of C s (discharge coefficient for sharp crested weirs) is assumed constant to 0.46 (Ribeiro et al. 2012b).

Discussion of experimental results
The discharging capacity of PK weirs is significantly affected by the plan of the weirs. As depicted from Fig. 5, trapezoidal piano key weirs have higher discharge evacuation efficiency than their respective rectangular PK weirs having identical L/W ratios. Discharge gained by trapezoidal PK weirs relative to rectangular PK weirs is observed higher for the entire range of heads tested. With the increase in height of the weir (P), discharge capacity increases over the weir for the identical head values on both trapezoidal and rectangular PK weirs ( Fig. 6). At smaller weir heights (P), the falling nappe from the sidewall of apexes interferes and coverage with each other at lower head (H) values in comparison to PK weir with larger heights, thereby reducing the hydraulic efficiency of small height weirs. So, PK weirs with lower heights are more susceptible to submergence due to early interaction of the falling nappes from the outlet key flow and lateral flow over sidewalls. Local submergence or drowning occurs from the upstream apex towards the downstream apex as the head (H) increases over the weir crest. The overall gain in discharge with increase in height of PK weir is observed slightly higher in trapezoidal weir (about 7.5%) than the rectangular weir (about 6%) for the current experimental range.
To investigate the percentage gain in discharge coefficient ( C d ) of trapezoidal PK weir relative to rectangular PK weir having similar configurations, a graph is plotted for discharge coefficient and H/P ratio showing the impact of weir geometry (Fig. 7). It is observed from the plot that the attainment of C d (%) in all trapezoidal PK weir models is higher at low heads and the maximum gain in efficiency values corresponds to the H/P ratio of about 0.1. The relative gain in discharge coefficient of TPK weir model having a height (P) of 15 cm and L/W ratio of 4.75 (N = 2.5) is observed higher at higher  relative heads (H/P > 0.25) in comparison with the other two models. This may be due to less no. of keys increase inlet ( W i ) and outlet ( W o ) cycle width, and the adequate spacing of the units enables free sideways movement of water, and so, nappe jet interference occurs at lower levels which restricts local submergence at relatively higher discharges. The overall increase in discharge coefficient is observed within the range of 2-15%, while the maximum overall gain is observed with the weir of height (P) 18 cm. Discharge enhancement ratio (r) is plotted with the relative head (H/P) for the entire experiments (Fig. 8). The values are observed higher with the lower range of heads over PK weir crest. At lower heads, PK weir effectively evacuates large volumes of water, but the enhancement ratio (r) starts declining as the water head over PKW crest increases. The ratio (r) is observed higher with TPK weirs respective to their corresponding RPK weirs. The discharge efficiency Increment in discharge coefficient with trapezoidal PK weirs relative to rectangular PK weirs reduces due to improper utilization of folded crest length by PK weirs at higher discharges caused by nappe or jet interference effects. Increase in L/W significantly improves the discharge capacity of PK weir of both types.

M5 model tree
M5 tree is quite popular and employed in several hydraulic and hydrologic problems (Kumar et al. 2018;Sihag et al. 2019). M5P is a simple algorithm for the accurate prediction of complex and nonlinear problems. Quinlan (1992) proposed a new tree type algorithm entitled as M5 tree for prediction of complex problem containing large number of data set and input variables. Pruning is also introduced in this algorithm to reduce the risk of overfitting. The dividing method is implemented at every node instead to attain the higher knowledge with lesser the deviation in the intrasubset class values down to every branch. The M5P model development has only three key steps, development of tree, pruning and smoothing. The basic tree model is developed by the dividing criteria, which gives the standard deviation of the class values that extent to the nodes. In this method, linear relationships were developed at every node. A very good tree structure is developed by this algorithm with higher prediction accuracy.

Random forest regression
The superiority of random forests is discussed in many hydrologic studies (Singh et al. 2017;Kumar and Sihag 2019;Sihag et al. 2019). Random forest, introduced by Breiman (2001), consists of a collection of regression trees trained using different bootstrap samples (bagging) of the training data. Each tree acts as a regression function on its own, and the final output is taken as the average of the individual tree outputs (Adusumilli et al. 2013). The method involves the utilization of randomly selected variables at each node to evolve a tree. In the bagging process, training set consists about two-third of data from the original training set is utilized for deriving the regression function, and thus about one-third of the total data left out from every tree grown constitutes the out-of-bag sample. These left-out training data were used to estimate prediction error and variable importance. The first step in the construction of a tree involves random selection of a bootstrap sample with replacement, and in the second step, a tree is designed using the selected bootstrap sample which requires the choice of a variable selection measure and a pruning method. The tree is grown to the maximum size and not pruned back. Thus, each time a regression tree is constructed using randomized selection of training sample from the original training data set, and an out-of-bag sample is used to test its accuracy. At each node, the best split is chosen among a randomly selected subset of tree (k) descriptors. The model setting parameters essential for random forest regression are the number of trees to be grown (k) in the forest and the number of features or variables selected (m) at each node to generate a tree (Breiman 2001).

Methodology
The discharge coefficient ( C d ) was considered as a function of dimensionless geometrical parameters and represented as the following general relationship, in which C d is the output parameter and six dimensionless geometrical variables were regarded as input parameters based on the current experimental study.
Two modelling techniques, M5 tree and random forest (RF) regression, are used in this study to estimate the values of discharge coefficient with the data sets obtained from both, trapezoidal and rectangular PK weirs. Both modelling techniques require the selection of suitable user defined parameters (or model specific parameters) which reflects the performance of a model based on the estimation accuracy of the output. Due to the availability of less no. of data with both type of PK weirs (36 observations each), a tenfold cross-validation is used in both modelling techniques in order to select the user defined parameters and generalization in modelling. Three statistical measures, coefficient of determination (R 2 ), root-mean-square error (RMSE) and mean absolute error (MAE) are used as criteria to test the performance of modelling techniques. In this study, a manual method of adjusting the values of user defined parameters is executed by carrying out several trials with these  Table 2.

Discussion of modelling results
To assess the usefulness of M5 tree and random forest regression in estimating discharge coefficient of piano key weirs, coefficient of determination (R 2 ), root-mean-square error (RMSE) and mean absolute error (MAE) values are used as model performance criteria. Six predictor input variables are used for discharge coefficient estimation. The predicted output values, obtained from both modelling techniques after setting user defined parameters presented in Table 2, are plotted with the actual experimental values of discharge coefficient ( C d ) for modelling analysis. The performance statistics using M5 and RF regression for both types of nonlinear weirs is summarized in Table 3. Table 4 comprises conditional equations generated by M5 model tree for rectangular and trapezoidal PK weir using the current data set. Scatter plots of both PK weirs are illustrated by Fig. 9 (M5 tree) and Fig. 10 (RF), respectively. It can be noted from Fig. 9a, b that the predicted values of discharge coefficient from M5 tree scatter more, particularly at lower and higher values, relative to random forest regression (Fig. 10). The prediction accuracy of M5 approaches in determining discharge coefficient of both types of PK weirs is inferior based on the performance tested by the statistical measures (Table 3). While, the estimated values of RF regression with both type of PK weir data sets lies closer to the line of agreement (Fig. 10), shows higher potential of the model in the estimation of this type of data than M5 tree approach. Table 3 supports this statement with the lower values of RMSE and MAE by RF regression in comparison with higher error values obtained from M5 tree approach. So based on statistical measures, the performance of RF regression is better than M5 tree in modelling the discharge coefficient values of PK weirs. Figure 11a, b displays the difference between experimental and estimated C d values (residuals) against observation number for trapezoidal and rectangular PK weir data sets, respectively. The residuals are found lower with RF regression models relative to M5 model tree approach which suggest improved performance by RF models over M5 tree model in the accurate approximations of discharge coefficient data of both type of PK weirs.

Conclusions
The present experimental investigation resulted in enhanced discharge efficiency with trapezoidal PK weirs in comparison with rectangular PK weirs having identical L/W ratio. The gain in discharge coefficient by trapezoidal PK weir relative to rectangular PK weir was observed in the range of 2-15%. The influence of weir height was observed positive in increasing the discharge capacity of both types of PK weirs due to limitation of early submergence of outlet keys with low height weirs, as observed in previous studies. In the current investigation, the impact of weir height is observed slightly stronger with trapezoidal PK weir than rectangular PK weir in affecting the hydraulic performance.
In determining the discharge coefficient, non-dimensional variables are used as input data to the random forest and M5 tree models. The modelling investigation on PK weirs in the estimation of discharge coefficient demonstrated superior performance by random forest regression than M5 model tree.