# Using two soft computing methods to predict wall and bed shear stress in smooth rectangular channels

- 539 Downloads

## Abstract

Two soft computing methods were extended in order to predict the mean wall and bed shear stress in open channels. The genetic programming (GP) and Genetic Algorithm Artificial Neural Network (GAA) were investigated to determine the accuracy of these models in estimating wall and bed shear stress. The GP and GAA model results were compared in terms of testing dataset in order to find the best model. In modeling both bed and wall shear stress, the GP model performed better with RMSE of 0.0264 and 0.0185, respectively. Then both proposed models were compared with equations for rectangular open channels, trapezoidal channels and ducts. According to the results, the proposed models performed the best in predicting wall and bed shear stress in smooth rectangular channels. The obtained equation for rectangular channels could estimate values closer to experimental data, but the equations for ducts had poor, inaccurate results in predicting wall and bed shear stress. The equation presented for trapezoidal channels did not have acceptable accuracy in predicting wall and bed shear stress either.

## Keywords

Shear stress Rectangular channel Genetic Algorithm Artificial neural network## Introduction

Awareness of shear stress values along the wetted perimeter of channels is very important in solving engineering problems such as sedimentation and deposition also planning stable channels. To study channel migration or to prevent bank erosion, awareness of wall shear stress is required. The effective parameters in shear stress values are the channel geometry, secondary flows and the channel wall and bed roughness recognized through numerous experimental studies (Knight 1981; Tominaga et al. 1989; Knight and Sterling 2000; Atabay et al. 2004; Seckin et al. 2006). Based the division channel into two subsections, the channel bed and sidewall, by Einstein (1942), many researchers used this idea for estimating bed and wall shear stress, e.g., Lundgren and Jonsson (1964), Yang and Lim (2005), Khodashenas and Paquier (2002) and Yang (2005). The shear stress distribution in circular and trapezoidal channels was investigated using Shannon entropy-based power law by Sheikh and Bonakdari (2015). Bonakdari et al. (2015a, b) presented a new method of estimating the bed and wall shear stress along a wetted perimeter in open channels based on Tsallis entropy concept. The use of soft computing methods to solve complicated problems in hydraulic fields is expanding (Nagy et al. 2002; Cigizoglu 2004; Giustolisi and Laucelli 2005; Alp and Cigizoglu 2007). Cobaner et al. (2010) predicted the percentage of shear force in smooth rectangular channels and ducts using artificial neural networks (ANN). Huai et al. (2013) utilized the ANN method for estimating apparent shear stress in compound channels. The percentage of shear force carried by walls was modeled using genetic programming (GP) and Genetic Algorithm Artificial Neural Network (GAA) in rectangular channels with smooth and rough boundaries by Sheikh Khozani et al. (2016a, b).

In this study, two different soft computing methods GP and GAA were extended in order to estimate mean wall and bed shear stresses in smooth rectangular channels. The two models were explained systematically, and in each stage, the best condition with the lowest error was selected after that the best GP or GAA model with highest precision was selected. In order to recognize the abilities of the proposed models, they were compared with equations presented by other researchers for rectangular channels, trapezoidal channels and ducts.

## Materials and methods

### Data description used

