^{1}

^{2}

^{1}

^{2}

Nowadays, the Colebrook equation is used as a mostly accepted relation for the calculation of fluid flow friction factor. However, the Colebrook equation is implicit with respect to the friction factor (^{8} and between 10^{−7} and 0.1, respectively. The proposed ANN demonstrates the relative error up to 0.07% which had the high accuracy compared with the vast majority of the precise explicit approximations of the Colebrook equation.

To date, the Colebrook equation (

The Colebrook equation is also somewhere known as the Colebrook-White equation or simply the CW equation [

There are a group of studies investigating the use of Artificial Neural Network (ANN) to estimate the friction factor. For instance, the intelligent estimation of hydraulic resistance for Newtonian fluids has been investigated in some of recent studies [

Nowadays, not only can the ANN approach be used in hydraulics and for simulation of fluid flow, but also it can be widely applied in the various branches of engineering, such as for the control systems [

In the present study, in order to produce an efficient and accurate procedure for estimation of the flow friction factor (

First, the raw datasets calculated using the Colebrook equation were used to train the ANN model and then the unknown friction factors (

Hydraulic resistance depends on the flow rate which is considered as the main problem in determination of the hydraulic flow friction factor (

As it was mentioned, the main problem of the Colebrook equation is related to its implicit form with respect to the friction factor (

It should be taken into account that the Moody diagram cannot be used as a reliable and accurate replacement for the Colebrook equation as its reading error can be even more than few percent [

The two most accurate explicit approximations with the relative errors up to 0.0026% and 0.0083% are those implied by Ćojbašić and Brkić [

In this study, the implied ANN structure led to a low relative error compared to the accurate iterative solution. In addition, the computational burden used to run the applied ANN structure was equal or lower than that of explicit approximations, and it, especially, was less than that of the iterative solution of the original Colebrook equation, while the accuracy of the ANN approach remains significantly high.

In order to generate the training set for the ANN model, the Colebrook equation was solved iteratively. The iterative solution is used because the highly accurate solution of the friction factor (

In order to train the presented ANN model, input dataset (Electronic Appendix ^{8} and 10^{−7}–0.1, respectively. In order to use input datasets, the values of the Reynolds number (Re) and the relative roughness (

The feedforward neural network structure which consists of three layers is used (Figure

Structure of the proposed ANN.

In general, an ANN should be trained, or adapted, either before or during its use. The used ANN network was properly trained and validated by supervised offline training prior to network application in which the data obtained by the iterative solution of the Colebrook equation were applied.

Almost every neural network consists of a large number of simple processing elements that are variously called neurons, nodes, cells, or units, connected to other neurons by means of direct communication links, each with an associated weight and bias. The weights represent information being used by the net to produce output for given inputs. The most common feedforward net has two or more layers of processing units in the adjacent layers. Generally speaking, ANN is able to efficiently imitate functions and recognize patterns. They can be trained to solve a problem (ability to learn). The quality of this solution heavily depends on the quantity of available data for training and the structure of a network.

It should be underlined that the developed ANN (the generated ANN is attached as Electronic Appendix

However, the main issue of the present network is related to the ranges of input parameter in which the relative roughness (^{−7} to 0.1, while another parameter, the Reynolds number (Re), is considerably large in the range of 2320 to 10^{8}. This problem can prevent the ANN from being properly trained and it will lead to the less accurate results in application phase. Therefore, the raw input dataset should be normalized to provide the input data for the ANN with the approximately same order of magnitude.

In order to address this issue, the logarithmic transformation can be done where the Reynolds number (Re) and the relative roughness (

The training sample (70%, 63,000 triplets) was presented to the ANN during the training,

the validation sample (15%, 10,500 triplets) was used to measure generalization of the ANN, that is, to stop the training when the generalization does not improve anymore (i.e., this prevents the so-called “overfitting”),

the testing sample (15%, 10,500 triplets) had no effect on the training and so it provided an independent measure of performance of the ANN during and after training.

The scheme of training process of the ANN.

When the training process with 90,000 inputs/output combinations of data was finalized, the generated ANN was saved under the name of “ColebrookANN” for later uses. In such a way, the ANN can be further used for the accurate estimation of the flow friction factor (

Exploitation of the ANN.

For the presented ANN, the process of training lasted few hours. Afterwards, the ANN can be used to estimate flow friction factor (

In order to determine the hydraulic friction factor (

In order to examine the performance of a model, approximation quality, model complexity, and model interpretability should be addressed. In fact, the approximation/prediction error is often used as an assessment criterion. There are different criteria in the literature to assess the model performance. It is possible that the worst case or the average deviation is crucial [

For training of the presented ANN, the back propagation Levenberg-Marquardt algorithm was used, while the Mean Squared Error (MSE) was used as performance measure during the training phase. The values of MSE for this ANN structure were calculated to be 10^{−12} after 5,000 epochs of training (Figure

The Mean Squared Error (MSE) during the process of training of the proposed ANN.

The training of the proposed ANN structure was done through 5,000 epochs. The Mean Squared Error (MSE) of this ANN structure was calculated to be 10^{−12} after which there was no further tendency to decrease. In addition, the same results were obtained with the tested ANN structures involving 100 neurons in a hidden layer and with the two hidden layers containing 50 neurons in each of them. However, the tested ANN structure with 30 neurons in one hidden layer resulted in a lower accuracy in comparison with the former tested structures, even after 10,000 epochs of training.

For the purpose of comparison, it is better to use the relative error than the Mean Squared Error (MSE) which was used during the training process of the proposed ANN. The maximum relative error of the proposed feedforward ANN structure, with one hidden layer containing 50 neurons, compared with the iterative solution of the Colebrook equation, was up to 0.07% (Table

Relative error of friction factor produced by the shown ANN over the practical domain of the relative roughness (

Relative error (%) | Relative roughness ( | |||||||||
---|---|---|---|---|---|---|---|---|---|---|

Reynolds number (Re) | 10^{−6} |
5 ⋅ 10^{−6} |
10^{−5} |
5 ⋅ 10^{−5} |
10^{−4} |
5 ⋅ 10^{−4} |
10^{−3} |
5 ⋅ 10^{−3} |
10^{−2} |
5 ⋅ 10^{−2} |

10^{4} |
0.00134 | 0.00088 | 0.00031 | 0.00017 | 0.00123 | 0.00141 | 0.00041 | 0.00099 | 0.00096 | 0.00069 |

5 ⋅ 10^{4} |
0.00102 | 0.00174 | 0.00080 | 0.00096 | 0.00220 | 0.00163 | 0.00247 | 0.00063 | 0.00224 | 0.00124 |

10^{5} |
0.00114 | 0.00145 | 0.00125 | 0.00356 | 0.00099 | 0.00384 | 0.00097 | 0.00117 | 0.00104 | 0.00076 |

5 ⋅ 10^{5} |
0.00181 | 0.00032 | 0.00287 | 0.00084 | 0.00047 | 0.00090 | 0.00028 | 0.00011 | 0.00055 | 0.00064 |

10^{6} |
0.00163 | 0.00246 | 0.00126 | 0.00073 | 0.00419 | 0.00440 | 0.00176 | 0.00190 | 0.00023 | 0.00053 |

5 ⋅ 10^{6} |
0.00449 | 0.00672 | 0.00207 | 0.00377 | 0.00012 | 0.00077 | 0.00071 | 0.00031 | 0.00038 | 0.00074 |

10^{7} |
0.00126 | 0.00054 | 0.00417 | 0.00527 | 0.00005 | 0.00089 | 0.00015 | 0.00033 | 0.00063 | 0.00186 |

5 ⋅ 10^{7} |
0.01946 | 0.00382 | 0.00490 | 0.00835 | 0.00260 | 0.00174 | 0.00011 | 0.00071 | 0.00038 | 0.00022 |

10^{8} |
0.06060 | 0.05266 | 0.03614 | 0.02413 | 0.01682 | 0.00410 | 0.00165 | 0.00544 | 0.00579 | 0.00068 |

It should be taken into account that there are three levels of the accuracy [

The first level is related to the nature of the Colebrook equation which is an empirical relation (in fact, there is a possibility of using other equations with higher accuracy, and accordingly the showed methodology can be used in order to develop the appropriate ANN for such a case).

The second level explains the accuracy related to the solution of the Colebrook equation; the Colebrook equation can be solved precisely using the iterative procedure (in this paper, the term “accurate by default” or “absolutely accurate” and the related error can be neglected in many cases).

The third one is related to the proposed ANN structures and relevant approximations which can be used to avoid iterative procedure; their errors can be estimated and compared with the error of iterative solution (obtained error of the suggested ANN structure belongs to the third category).

Distribution of the estimated error produced by the ANN compared with the Colebrook equation in normalized domain which is suitable for training of the ANN (verification in MATLAB).

Distribution of the estimated error produced by the ANN compared with the Colebrook equation (verification in MS Excel).

Furthermore, to some extent, an increase in the complexity of the ANN structure would augment its potential to produce even more accurate results. Hence, the right balance of accuracy and complexity is necessary during the network design phase. Additionally, accuracy depends on the quantity of terms in the training set. The complexity of network in the phase of exploitation is relatively unimportant since the ANN is a sort of “black box.” It can produce outputs for inputs and its inner complexity is not crucial [

Users would easily apply the ANN without any difficulty due to its structure complexity, in contrast to use of the approximate formulas [

According to Figures ^{8} and

Having looked at the existing approximations of Colebrook equation [

Maximal relative error produced by the ANN compared with the seven most accurate explicit approximations of Colebrook equation; the Reynolds number (Re) is used as the base.

Maximal relative error (%) | ||||||||
---|---|---|---|---|---|---|---|---|

Reynolds number (Re) | (a) | (b) | (c) | (d) | (e) | (f) | (g) | (h) |

10^{4} |
0.00141 | 0.00074 | 0.00569 | 0.12272 | 0.13563 | 0.13453 | 0.13301 | 0.13313 |

5 ⋅ 10^{4} |
0.00247 | 0.00219 | 0.00574 | 0.14112 | 0.13784 | 0.11047 | 0.13736 | 0.13736 |

10^{5} |
0.00384 | 0.00246 | 0.00698 | 0.14467 | 0.13812 | 0.10281 | 0.13793 | 0.13793 |

5 ⋅ 10^{5} |
0.00287 | 0.00250 | 0.00802 | 0.14712 | 0.13841 | 0.08915 | 0.13839 | 0.13839 |

10^{6} |
0.00440 | 0.00235 | 0.00816 | 0.14727 | 0.13846 | 0.08426 | 0.13845 | 0.13845 |

5 ⋅ 10^{6} |
0.00672 | 0.00167 | 0.00826 | 0.14725 | 0.13850 | 0.07315 | 0.13850 | 0.13850 |

10^{7} |
0.00527 | 0.00122 | 0.00828 | 0.14722 | 0.13851 | 0.06754 | 0.13850 | 0.13850 |

5 ⋅ 10^{7} |
0.01946 | 0.00022 | 0.00829 | 0.14718 | 0.13851 | 0.04876 | 0.13851 | 0.13851 |

10^{8} |
0.06060 | 0.00005 | 0.00829 | 0.14718 | 0.13851 | 0.04841 | 0.13851 | 0.13851 |

(a)-Artificial Neural Network (ANN).

(b)-Ćojbašić and Brkić [

(c)-Ćojbašić and Brkić [

(d)-Vatankhah and Kouchakzadeh [

(e)-Buzzelli [

(f)-Romeo et al. [

(g)-Serghides [

(h)-Zigrang and Sylvester [

Maximal relative error produced by ANN compared with the seven most accurate explicit approximations of Colebrook equation where

The results of comparative analysis which were reported in Figure

In order to evaluate the friction factor, the sophisticated ANN model was developed. The model includes three layers of input, hidden, and output neurons with 2, 50, and 1 neurons, respectively. The trained ANN is able to predict friction factor (

In our approach we tried to keep the solution simple and provide single neural network that covers the whole range of inputs, but further interesting research direction would be to design several networks covering parts of input spaces and working in conjunction possibly providing improved accuracy and sacrificing simplicity of the solution. Also, following our own results and results of others regarding application of other techniques of computational intelligence for the same problem, the ANN presented here could potentially be cross-fertilized with them in an attempt to improve results, where primarily genetic optimization of the network structure might be promising.

Approximations of the Colebrook equation for flow friction used in this paper are as follows (MATLAB and MS Excel codes for the shown approximations are listed in Electronic Appendix

Buzzelli approximation [

Vatankhah and Kouchakzadeh [

Romeo et al. approximation [

Serghides approximation [

Zigrang and Sylvester approximation [

Ćojbašić and Brkić approximation [

Ćojbašić and Brkić approximation [

Software packages used for this research are MS Excel ver. 2007 and MATLAB R2010a by MathWorks. The paper is registered in the internal system for publication PUBSY of the Joint Research Centre of the European Commission under no. JRC100455.

The views expressed are purely those of the authors and may in any circumstance be regarded as stating an official position of neither the European Commission nor the University of Niš.

The authors declare that there are no competing interests regarding the publication of this paper.

The work of Žarko Ćojbašić has been supported by the Ministry of Education, Science and Technological Development of the Republic of Serbia under Grant TR35016.