File Exchange

image thumbnail

colebrook.m

version 1.0.0.0 (1.07 KB) by Didier Clamond
Efficient resolution of the Colebrook-White equation.

37 Downloads

Updated 04 Nov 2008

No License

% F = COLEBROOK(R,K) fast, accurate and robust computation of the
% Darcy-Weisbach friction factor F according to the Colebrook equation:
% - -
% 1 | K 2.51 |
% --------- = -2 * Log_10 | ----- + ------------- |
% sqrt(F) | 3.7 R * sqrt(F) |
% - -
% INPUT:
% R : Reynolds' number (should be >= 2300).
% K : Equivalent sand roughness height divided by the hydraulic
% diameter (default K=0).
%
% OUTPUT:
% F : Friction factor.
%
% FORMAT:
% R, K and F are either scalars or compatible arrays.
%
% ACCURACY:
% Around machine precision forall R > 3 and forall K>=0,
% i.e. forall values of physical interest.
%
% EXAMPLE: F = colebrook([3e3,7e5,1e100],0.01)

This m-file is more efficient than the solution of the Colebrook equation via the Lambert W-function, or the simple approximations.

PS: For the first submission of this m-file, the author accidentaly uploaded a test version. This resubmission should be the correct one.

Cite As

Didier Clamond (2021). colebrook.m (https://www.mathworks.com/matlabcentral/fileexchange/21990-colebrook-m), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

Juba Oukaci

Thank you so much

Alfredo Bonilha

Thanks for sharing your work. Definitely a life saver!

thank you so much

Bariscan Yildiz

Beyza Ozen

Maarten Zwart

joy shooter

James Whidborne

Muhammad

Fantastic. Very pleased with your effort. It's a life saver.

Jake Dugge

osama ayadi

Well done

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!