File Exchange

image thumbnail

Colebrook

version 1.0.2 (2.22 KB) by Ildeberto de los Santos Ruiz
Computes the friction factor in pipes for given values of the Reynolds number (Re) and the relative roughness coefficient (epsilon).

11 Downloads

Updated 23 Jul 2019

GitHub view license on GitHub

MATLAB code to compute the friction factor in pipes for given values of the Reynolds number (Re) and the relative roughness coefficient (epsilon).

Syntax:
f = colebrook(Re,epsilon)

Example 1: Single Re, single epsilon
Re = 1e5;
epsilon = 1e-4;
f = colebrook(Re,epsilon)

Example 2: Multiple Re, single epsilon
Re = 5000:1000:100000;
epsilon = 1e-4;
f = colebrook(Re,epsilon*ones(size(Re)));
plot(Re,f)

Example 3: Multiple Re, multiple epsilon
Re = logspace(4,8,100);
epsilon = linspace(1e-4,1e-1,100);
[RE,EPSILON] = meshgrid(Re,epsilon);
F = colebrook(RE,EPSILON);
surf(RE,EPSILON,F)

Cite As

Ildeberto de los Santos Ruiz (2020). Colebrook (https://github.com/isantosruiz/colebrook), GitHub. Retrieved .

Santos-Ruiz, Ildeberto. Colebrook Equation. Zenodo, 2019, doi:10.5281/zenodo.3348254.

View more styles

Comments and Ratings (1)

MATLAB User

Updates

1.0.2

Minor bugs fixed.

1.0.1

Minor bugs fixed.

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