When the pipes have certain roughness , this factor must be taken in account when the Fanning friction factor is calculated. The relationship between pipe roughness and Fanning friction factor was developed by Haaland (1983) under flow conditions of 
where
*  is the roughness of the inner surface of the pipe (dimension of length)
* D is inner pipe diameter;
The Swamee–Jain equation is used to solve directly for the Darcy–Weisbach friction factor f for a full-flowing circular pipe.  It is an approximation of the implicit Colebrook–White equation.