scieee AI-readable full text Open interactive document viewer

Symbolic regression-based genetic approximations of the Colebrook equation for flow friction

Praks, Pavel

Abstract

Widely used in hydraulics, the Colebrook equation for flow friction relates implicitly to the input parameters; the Reynolds number, Re and the relative roughness of an inner pipe surface, epsilon/D with an unknown output parameter; the flow friction factor, ; = f (, Re, epsilon/D). In this paper, a few explicit approximations to the Colebrook equation; approximate to f (Re, epsilon/D), are generated using the ability of artificial intelligence to make inner patterns to connect input and output parameters in an explicit way not knowing their nature or the physical law that connects them, but only knowing raw numbers, {Re, epsilon/D}{}. The fact that the used genetic programming tool does not know the structure of the Colebrook equation, which is based on computationally expensive logarithmic law, is used to obtain a better structure of the approximations, which is less demanding for calculation but also enough accurate. All generated approximations have low computational cost because they contain a limited number of logarithmic forms used for normalization of input parameters or for acceleration, but they are also sufficiently accurate. The relative error regarding the friction factor , in in the best case is up to 0.13% with only two logarithmic forms used. As the second logarithm can be accurately approximated by the Pade approximation, practically the same error is obtained also using only one logarithm.

Full text

water Communication Symbolic Regression-Based Genetic Approximations of the Colebrook Equation for Flow Friction Pavel Praks 1,2,*ID and Dejan Brki´c 1,*ID 1European Commission, Joint Research Centre (JRC), Directorate C: Energy, Transport and Climate, Unit C3: Energy Security, Distribution and Markets, Via Enrico Fermi 2749, 21027 Ispra (VA), Italy 2IT4Innovations National Supercomputing Center, VŠB—Technical University of Ostrava, 17, listopadu 2172/15, 708 00 Ostrava, Czech Republic * Correspondence: [email protected] or [email protected] (P.P.); [email protected] (D.B.) Received: 6 August 2018; Accepted: 30 August 2018; Published: 2 September 2018   Abstract: Widely used in hydraulics, the Colebrook equation for flow friction relates implicitly to the input parameters; the Reynolds number, Re and the relative roughness of an inner pipe surface, ε /Dwith an unknown output parameter; the flow friction factor, λ ; λ = f ( λ ,Re, ε /D). In this paper, a few explicit approximations to the Colebrook equation; λ≈ f (Re, ε /D), are generated using the ability of artificial intelligence to make inner patterns to connect input and output parameters in an explicit way not knowing their nature or the physical law that connects them, but only knowing raw numbers, {Re, ε /D} → { λ }. The fact that the used genetic programming tool does not know the structure of the Colebrook equation, which is based on computationally expensive logarithmic law, is used to obtain a better structure of the approximations, which is less demanding for calculation but also enough accurate. All generated approximations have low computational cost because they contain a limited number of logarithmic forms used for normalization of input parameters or for acceleration, but they are also sufficiently accurate. The relative error regarding the friction factor λ , in in the best case is up to 0.13% with only two logarithmic forms used. As the second logarithm can be accurately approximated by the Padéapproximation, practically the same error is obtained also using only one logarithm. Keywords: Colebrook equation; flow friction; turbulent flow; genetic programming; symbolic regression; explicit approximations 1. Introduction The Colebrook equation for flow friction is one of the most used formulas in hydraulics, which is a branch of civil engineering, that deals with the conveyance of liquids through pipes. It is also widely used in mechanical, petroleum and chemical engineering, etc., wherever flow through pipes occur. It is an empirical relation developed by Colebrook [ 1 ] based on his experiment with White [ 2 ]. The experiment dealt with flow of air/liquid through artificially roughened pipes; Equation (1): 1 √λ=−2·log102.51 Re ·1 √λ+ε 3.71·D(1) In Equation (1), λ is the Darcy flow friction factor, Re is the Reynolds number, and ε /Dis the relative roughness of inner pipe surface (all three quantities are dimensionless). In the Colebrook equation, the flow friction factor λ is implicitly given, λ = f ( λ ,Re, ε /D) where it can be expressed in an explicit way only approximately [ 3 – 8 ], λ≈ f (Re, ε /D) or otherwise the original equation can be solved iteratively [ 9 , 10 ]. Today, it is important not only to have accurate Water 2018,10, 1175; doi:10.3390/w10091175 www.mdpi.com/journal/water Water 2018,10, 1175 2 of 14 but also computationally efficient approximations [ 11 – 13 ]. Here, we used the ability of artificial intelligence to connect input data; in our case the Reynolds number, Re and the relative roughness of inner pipe surface, ε /Dwith the output parameter; in our case the flow friction factor, λ not knowing the structure of the Colebrook equation [ 14 – 17 ]. We used the ability of artificial intelligence to connect input with output data to form patterns not knowing the nature of the data or the physical law that connects them (a similar approach is valid for other branches of hydraulics [ 18 , 19 ]). In that way, we tried to avoid the computationally expensive logarithmic law on which the Colebrook equation is based. As a final product we developed few low-cost but very accurate explicit approximations to the Colebrook equation. 2. Methods Used, Preparation of Data and Software Tool, Results, Structure of Approximations, Accuracy and Comparative Analysis The main idea is to use the ability of artificial intelligence to connect input data sets; in our case the Reynolds number, Re and the relative roughness of inner pipe surface, ε /Dwith the output data set; in our case the flow friction factor, λ ; {Re, ε /D} → { λ }, not knowing the physical law which connects input to output. Sign “ → ” practically represents the Colebrook equation; Equation (1), but the genetic programming tool is not aware of that fact. To prepare data to feed the genetic programming tool, we covered the whole practical domain of applicability of the Colebrook equation; which is for the Reynolds number, Re between 4000 and 10 8 (whole turbulent flow covered) and for the relative roughness of inner pipe surface, ε /Dup to 0.05 (pipe covered from practically smooth to the very rough) [ 20 ] with a mesh which consists of 90 thousand intersection points {Re, ε /D} for which we calculated very accurately the flow friction factor, λ using the Colebrook equation; Equation (1); Figure 1a,b. Water 2018, 10, x FOR PEER REVIEW 2 of 14 inner pipe surface, ε/D with the output parameter; in our case the flow friction factor, λ not knowing the structure of the Colebrook equation [14–17]. We used the ability of artificial intelligence to connect input with output data to form patterns not knowing the nature of the data or the physical law that connects them (a similar approach is valid for other branches of hydraulics [18,19]). In that way, we tried to avoid the computationally expensive logarithmic law on which the Colebrook equation is based. As a final product we developed few low-cost but very accurate explicit approximations to the Colebrook equation. 2. Methods Used, Preparation of Data and Software Tool, Results, Structure of Approximations, Accuracy and Comparative Analysis The main idea is to use the ability of artificial intelligence to connect input data sets; in our case the Reynolds number, Re and the relative roughness of inner pipe surface, ε/D with the output data set; in our case the flow friction factor, λ; {Re, ε/D}→{λ}, not knowing the physical law which connects input to output. Sign “→” practically represents the Colebrook equation; Equation (1), but the genetic programming tool is not aware of that fact. To prepare data to feed the genetic programming tool, we covered the whole practical domain of applicability of the Colebrook equation; which is for the Reynolds number, Re between 4000 and 108 (whole turbulent flow covered) and for the relative roughness of inner pipe surface, ε/D up to 0.05 (pipe covered from practically smooth to the very rough) [20] with a mesh which consists of 90 thousand intersection points {Re, ε/D} for which we calculated very accurately the flow friction factor, λ using the Colebrook equation; Equation (1); Figure 1a,b. (a) Figure 1. Cont. Water 2018,10, 1175 3 of 14 Water 2018, 10, x FOR PEER REVIEW 3 of 14 (b) Figure 1. (a) An example of Eureqa [computer software] interface: Best approximate solutions of the Colebrook equation with various complexity, which were automatically found by Eureqa. (b) An example of Eureqa [computer software] interface: The residual error plot of a selected analytical model for 200 pairs together with an accuracy vs complexity plot of solutions. Having 90 thousand combinations; in order to test robustness of the symbolic regression algorithms we fed the genetic programming tool with 200 triplets {Re, ε/D}i, {λ}i (see Supplementary Material attached to this paper) hoping that it will connect {Re, ε/D}i→{λ}i accurately. The input sample was generated according to the uniform density function of each input variable. The lowdiscrepancy Sobol sequences were employed [21]. These so-called quasirandom sequences have useful properties. In contrary to random numbers, quasirandom numbers cover the space more quickly and evenly. Thus, they leave very few holes. We used [computer software] Eureqa by Nutonian, Inc., Boston, MA, as a genetic programming tool [22,23]. The symbolic regression approach adopted herein [24–29] is based upon genetic programming wherein a population of functions is allowed to breed and mutate with the genetic propagation into subsequent generations based on survival-of-the-fittest criteria [30]. The main goal of this study is to make accurate and computationally cheap explicit approximations of the Colebrook equation, where computationally cheap means to contain the least possible number of logarithmic functions and non-integer powers [31–36]. We can see that approximations found by Eureqa [computer software] have the form {R, K}→xsol, where the symbol R denotes the Reynolds number, K represents relative roughness and 𝑥𝑠𝑜𝑙= 1 √𝜆. All accurate models are computationally expensive, as they contain many logarithmic terms with different arguments. Thus, we can see that Eureqa itself requires human knowledge, in order to obtain an accurate but still a computationally cheap approximation of the Colebrook Figure 1. ( a ) An example of Eureqa [computer software] interface: Best approximate solutions of the Colebrook equation with various complexity, which were automatically found by Eureqa. ( b ) An example of Eureqa [computer software] interface: The residual error plot of a selected analytical model for 200 pairs together with an accuracy vs complexity plot of solutions. Having 90 thousand combinations; in order to test robustness of the symbolic regression algorithms we fed the genetic programming tool with 200 triplets {Re, ε /D} i , { λ } i (see Supplementary Material attached to this paper) hoping that it will connect {Re, ε /D} i→ { λ } i accurately. The input sample was generated according to the uniform density function of each input variable. The low-discrepancy Sobol sequences were employed [ 21 ]. These so-called quasirandom sequences have useful properties. In contrary to random numbers, quasirandom numbers cover the space more quickly and evenly. Thus, they leave very few holes. We used [computer software] Eureqa by Nutonian, Inc., Boston, MA, as a genetic programming tool [ 22 , 23 ]. The symbolic regression approach adopted herein [ 24 – 29 ] is based upon genetic programming wherein a population of functions is allowed to breed and mutate with the genetic propagation into subsequent generations based on survival-of-the-fittest criteria [ 30 ]. The main goal of this study is to make accurate and computationally cheap explicit approximations of the Colebrook equation, where computationally cheap means to contain the least possible number of logarithmic functions and non-integer powers [31–36]. We can see that approximations found by Eureqa [computer software] have the form {R,K} → xsol, where the symbol Rdenotes the Reynolds number, Krepresents relative roughness and xsol =1 √λ . All accurate models are computationally expensive, as they contain many logarithmic terms with different arguments. Thus, we can see that Eureqa itself requires human knowledge, in order to obtain an accurate but still a computationally cheap approximation of the Colebrook equation. Consequently, Water 2018,10, 1175 4 of 14 we will combine several approaches in this paper: Eureqa [computer software] [ 22 , 23 ], the fixed-point iteration [ 9 ] and Padéapproximation [ 10 ]. According to our numerical experiments, Eureqa seems to be useful especially for finding a computationally cheap rational approximation of the Colebrook solution, which serves as a good starting point for the fixed-point iteration method (acceleration). Finally, the Padéapproximation is used as a cheap but very accurate approximation of the logarithm in the second and the successful iterations of the fixed-point method. 2.1. Input Parameters in Their Raw Form Using the input parameters in their raw form {Re, ε /D} i→ { λ } i , Eureqa, the used genetic programming tool gives a set of approximations in polynomial forms [ 12 ]. Knowing that logarithmic expressions and non-integer powers are expensive for computation, we hoped that we have fully accomplished our task. Unfortunately, Eureqa gives a number of not very accurate solutions and here we show Equation (2) with the relative error of λ0 even up to 16.56% in respect to the accurate λ , where the relative error [ 5 , 26 ] is defined as (| λaccurate −λ |/ λaccurate ) · 100%, where λaccurate is calculated in an iterative procedure using the original implicitly given Colebrook equation [ 6 , 9 ]; Equation (1), while λ is obtained through the presented approximations; Equations (2)–(6). In Equation (2), “ ↔ ” means related but not sufficiently accurate: 1 √λ0↔4.34·Re Re+129,000·Re·ε D+7,850,000 +781·Re 187·Re+133,000·Re·ε D+8,960,000 −20.5·ε D+4.85 (2) On the other hand, we found that the accuracy can increase significantly using one fixed-point iterative cycle of acceleration [9]; Equation (2a), after which accuracy of λ1increases up to 0.98%. 1 √λ1≈ −2·log10(y1) . . . 1 √λi+1≈ −2·log10(yi+1)          (2a) In Equation (2a), “ ≈ ” means reasonably accurate enough and arguments of logarithms are defined by; Equation (2b): y1≈2.51 Re · 4.34·Re Re+129,000·Re·ε D+7,850,000 +781·Re 187·Re+133,000·Re·ε D+8,960,000 −20.5·ε D+4.85 ! | {z } 1 √λ0 +ε 3.71·D . . . yi+1≈2.51 Re ·1 √λi+ε 3.71·D                      (2b) The simple fixed-point iterative procedure [ 6 , 9 ]; Equation (2a) in case of the Colebrook equation is fast; λ0→ 16.56%, λ1→ 0.98%, λ2→ 0.13%, etc. (Figure 2). Thus, using only two logarithmic forms, high accuracy of λ2→ 0.13% is reached. Results are in the form { λ } 0↔ {Re, ε /D} 0 , { λ } 1≈ {log 10 ( λ0 )} 1 , { λ } 2≈ {log 10 (log 10 ( λ0 ))} 2 , etc., where “ ↔ ” means related but not sufficiently accurate, while “ ≈ ” is reasonably accurate enough. This approach with acceleration is widely used in development of approximations of the Colebrook equation [ 37 – 42 ]. The error can be further reduced by using one more accelerating step as shown, or using genetic algorithms [ 25 , 29 , 36 ], Excel fitting tool [ 27 ] or the Monte Carlo method [43,44]. Water 2018,10, 1175 5 of 14 Water 2018, 10, x FOR PEER REVIEW 5 of 14 Water 2018, 10, x FOR PEER REVIEW 6 of 14 Figure 2. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by polynomial Equation (2)—(up), Equation (2a) after first step of fixed-point acceleration—(middle), and the second step of acceleration—(down); relative error up to 16.56%, up to 0.98% and up to 0.13% respectively. 2.2. Normalized Input Parameters Unfortunately, in our case using the input parameters in their raw form the accuracy was not at a high level without acceleration, so having previous experience with the same problem where we used Artificial Neural Network [15,16] to simulate results, we normalized parameters a = log10(Re), b = −log10(ε/D), in order to avoid discrepancy in the scale which are in raw form 1000 < Re < 108 and ε/D << 1 and after normalization 3.5 < a < 8 and 1.3 < b < 6.5 (Eureqa, software used a as genetic programming tool also suggested to us a data normalization process) [34–36]. The normalization gives relatively good results, and the genetic programming tool generated more accurate results without knowing that the logarithmic form of the Colebrook equation was originally used but only knowing the predicted input and output datasets; Figure 3: Figure 3. Genetic programming tool makes λ ≈ f (a,b) without knowing the physical law that connects a and b. Using our previous experience [15] with the training of the Artificial Neural Network where very good results were achieved through the normalization of parameters; a = log10(Re), b = −log10(ε/D), the genetic programming tool generated a dozen equations with different levels of accuracy and complexity, but fortunately none of them contain logarithms or non-integer power terms. Here, we present the four most successful explicit approximations; Equations (3)–(6). Adding one additional logarithmic form for acceleration using one additional fixed-point iterative step [9,45]; Equation (2a), the accuracy of the approximations increases significantly (about 10 times); Equations (3a)–(6a). Figure 2. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by polynomial Equation (2)—( up ), Equation (2a) after first step of fixed-point acceleration—( middle ), and the second step of acceleration—( down ); relative error up to 16.56%, up to 0.98% and up to 0.13% respectively. Water 2018,10, 1175 6 of 14 2.2. Normalized Input Parameters Unfortunately, in our case using the input parameters in their raw form the accuracy was not at a high level without acceleration, so having previous experience with the same problem where we used Artificial Neural Network [ 15 , 16 ] to simulate results, we normalized parameters a=log 10 (Re), b=−log10(ε/D) , in order to avoid discrepancy in the scale which are in raw form 1000 < Re < 10 8 and ε /D<< 1 and after normalization 3.5 < a< 8 and 1.3 < b< 6.5 (Eureqa, software used aas genetic programming tool also suggested to us a data normalization process) [ 34 – 36 ]. The normalization gives relatively good results, and the genetic programming tool generated more accurate results without knowing that the logarithmic form of the Colebrook equation was originally used but only knowing the predicted input and output datasets; Figure 3: Water 2018, 10, x FOR PEER REVIEW 6 of 14 Figure 2. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by polynomial Equation (2)—(up), Equation (2a) after first step of fixed-point acceleration—(middle), and the second step of acceleration—(down); relative error up to 16.56%, up to 0.98% and up to 0.13% respectively. 2.2. Normalized Input Parameters Unfortunately, in our case using the input parameters in their raw form the accuracy was not at a high level without acceleration, so having previous experience with the same problem where we used Artificial Neural Network [15,16] to simulate results, we normalized parameters a = log10(Re), b = −log10(ε/D), in order to avoid discrepancy in the scale which are in raw form 1000 < Re < 108 and ε/D << 1 and after normalization 3.5 < a < 8 and 1.3 < b < 6.5 (Eureqa, software used a as genetic programming tool also suggested to us a data normalization process) [34–36]. The normalization gives relatively good results, and the genetic programming tool generated more accurate results without knowing that the logarithmic form of the Colebrook equation was originally used but only knowing the predicted input and output datasets; Figure 3: Figure 3. Genetic programming tool makes λ ≈ f (a,b) without knowing the physical law that connects a and b. Using our previous experience [15] with the training of the Artificial Neural Network where very good results were achieved through the normalization of parameters; a = log10(Re), b = −log10(ε/D), the genetic programming tool generated a dozen equations with different levels of accuracy and complexity, but fortunately none of them contain logarithms or non-integer power terms. Here, we present the four most successful explicit approximations; Equations (3)–(6). Adding one additional logarithmic form for acceleration using one additional fixed-point iterative step [9,45]; Equation (2a), the accuracy of the approximations increases significantly (about 10 times); Equations (3a)–(6a). Figure 3. Genetic programming tool makes λ≈ f (a,b) without knowing the physical law that connects a and b. Using our previous experience [ 15 ] with the training of the Artificial Neural Network where very good results were achieved through the normalization of parameters; a=log 10 (Re), b= − log 10 ( ε /D), the genetic programming tool generated a dozen equations with different levels of accuracy and complexity, but fortunately none of them contain logarithms or non-integer power terms. Here, we present the four most successful explicit approximations; Equations (3)–(6). Adding one additional logarithmic form for acceleration using one additional fixed-point iterative step [ 9 , 45 ]; Equation (2a), the accuracy of the approximations increases significantly (about 10 times); Equations (3a)–(6a). Results are in the form { λ } 0↔ {a=log 10 (Re), b= − log 10 ( ε /D)} 0 , { λ } 1≈ {log 10 ( λ0 )} 1 , { λ } 2≈ {log 10 (log 10 ( λ0 ))} 2 , etc., where “ ↔ ” means related but not sufficiently accurate, while “ ≈ ” is reasonably accurate enough. 1 √λ0↔3.13·b−1.56·b2 a(3) 1 √λ1≈ −2·log102.51 Re ·3.13·b−1.56·b2 a+ε 3.71·D | {z } accelerated Eq.(3) (3a) 1 √λ0↔b+0.904·a+1.08·sin(0.937·a−b)−1.85 (4) 1 √λ1≈ −2·log102.51 Re ·(b+0.904·a+1.08·sin(0.937·a−b)−1.85)+ε 3.71·D | {z } accelerated Eq.(4) (4a) α=1 √λ0≈a+0.61·b+0.28·a·b+0.51·sin(0.935·a−b)−0.894 −0.103·a2−0.158·b2(5) Water 2018,10, 1175 7 of 14 1 √λ1≈ −2·log102.51·α Re +ε 3.71·D | {z } accelerated Eq.(5) (5a) β=1 √λ0≈1.15·a+0.569·b+0.292·a·b+0.478·sin(0.939·a−b) +0.122·sin2(0.939·a−b)−1.284 −0.12·a2−0.162·b2(6) 1 √λ1≈ −2·log102.51·β Re +ε 3.71·D | {z } accelerated Eq.(6) (6a) Distribution of the relative error over the domain of applicability of the Colebrook equation introduced by these four approximations is presented in Figures 4–7. Water 2018, 10, x FOR PEER REVIEW 7 of 14 Results are in the form {λ}0↔{a = log10(Re), b = −log10(ε/D)}0, {λ}1≈{log10(λ0)}1, {λ}2≈{log10(log10(λ0))}2, etc., where “↔” means related but not sufficiently accurate, while “≈” is reasonably accurate enough. 1 √𝜆0↔3.13∙𝑏−1.56∙𝑏2 𝑎 (3) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51 𝑅𝑒 ∙(3.13∙𝑏−1.56∙𝑏2 𝑎)+ 𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(3) (3a) 1 √𝜆0↔𝑏+0.904∙𝑎+1.08∙sin(0.937∙𝑎−𝑏)−1.85 (4) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51 𝑅𝑒 ∙(𝑏+0.904∙𝑎+1.08∙sin(0.937∙𝑎−𝑏)−1.85)+𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(4) (4a) 𝛼= 1 √𝜆0≈𝑎+0.61∙𝑏+0.28∙𝑎∙𝑏+0.51∙𝑠𝑖𝑛(0.935∙𝑎−𝑏)−0.894−0.103·𝑎2−0.158·𝑏2 (5) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51∙𝛼 𝑅𝑒 +𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(5) (5a) 𝛽= 1 √𝜆0≈1.15∙𝑎+0.569∙𝑏+0.292∙𝑎∙𝑏+0.478∙sin(0.939∙𝑎−𝑏)+0.122∙ sin2(0.939∙𝑎−𝑏)−1.284−0.12∙𝑎2−0.162∙𝑏2 (6) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51∙𝛽 𝑅𝑒 +𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(6) (6a) Distribution of the relative error over the domain of applicability of the Colebrook equation introduced by these four approximations is presented in Figures 4–7. (a) (b) Figure 4. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (3)—(a), and accelerated Equation (3a)—(b); relative error up to 20% and up to 5.35%, respectively. (a) (b) Figure 5. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (4)—(a), and accelerated Equation (4a)—(b); relative error up to 60% and up to 6.29%, respectively. Figure 4. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (3)—( a ), and accelerated Equation (3a)—( b ); relative error up to 20% and up to 5.35%, respectively. Water 2018, 10, x FOR PEER REVIEW 7 of 14 Results are in the form {λ}0↔{a = log10(Re), b = −log10(ε/D)}0, {λ}1≈{log10(λ0)}1, {λ}2≈{log10(log10(λ0))}2, etc., where “↔” means related but not sufficiently accurate, while “≈” is reasonably accurate enough. 1 √𝜆0↔3.13∙𝑏−1.56∙𝑏2 𝑎 (3) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51 𝑅𝑒 ∙(3.13∙𝑏−1.56∙𝑏2 𝑎)+ 𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(3) (3a) 1 √𝜆0↔𝑏+0.904∙𝑎+1.08∙sin(0.937∙𝑎−𝑏)−1.85 (4) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51 𝑅𝑒 ∙(𝑏+0.904∙𝑎+1.08∙sin(0.937∙𝑎−𝑏)−1.85)+𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(4) (4a) 𝛼= 1 √𝜆0≈𝑎+0.61∙𝑏+0.28∙𝑎∙𝑏+0.51∙𝑠𝑖𝑛(0.935∙𝑎−𝑏)−0.894−0.103·𝑎2−0.158·𝑏2 (5) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51∙𝛼 𝑅𝑒 +𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(5) (5a) 𝛽= 1 √𝜆0≈1.15∙𝑎+0.569∙𝑏+0.292∙𝑎∙𝑏+0.478∙sin(0.939∙𝑎−𝑏)+0.122∙ sin2(0.939∙𝑎−𝑏)−1.284−0.12∙𝑎2−0.162∙𝑏2 (6) 1 √𝜆1≈−2∙𝑙𝑜𝑔10(2.51∙𝛽 𝑅𝑒 +𝜀 3.71∙𝐷) ⏟ 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑒𝑑 𝐸𝑞.(6) (6a) Distribution of the relative error over the domain of applicability of the Colebrook equation introduced by these four approximations is presented in Figures 4–7. (a) (b) Figure 4. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (3)—(a), and accelerated Equation (3a)—(b); relative error up to 20% and up to 5.35%, respectively. (a) (b) Figure 5. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (4)—(a), and accelerated Equation (4a)—(b); relative error up to 60% and up to 6.29%, respectively. Figure 5. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (4)—( a ), and accelerated Equation (4a)—( b ); relative error up to 60% and up to 6.29%, respectively. Water 2018,10, 1175 8 of 14 Water 2018, 10, x FOR PEER REVIEW 8 of 14 (a) (b) Figure 6. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (5)—(a), and accelerated Equation (5a)—(b); relative error up to 6% and up to 0.28%, respectively. (a) (b) Figure 7. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (6)—(a), and accelerated Equation (6a)—(b); relative error up to 2% and up to 0.17%, respectively. 2.3. Discussion—Comparative Analysis In general, the relative error of approximations of the Colebrook equation is not uniformly dispersed over the domain of applicability of the Colebrook equation [7,29], where the more complex is not always more accurate which can be noticed by comparing Equation (3) and Equation (4) and related Figures 4 and 5, respectively. According to Eureqa, the software package which generated the approximations, Equation (5) is three times more complex compared with Equation (3), while Equation (4) is 1.5 times more complex compared with Equation (3). Using genetic algorithms [25,29] or the Excel fitting tool [27], there is a possibility to increase the accuracy of the presented approximations by changing their parameters near the current value. If the structure of the approximations remains unchanged, the complexity remains also unchanged while accuracy can increase [4,12,13], or in other words, the structure of the equations remains unchanged while the values of the coefficient change in order to fit better values obtained through the Colebrook equation. In that way error from Figures 4–7 can decrease but also the distribution of the error over the domain of applicability changes [7,29]. To summarize our findings, we made Table 1, in which the maximum relative errors of approximations compared to the accurate λ are expressed as a function of complexity. Table 1. The maximal relative errors of approximations as a function of complexity. Complexity: Number of log Functions Accuracy 1 2 3 High Equation (2a)—λ2→0.13% Equation (6a)—λ1→0.17% Equation (5a)—λ1→0.28% Figure 6. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (5)—( a ), and accelerated Equation (5a)—( b ); relative error up to 6% and up to 0.28%, respectively. Water 2018, 10, x FOR PEER REVIEW 8 of 14 (a) (b) Figure 6. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (5)—(a), and accelerated Equation (5a)—(b); relative error up to 6% and up to 0.28%, respectively. (a) (b) Figure 7. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (6)—(a), and accelerated Equation (6a)—(b); relative error up to 2% and up to 0.17%, respectively. 2.3. Discussion—Comparative Analysis In general, the relative error of approximations of the Colebrook equation is not uniformly dispersed over the domain of applicability of the Colebrook equation [7,29], where the more complex is not always more accurate which can be noticed by comparing Equation (3) and Equation (4) and related Figures 4 and 5, respectively. According to Eureqa, the software package which generated the approximations, Equation (5) is three times more complex compared with Equation (3), while Equation (4) is 1.5 times more complex compared with Equation (3). Using genetic algorithms [25,29] or the Excel fitting tool [27], there is a possibility to increase the accuracy of the presented approximations by changing their parameters near the current value. If the structure of the approximations remains unchanged, the complexity remains also unchanged while accuracy can increase [4,12,13], or in other words, the structure of the equations remains unchanged while the values of the coefficient change in order to fit better values obtained through the Colebrook equation. In that way error from Figures 4–7 can decrease but also the distribution of the error over the domain of applicability changes [7,29]. To summarize our findings, we made Table 1, in which the maximum relative errors of approximations compared to the accurate λ are expressed as a function of complexity. Table 1. The maximal relative errors of approximations as a function of complexity. Complexity: Number of log Functions Accuracy 1 2 3 High Equation (2a)—λ2→0.13% Equation (6a)—λ1→0.17% Equation (5a)—λ1→0.28% Figure 7. Distribution of the relative error of λ over the domain of applicability of the Colebrook equation introduced by Equation (6)—( a ), and accelerated Equation (6a)—( b ); relative error up to 2% and up to 0.17%, respectively. 2.3. Discussion—Comparative Analysis In general, the relative error of approximations of the Colebrook equation is not uniformly dispersed over the domain of applicability of the Colebrook equation [ 7 , 29 ], where the more complex is not always more accurate which can be noticed by comparing Equation (3) and Equation (4) and related Figures 4and 5, respectively. According to Eureqa, the software package which generated the approximations, Equation (5) is three times more complex compared with Equation (3), while Equation (4) is 1.5 times more complex compared with Equation (3). Using genetic algorithms [ 25 , 29 ] or the Excel fitting tool [ 27 ], there is a possibility to increase the accuracy of the presented approximations by changing their parameters near the current value. If the structure of the approximations remains unchanged, the complexity remains also unchanged while accuracy can increase [ 4 , 12 , 13 ], or in other words, the structure of the equations remains unchanged while the values of the coefficient change in order to fit better values obtained through the Colebrook equation. In that way error from Figures 4–7can decrease but also the distribution of the error over the domain of applicability changes [7,29]. To summarize our findings, we made Table 1, in which the maximum relative errors of approximations compared to the accurate λare expressed as a function of complexity. Water 2018,10, 1175 9 of 14 Table 1. The maximal relative errors of approximations as a function of complexity. Complexity: Number of log Functions Accuracy 1 2 3 High Equation (2a)—λ2→0.13% Equation (6a)—λ1→0.17% Equation (5a)—λ1→0.28% Moderate Equation (2a)—λ1→0.98% Equation (6)—λ0→2% Low Equation (5)—λ0→6% Equation (4a)—λ1→6.29% Equation (3a)—λ1→5.35% It is clear that polynomial approximation was accelerated through the fixed-point iterative procedure; Equation (2a) shows better performances compared with those with normalized input parameters; Equations (3a)–(6a). For example, Equation (2a) with two logarithmic functions (used for acceleration) gives a relative error of no more than λ2→ 0.13% compared with the approximately same error of Equation (6a) with three logarithmic forms (two for normalization and one for acceleration); Equation (6a)— λ1→ 0.17%. Also, the expression for λ0 in case of Equation (2) is a polynomial while Equations (4)–(6) contain sinus trigonometric function [ 46 ]. After this careful analysis it can be concluded that it is better to use computationally expensive logarithmic functions for acceleration through Equation (2a) and not for normalization. All approximations can be classified as highly accurate, moderate and with a low level of accuracy: • Highly accurate: Compared with the similar approximations to the Colebrook equation, accelerated Equation (5a); with the relative error up to 0.28% and accelerated Equations (2a) and (6a) with the relative error up to 0.13% and 0.17%, respectively, are accurate as approximations by Bar [ 47 ] (0.2%), Chen [ 38 ] (0.36–0.18%), Zigrang and Sylvester [ 41 ] (0.14–0.08%, simpler: 1–0.775%), Fang et al. [ 48 ] (0.61–0.56%), Serghides [ 38 ] (0.14–0.0026%, simpler 0.35–0.27%), Buzzelli [ 49 ] (0.14–0.08%), Sonad and Goudar [ 50 ] (0.8–improved by Vatankhah and Kouchakzadeh [ 51 ]: 0.15%) and Romeo et al. [ 52 ] (0.14–0.008%); where the higher reported accuracy is achieved through genetic optimization [ 25 , 29 ]. These approximations are among the most accurate available to date [ 3 – 8 ], but at the same time in many cases much more complex compared to the approximations presented in our paper [ 4 , 11 – 13 ]. For example; approximations by Barr [ 47 ] and by Chen [ 38 ] contain two logarithmic expressions and two non-integer powers; by Romeo et al. [ 52 ], three logarithmic expressions and two non-integer powers, etc. which means that they introduce a higher computational burden to achieve the same accuracy. In this case, our Equation (2a), which after two steps of acceleration, contains only two logarithmic forms. • Moderately accurate: Our Equation (6) with the relative error up to 2% does contain only two logarithmic expressions used for normalization and no non-integer power, and its accuracy can be compared with approximations by Swamee and Jain [ 53 ] (2.18–1.75%), Manadili [ 54 ] (2–1.5%), Brki´c [ 42 , 55 – 57 ] (2–1.3%), Haland [ 58 ] (1.4–1.1%), etc., all with the same or higher complexity as Equation (6). Equation (2a) after the first step of acceleration with only one logarithmic function and with the relative error of up to 2.6% is even more efficient. • Low accuracy: Our accelerated Equation (3a) is very simple with the relative error up to 5.35% but with only one peak of high error (otherwise up to 3% as can be seen from Figure 4); it is more accurate compared with approximations by Round [ 59 ] (10.9–5.5%), Eck [ 60 ] (8.2–5.7%) and Avci and Karagoz [61] (4.8–3.1%), Wood [62] (23.7–16.6%), Moody [63] (21.5–18.1%), etc. 3. Possible Simplifications As already noted, the main goal is to produce not only accurate, but also computationally low cost [ 11 – 13 , 29 ] explicit approximations of the Colebrook equation. Trigonometric functions