Fluid Mechanics Calculator

Pipe Flow Calculator

Calculate volumetric flow rate, fluid velocity, and internal cross-sectional area for circular conduits using the continuity principle.

Pipe Cross-Section & Flow Velocity

Continuity equation: Volumetric discharge vs internal area

D = 80 mmCross Section (A)v = 1.99 m/sQ = 36.0 m³/h

Calculation Inputs

Specify known variables to solve for velocity or discharge

mm

Actual inside diameter (ID) of the pipe.

m³/h

Discharge volume passing per hour.

Velocity Guide

Target fluid velocity for general water piping is typically 1.0 – 2.5 m/s. Pump suction lines are typically sized lower at 0.8 – 1.2 m/s.

Fluid Velocity (v)

1.99m/s

Cross-sectional Area: 50.27 cm² (0.00503 m²)

Flow in m³/h

36.00

Flow in L/s

10.00

Flow in L/min

600.0

Piping Velocity Status: Optimal (1.0 – 3.0 m/s)

Governing Formula

Q = A · v = (π · D² / 4) · v
Qm³/s, m³/h, L/s

Volumetric flow rate

vm/s

Average fluid flow velocity

A

Cross-sectional flow area

Dm / mm

Internal pipe diameter

Calculation Assumptions

  • Incompressible fluid flow
  • Full conduit cross-section
  • Circular pipe internal geometry
  • Uniform 1D bulk velocity
  • Steady-state continuity
  • Pipe wall expansion neglected

Engineering Code

Reuse the calculation in your own engineering workflow.

Python
import math

def calculate_pipe_flow(d_mm, q_m3_h=None, v_m_s=None):
    """
    Calculate flow parameters using the continuity equation Q = A * v.
    """
    d_m = d_mm / 1000.0
    area_m2 = (math.pi * (d_m ** 2)) / 4.0
    
    if q_m3_h is not None:
        q_m3_s = q_m3_h / 3600.0
        v = q_m3_s / area_m2
    elif v_m_s is not None:
        v = v_m_s
        q_m3_s = v * area_m2
    else:
        raise ValueError("Provide either flow rate or velocity.")
        
    return {
        "area_m2": area_m2,
        "velocity_m_s": v,
        "flow_m3_h": q_m3_s * 3600.0,
        "flow_L_s": q_m3_s * 1000.0,
        "flow_L_min": q_m3_s * 60000.0
    }

# Example
res = calculate_pipe_flow(
    d_mm=80,
    q_m3_h=36
)
print(f"Velocity: {res['velocity_m_s']:.3f} m/s")
print(f"Flow Rate: {res['flow_m3_h']:.2f} m³/h ({res['flow_L_s']:.2f} L/s)")
print(f"Pipe Area: {res['area_m2']:.6f} m²")
MATLAB
function res = pipe_flow(d_mm, q_m3_h, v_m_s)
    d_m = d_mm / 1000;
    area = (pi * d_m^2) / 4;
    
    if nargin > 1 && ~isempty(q_m3_h)
        q_m3_s = q_m3_h / 3600;
        v = q_m3_s / area;
    else
        v = v_m_s;
        q_m3_s = v * area;
    end
    
    res.velocity = v;
    res.flow_m3_h = q_m3_s * 3600;
    res.flow_L_s = q_m3_s * 1000;
end

% Example
res = pipe_flow(80, 36, []);
fprintf('Velocity: %.2f m/s\n', res.velocity);
Excel Formula
=Q_m3s / ((PI() * (D_mm/1000)^2) / 4)

Example Calculation

For water passing through an internal diameter D = 80 mm pipe at a volumetric discharge rate Q = 36 m³/h:

A = π × (0.080 m)² / 4 = 0.005027 m²
Q = 36 m³/h = 0.010 m³/s = 10.0 L/s = 600.0 L/min
Velocity (v) = Q / A = 1.989 m/s (Optimal Liquid Range)

Technical Explanation: Pipe Discharge and Continuity Equation

The principle of conservation of mass states that for steady, incompressible fluid flow in an enclosed conduit, the mass flow rate entering any section must equal the mass flow rate exiting.

Continuity Equation

Assuming constant fluid density, the volumetric flow rate (Q) remains constant along the stream tube and equals the cross-sectional flow area (A) multiplied by average fluid velocity (v):

Q = A · v = (π · D² / 4) · v

Velocity Limits in Piping Design

Selecting proper internal pipe diameter involves balancing capital piping cost against operating pumping energy and system longevity:

  • Low Velocity (< 0.8 m/s): Results in oversized pipes, excessive material costs, and potential settling of suspended solids or silt.
  • Standard Velocity (1.0 – 2.5 m/s): Optimal economic range for industrial water distribution, balancing pipe sizing and frictional head losses.
  • High Velocity (> 3.0 m/s): Causes high friction pressure drops, pipe wall erosion, acoustic noise, and dangerous hydraulic transients (water hammer).

Real-World Engineering Cases

Severe Water Hammer in Municipal Booster Pump Discharge

A water treatment plant replaced distribution pumps to increase delivery capacity without upgrading the existing 100 mm discharge line. Fluid velocity surged from 1.8 m/s to 4.2 m/s. An abrupt emergency pump trip generated a shock pressure spike exceeding 25 bar, fracturing pipe elbows.

Engineering Lesson

Always resize headers when expanding flow. High flow velocities store tremendous kinetic energy that converts into destructive pressure shockwaves upon sudden valve closure or pump shutdown.

Sedimentation and Blockage in Gravity Drainage Piping

In a mineral processing slurry line, a 200 mm pipe was installed where a 125 mm pipe was needed. The resulting low fluid velocity (< 0.5 m/s) failed to maintain suspended particles above the critical settling velocity, leading to complete sediment blockage within weeks.

Engineering Lesson

Maintain minimum scouring velocities (typically 0.9–1.2 m/s) in lines carrying particulate matter or untreated raw water to avoid sedimentation.

Frequently Asked Questions

Should I use nominal pipe size (NPS) or internal diameter (ID)?

Always use the actual internal diameter (ID). Nominal pipe sizes (such as 2-inch Schedule 40 vs Schedule 80) have different wall thicknesses, which significantly alters internal cross-sectional flow area.

Does this calculation apply to compressible gases?

The continuity formula Q = A · v applies to gases at specific localized conditions (actual volumetric flow rate), but gas density changes with pressure drops must be accounted for across long spans.

How do I convert between m³/h and L/min?

Multiply m³/h by 16.6667 to obtain liters per minute (L/min), or divide L/min by 60 to obtain liters per second (L/s).

Engineering calculations provided by this tool are for educational and preliminary design purposes. Always verify calculations, loading conditions, fluid properties, applicable standards, safety factors, and design requirements before using results in a final engineering design.