frictionfactor

Sick of squinting at the Moody diagram? Use this function instead to compute your friction factor (Fluid Mechanics pipe flow analysis).
109 Downloads
Updated 23 May 2020

View License

Takes the following inputs:
e (roughness)
d (pipe diameter)
rho (density)
mu (viscosity)
vave (average velocity)
uid (indicates whether using English or metric)

And outputs:
friction factor
relative roughness
alpha (for turbulent or laminar)
Reynold's number

Inputs may be in either English or metric. Uses the Colebrook function for iteration.

Cite As

Maile Juarez (2026). frictionfactor (https://www.mathworks.com/matlabcentral/fileexchange/75908-frictionfactor), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0