Liquid or Gas Pipe Design - Pressure, Flow

Pressure, flow, diameter, elevation, pump, minor losses, pipe sizing. Darcy-Weisbach friction. Friction factor using Colebrook equation for Moody Diagram. Turbulent or laminar flow.

Darcy-Weisbach pressure loss and flow calculation is mobile-device-friendly as of June 9, 2015

Register to enable "Calculate" button.

 Flow Rate, Q (gpm): Velocity: Vpipe, V2 (ft/s): Pipe Diameter, D (inch): Select Pipe Material and Fluid: Pipe Area, A (ft2): PVC, Plastic, Glass Commercial Steel or Wrought Iron Galvanized Iron Cast Iron Asphalted Cast Iron Riveted Steel Drawn Tubing Wood Stave Concrete User Defined Material Length, L (ft): Water at 20 C (68 F) Water at 4 C (39 F) Seawater at 16 C (60 F) SAE 30 oil at 16 C (60 F) Gasoline at 16 C (60 F) Mercury at 20 C (68 F) Air at 20 C (68 F), 1 atm Carbon Dioxide at 20 C (68 F), 1 atm Nitrogen at 20 C (68 F), 1 atm Helium at 20 C (68 F), 1 atm User Defined Fluid Surface Roughness, e (ft): Fluid Density (lb/ft3): Select Calculation and Scenario: Fluid Viscosity (ft2/s): Solve for V, Q Q known. Solve for Pipe Diameter Q known. Solve for Z1-Z2 Q known. Solve for P1-P2 Q known. Solve for Pipe Length Q known. Solve for Km Q known. Solve for Pump Head V known. Solve for Pipe Diameter V known. Solve for Z1-Z2 V known. Solve for P1-P2 V known. Solve for Pipe Length V known. Solve for Km V known. Solve for Pump Head Minor Loss Coefficient, Km: A - Pipe Only B - Reservoir to Reservoir C - Reservoir to Pipe D - Pipe to Reservoir E - Main to Main F - Main to Lateral G - Lateral to Main Elevation Difference, Z1-Z2 (ft): Select Units: Pressure Diff., P1-P2 (psi): Flow in m3/s Flow in ft3/s (cfs) Flow in ft3/min (cfm) Flow in gal/min (gpm) (US) Flow in gal/day (gpd) (US) Pump Head, Hp (ft): Velocity in m/s Velocity in ft/s Pump Power (hp): Diameter in m Diameter in cm Diameter in ft Diameter in inch Driving Head, DH (ft): Pressure in N/m2 or Pa Pressure in lb/ft2 or psf Pressure in lb/in2 or psi Ratio, e/D: Power in N-m/s or Watt Power in ft-lb/s Power in horsepower or hp Reynolds Number, Re: Density in g/cm3 Density in kg/m3 Density in N/m3 Density in slug/ft3 Density in lb/ft3 Friction Factor, f: Viscosity in centipoise, cP Viscosity in poise, dyne-s/cm2 Viscosity in N-s/m2, kg/m-s Viscosity in lb(f)-s/ft2, slug/ft-s Viscosity in centistoke, cSt Viscosity in stoke, cm2/s Viscosity in m2/s Viscosity in ft2/s Major (Friction) Loss, hf (ft): L, e, Z, Hp, DH, hf, hm in m. A in m2 L, e, Z, Hp, DH, hf, hm in ft. A in ft2 Minor Loss, hm (ft): © 2015 LMNO Engineering, Research, and Software, Ltd. www.LMNOeng.com

Units: cfs=cubic foot per second, cm=centimeter, cP=centipoise, cSt=centistoke, ft=foot, g=gram, gal=U.S. gallon, gpd=U.S. gallon per day, gpm=U.S. gallon per mimute, hp=horsepower, kg=kilogram, lb=pound, m=meter, min=minute, N=Newton, Pa=Pascal, psi=lb/inch2, s=second

Introduction
Our calculation is based on the steady state incompressible energy equation utilizing Darcy-Weisbach friction losses as well as minor losses. The calculation can compute flow rate, velocity, pipe diameter, elevation difference, pressure difference, pipe length, minor loss coefficient, and pump head (total dynamic head). The density and viscosity of a variety of liquids and gases are coded into the program, but you can alternatively select "User defined fluid" and enter the density and viscosity for fluids not listed. Though some industries use the term "fluid" when referring to liquids, we use it to mean either liquids or gases. The calculation allows you to select from a variety of piping scenaris which are discussed below.

