Introduction

Velocity distribution in open channels is a crucial aspect studied by hydraulic engineers and researchers due to its broad applicability in hydraulics. Precisely estimating velocity distribution is vital for various purposes, including understanding sediment transport, channel scouring, calculating stream discharge, and analyzing pollutant dispersion. Extensive research has been conducted to estimate velocity profiles in open channels, leading to the development of several analytical hydrodynamic models. These models are based on a simplified form of the Reynolds-averaged Navier–Stokes equations (RANS) and are developed to predict velocity distributions in open channels.

To approximate velocity profiles, the conventional log law proposed by Nikuradse (1950) is often used in the inner region (z < 0.2 h), where z represents the distance from the solid boundary, and h is the flow depth. However, the log law exhibits a relatively high error in the outer region (z > 0.2 h) (Nezu and Rodi 1986). In response to this limitation, Coles (1956) introduced a more accurate method known as the log-wake law, particularly suitable for wide open channels, when the wake strength parameter is properly selected (Nezu and Rodi 1986). The accuracy of the log law and the log-wake law has been extensively studied by numerous researchers using laboratory data, and corrections have been provided for both smooth and rough flows (Guo et al. 2005; Yang et al. 2004). Recent literature suggests various laws for turbulent velocity profiles in either smooth or rough bed flows (e.g. Guo and Julien 2003; Yang et al. 2004; Termini and Greco 2006; Liu and Ni 2007; Guo and Julien 2007). Many of these laws incorporate modifications of the log or wake law to represent velocity profiles accurately.

Taking measurements in open channels and rivers can indeed be challenging, especially during extreme events like floods when it may be impractical or unsafe to conduct direct measurements. This limitation has highlighted the necessity for developing accurate and reliable models for predicting velocity distribution. Furthermore, to ensure practicality and usability in engineering applications, these models should be relatively simple to implement. In response to these requirements, several analytical models have been developed based on a simplified form of the Reynolds-averaged Navier–Stokes equations. RANS-based models offer a balance between computational efficiency and accuracy, making them suitable for predicting velocity distribution in various types of channels. These analytical models take into account the channel geometry, roughness, and flow conditions to estimate the velocity distribution across the channel cross-section. While these analytical models simplify the complexity of flow physics, they are developed to offer reasonable accuracy and can be used for a wide range of practical engineering applications. Nevertheless, it is important to validate these models against real-world data to ensure their reliability and performance under different flow scenarios.

The channel bed and its roughness, free water surface, and irregularity of the channel cross-section cause the velocity distribution to be three-dimensional. Common one-dimensional models in hydraulics and river engineering, such as HEC-RAS, ISIS, FLUVIAL, and MIKE-11, cannot have the ability to solve velocity changes in two and three dimensions; they only calculate the average values of hydraulic parameters across the entire cross-section. Hydraulic models like FLOW-3D, FLUENT, and SSIIM can simulate velocity distribution, shear stress, and other parameters in 3D, providing comprehensive information on hydraulic variables at different points of the channel. However, these models also have limitations. The most significant limitation of these software applications is the extensive input data required and the lengthy runtime (Abril and Knight 2002). Various models have been proposed by researchers to estimate the two-dimensional distribution of velocity in the cross-sections of rivers. One significant approach in this regard was the two-dimensional flow velocity model based on the principles of entropy and probability, introduced by Chiu (1987). Although this concept has found application in some channels and rivers (e.g., Chen 1998; Farina et al. 2014), its computational complexity and the need for precise velocity distribution information have hindered its widespread use. Additionally, effective implementation of this model requires knowledge of the velocity magnitude and location in the river. Addressing these challenges, Maghrebi and Ball (2006) proposed a new model for two-dimensional velocity distribution using electromagnetic concepts. This model showed promising results in channels and rivers. However, solving the integrals in rivers remains complex and challenging. Stosic et al. (2016) presented a method for calculating the velocity and discharge field, utilizing interpolation techniques for the vertical velocity profile. This method also requires point-wise velocity measurements in the river during flood events, which can be problematic in practice.