In order to predict the mean bed and wall shear stress in smooth rectangular channels, the experimental results of Cruff (1965), Ghosh and Roy (1970), Kartha and Leutheusser (1970), Myers (1978), Knight and Macdonald (1979), Knight (1981), Noutsopoulos and Hadjipanos (1982), Knight et al. (1984) and Seckin et al. (2006) were used. Different flumes with rectangular cross sections and several aspect ratios (*B*/*h*) were employed in their experiments to estimate the mean bed shear stress and wall shear stress. Several equations were extracted from the researchers’ results that can estimate shear stress in the bed and wall of a channel.

*B*the channel width,

*h*the water depth, \(\rho\) the fluid density and \(\% SF_{w}\) the total shear force carried by the walls calculated as:

*SF*

_{ w }and the wetted perimeter ratio,

*P*

_{ b }

*/P*

_{ w }, Flintham and Carling (1988) introduced a general equation for trapezoidal channels in the following form:

*C*

_{ 1 }

*, C*

_{ 2 }and

*C*

_{ 3 }are coefficients, and the limiting case is fixed by defining %

*SF*

_{ w }= 100% for

*P*

_{ b }

*/P*

_{ w }= 0, then one constant is eliminated. Hence,

*T*is the width of the water surface and

*θ*is the sidewall angle.Knight and Patel (1985) calculated boundary shear stress distributions in fully developed turbulent flows in smooth rectangular ducts and extracted the following equation:

### Genetic Algorithm-based artificial neural network

The hybrid Genetic Algorithm (GA) and Multi-Layer Perceptron (MLP) artificial neural network were used in this study to calculate rectangular smooth channel wall and bed shear stresses. The MLP neural network is made from layers, which are input, hidden and output layers. The input layer receives input variables from the user and transfers them to the hidden layers. The hidden layer receives data from the input layer and after a nonlinear transformation, prepares appropriate information for the output layer. The output layer collects the previous layer’s output and presents the MLP procedure results to the user. Each layer consists of some neurons. The input layer has the same number of neurons as the input variables of the model. In the present study, there is one input variable, B/H, so the input layer in the current MLP has only one neuron. The output layer has the same number of neurons as output variables of the model. General MLP models consider one output variable. Therefore, there is one neuron in the output layer.

The Levenberg–Marquardt Algorithm (LMA) (Levenberg 1944) is used to train the considered MLP methods. The LMA has a random behavior in the determination of network weights and biases. Therefore, it is probable for a good MLP to be ignored in the GA process due to bad luck in the LMA procedure. As a result, modification is required in the GA optimization method. As shown in Fig. 1, in the modified GA, each individual (MLP) of the elite population is trained several times by the LMA to find the most appropriate result of the considered individual. After that, the best result of each individual is saved as its cost. By using this simple modification, the GA algorithm can successfully overcome the random nature of the LMA.

### Genetic programming

GP properties

Parameter name | Parameter specification |
---|---|

Population size | 500 |

Mutation frequency | 93% |

Crossover frequency | 50% |

Number of replication | 10 |

Block mutation rate | 30% |

Instruction mutation rate | 30% |

Instruction data mutation rate | 40% |

Homologous crossover | 95% |

### Model performance

*δ*%. The root mean square error can be calculated by:

*x*

_{ ip }is the mean wall or bed shear stress predicted by the models,

*x*

_{ im }is the value of wall or bed shear stress obtained from the experimental results, and

*n*is the number of observations. Mean square error (MSE), MAE based on mean absolute error and average absolute deviation (

*δ*%) were also investigated. The results of comparing the models in each step as well as comparing the models with other methods were found and tabulated in different tables for each step. The other statistical parameters employed are defined as:

## Results

### Fitness function selection

Considering the aspect ratio as input data, two different fitness functions were investigated to select the best one for modeling the mean wall and bed shear stress. The test dataset results are reported in Table 1. In modeling dimensionless mean wall shear stress with the GAA model, MAE performed better with RMSE of 0.0305 than MSE with RMSE of 0.0402. When the dimensionless mean wall shear stress was modeled with the GP model, the MSE showed better function than MAE did, with fitness functions of RMSE of 0.0276 and 0.0306, respectively. It is obvious in Table 1 that in modeling \(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) the GP model performed better than the GAA model, with lower statistical parameter values.

*δ*% = 2.3751 had better accuracy than the MAE fitness function with

*δ*% = 2.6714 for the testing dataset. The GP model with MAE as a fitness function presented lower error with RMSE of 0.0218 than the MSE fitness function with RMSE of 0.0276. Overall, in modeling \(\frac{{\overline{\tau }_{b} }}{\rho ghS}\) the GP model with MAE fitness function had better accuracy than the GAA model with MSE fitness function.

Measured errors for different fitness functions for the testing dataset

Fitness functions | Variables | GAA | GP | ||||
---|---|---|---|---|---|---|---|

RMSE | MAE | | RMSE | MAE | | ||

MSE | \(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) | 0.0402 | 0.0324 | 5.6952 | 0.0276 | 0.0219 | 3.843 |

\(\frac{{\overline{\tau }_{b} }}{\rho ghS}\) | 0.0229 | 0.0173 | 2.3751 | 0.0231 | 0.0178 | 2.4058 | |

MAE | \(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) | 0.0305 | 0.0240 | 4.2106 | 0.0306 | 0.0249 | 4.4187 |

\(\frac{{\overline{\tau }_{b} }}{\rho ghS}\) | 0.0258 | 0.0194 | 2.6714 | 0.0218 | 0.0151 | 2.0423 |

### Selection of the best transfer function

In the final step of GAA modeling, the appropriate transfer functions were investigated. Two commonly used types of sigmoid transfer functions are the logarithmic transfer function (Eq. 14) and hyperbolic tangent transfer function (Eq. 15). In this study, the logarithmic and hyperbolic tangent transfer functions were examined for the hidden layers and the linear transfer function (Eq. 13) was used for the output layer.

Statistical parameter values of transfer function selection for the testing dataset

Hidden layer transfer function | Output layer transfer function | \(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) | \(\frac{{\overline{\tau }_{b} }}{\rho ghS}\) | ||||
---|---|---|---|---|---|---|---|

RMSE | MAE | | RMSE | MAE | % | ||

Logsig | Purelin | 0.0305 | 0.0240 | 4.2106 | 0.0229 | 0.0173 | 2.3751 |

Lansig | Purelin | 0.0347 | 0.0270 | 4.7316 | 0.0230 | 0.0174 | 2.3926 |

### Selection of the best mathematical function set

In this study, different mathematical functions were used in the final step of GP modeling, including basic arithmetic operators \(\left( { + ,\, - ,\, \times ,\, \div } \right)\) as well as some other basic mathematical functions \(\left( {\sin ,\cos ,{\text{abs}},{\text{sqrt}},{\text{power}},\exp } \right)\). The different combinations of mathematical functions were investigated as per Eqs. (16)–(19).

*F*2 mathematical function with the lowest error had the best accuracy among the other function sets. With increasing the depended functions the error values increased. As seen in Table 4, modeling with

*F*3 resulted in RMSE of 0.0316 that indicates the worst accuracy.

Preliminary selection of mathematical functions in the GP model for the testing dataset

Mathematical functions | \(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) | \(\frac{{\overline{\tau }_{b} }}{\rho ghS}\) | ||||
---|---|---|---|---|---|---|

RMSE | MAE | | RMSE | MAE | | |

| 0.0276 | 0.0219 | 3.843 | 0.0218 | 0.0151 | 2.0423 |

| 0.0264 | 0.0219 | 3.8153 | 0.0223 | 0.0134 | 1.8227 |

| 0.0316 | 0.0263 | 4.6265 | 0.0229 | 0.0148 | 2.0090 |

| 0.0273 | 0.0228 | 3.9497 | 0.0185 | 0.0110 | 1.4866 |

In modeling bed shear stress, the combination of all mathematical functions used, F4, with RMSE of 0.0185 was the most appropriate among the basic functions, while *F*1 was second best. It is obvious that there are no basic rules for identifying which has a better function than the rest and the linking function selection depends on the problem. Both parameters modeled with *F*3 had the highest errors.

*F*2 as mathematical function set is displayed as the program in Table 5. The output program for modeling mean bed shear stress in the GP model with aspect ratios as input data, MAE as fitness function and

*F*4 as mathematical function set is presented in Table 5. These programs were written in Matlab software, and in these programs Tw is \(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) and Tb is \(\frac{{\overline{\tau }_{b} }}{\rho ghS}\).

The output program of the GP model for (a) modeling the mean wall shear stress and (b) modeling the mean bed shear stress

### Selection of the more appropriate model

Comparison between GAA and GP models

Variables | GAA | GP | ||||
---|---|---|---|---|---|---|

RMSE | MAE | | RMSE | MAE | | |

\(\frac{{\overline{\tau }_{w} }}{\rho ghS}\) | 0.0305 | 0.0240 | 4.2106 | 0.0264 | 0.0219 | 3.8153 |

\(\frac{{\overline{\tau }_{b} }}{\rho ghS}\) | 0.0229 | 0.0173 | 2.3751 | 0.0185 | 0.0110 | 1.4866 |

## Comparison between the best model and other equations

Comparison between GAA and GP models with other equations for wall shear stress

Methods | Statistical parameters | ||
---|---|---|---|

RMSE | MAE | | |

GAA model | 0.0463 | 0.03202 | 5.9596 |

GP model | 0.0486 | 0.0358 | 6.6082 |

Presented equation by Knight (1981) | 0.0543 | 0.0429 | 7.8096 |

Presented equation by Flintham and Carling (1988) | 0.1826 | 0.1645 | 44.0806 |

Presented equation by Knight and Patel (1985) | 0.2694 | 0.2483 | 85.8381 |

Presented equation by Rhodes and Knight (1994) | 0.2554 | 0.2383 | 79.6243 |

*R*

^{2}value is close to 1 the best fit of observed versus predicted values is achieved. The proposed model results are close to the fitted line since the

*R*

^{2}value is 0.8775 for the GAA model and 0.8671 for the GP model. Knight’s (1981) equation is better than the equations for duct and trapezoidal channels with respect to

*R*

^{2}. As seen in Fig. 3, Flintham and Carling’s (1988) equation estimates lower values for wall shear stress and it can be deducted that the equation for trapezoidal channels is not useful for calculating wall shear stress in rectangular channels. The values predicted by the duct equations are underestimated and these equations had better not be used for estimating wall shear stress in rectangular channels. As seen in Fig. 3, the equations proposed by Flintham and Carling’s (1988), Rhodes and Knight (1994) and Knight and Patel (1985) predicted underestimated values for mean wall shear stress that resulted in designing channels with high erosion. Since the actual values of wall shear stress are higher than the values predicted by these equations, wall protective structures are needed; while designing channel with wall shear stress obtained by GP and GAA resulted in more stable channels.

Comparison between GAA and GP models with other equations for mean bed shear stress

Methods | Statistical parameters | ||
---|---|---|---|

RMSE | MAE | | |

GAA model | 0.0293 | 0.0209 | 3.2288 |

GP model | 0.0312 | 0.0183 | 2.7894 |

Presented equation by Knight (1981) | 0.0318 | 0.0242 | 3.7667 |

Presented equation by Flintham and Carling (1988) | 0.0951 | 0.0830 | 11.3135 |

Presented equation by Knight and Patel (1985) | 0.1423 | 0.1273 | 16.2633 |

Presented equation by Rhodes and Knight (1994) | 0.1458 | 0.1284 | 16.4748 |

*a*

_{ 2 }coefficients have very high values: 0.2643 for Knight and Patel’s (1985) equation and 0.2749 for Rhodes and Knight’s (1994) equation. As seen in Fig. 4, the obtained equations for ducts could not predict accurate values for bed shear stress in open channels. Since the presented equations in trapezoidal channels and ducts predicted overestimated values of bed shear stress, the designed channels by these values resulted in high construction costs. The designed channels based the bed shear stress values obtained by GP, GAA and equation proposed by Knight (1981) due to design stable and affordable channels.

## Conclusion

*F*2 as mathematical function indicated the best results with RMSE of 0.0262. Also for mean bed shear stress MAE as fitness function and

*F*4 as mathematical function showed the best results with RMSE of 0.0185 than other GP models. For GAA modeling, different fitness functions and transfer functions were studied and the best was chosen to make the most appropriate GAA model. Both proposed models were compared with each other with the testing dataset based on statistical parameter values and the model with higher accuracy was introduced. The results showed that both GAA and GP models were highly accurate in predicting bed and wall shear stress. These models’ results were then compared with an equation for rectangular channels presented by Knight (1981), an equation for trapezoidal channels presented by Flintham and Carling (1988) and two equations by Knight and Patel (1985) and Rhodes and Knight (1994) for rectangular ducts for the entire dataset. These results were obtained as:

- 1.
Considering the results, the GAA and GP models exhibited greater ability than the other equations, with RMSE of 0.0463 and 0.0486, respectively, for wall shear stress modeling and RMSE of 0.0293 for the GAA model and 0.0312 for the GP model for bed shear stress.

- 2.
After the proposed models, the equation for rectangular channels proposed by Knight (1981) had reasonable precision in predicting wall shear stress.

- 3.
For bed shear stress, Flintham and Carling’s (1988) equation predicted underestimated values and had high errors similar to the wall shear stress results. The equation for trapezoidal sections could not predict acceptable values for wall shear stress and all predicted values were underestimated.

- 4.
The equations for rectangular ducts had the worst accuracy in predicting wall and bed shear stress. In estimating wall shear stress, the results obtained with the equations for ducts were underestimated and for estimating bed shear stress, they were overestimated.

- 5.
Generally, soft computing methods can be powerful means of predicting shear stress in rectangular channels and their results can result in designing more stable and affordable channels.

## References

- Alp M, Cigizoglu HK (2007) Suspended sediment load simulation by two artificial neural network methods using hydro meteorological data. Environ Model Softw 22:2–13CrossRefGoogle Scholar
- Atabay S, Knight DW, Seckin G (2004) Influence of a mobile bed on the boundary shear in a compound channel. In Proc Int Conf River Flow,Napoli, Italy, vol. 1, pp. 337–345Google Scholar
- Bonakdari H, Sheikh Z, Tooshmalani M (2015a) Comparison between Shannon and Tsallis entropies for prediction of shear stress distribution in circular open channels. Stoch Env Res Risk Assess 29(1):1–11CrossRefGoogle Scholar
- Bonakdari H, Tooshmalani M, Sheikh Z (2015b) Predicting shear stress distribution in rectangular channels using entropy concept. Int J Eng 28(3):360–367Google Scholar
- Cigizoglu HK (2004) Estimation and forecasting of daily suspended sediment data by multi layer perceptrons. Adv Water Resour 27:185–195CrossRefGoogle Scholar
- Cobaner M, Seckin G, Seckin N, Yurtal R (2010) Boundary shear stress analysis in smooth rectangular channels and ducts using neural networks. Water Environ J 24:133–139CrossRefGoogle Scholar
- Cruff RW (1965) Cross-channel transfer of linear momentum in smooth rectangular channels. Geological Survey Water Supply Paper 1592-B, US Geological Survey, Washington, DC, pp. B1–B26Google Scholar
- Einstein HA (1942) Formulas for the transportation of bed-load. Trans ASCE 107(2140):561–597Google Scholar
- Emiroglu ME, Bilhan O, Kisi O (2011) Neural networks for estimation of discharge capacity of triangular labyrinth side-weir located on a straight channel. Expert Sys Appl 38:867–874CrossRefGoogle Scholar
- Flintham TP, Carling PA (1988) The prediction of mean bed and wall boundary shear in uniform and compositely rough channels. Proc. Int. Conf. River Regime, Wiley, Chichester, pp. 267–287Google Scholar
- Ghosh SN, Roy N (1970) Boundary shear distribution in open channel flow. J Hydraul Div 96(4):967–994Google Scholar
- Giustolisi O, Laucelli D (2005) Improving generalization of artificial neural networks in rainfall-runoff modelling. Hydrolog Sci 50(3):439–457CrossRefGoogle Scholar
- Huai W, Chen G, Zeng Y (2013) Predicting apparent shear stress in prismatic compound channels using artificial neural network. J Hydroinform 15(1):131–146CrossRefGoogle Scholar
- Kartha VC, Leutheusser HJ (1970) Distribution of tractive force in open channels. J Hydraul Div 96(7):1469–1483Google Scholar
- Khodashenas SR, Paquier A (2002) River bed deformation calculated from boundary shear stress. J Hydraul Res 40(5):603–609CrossRefGoogle Scholar
- Knight DW (1981) Boundary shear in smooth and rough channels. J Hydraul Div 107(7):839–851Google Scholar
- Knight DW, Macdonald JA (1979) Open channel flow with varying bed roughness. J Hydraul Div 105(9):1167–1183Google Scholar
- Knight DW, Patel HS (1985) Boundary shear stress in smooth rectangular ducts. J Hydraul Div 111(1):29–47CrossRefGoogle Scholar
- Knight DW, Sterling M (2000) Boundary shear in circular pipes partially full. J Hydraul Eng 126(4):263–275CrossRefGoogle Scholar
- Knight DW, Demetriou JD, Hamed ME (1984) Boundary shear stress in smooth rectangular channel. J Hydraul Eng 10(4):405–422CrossRefGoogle Scholar
- Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT press, CambridgeGoogle Scholar
- Levenberg K (1944) A method for the solution of certain non-linear problems in Least-Squares. Qu Appl Math 2:164–168CrossRefGoogle Scholar
- Lundgren H, Jonsson IG (1964) Shear and velocity distribution in shallow channel. J Hydraul Div 90(1):1–21Google Scholar
- Myers WRC (1978) Momentum transfer in a compound channel. J Hydraul Res 16(2):139–150CrossRefGoogle Scholar
- Nagy HM, Watanabe K, Hirano M (2002) Estimation of sediment load concentration in rivers using artificial neural network model. J Hydraul Eng 128(6):588–595CrossRefGoogle Scholar
- Noutsopoulos GC, Hadjipanos PA (1982) Discussion of ‘‘boundary shear in smooth and rough channels’’ by D.W. Knight. J Hydraul Eng 108(6):809–812Google Scholar
- Pierini JO, Gomez EA, Telesca L (2012) Prediction of water flows in Colorado River, Argentina. Lat Am J Aquat Res 40:872–880CrossRefGoogle Scholar
- Rhodes DG, Knight DW (1994) Distribution of shear force on boundary of smooth rectangular duct. J Hydraul Eng 120(7):787–807CrossRefGoogle Scholar
- Seckin G, Seckin N, Yurtal R (2006) Boundary shear stress analysis in smooth rectangular channels. NRC Res Press 33:336–342Google Scholar
- Sheikh Z, Bonakdari H (2015) Prediction of boundary shear stress in circular and trapezoidal channels with entropy concept. J Urban Water 13(6):629–636CrossRefGoogle Scholar
- Sheikh Khozani Z, Bonakdari H, Zaji AM (2016a) Application of a genetic algorithm in predicting the percentage of shear force carried by walls in smooth rectangular channels. Measurement 87:87–98CrossRefGoogle Scholar
- Sheikh Khozani Z, Bonakdari H, Zaji AM (2016b) Application of soft computing technique in prediction percentage of shear force carried by walls in rectangular channel with Non-homogenous roughness. Water Sci Technol 73(1):124–129CrossRefGoogle Scholar
- Smith M (1993) Neural networks for statistical modeling. Thomson Learning, BostonGoogle Scholar
- Tominaga A, Nezu I, Ezaki K, Nakagawa H (1989) Three dimensional turbulent structure in straight open channel flows. J Hydraul Res 27:149–173CrossRefGoogle Scholar
- Yang SQ (2005) Interaction of boundary shear stress, secondary currents and velocity. Fluid Dyn Res 36(3):121–136CrossRefGoogle Scholar
- Yang SQ, Lim SY (2005) Boundary shear stress distributions in trapezoidal channels. J Hydraul Res 43(1):98–102CrossRefGoogle Scholar
- Zadeh MR, Amin S, Khalili D, Singh VP (2010) Daily outflow prediction by multi layers perceptron with logistic sigmoid and tangent sigmoid activation functions. Water Resour Manag 24:2673–2688CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.