Solving the Colebrook Equation for Friction Factors
Part 1 of 3 in a series of articles

 More on Fluid Flow from Cheresources.com: FREE Resources Article: Centrifugal Pumps - Part I Article: Centrifugal Pumps - Part II Questions and Answers: Fluid Dynamics Experienced-Based Rules for Pumps and Fluid Flow ChE Links: Search for "Pumps" Students: Ask a Question in our Forums Professionals: Ask a Question in our Forums Purchase / Subscription Resources Online Store: Centrifugal Pump Spec Sheet Online Store: Centrifugal Pumps Tips and Tricks Online Store: Pump Maintenance Articles Online Store: Fluid Flow Software

Introduction

In 1944 Lewis F. Moody, Professor, Hydraulic Engineering, Princeton University,  published “Friction Factors for Pipe Flow”1.  The work of Moody, and the Moody Diagram on page 672 of the published transactions, has become the basis for many of the calculations on friction loss in pipes, ductwork and flues.  While there are modified versions of the original Moody Diagram, I will strive to use the original diagram as the basis for terminology used here.

Moody references the work of C.F. Colebrook and C.M. White, amongst others, in developing his Moody Diagram.  The Moody Diagram can be used as a graphical solution of the Colebrook Equation.  There are tools available today that allow solution of the Colebrook Equation, in both its Implicit forms and Explicit forms, without using the graphical approach.  These are much more useful when working with electronic spreadsheets as will be done in this series.

The series will examine:

Implicit Forms of Colebrook:

We will look at the three common forms of the Colebrook Equation.  The differences between these three equations will be examined and the deviations in the results that they produce will be explored.

User Defined Functions (UDF) for the Implicit Forms of Colebrook:

We will look at UDFs that solve the three Implicit forms of Colebrook.  The functions are written in the Visual Basic Editor which is part of Excel spreadsheets.  The accuracy of the UDFs will be compared to those obtained by Iteration.

Explicit Forms of Colebrook:

In this section we will be looking at four forms of the Colebrook Equations that I am familiar with.  I would also like to solicit the readers for any other explicit equations that they are familiar with and these will be included as well.  The four equations that I plan to discuss are:

Serghide’s Solution.3
Zigrang and Sylvester Solution.4
Swamee and Jain.5
Altshul-Tsal.6

Special Cases:

In this section, several special case equations will be examined.  Where possible, the deviations between these equations and the parent equations will be evaluated.   We will also examine if these special case equations are needed because the Colebrook solutions are inadequate or if they are useful as merely simplified equations.

What should be considered in selecting a method to solve Colebrook:

Several alternatives will be presented for calculating the Friction Factor, “f ”.  Easy of use, accuracy, alternatives and limits of use are among the considerations to be evaluated.

Implicit Forms of Colebrook

There are at least three forms of the Colebrook Equation that can be found in current literature on hydraulics.  These are:

Where:

f is the Friction Factor and is dimensionless
e is the Absolute Roughness and is in units of length
D is the Inside Diameter and, as these formulas are written, is in the same units as e.
R is the Reynolds Number and is dimensionless.
Note that
e/D is the Relative Roughness and is dimensionless.

These three equations are referred to as “Implicit” Equations.  “Implicit” means that “f”, the Friction Factor, is “Implied or understood though not directly expressed”2.  Simply stated, the equations ARE NOT in the form of “f = ………”.  These are sometimes referred to as “equivalent” but as we will see, the results will vary when calculated to the fourth significant digit.

These equations can be solved for “f” given the Relative Roughness (?/D) and the Reynolds Number, (R), by iteration.  Such iterations can be performed using an electronic spreadsheet. A spreadsheet, “Friction Factor Formulas for Cheresource.xls” is presented for demonstration.  The spreadsheet contains four worksheets.  The first “Tab” is labeled “Iterations”.  The Iterative solutions are generated by breaking the formulas in two parts, that which is left of the equal sign and that which is right of the equal sign.  (See row 20 as an example.)  The Iteration then tests values of “ f ” that will result in the difference between the two sides to be zero or very close to zero.  (A complete explanation was published in the ASHRAE Journal of September, 20027.)

If you open the spreadsheet to the “Iterations” workbook and enter valves for Relative Roughness of .001 in cell C3 and Reynolds Number of 1,000,000 in cell C4, you will see cells C9, C11 and C13 all indicate that “Iteration Required”.  This is indicating that a solution has not been found and that an Iteration must be performed.  You will note that there is a Command Button titled “Perform Iterations” in the upper left hand area of the spreadsheet.  A macro was written to perform the necessary Iterations on the three formulas when this Command Button is clicked.  (You can alternatively execute the macro for the three Iterations using the Hotkeys “Ctrl – I” or execute the Iterations manually using the Tools / Goal Seek commands from the menu bar.)

Assuming that the valves suggested have been entered and the Command Button has been clicked, cells C9, C11 and C13 should now contain valves.  Note that each value is identical for at least three significant digits, that being .0199…for the example given.  (If you refer to a Moody Diagram, you will see that the graphical solution appears to be approximately .02.)  You should also note that there is some difference between these cells starting at the fourth significant digit.  You may wonder if this is an error in the iteration or difference in the formulas themselves.

The accuracy of the Iterative Solution can be validated by back substituting the result into the original equation.  I’m going to refer to this as the “Check Value”.  Modifying Eq 1 by multiplying both sides of the equation by the square root of “f “ becomes:

Back substituting the given Relative Roughness and Reynolds Numbers and the calculated Friction Factor, an exact solution would result in a “Check Value” of:

1 = 1.000000……

The result of an iteration is limited by either the number of iterations or the maximum deviation allowed.  The result here, although extremely accurate, is less than exact.  (You may note that the difference in cell I20 was multiplied by 1000 to improve the accuracy over the default “Maximum Change” of .001 in Excel.)  Given that the original formula was empirically derived, and that there is some difference between the results from the three forms of Colebrook, something less than the exact solution must be deemed acceptable.  What is practical from the stand point of Good Engineering Practice is something that will be discussed in the last section of this series.  For now, I will present “Check Values” taken to the sixth decimal point for comparing various solutions.

In the spreadsheet, you will notice that “Check Values” are given in both columns D and E.  In column D, the “Check Values” are calculated using the same equation used in the iteration.  This indicates that the iterations produced very accurate results.  Column E, on the other hand, is calculated using the Friction Factor from the iteration of Eq 2 or 3, but back substituted into Eq 1 for calculating the “Check Values”.

There is a problem with Eq 3; it isn’t capable of producing a result when a Relative Roughness of zero (representing smooth pipe) is entered.   The Visual Basic dialog box will appear with the message, “Run-time error ‘1004’.  Reference is not valid”  Click on the “End” Button to get out of the macro.  A good approximation can be calculated by entering a very small Relative Roughness, say .000 000 001.

Enough for now on Iterative Solutions.  We will revisit this subject and the other solutions to be covered in the last section of this series.

By: Thomas G. Lester, P.E., Bergmann Associates
tlester@bergmannpc.com