# Approximate Flow Friction Factor: Estimation of the Accuracy Using Sobol’s Quasi-Random Sampling

^{*}

## Abstract

**:**

## 1. Introduction

^{2}/sec), and D is inner diameter of pipe (in m).

^{8}, and for the relative roughness of an inner pipe surface ε between 0 and 0.05, i.e., for a turbulent condition of flow.

_{%}over the domain of applicability of the Colebrook equation is uneven and is different for every new approximation [17,18]. This error should be evaluated in a sufficient number of points dispersed over the domain of applicability in engineering practice, and the points should be uniformly, randomly or quasi-randomly distributed. This communication shows how to use Sobol’s quasi-random distribution for such purposes. The Colebrook equation is widely used in many scientific disciplines where fluid flow occurs [19,20,21,22], and hence evaluation of the error and its distribution is essential for the ability to check and repeat scientific findings.

## 2. Estimation of Error; Testing Patterns and Quantity of Points

_{%}of the chosen approximation of the Colebrook equation and evaluates different quantities of testing points and related patterns, i.e., their distribution over the domain of its applicability in engineering practice.

#### 2.1. Relative Error

_{%}of any explicit approximation should be calculated in reference to the solution of the original implicitly given Colebrook equation. Its native implicitly given form is usually solved in an iterative process after sufficient iterations f

_{0}[8,9,10,11] (as the Colebrook equation is empirical, its accuracy can be disputed, but for this study, it is treated as accurate [23,24,25]). The relative error δ

_{%}is calculated as ${\delta}_{\%}=\frac{\u2502f-{f}_{0}\u2502}{{f}_{0}}\xb7100\%$, where f is obtained using the chosen explicit approximation (the testing approximation in this communication is given in Equation (2)). The goal is to find a worst case, which is represented by the maximum relative error, i.e., to find a combination of input parameters for the largest approximation error. For this reason, a sufficiently large number of sample points from the domain of the Colebrook equation has to be chosen and those points are chosen using Sobol’s sampling, a type of quasi-random sampling which is capable of detecting picks of the relative error more efficiently than the classical Monte Carlo sampling, as fewer evaluation points of quasi-Monte Carlo points are required. Consequently, quasi-Monte Carlo sampling overperforms the classical Monte Carlo sampling [26].

#### 2.2. Chosen Approximation for Tests

_{%}[36]. Such variation of the numerical values of parameters does not only change the value of the maximal relative error δ

_{%}, but also changes the distribution of the error over the domain of applicability of the Colebrook equation in engineering practice [17,18]. Therefore, the results depend on both the number of testing points and on their distribution.

_{%}of Equation (2) is estimated by Praks and Brkić [31] to be around 0.0012% using up to 2 to 8 million Sobol’s quasi-random testing points. Using the same methodology for estimation of the maximal relative error δ

_{%}as in Brkić [14], with 740 quasi-uniform testing points, it is estimated to be up to 0.00120421% (it was additionally tested using 740 points and confirmed up to 0.001204% by Brkić and Stajić [15], who used VBA coding for MS Excel).

#### 2.3. Distribution of Testing Points

_{%}can be overlooked, because it can be located among the chosen testing points. Therefore, the testing points should sufficiently cover the domain of applicability of the Colebrook equation using an appropriate pattern to avoid such undetected picks of error which can occur among the testing points.

#### 2.3.1. Sobol’s Quasi-Random Testing Points

_{1i}, S

_{2i}], values of the Reynolds number Re between 4000 and 10

^{8}can be generated, as well for the relative roughness of inner pipe surface ε between 0 and 0.05. Sobol’s numbers are always between 0 and 1, and the Reynolds number Re can be generated using the first dimension of the Sobol two-dimensional sequence S

_{1i}, while the relative roughness of the inner pipe surface ε using the second S

_{2i}, as shown in Equation (3):

^{8}, and ε between 0 and 0.05, while to normalize it, Equation (4) is used, where $R{e}_{norm}$ and ${\epsilon}_{norm}$ represent a normalized value, i.e., a value between 0 and 1 (for example a random number or quasi-random number of the Sobol sequence):

^{x}functions were used in the transformation to sufficiently cover the large interval of input parameters of the Colebrook equation (especially for the Reynolds numbers). As the Reynold numbers Re of the Colebrook equation are between 4000 and 10