The purpose of this paper is to present and validate a numerical model based on the finite volume method that predicts the distribution of longitudinal velocity in the cross-section of an open channel. In this study, the partial differential equation presented by Kean et al. (2009) has been utilized as a tool for solving the flow field for rectangular and trapezoidal channels. Eddy viscosity is one of the factors affecting the accuracy of predicting velocity distribution. In this paper, in addition to developing a two-dimensional numerical model for velocity estimation, the effect of different formulas for estimating turbulent viscosity on the results of the numerical model was investigated, and the best formula was selected. Also, the appropriate value for the momentum transfer coefficient in rectangular and trapezoidal channels was calculated.

Materials and methods

Governing equations

Under the assumption that the transversal and vertical velocities in open channels are negligible, and considering steady flow conditions, the Navier–Stokes equation takes the simplified form as follows (Pizzto 1991):

$$\uprho {\text{u}}\frac{{\partial {\text{u}}}}{{\partial {\text{x}}}} = \frac{{\partial {\text{p}}}}{{\partial {\text{x}}}} +\uprho {\text{gS}} + \frac{\partial }{{\partial {\text{y}}}}\left( {{\uprho \upnu }\frac{{\partial {\text{u}}}}{{\partial {\text{y}}}} +\uptau _{{{\text{yx}}}} } \right) + \frac{\partial }{{\partial {\text{z}}}}\left( {{\uprho \upnu }\frac{{\partial {\text{u}}}}{{\partial {\text{z}}}} +\uptau _{{{\text{zx}}}} } \right)$$
(1)

where u is the longitudinal velocity, p is the pressure, ν is kinematic viscosity of the fluid, ρ is the fluid density, g is the acceleration due to gravity, S is the bed slope, and τyx and τzx are shear stress components of the deviatoric stress tensor in the plane normal to the downstream component (x) in the cross-stream (y) and vertical (z) directions respectively. The shear stress component can be computed as:

$$\uptau _{{{\text{yx}}}} = {\uprho \upnu }_{t} \frac{{\partial {\text{u}}}}{{\partial {\text{y}}}},\; \uptau _{{{\text{zx}}}} = {\uprho \upnu }_{t} \frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}$$
(2)

where νt is the eddy viscosity. Substituting Eq. (2) into Eq. (1) gives:

$${\text{u}}\frac{{\partial {\text{u}}}}{{\partial {\text{x}}}} = {\text{g}}\frac{{\partial {\text{h}}}}{{\partial {\text{x}}}} + {\text{gS}} + \frac{\partial }{{\partial {\text{y}}}}\left( {\left( {\upnu +\upnu _{{\text{t}}} } \right)\frac{{\partial {\text{u}}}}{{\partial {\text{y}}}}} \right) + \frac{\partial }{{\partial {\text{z}}}}\left( {\left( {\upnu +\upnu _{{\text{t}}} } \right)\frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}} \right)$$
(3)

where h is water depth. Assuming that the velocity gradient in the flow direction is negligible, which means steady uniform flow is assumed, and considering that the flow in the open channels is turbulent and the kinematic viscosity of the fluid is negligible (ν << νt), Eq. (1) can be further simplified to:

$$\frac{\partial }{{\partial {\text{y}}}}\left( {\upnu _{{\text{t}}} \frac{{\partial {\text{u}}}}{{\partial {\text{y}}}}} \right) + \frac{\partial }{{\partial {\text{z}}}}\left( {\upnu _{{\text{t}}} \frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}} \right) = - {\text{gS}}$$
(4)

The turbulent viscosity is an essential variable in the numerical solution of the proposed mathematical model for 2D velocity distribution. It is a function of the flow and can be related to the flow characteristics through various formulas. One of the initial proposals for eddy viscosity was developed based on the mixing-length theory, which can be represented as follows:

$$\upnu _{{\text{t}}} =\upkappa {\text{hu}}_{*}$$
(5)

where κ is von Kármán's constant, which has a value of 0.408 (Long et al. 1993), h is the vertical distance from the bed, and u* represents the shear velocity. Yalin (1997) and Odgaard (1986) proposed the parabolic model for simulating flow and erosion in rivers, which can be expressed as follows:

$$\upnu _{{\text{t}}} =\upkappa {\text{h}}\left( {1 - {\text{h}}/{\text{H}}} \right){\text{u}}_{*}$$
(6)