Comments on gas flow
As mentioned above, the equations that our calculation is based upon are for incompressible flow. The incompressible flow assumption is valid for liquids. It is also valid for gases if the pressure drop is less than 40% of the upstream pressure. Crane (1988, p. 3-3) states that if the pressure drop is less than 10% of the upstream gage pressure (gage pressure is pressure relative to atmospheric pressure) and an incompressible model is used, then the gas density should be based on either the upstream or the downstream conditions. If the pressure drop is between 10% and 40% of the upstream gage pressure, then the density should be based on the average of the upstream and downstream conditions. If the pressure drop exceeds 40% of the upstream gage pressure, then a compressible flow model, like the Weymouth, Panhandle A, or Panhandle B should be used.

Piping Scenarios
Since boundary conditions affect the flow characteristics, our calculation allows you to select whether your locations 1 and 2 are within pipes, at the surface of open reservoirs, or in pressurized mains (same as pressurized tank). If there is no pump between locations 1 and 2, then enter the pump head (Hp) as 0.

Steady State Energy Equation           Back to Pipe Design Calculation         References
The first equation shown is the steady state energy equation for incompressible flow. The left side of the equation contains what we call the driving heads. These heads include heads due to a pump (if present), elevation, pressure, and velocity. The terms on the right side are friction loss and minor losses. Friction losses are computed using the Darcy Weisbach friction loss equation. The friction factor for turbulent flow is found using the Colebrook equation which represents the Moody diagram. f is the Moody friction factor. The equations are well-accepted in the field of fluid mechanics and can be found in many references such as Cimbala and Cengel (2008), Munson et al. (1998), and Streeter et al. (1998).

The equations above are dimensionally correct which means that the units for the variables are consistent. A consistent set of English units would be mass in slugs, weight and force in pounds, length in feet, and time in seconds. SI units are also a consistent set of units with mass in kilograms, weight and force in Newtons, length in meters, and time in seconds. Our calculation allows you to enter a variety of units and automatically performs the unit conversions.

A = Pipe cross-sectional area, ft2 or m2.
D = Pipe diameter, ft or m.
Driving Head (DH) = left side of the first equation (or right side of the equation), ft or m. This is not total dynamic head.
e = Pipe surface roughness, ft or m. Select from the drop-down menu in our calculation. Additional values.
f = Moody friction factor, unit-less. Do not confuse the Moody f with the Fanning friction factor. f = 4 fFanning .
g = acceleration due to gravity = 32.174 ft/s2 = 9.8066 m/s2.
hf = Major (friction) losses, ft or m.
hm = Minor losses, ft or m.
Hp = Pump head (also known as Total Dynamic Head), ft or m.
Km = Sum of minor losses coefficients. See table below.
log = Common (base 10) logarithm.
Pump Power (computed by program) = SQHp, lb-ft/s or N-m/s. Theoretical pump power. Does not include an inefficiency term. Note that 1 horsepower = 550 ft-lb/s.
P1 = Upstream pressure, lb/ft2 or N/m2.
P2 = Downstream pressure, lb/ft2 or N/m2.
Re = Reynolds number, unit-less.
Q = Flow rate in pipe, ft3/s or m3/s.
S = weight density, lb/ft3 or N/m3.
V = Velocity in pipe, ft/s or m/s.
V1 = Upstream velocity, ft/s or m/s.
V2 = Downstream velocity, ft/s or m/s.
Z1 = Upstream elevation, ft or m.
Z2 = Downstream elevation, ft or m.
v = kinematic viscosity, ft2/s or m2/s. Note that kinematic viscosity = dynamic viscosity divided by density.

All of our calculations utilize double precision. Newton's method (a numerical method) is used to solve the Colebrook equation accurate to 8 significant digits. A cubic solver (numerical method) is used for "Solve for V, Q," "Q known. Solve for Pipe Diameter," and "V known. Solve for Pipe Diameter." More than one solution is possible for these three calculations since there could be a result in the laminar range and the turbulent range. There may even be two possible results in the laminar range for "Solve for V, Q" if scenario D or G is selected. All of the possible solutions are computed and output. If multiple solutions are computed, please click in the numeric field and click the right arrow key to see all of the digits. If you have selected "Q known. Solve for Pipe Diameter," and scenario D or G, you must enter Km >1. All calculations are analytic (closed form) except as mentioned here.