^{8}, the procedure for the generation can be expressed as 10^(Re

_{norm}*(Re

_{max}− Re

_{min}) + Re

_{min}), where Re

_{min}= log

_{10}(4000) and Re

_{max}= log

_{10}(10

^{8}) = 8. Consequently, the expression for the generation of Reynold numbers Re of the Colebrook equation can be approximated as Re~10.0^(4.3979*Re

_{norm}+ 3.6021), as 10

^{3}.

^{6021}~4000 represents the minimal Reynold number of the Colebrook equation. Moreover, 4.3979 + 3.6021 = 8, which represents the maximal Reynold number 10

^{8}, where for Re

_{norm}= 0→Re~4000 and for Re

_{norm}= 1→Re~10

^{8}. Similarly, the relative roughness ε of the pipeline between ε

_{min}= log

_{10}(3.1808 × 10

^{−7}) and ε

_{max}= log

_{10}(0.05) can be generated from ε

_{norm}as ε = 10^(ε

_{norm}*(ε

_{max}− ε

_{min}) + ε

_{min}) where the expression can be approximated for the Colebrook equation as ε~10.0^(5.1964*x

_{norm}− 6.4975) because for ε

_{norm}= 0→ε~0 and for ε

_{norm}= 1→ε~0.05.

_{%}of Equation (2) for n = 6, for 64 sampling points is 0.00120432%, for 740 sampling points the same results (the maximal error was already detected in the first 64 samples), while for n = 11, 2

^{n}= 2048 is up to 0.00120441%.

^{n}= 64 sampling points.

#### 2.3.2. Random Sampling

_{1i}, S

_{2i}], Equation (3) used Excel function “Rand()”. This will always generate different testing patterns as shown in Figure 2.

_{%}in all tests for the approximation from Equation (2) is always evaluated to be around 0.0012% using random sampling.

## 3. Conclusions

^{8}and the inner pipe surface varies from 3.1808 × 10