where H is the characteristic flow depth. Nezu and Rodi (1986) proposed their model for eddy viscosity based on the log-wake law, and it can be expressed as follows:

$$\upnu _{{\text{t}}} =\upkappa {\text{h}}\left( {1 - {\text{h}}/{\text{H}}} \right)\left[ {{\text{H}}/{\text{h}} +\uppi \Pi \sin \left( {\uppi {\text{h}}/{\text{H}}} \right)} \right]^{ - 1} {\text{u}}_{*}$$
(7)

where Π is the wake strength parameter. Alawadi (2019) demonstrated that the value of Π is dependent on the shear Reynolds number and proposed the following equation:

$$\Pi = 0.1243\ln \left( {{\text{R}}_{{\text{e}}}^{*} } \right) - 0.7445$$
(8)

where \({\text{R}}_{{\text{e}}}^{*} = {\text{Hu}}_{*} /\upnu\) is the shear Reynolds number, \({\text{u}}_{*}\) is the shear velocity, and \(\upnu\) is the molecular viscosity. If \({\text{R}}_{{\text{e}}}^{*}\) is less than 400, the wake strength parameter (Π) is 0, and if it is greater than 2000, the parameter Π is 0.2.

Numerical model

A regular rectangular or unstructured triangular mesh is utilized for the numerical solution of the governing equations. An unstructured mesh does not have any fixed connectivity among its elements. A recent survey by Owen (1998) has shown that unstructured mesh generation has become more popular than structured techniques in most engineering applications, due to the flexibility and power they possess over structured generators when the object domain is complicated and irregular. These methods also facilitate the process of generating variable size elements from densities specified at random points, which are usually the end product of the error estimation process in adaptive remeshing (El-Hamalawi 2004). A mesh vertex finite volume method is developed for Eq. (4) over an unstructured triangular control volume, as illustrated in Fig. 1. The software EasyMesh is used to generate unstructured triangular meshes across the computational domain. EasyMesh is a simple two-dimensional, unstructured, Delaunay triangulation mesh generator, developed by Bojan Niceno of The Delft University of Technology.Footnote 1 In this mesh, the unknown variables are placed at the center of the vertices of a cell, and the control volume takes the form of an irregular shape that surrounds the corresponding vertex.

Fig. 1
figure 1

The Two-dimensional control volume

By integrating Eq. (4) over the area of the control volume, one can obtain the following expression:

$$\mathop \int \limits_{{\Omega_{{\text{i}}} }}^{ } \left[ {\frac{\partial }{{\partial {\text{y}}}}\left( {\upnu _{{\text{t}}} \frac{{\partial {\text{u}}}}{{\partial {\text{y}}}}} \right) + \frac{\partial }{{\partial {\text{z}}}}\left( {\upnu _{{\text{t}}} \frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}} \right)} \right]{\text{d}}\Omega = - \mathop \int \limits_{{\Omega_{{\text{i}}} }}^{ } {\text{gSd}}\Omega$$
(9)

The first integral on the left-hand side of Eq. (9) can be written as:

$$\mathop \int \limits_{{\Omega_{{\text{i}}} }}^{ } \left[ {\frac{\partial }{{\partial {\text{y}}}}\left( {\upnu _{{\text{t}}} \frac{{\partial {\text{u}}}}{{\partial {\text{y}}}}} \right) + \frac{\partial }{{\partial {\text{z}}}}\left( {\upnu _{{\text{t}}} \frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}} \right)} \right]{\text{d}}\Omega = \mathop \int \limits_{{\Omega_{{\text{i}}} }}^{ }\upnu _{{\text{t}}} \left( {\nabla \cdot {\vec{\text{E}}}} \right){\text{d}}\Omega$$
(10)

where Ω is two-dimensional domain, and \({\vec{\text{E}}} = \frac{{\partial {\text{u}}}}{{\partial {\text{y}}}}{\text{i}} + \frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}{\text{j}}\).

Using the divergence theorem, Eq. (10) can be replaced by a line integral around the control volume. Thus, Eq. (9) becomes:

$$\mathop {\oint }\limits_{{\Gamma_{{\text{i}}} }}^{ }\upnu _{{\text{t}}} \left( {{\vec{\text{E}}} \cdot {\vec{\text{n}}}} \right){\text{d}}\Gamma = - \mathop \int \limits_{{\Omega_{{\text{i}}} }} {\text{gSd}}\Omega$$
(11)

