An algorithm for the calculation of the Darcy friction factor, for the estimation of pressure losses in pipe flows, is presented. The algorithm includes the five correlations that generate the Moody chart. The codification of the algorithm in Visual Basic for Applications, for use in the MS Excel spreadsheet, is presented. The Prandtl and Colebrook correlations, which are not explicit in the friction factor, are solved through a Newton numerical method; the derivatives of the functions are obtained through a numerical central perturbation procedure. The algorithm also calculates the values of the friction factor for the critical flow zone, between the zones of laminar and turbulent flow, in order to avoid numeric discontinuities during optimization processes. The results are shown as an Excel-generated Moody chart.

This content is only available via PDF.
You do not currently have access to this content.