^{−7}to 0.05), every new approximation of the Colebrook equation should be discovered by the evaluation of a large number of possible combinations of input parameters. For this reason, a method is required, which is able to identify a limited number of pairs suitable for the building of a new approximation. This communication shows that the Sobol quasi-Monte Carlo method requires, for the same accuracy of the Colebrook approximation, a less number of evaluations of the Colebrook equation than the classical Monte-Carlo method.

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Colebrook, C.F. Turbulent flow in pipes with particular reference to the transition region between the smooth and rough pipe laws. J. Inst. Civ. Eng.
**1939**, 11, 133–156. [Google Scholar] [CrossRef] - Colebrook, C.; White, C. Experiments with fluid friction in roughened pipes. Proc. R. Soc. Lond. Ser. A Math. Phys. Sci.
**1937**, 161, 367–381. [Google Scholar] [CrossRef] - Brown, G.O. The history of the Darcy-Weisbach equation for pipe flow resistance. In Proceedings of the Environmental and Water Resources History Sessions at ASCE Civil Engineering Conference and Exposition, Washington, DC, USA, 3–7 November 2002; pp. 34–43. [Google Scholar] [CrossRef] [Green Version]
- Moody, L.F. Friction factors for pipe flow. Trans. ASME
**1944**, 66, 671–684. [Google Scholar] - Jackson, D.; Launder, B. Osborne Reynolds and the publication of his papers on turbulent flow. Annu. Rev. Fluid Mech.
**2007**, 39, 19–35. [Google Scholar] [CrossRef] [Green Version] - Kaur, K.; Annus, I.; Vassiljev, A.; Kändler, N. Determination of pressure drop and flow velocity in old rough pipes. Proceedings
**2018**, 2, 590. [Google Scholar] [CrossRef] [Green Version] - Carvajal, J.; Zambrano, W.; Gómez, N.; Saldarriaga, J. Turbulent flow in PVC pipes in water distribution systems. Urban Water J.
**2020**, 17, 503–511. [Google Scholar] [CrossRef] - Brkić, D. Solution of the implicit Colebrook equation for flow friction using Excel. Spreadsheets Educ.
**2017**, 10, 4663. Available online: https://sie.scholasticahq.com/article/4663 (accessed on 12 August 2021). - Praks, P.; Brkić, D. Advanced iterative procedures for solving the implicit Colebrook equation for fluid flow friction. Adv. Civ. Eng.
**2018**, 2018, 5451034. [Google Scholar] [CrossRef] [Green Version] - Praks, P.; Brkić, D. Choosing the optimal multi-point iterative method for the Colebrook flow friction equation. Processes
**2018**, 6, 130. [Google Scholar] [CrossRef] [Green Version] - Olivares, A.; Guerra, R.; Alfaro, M.; Notte-Cuello, E.; Puentes, L. Experimental evaluation of correlations used to calculate friction factor for turbulent flow in cylindrical pipes. Rev. Int. Métodos Numér. Cálc. Diseño Ing.
**2019**, 35, 15. [Google Scholar] [CrossRef] - Gregory, G.A.; Fogarasi, M. Alternate to standard friction factor equation. Oil Gas J.
**1985**, 83, 120–127. [Google Scholar] - Yıldırım, G. Computer-based analysis of explicit approximations to the implicit Colebrook–White equation in turbulent flow friction factor calculation. Adv. Eng. Softw.
**2009**, 40, 1183–1190. [Google Scholar] [CrossRef] - Brkić, D. Review of explicit approximations to the Colebrook relation for flow friction. J. Pet. Sci. Eng.
**2011**, 77, 34–48. [Google Scholar] [CrossRef] [Green Version] - Brkić, D.; Stajić, Z. Excel VBA-Based User Defined Functions for highly precise Colebrook’s pipe flow friction approximations: A comparative overview. Facta Univ. Ser. Mech. Eng.
**2021**, 19, 253–269. [Google Scholar] [CrossRef] - Qiu, M.; Ostfeld, A. A head formulation for the steady-state analysis of water distribution systems using an explicit and exact expression of the Colebrook–White equation. Water
**2021**, 13, 1163. [Google Scholar] [CrossRef] - Winning, H.K.; Coole, T. Explicit friction factor accuracy and computational efficiency for turbulent flow in pipes. Flow Turbul. Combust.
**2013**, 90, 1–27. [Google Scholar] [CrossRef] - Winning, H.K.; Coole, T. Improved method of determining friction factor in pipes. Int. J. Numer. Methods Heat Fluid Flow
**2015**, 25, 941–949. [Google Scholar] [CrossRef] - Samadifar, M.; Toghraie, D. Numerical simulation of heat transfer enhancement in a plate-fin heat exchanger using a new type of vortex generators. Appl. Therm. Eng.
**2018**, 133, 671–681. [Google Scholar] [CrossRef] - Rahmati, A.R.; Akbari, O.A.; Marzban, A.; Toghraie, D.; Karimi, R.; Pourfattah, F. Simultaneous investigations the effects of non-Newtonian nanofluid flow in different volume fractions of solid nanoparticles with slip and no-slip boundary conditions. Therm. Sci. Eng. Prog.
**2018**, 5, 263–277. [Google Scholar] [CrossRef] - Shahsavar, A.; Godini, A.; Sardari, P.T.; Toghraie, D.; Salehipour, H. Impact of variable fluid properties on forced convection of Fe
_{3}O_{4}/CNT/water hybrid nanofluid in a double-pipe mini-channel heat exchanger. J. Therm. Anal. Calorim.**2019**, 137, 1031–1043. [Google Scholar] [CrossRef] - Barnoon, P.; Toghraie, D.; Eslami, F.; Mehmandoust, B. Entropy generation analysis of different nanofluid flows in the space between two concentric horizontal pipes in the presence of magnetic field: Single-phase and two-phase approaches. Comput. Math. Appl.
**2019**, 77, 662–692. [Google Scholar] [CrossRef] - Zahreddine, H. Accurate explicit analytical solution for Colebrook-White equation. Mech. Res. Commun.
**2021**, 111, 103646. [Google Scholar] [CrossRef] - Muzzo, L.E.; Matoba, G.K.; Ribeiro, L.F. Uncertainty of pipe flow friction factor equations. Mech. Res. Commun.
**2021**, 116, 103764. [Google Scholar] [CrossRef] - Shaikh, M.M.; Massan, S.R.; Wagan, A.I. A sixteen decimal places’ accurate Darcy friction factor database using non-linear Colebrook’s equation with a million nodes: A way forward to the soft computing techniques. Data Brief
**2019**, 27, 104733. [Google Scholar] [CrossRef] [PubMed] - Sobol, I.M. Uniformly distributed sequences with an additional uniform property. USSR Comput. Math. Math. Phys.
**1976**, 16, 236–242. [Google Scholar] [CrossRef] - Clamond, D. Efficient resolution of the Colebrook equation. Ind. Eng. Chem. Res.
**2009**, 48, 3665–3671. [Google Scholar] [CrossRef] [Green Version] - Giustolisi, O.; Berardi, L.; Walski, T.M. Some explicit formulations of Colebrook–White friction factor considering accuracy vs. computational speed. J. Hydroinform.
**2011**, 13, 401–418. [Google Scholar] [CrossRef] [Green Version] - Biberg, D. Fast and accurate approximations for the Colebrook equation. J. Fluids Eng.
**2017**, 139, 031401. [Google Scholar] [CrossRef] - Brkić, D.; Praks, P. Accurate and efficient explicit approximations of the Colebrook flow friction equation based on the Wright ω-function. Mathematics
**2019**, 7, 34. [Google Scholar] [CrossRef] [Green Version] - Praks, P.; Brkić, D. Review of new flow friction equations: Constructing Colebrook explicit correlations accurately. Rev. Int. Métodos Numér. Cálc. Diseño Ing.
**2020**, 36, 41. [Google Scholar] [CrossRef] - Praks, P.; Brkić, D. One-log call iterative solution of the Colebrook equation for flow friction based on Padé polynomials. Energies
**2018**, 11, 1825. [Google Scholar] [CrossRef] [Green Version] - Vatankhah, A.R. Approximate analytical solutions for the Colebrook equation. J. Hydraul. Eng.
**2018**, 144, 06018007. [Google Scholar] [CrossRef] - Lamri, A.A. Discussion of “Approximate analytical solutions for the Colebrook equation”. J. Hydraul. Eng.
**2020**, 146, 07019012. [Google Scholar] [CrossRef] [Green Version] - Lamri, A.A.; Easa, S.M. Computationally efficient and accurate solution for Colebrook equation based on Lagrange theorem. J. Fluids Eng.
**2021**, 144, 014504. [Google Scholar] [CrossRef] - Brkić, D.; Ćojbašić, Ž. Evolutionary Optimization of Colebrook’s Turbulent Flow Friction Approximations. Fluids
**2017**, 2, 15. [Google Scholar] [CrossRef] [Green Version] - Sobol, I.M.; Turchaninov, V.I.; Levitan, Y.L.; Shukhman, B.V. Quasi-Random Sequence Generators; Distributed by OECD/NEA Data Bank; Keldysh Institute of Applied Mathematics; Russian Academy of Sciences: Moscow, Russia, 1992; Available online: https://ec.europa.eu/jrc/sites/jrcsh/files/LPTAU51.rar (accessed on 12 January 2021).
- Bratley, P.; Fox, B.L. Algorithm 659: Implementing Sobol’s quasirandom sequence generator. ACM Trans. Math. Softw. TOMS
**1988**, 14, 88–100. [Google Scholar] [CrossRef] - Joe, S.; Kuo, F.Y. Constructing Sobol sequences with better two-dimensional projections. SIAM J. Sci. Comput.
**2008**, 30, 2635–2654. [Google Scholar] [CrossRef] [Green Version] - Joe, S.; Kuo, F.Y. Remark on algorithm 659: Implementing Sobol’s quasirandom sequence generator. ACM Trans. Math. Softw. TOMS
**2003**, 29, 49–57. [Google Scholar] [CrossRef] - Fox, B.L. Algorithm 647: Implementation and relative efficiency of quasirandom sequence generators. ACM Trans. Math. Softw. TOMS
**1986**, 12, 362–376. [Google Scholar] [CrossRef] - Hamlet, R. Random testing. Encycl. Softw. Eng.
**1994**, 2, 971–978. [Google Scholar] [CrossRef] - Hamlet, D. When only random testing will do. In Proceedings of the 1st International Workshop on Random Testing, Portland, ME, USA, 20 July 2006; pp. 1–9. [Google Scholar] [CrossRef]
- Chen, T.Y.; Merkel, R. Quasi-random testing. IEEE Trans. Reliab.
**2007**, 56, 562–568. [Google Scholar] [CrossRef] - Engine for Generating (Scrambled) Sobol’ Sequences. Available online: https://docs.scipy.org/doc/scipy/reference/reference/generated/scipy.stats.qmc.Sobol.html (accessed on 12 January 2022).
- Ashraf, A.; Pervaiz, S.; Haider Bangyal, W.; Nisar, K.; Ibrahim, A.; Rodrigues, J.J.P.C.; Rawat, D.B. Studying the Impact of Initialization for Population-Based Algorithms with Low-Discrepancy Sequences. Appl. Sci.
**2021**, 11, 8190. [Google Scholar] [CrossRef] - Bangyal, W.H.; Nisar, K.; Ibrahim, A.; Haque, M.R.; Rodrigues, J.J.P.C.; Rawat, D.B. Comparative Analysis of Low Discrepancy Sequence-Based Initialization Approaches Using Population-Based Algorithms for Solving the Global Optimization Problems. Appl. Sci.
**2021**, 11, 7591. [Google Scholar] [CrossRef] - Wang, L.; Defo, M.; Xiao, Z.; Ge, H.; Lacasse, M.A. Stochastic Simulation of Mould Growth Performance of Wood-Frame Building Envelopes under Climate Change: Risk Assessment and Error Estimation. Buildings
**2021**, 11, 333. [Google Scholar] [CrossRef]

