Iteratively solves the Colebrook formula for the Darcy-Weisbach friction factor
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This script will iteratively solve the Colebrook equation for the
Darcy friction factor. Read more about it here:

Call this script from the command line like this:
./colebrook.m Re d epsilon

'Re' is the Reynolds number, 'epsilon' is the roughness height in
millimeters, a characteristic of the pipe material that you can
probably look up in published tables, depending on your
requirements. 'd' is the pipe diameter in millimeters.

Try this:

./colebrook.m 25300 25.4 0.002;

This would represent a flow with Reynolds number 25300 in a 1-inch
diameter smooth plastic pipe, for example.

This is very crudely done; for instance, 10 iterations is simply
assumed to yield precise-enough results. Modify as needed. Attribution
not necessary. Your mileage may vary.