Numerical calculation of Darcy-Weisbach friction factor
Version 1.0.0 (1.86 KB) by
Ryan Pritzkau
The darcy-weisbach friction factor is calculated using the Colebrook-White equation via the secant method.
This function takes in a given reynolds number, relative roughness, and residual value. Utilizing these three values the function iterates though the colebrook-white equation to calculate the darcy-weisbach friction factor utilizing the secant method. Since the secant method is utilized, the function breaks down a extremely high reynolds numbers. This can be resolved by adjusting the values of the first two iterations of the friction factor calculation to a value closer to the actual value.
Cite As
Ryan Pritzkau (2026). Numerical calculation of Darcy-Weisbach friction factor (https://www.mathworks.com/matlabcentral/fileexchange/130809-numerical-calculation-of-darcy-weisbach-friction-factor), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