S_{1i} | S_{2i} | Re | Ε | f_{0}^{−}^{0.5} | f_{0} | A_{1} | A_{2} | A_{3} | f^{−}^{0.5} | f | δ_{%} | |
---|---|---|---|---|---|---|---|---|---|---|---|---|

1 | 0.5 | 0.5 | 632455.5 | 0.0001257433 | 8.347569 | 0.014351 | 12.57773 | 22.40839 | 3.10943 | 8.347588 | 0.014351 | 0.00046325 |

2 | 0.25 | 0.75 | 50297.3 | 0.0000063058 | 6.919347 | 0.020887 | 10.04608 | 10.08528 | 2.31107 | 6.919307 | 0.020887 | 0.00116755 |

3 | 0.75 | 0.25 | 7952707.3 | 0.0025074224 | 6.337726 | 0.024896 | 15.10939 | 2480.07058 | 7.81604 | 6.337728 | 0.024896 | 0.00007747 |

4 | 0.125 | 0.625 | 14184.1 | 0.0000281588 | 5.949113 | 0.028255 | 8.780253 | 8.82962 | 2.17811 | 5.949092 | 0.028255 | 0.00071176 |

5 | 0.625 | 0.125 | 2242706.8 | 0.0111969246 | 5.038929 | 0.039384 | 13.84356 | 3117.96594 | 8.04493 | 5.038919 | 0.039384 | 0.00038896 |