Table of Minor Loss Coefficients (Km is unit-less)   References     Back to Calculation

 Fitting Km Fitting Km Valves: Elbows: Globe, fully open 10 Regular 90°, flanged 0.3 Angle, fully open 2 Regular 90°, threaded 1.5 Gate, fully open 0.15 Long radius 90°, flanged 0.2 Gate 1/4 closed 0.26 Long radius 90°, threaded 0.7 Gate, 1/2 closed 2.1 Long radius 45°, threaded 0.2 Gate, 3/4 closed 17 Regular 45°, threaded 0.4 Swing check, forward flow 2 Swing check, backward flow infinity Tees: Line flow, flanged 0.2 180° return bends: Line flow, threaded 0.9 Flanged 0.2 Branch flow, flanged 1.0 Threaded 1.5 Branch flow, threaded 2.0 Pipe Entrance (Reservoir to Pipe): Pipe Exit (Pipe to Reservoir) Square Connection 0.5 Square Connection 1.0 Rounded Connection 0.2 Rounded Connection 1.0 Re-entrant (pipe juts into tank) 1.0 Re-entrant (pipe juts into tank) 1.0

Common Questions                                          Back to Calculation
I took fluid mechanics a long long time ago. What is head? Why does it have units of length? Head is energy per unit weight of fluid (i.e. Force x Length/Weight = Length). The program on this page solves the energy equation (shown above); we call energy "head."
Why is Pressure=0 for a reservoir?
A reservoir is open to the atmosphere, so its gage pressure is zero.
Why is Velocity=0 for a reservoir? This is a common assumption in fluid mechanics and is based on the fact that a reservoir has a large surface area. Therefore, the liquid level drops very little even if a lot of liquid flows out of the reservoir. A reservoir may physically be a lake or a large diameter tank.
What is a "main" and a "lateral"? A "main" is a large diameter supply pipe that has many smaller diameter "laterals" branching off of it. In fluid mechanics, we set V=0 for the main since it has a large diameter (relative to the lateral) and thus a very small velocity. To further justify the V=0 assumption, the main's pressure is typically high, so the velocity head in the main is negligible. The main is drawn such that it is coming out of your computer monitor.
Can I model flow between two reservoirs using either Scenario B or E? Yes, you can. If using Scenario E, just set P1-P2=0. Scenario B automatically sets P1-P2=0.
Can I model flow between two mains using either Scenario B or E? Only if the pressure is the same in both mains.
How do I model a pipe discharging freely to the atmosphere? Use Scenario A, C, or F. Since P2=0 (relative to atmospheric pressure), P1-P2 that is input or output will be P1.
What are minor losses? Minor losses are head (energy) losses due to valves, pipe bends, pipe entrances (for fluid flowing from a tank to a pipe), and pipe exits (fluid flowing from a pipe to a tank), as opposed to a major loss which is due to the friction of fluid flowing through a length of pipe. Minor loss coefficients (Km) are tabulated below. For our program, all of the pipes have the same diameter, so you can add up all your minor loss coefficients and enter the sum in the Minor Loss Coefficient input box.
Why do I sometimes get the message, "Infeasible Input"? The governing equations for fluid flow must be satisfied. Fluids must flow from higher energy to lower energy; driving head must always be > 0. Pipe roughness, fluid viscosity, pipe diameter, and velocity must be such that the Reynolds number is <=108 and other conditions shown with the equations below are satisfied. It is possible to enter values that are not physically or mathematically feasible.
I'm confused about pumps. Only input Pump Head if the pump is between points 1 and 2. Otherwise, enter 0 for Pump Head. Pump Head, Hp, is also known as total dynamic head.
Your program is great! What are its limitations? Pipes must all have the same diameter. Pump curves cannot be implemented.
What is Driving Head? See above in the variable definitions.

References               Back to Calculation
Cimbala, John M. and Yunus A. Cengel. 2008. Essentials of Fluid Mechanics: Fundamentals and Applications. McGraw-Hill.

Crane Co. 1988. Flow of Fluids through Valves, Fittings, and Pipe. Technical Paper 40 (TP-40). http://www.craneco.com.

Munson, Bruce R. Donald F. Young, and Theodore H. Okiishi. 1998. Fundamentals of Fluid Mechanics. John Wiley and Sons. Inc. 3ed.

Streeter, Victor L., E. Benjamin Wylie, and Keith W. Bedford. 1998. Fluid Mechanics. McGraw-Hill. 9ed.

LMNO Engineering, Research, and Software, Ltd.
7860 Angel Ridge Rd.   Athens, Ohio  45701  USA   Phone and fax: (740) 592-1890
LMNO@LMNOeng.com    http://www.LMNOeng.com

August 25, 2015: Made text fields narrower to show 8 significant figures rather than 16. Calculation still uses double precision internally.

To:

Other single pipe calculators:

Darcy-Weisbach with pump curve

Hazen-Williams without pump curve

Hazen-Williams with pump curve

Multiple pipes:

Pipe Network

Bypass Loop Calculator

Videos of experiment and analysis of friction loss

Trouble printing?

Register