where Γi is the boundary of the ith control volume, n is the unit vector normal to the boundary, and \({\vec{\text{E}}} \cdot {\vec{\text{n}}}\) is the normal flux at the edge of a control volume. Integrating Eq. (11) over a control volume with m edges yields:

$$\upnu _{{\text{t}}} \mathop \sum \limits_{{{\text{k}} = 1}}^{{{\text{k}} = {\text{m}}}} \left( {{\vec{\text{E}}}_{{\text{i}}} \cdot {\vec{\text{n}}}_{{\text{i}}} } \right)_{{\text{k}}} {\Delta }\Gamma_{{{\text{i}},{\text{k}}}} = - {\text{gS}}\Omega_{{\text{i}}}$$
(12)

In which:

$${\vec{\text{E}}} \cdot {\vec{\text{n}}} = \frac{{\partial {\text{u}}}}{{\partial {\text{y}}}}{\text{n}}_{{\text{y}}} + \frac{{\partial {\text{u}}}}{{\partial {\text{z}}}}{\text{n}}_{{\text{z}}}$$
(13)

where ny and nz are the components of the unit normal in the y and z directions, respectively. The unit outward normal vector on this edge defined as follows:

$${\vec{\text{n}}} = \frac{{\Delta {\text{y}}}}{{\sqrt {\Delta {\text{x}}^{2} + \Delta {\text{y}}^{2} } }}{\text{i}} - \frac{{\Delta {\text{x}}}}{{\sqrt {\Delta {\text{x}}^{2} + \Delta {\text{y}}^{2} } }}{\text{j}}$$
(14)

The components of the unit normal in the y and z directions can be calculated as

$${\text{n}}_{{\text{x}}} = \frac{{\Delta {\text{y}}}}{{\sqrt {\Delta {\text{x}}^{2} + \Delta {\text{y}}^{2} } }},\;{\text{ny}} = \frac{{ - \Delta {\text{x}}}}{{\sqrt {\Delta {\text{x}}^{2} + \Delta {\text{y}}^{2} } }}$$
(15)

Δx and Δy are the horizontal and vertical distance between the starting and ending point of the edges. By defining a local coordinate system according to Fig. 2, the normal flux at the face of the ith control volume can be calculated as:

$$\left( {{\vec{\text{E}}}_{{\text{i}}} \cdot {\vec{\text{n}}}_{{\text{i}}} } \right)_{{\text{k}}} = \frac{{{\text{u}}_{{\text{k}}} - {\text{u}}_{{\text{i}}} }}{{\Delta {\text{r}}}}$$
(16)
Fig. 2
figure 2

Global coordinate system (x,y) and local coordinate system (r,s)

where Δr is the distance from the centroid of the control volume i to its neighboring cell k, this distance is used to account for the spatial difference between the neighboring control volumes in the numerical calculations.

Substitution of values of the normal flux for the entire face of the ith control volume into Eq. (12) yields the following equation for the longitudinal velocity:

$${\text{a}}_{0} {\text{u}}_{{\text{i}}} + \mathop \sum \limits_{{{\text{k}} = 1}}^{{\text{m}}} \left( {{\text{a}}_{{\text{k}}} {\text{u}}_{{\text{k}}} } \right)_{{\text{i}}} = {\text{RH}}_{{\text{i}}}$$
(17)

In which

$${\text{RH}}_{i} = - {\text{gS}}\Omega_{{\text{i}}} /\upnu _{{\text{t}}}$$
(18)
$${\text{a}}_{{\text{k}}} = \left( {\frac{{{\Delta }\Gamma }}{{{\Delta r}}}} \right)_{{\text{k}}} ,\;{\text{a}}_{0} = - \mathop \sum \limits_{{{\text{k}} = 1}}^{{\text{m}}} \left( {\frac{{{\Delta }\Gamma }}{{{\Delta r}}}} \right)_{{\text{k}}}$$
(19)

The Gauss–Seidel iteration method is a highly popular classical iteration algorithm for solving linear systems of equations used in this research to solve Eq. (10). The volume flow rate passing through a control volume is calculated by multiplying the flow velocity by the area of control volume.

