Calculate pipeline pressure drop for liquids (Darcy-Weisbach equation) or gases (General flow equation / AGA equation). Friction factor is calculated iteratively using the Colebrook-White equation (used in the Moodey chart). Wall thickness is calculated using Lame’s equation together with a pipe schedule lookup table for standard diameters. Sensitivity plot of inlet pressure, diameter & flowrate is also provided as well as a check of erosional velocity.
Reference:
http://firstprincipleseng.net/index.htm