6 | 0.375 | 0.375 | 178355.9 | 0.0005615084 | 7.195110 | 0.019316 | 11.31191 | 23.69164 | 3.16512 | 7.195132 | 0.019316 | 0.00059865 |

7 | 0.875 | 0.875 | 28200544.8 | 0.0000014121 | 11.694507 | 0.007312 | 16.37522 | 21.29784 | 3.05860 | 11.694525 | 0.007312 | 0.00031746 |

8 | 0.0625 | 0.9375 | 7532.4 | 0.0000006682 | 5.477297 | 0.033332 | 8.147338 | 8.14796 | 2.09776 | 5.477294 | 0.033333 | 0.00011350 |

9 | 0.5625 | 0.4375 | 1190971.2 | 0.0002657178 | 8.104136 | 0.015226 | 13.21065 | 52.32980 | 3.95756 | 8.104180 | 0.015226 | 0.00108532 |

⁞ | ⁞ | |||||||||||

2049 | 0.0002441 | 0.941162 | 4009.9 | 0.0000006396 | 5.007611 | 0.039878 | 7.516895 | 7.51721 | 2.01719 | 5.007631 | 0.039878 | 0.00081838 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Praks, P.; Brkić, D.
Approximate Flow Friction Factor: Estimation of the Accuracy Using Sobol’s Quasi-Random Sampling. *Axioms* **2022**, *11*, 36.
https://doi.org/10.3390/axioms11020036

**AMA Style**

Praks P, Brkić D.
Approximate Flow Friction Factor: Estimation of the Accuracy Using Sobol’s Quasi-Random Sampling. *Axioms*. 2022; 11(2):36.
https://doi.org/10.3390/axioms11020036

**Chicago/Turabian Style**

Praks, Pavel, and Dejan Brkić.
2022. "Approximate Flow Friction Factor: Estimation of the Accuracy Using Sobol’s Quasi-Random Sampling" *Axioms* 11, no. 2: 36.
https://doi.org/10.3390/axioms11020036