Boundary conditions

A zero-velocity gradient can be used at the free surface, (i.e. \(\partial {\text{u}}_{{\text{r}}} /\partial {\text{r}} = 0\)), In this case the fluxes passing through a face of the control volume that is on the free surface water is considered zero, and the normal flux for other faces of boundary control volume are calculated as the inner faces. Near a rigid wall, there exists a thin viscous sublayer for smooth walls, while roughness elements on a rough wall significantly affect the flow. Simulating flows near a wall can be computationally expensive due to the high-velocity gradient present in that region. As an alternative, a wall-function approach is often employed.

In this approach, the first grid point (denoted as P) next to the rigid wall is positioned above the roughness elements. The flow velocity at point P is related to the shear velocity on the wall,\({\text{ u}}_{*} = \sqrt {{\text{gRS}}}\), and it is defined as:

$${\text{u}}_{{\text{P}}} = \frac{{{\text{u}}_{*} }}{\upkappa }{\text{ln}}\left( {{\text{Ey}}_{{\text{p}}}^{ + } } \right)$$
(20)

In which:

$${\text{y}}_{{\text{p}}}^{ + } = {\text{u}}_{*} {\text{y}}_{{\text{p}}} /\upnu$$
(21)

where yp is the distance from the cell center P to the wall, ν is the molecular viscosity, and E is a roughness parameter. For a smooth wall, E is approximately 8.43. On the other hand, for a rough wall, E is related to the roughness Reynolds number, \({\text{k}}_{{\text{s}}}^{ + } = {\text{u}}_{*} {\text{k}}_{{\text{s}}} /\upnu\), as proposed by Cebeci and Bradshaw (1977):

$${\text{E}} = {\text{exp}}\left[ {\upkappa \left( {{\text{B}}_{0} - \Delta {\text{B}}} \right)} \right]$$
(22)

where ks is the roughness height on the wall, B0 is an additive constant of 5.2, and ΔB is defined as:

