Uncertainty analysis of discharge coefficient of circular crested weirs

The circular crested weir (CCW) has been introduced as weirs having a high discharge coefficient (Cd). The ratio of flow head to the radius of the crest (H/R) is the most important parameter affecting the Cd, that the Cd≈aH/Rb\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\text{Cd}} \approx a\left( {H/R} \right)^{b}$$\end{document} can mathematical model their relation. In this study, the parameters of the Cd formula (i.e., a and b) were uncertainty analyzed using Monte Carlo (MC) and Bootstrap methods (BM). To perform these methods, some of the built-in functions of Excel software were utilized. The results declared that the average values of a and b were 1.187 and 0.140. The outcome of the MC method showed that the range of a and b at 95% confidence interval changed between 1.179 to 1.194 and 0.134 to 0.146, respectively, while at the same confidence interval the BM ranged from 1.187 to 1.200 and 0.133 to 0.147.


Introduction
Flow measurement structures are the main inseparable parts of irrigation and drainage projects. Weirs are the well-known hydraulic structures for measuring the discharge of flow. In addition to flow measurement weirs used to adjust the surface water level (Vatankhah 2012;Vatankhah 2010;Vatankhah and Khalili 2017). Weir when used on a large scale (dam projects) named spillway, have different components such as guide walls, approach channel, crest, chute, and energy dissipaters (Dehdar-behbahani and Parsaie 2016; . Of course, it is worth mentioning that in watershed projects, most time weirs are used as a dam. In other words, the weir body can be the same as the dam body. These weirs, in addition to flow measurements, have great potential for depositing sediments (Parsaie et al. 2017a, b). Up to now, several types of weirs have been proposed such as labyrinth weir (Kabiri-Samani et al. 2013;Parvaneh et al. 2016), piano key weir (Kabiri-Samani and Javaheri 2012; Ribeiro et al. 2012), duckbill weir (Tajari et al. 2018), circular crested weir (Haghiabi 2012;Haghiabi et al. 2018;Heidarpour et al. 2008). The operating conditions and the Cd are the most important factors that are considered in selecting the type of weirs. The terms of operation condition mean that weirs are used with or without gates. If the goal is better management of the water level in the dam's reservoir or the upstream channel using the gate installed on the weir, the labyrinth and piano key weirs no longer can be chosen. After the operation conditions, the Cd is the most important factor for choosing the type of weir. In the design of weirs, the Cd determines the elevation and length of the crest and the height of sidewalls, as well. Nowadays, a different type of circular crested weirs such as cylinder , circular Schmocker et al. 2011

Materials and method
The sketch of the CCW is shown in Fig. 1. As shown in this figure, the curvature of the crest is defined via R. The slope of upstream and downstream ramps are defined with Φ 1 and Φ 2 . In this figure, P is the height of weir, y up and H are the depth and head of flow over the crest at upstream, respectively. y 1 and y 2 are the conjugate depths of hydraulic jump at downstream of the CCW.
The data related to Cd of the CCW and detail of tested laboratory models have been collected from Mohammadzadeh- Habili et al. (2013). The curve of the Cd of the CCW is shown in Fig. 2. The mathematical form of the Cd versus of relative upstream head (H/R) is presented in Eq. 1. In this study, using the MC and BM at 95% of confidence interval the variation of parameters of Eq. 1(i.e., a and b) are derived.

Uncertainty analysis techniques
The Monte Carlo method (or Monte Carlo simulation) refers to any technique that provides approximate answers for quantitative issues through statistical sampling. The MC simulation is further used to describe a method for releasing uncertainties in model inputs to uncertainties in model outputs. Therefore, the MC is a simulator that explicitly and quantitatively represents uncertainty. The MC simulation relies on the process of explicit uncertainty representation by specifying inputs as probability distributions. To calculate the distribution of the predicted efficiency probability, input uncertainties need to be transferred to the output uncertainties. There are various methods for transferring uncertainty. The MC simulation is probably the most commonly used technique for releasing uncertainties in various aspects of a system's performance. In the MC simulation, the whole system runs over many times (e.g., 1000 times). Each simulation is called the realization of the system. For each realization, all non-deterministic parameters are sampled (i.e., a random value of the specific distribution for each parameter is selected). The system is then simulated over time (with a given set of input parameters) so that system performance can be calculated. The results will be possible in the form of possible distributions of possible outputs. As a result, outputs are not single values, but the distribution of probabilities. The BM is similar to the MC. The MC is developed on a probability distribution of variables, while the BM has Fig. 1 The sketch of the circular crested weir and its hydraulic and geometric parameters no assumption on the probability distribution of a variable and thus has no limits on sampling size (Hu et al. 2015).

Stepwise application of the Monte Carlo and Bootstrap methods
To use Excel to perform the MC simulations, the following steps will be considered. Firstly, the observed data related to independent (in this study: H/R) and dependent (Cd) variables are sorted in Excel. In this study, the observed data including H/R and Cd were sorted in columns A and B in a worksheet. Then, the mathematical model (Eq. 1) is written next to the output column (Cd) (column C). Using the solver excel the coefficients of the mathematical model are justified. This is accomplished by minimizing the error value between the measured values and the mathematical model results. This operation is called model calibration. After calibration of the model, uncertainty analysis will begin. Next to the column of the mathematical model, random numbers are generated. This is done with the following command.
where Cd rg : randomly generated values of Cd, $I8 refers to the column of results of the mathematical model. SSE is the sum of squared residuals that is calculated by SUMXMY2 in excel. Notably, the SSE is calculated in the model calibration stage. df is the degree of freedom that is equal to the number of measurements mines of the number of parameters. The RAND command is used to produce random numbers. This operation is performed for all observations and is repeated (2) for 100 next columns. This process is performed only for 100 columns since the excel solver in the noncommercial version only can solve problems including 200 variables. Then, using the Excel solver and based on the same equation (Eq. 1), the mathematical model is fitted on these columns (generated data). After, that coefficients of fitted models are derived (a and b). This process is shown in Fig. 3. To use BM for resampling, firstly the difference between the observed data and model results should be prepared. The process of resampling using BM is shown in Fig. 4. The resampling formula used in the BM is given in Eq. 3.

Results and discussion
In this section, the results of the uncertainty analysis of the parameters of the Cd of the CCW are presented. As given in the materials and method section, the MC and BM were applied for this purpose. The stepwise of application of both methods for one simulation is shown in Figs. 3 and 4. As stated, in a simulation, 100 columns of simulate data are generated. In this study, more than ten times the process was implemented, and more than one thousand data for each of the parameters (a and b) has been obtained. The 95% confidence interval obtained from both uncertainty analysis methods were calculated for each observed data. The results of (3) Fig. 3 The process of uncertainty analysis of Cd based on the MC method of circular crested weirs the calculation of 95% confidence interval for the Cd curve are shown in Fig. 5. In this figure, the results of MC and BM are shown separately. As shown in this figure, by increasing the H/R the bound of confidence interval is increased. This is due to increased data dispersion and reduced measurement accuracy in experiments. The comparison of the results of the MC method with BM shows that the MC method calculates a wider range for confidence intervals. This is due to the use of normal distribution in generating data. The BM seems to be better than the MC method in calculating the confidence interval. In these figures, the fitted mathematical model having the a and b parameters equal to 1.

Conclusion
In this study, the uncertainty analysis was performed on the parameters of the Cd of circular crested weirs. The Cd of CCW is proportional to relative upstream head (H/R). For this purpose, the two of the most popular methods of uncertainty analysis, including MC and BM were used. The dataset of the Cd of CCW was collected from the literature. This paper discusses how to use both methods step by step in Excel software. In this way, the necessary functions were written. The mathematical formula proposed for the prediction of the Cd was calibrated using Excel's Solver. Achieved results declared that MC and BM can be used to estimate the parameter uncertainties. Due to the high utilization of Excel software in engineering and environmental problems, it is suggested that, in curve fitting problems, be sure to use uncertainty analysis methods to provide additional information.
Funding There is no funding source.

Compliance with Ethical Standards
Conflict of interest The authors declare that they have no conflict of interest.
Ethical approval This article does not contain any studies with human participants or animals performed by any of the authors.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.