$$\Delta {\text{B}} = \left\{ {\begin{array}{*{20}l} 0 \hfill & {{\text{k}}_{{\text{s}}}^{ + } < 2.25} \hfill \\ {\left( {{\text{B}}_{0} - 8.5 + \frac{1}{\upkappa }\ln {\text{k}}_{{\text{s}}}^{ + } } \right)\sin \left[ {0.4258\left( {\ln {\text{k}}_{{\text{s}}}^{ + } - 0.811} \right)} \right]} \hfill & {2.25 \le {\text{k}}_{{\text{s}}}^{ + } < 90} \hfill \\ {{\text{B}}_{0} - 8.5 + \frac{1}{\upkappa }\ln {\text{k}}_{{\text{s}}}^{ + } } \hfill & {{\text{k}}_{{\text{s}}}^{ + } \ge 90} \hfill \\ \end{array} } \right.$$
(23)

Manning’s formula is widely used in open channels engineering applications. Strickler (1923) proposed the following empirical correlation for the Gauckler–Manning coefficient, nm:

$${\text{n}}_{{\text{m}}} = 0.041{\text{k}}_{{\text{s}}}^{1/6}$$
(24)

Near-wall regions have larger gradients in the solution variables, and momentum occur most vigorously. The wall \({\text{y}}_{{\text{p}}}^{ + }\) is often used in CFD to describe how coarse or fine a mesh is for a numerical simulation. Values of \({\text{y}}_{{\text{p}}}^{ + }\) close to 30 are most desirable for wall functions. In this research, the mesh size was chosen so that y+ was about 30 (Gerasimov 2006).

Collected experimental datasets

To determine the optimal value of the momentum transfer coefficient of eddy viscosity and validate the developed numerical model, laboratory data from Guy (1966), Tominaga et al. (1989), and Alawadi (2019) were used.

Guy (1966) conducted studies on a rectangular flume with a width of 2.44 m and a length of 45.72 m to investigate flow resistance, sediment transport rates, and velocity profiles. The discharge varied between 84.67 and 622.4 l/s, and the channel slope varied from 0.000055 to 0.00229. Velocity-profile data at specific vertical locations in the flow were obtained using a standard Prandtl pitot tube.

The second set of data was taken from Tominaga et al. (1989) for the present analysis. The cross-section of the channel was trapezoidal, and the sidewalls had inclinations of 30°, 46°, and 58° to the vertical. The discharge ranged from 2.72 to 10.55 l/s, and the channel slope varied from 0.000389 to 0.00138. The flow in each channel was found to be subcritical.

In the experiment conducted by Alawadi (2019), the channel's cross-section was rectangular with a width of 0.3 m and a fixed-bed slope of 0.0005. The discharge varied between 3.12 and 21.17 l/s. The data collected from these studies were used to test the developed model, and a summary of the data is provided in Table 1.

Table 1 Summary of geometric and hydraulic characteristics of the experimental data

Results and discussion

In the present study, the turbulent eddy viscosity was computed based on the mixing-length theory, the parabolic model, and the log-wake law. The model's velocity distributions were compared with the laboratory data from Guy (1966). Figure 3 shows the comparison between the predicted and measured velocity distributions along the centerline (x = 1.22 m vertical line) and the vertical line x = 1.83 m for Run 1.

Fig. 3
figure 3

Comparison of velocity profiles computed by the present model based on different eddy viscosity formulas

To assess the model's performance, a comparison was made between the observed and computed values using the mean absolute percentage error (MAPE) and the root mean square error (RMSE) as the evaluation metric.

$${\text{MAPE}} = \frac{100}{{\text{N}}}\mathop \sum \limits_{{{\text{i}} = 1}}^{{{\text{i}} = {\text{N}}}} \left| {\left( {{\text{u}}_{{\text{o}}} - {\text{u}}_{{\text{c}}} } \right)/{\text{u}}_{{\text{o}}} } \right|_{{\text{i}}}$$
(25)
$${\text{RMSE}} = \sqrt {\frac{1}{{\text{N}}}\mathop \sum \limits_{{{\text{i}} = 1}}^{{{\text{i}} = {\text{N}}}} \left( {{\text{u}}_{{\text{o}}} - {\text{u}}_{{\text{c}}} } \right)_{{\text{i}}}^{2} }$$
(26)

where N is the number of observations available for analysis, uo and uc represents the observed and computed distributions of the velocity, respectively. The lower limit for the MAPE and RMSE are zero, indicating the most accurate simulation. The mean absolute percentage errors in computed velocity were 32%, 19%, and 15%, and the root mean square errors were 0.29, 0.21 and 0.16, respectively, for the developed model based on the mixing length, parabolic, and Nezu and Rodi's formula for eddy viscosity. As evident, the calculated velocity profiles significantly differ from the observations, and the method used to calculate the eddy viscosity has a significant impact on the accuracy of the numerical model. Some research results (e.g., Van Prooijen et al. 2005) suggest that the eddy viscosity can be modeled as the product of a typical length and velocity scale, which allows it to be expressed as:

$$\upnu _{{\text{t}}} = \upalpha \upkappa {\text{hu}}_{*}$$
(27)

where α is defined as the momentum transfer coefficient, and h is the distance above the channel bed. The accurate prediction of velocity distribution depends on properly estimating the momentum transfer coefficient in the model. To investigate the effect of α on the accuracy of the numerical model, Run 1 was conducted using the numerical model with different values of the momentum transfer coefficient, and the results were compared with the experimental data. Figure 4 shows the calculated velocity profiles for different values of the momentum transfer coefficient and the observed data for Run 1.

Fig. 4
figure 4

The effect of the momentum transfer coefficient on the simulation of the velocity profile

As observed, the value of α significantly influences the accuracy of the results. Decreasing the momentum transfer coefficient reduces flow turbulence and shifts the velocity profile to the right.

Optimal value of the momentum transfer coefficient

To determine the optimal value of α, the velocity distribution and flow rate data from Table 1 were utilized. By varying the value of α between 0.1 and 1, the optimal value was determined for each experiment by minimizing the objective function, as follows:

$${\text{Minimize}}:{\text{OF}} = \left| {{\text{Q}}_{{\text{o}}} - {\text{Q}}_{{\text{c}}} } \right|/{\text{Q}}_{{\text{o}}} + 1/{\text{n}}\mathop \sum \limits_{{{\text{i}} = 1}}^{{\text{n}}} \left| {\left( {{\text{u}}_{{\text{o}}} - {\text{u}}_{{\text{c}}} } \right)/{\text{u}}_{{\text{o}}} } \right|_{{\text{i}}}$$
(28)

where OF represents the objective function, and Qo and Qc are the observed and computed flow discharges, respectively. The values of the objective function for different experiments are presented in Fig. 5. It can be observed that the minimum and maximum values of the objective function are 0.03 and 0.23, respectively.

Fig. 5
figure 5

The objective function value for different experiments

Figure 6 illustrates the optimal values of the momentum transfer coefficient for each experiment. The maximum and minimum optimal values of α for the tests are 0.28 and 0.202, respectively. The average optimal value of α is approximately 0.241 (Fig. 6).

Fig. 6
figure 6

The optimal values of α for different experiments

In this research, based on the mixing-length theory and by calibrating the momentum transfer coefficient, Eq. (29) is proposed to calculate the eddy viscosity in wide channels:

$$\upnu _{{\text{t}}} = 0.241\upkappa {\text{hu}}_{*}$$
(29)

Verification of the numerical procedure

Utilizing Eq. (29) to calculate the turbulence viscosity, the velocity distributions, and flow discharge were computed for the experiments. The mean absolute percentage error in estimating the velocity distribution and flow discharge for all tests are 7.6% and 6.8%, and the root mean square errors are 0.093 and 0.081, respectively. Figure 7 displays the predicted and measured distributions of velocity in rectangular and trapezoidal channel sections. In the 2D velocity profile plots, the symbol ‘+’ represents experimental values.

Fig. 7
figure 7

Velocity samples and computed velocity distribution for different experiments

The measured and estimated one-dimensional (1D) axial velocity profiles were compared in Figs. 8 and 9 for the trapezoidal channel section.

Fig. 8
figure 8

Velocity distribution on the y-axis using the present model for the trapezoidal channel (RUN-14)

Fig. 9
figure 9

Velocity distribution on the y-axis using the present model for the trapezoidal channel (RUN-16)

The mean absolute percentage error in estimating the velocity distribution for RUN-14 and 17 are 3.6% and 4.8%, and and the root mean square errors are 0.051 and 0.062, respectively. The calculated discharge for RUN-14 and 16 is equal to 10.83 and 9.71 l/s, respectively, which has a 2.7 and 2.5% error with its actual value. The measured and estimated one-dimensional (1D) axial velocity profiles for the middle of the rectangular channels (RUN-1 and 12) were compared in Fig. 10.

Fig. 10
figure 10

Velocity distribution on the y-axis using the present model for the rectangular channels

The mean absolute percentage error in estimating the velocity distribution for RUN-1 and 12 are 6.5% and 7.3%, and the root mean square errors are 0.073 and 0.083, respectively. Using the numerical model, the maximum velocity and flow discharge were calculated for all experiments and compared with the observational data according to Fig. 11. As can be seen, the error of the numerical model in calculation of the maximum velocity and discharge is less than 10% and 8%, respectively.

Fig. 11
figure 11

Computed values of the maximum velocity and discharge and observed ones for the laboratory data

Conclusion

A model has been presented for the calculation of discharge and velocity distribution on a cross-section of an open channel. This study employs the finite volume method and an unstructured triangular mesh to numerically solve the simplified Navier–Stokes equations.

An important parameter affecting the accuracy of the presented numerical model is the method used to estimate turbulent viscosity. In this model, turbulent eddy viscosity is computed using the mixing-length theory, the parabolic model, and the log-wake law. Computational velocity distributions are compared with observational data. Results indicate that the accuracy of the numerical model is compromised when these turbulence models are applied. The precision of the developed model for calculating two-dimensional velocity distribution hinges on the momentum transfer coefficient in the eddy viscosity formula. The optimal value of this coefficient, determined by minimizing the objective function, is approximately 0.241. The model's validity is tested against published experimental data from both rectangular and trapezoidal channels. The mean absolute percentage error in estimating velocity distribution and flow discharge for all tests is 7.6% and 6.8%, respectively. This developed model holds potential for broader application in simulating flows within straight rectangular and trapezoidal channels. Consequently, it offers a valuable approach for predicting two-dimensional velocity distribution across a cross-section.