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

Am²

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. This single principle underpins the pipe flow calculation: it links the geometry of a circular conduit to the velocity and volumetric discharge of the fluid passing through it. Engineers use it constantly to size pipes, check pump duty points, verify velocity limits, and diagnose flow problems in existing systems.

Governing Formula: The 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

where Q is the volumetric flow rate (m³/s), A is the internal cross-sectional area (m²), v is the average fluid velocity (m/s), and D is the internal pipe diameter (m). The formula is equally valid for any consistent unit system: for example, Q in L/s, A in m² and v in m/s, or Q in m³/h, A in m² and v in m/h.

Derivation and Physical Basis

Consider a control volume bounded by two cross-sections of a pipe. In steady flow the mass inside does not change with time, so the mass entering per unit time must equal the mass leaving. For a fluid of constant density ρ, the mass flow rate is ρ·Q, and since ρ is the same at both sections it cancels out, leaving Q₁ = Q₂. For a single circular section this reduces to Q = A·v. Solving for velocity gives v = Q / A, and substituting A = π·D²/4 gives the form used by the calculator. The equation is purely kinematic: it says nothing about pressure, friction, or energy losses. It simply states that for a fixed flow rate, a smaller cross-section must result in a proportionally higher velocity, and vice versa.

Input Parameters

  • Internal Diameter (D): The actual flow bore of the pipe, not the nominal size. For a 2-inch Schedule 80 pipe, the ID is significantly smaller than for Schedule 40, which reduces the flow area and increases velocity at the same Q. Always use the manufacturer's ID or subtract twice the wall thickness from the outside diameter.
  • Volumetric Flow Rate (Q): The volume of fluid passing a section per unit time. If you know mass flow rate ṁ and density ρ, use Q = ṁ / ρ. For water at 20 °C, ρ ≈ 998 kg/m³, so 1 kg/s ≈ 1.002 L/s.
  • Fluid Velocity (v): The average velocity across the cross-section, not the peak centerline value. In turbulent pipe flow the velocity profile is nearly flat, so the average is a good approximation for most engineering work.

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).

For suction lines, velocities are usually kept lower (0.6–1.5 m/s) to avoid cavitation and net positive suction head (NPSH) problems. For slurries and sewage, a minimum scouring velocity (typically 0.9–1.2 m/s) is required to keep solids in suspension.

Engineering Interpretation

The calculated velocity is an average value and is the starting point for further checks. It feeds directly into the Reynolds number Re = ρ·v·D / μ, which determines whether the flow is laminar (Re < 2300), transitional, or turbulent (Re > 4000). For turbulent flow, the Darcy–Weisbach equation uses velocity to compute friction head loss h_f = f · (L/D) · v² / (2g), where f depends on Reynolds number and relative roughness. A high velocity therefore does not just indicate a fast flow; it produces head loss that grows with the square of velocity, increasing pump power and operating cost. The continuity equation alone does not predict pressure drop—it only links Q, A, and v.

Units and Conversions

  • 1 m³/s = 1,000 L/s = 60,000 L/min = 3,600 m³/h
  • 1 m³/h = 16.6667 L/min = 0.27778 L/s
  • 1 L/s = 3.6 m³/h = 60 L/min
  • 1 mm = 0.001 m; 1 cm² = 10⁻⁴ m²
  • 1 US gpm = 0.06309 L/s = 0.2271 m³/h

Always convert diameter to meters before computing area in m², and keep Q in m³/s when using the base formula. Mixing mm and m is one of the most common mistakes in pipe flow calculations.

Alternative and General Cases

This calculator assumes steady, incompressible flow through a single circular pipe of constant diameter. More general cases include:

  • Compressible flow (gases): Density changes with pressure, so the mass flow rate ṁ = ρ·A·v is constant, but Q and v vary along the pipe.
  • Non-circular ducts: Use the hydraulic diameter D_h = 4·A / P_wetted in place of D.
  • Variable cross-section: Continuity gives A₁·v₁ = A₂·v₂; combine with Bernoulli to find pressure changes.
  • Open-channel flow: Free surface, gravity-driven, and governed by Manning or Chezy equations rather than pipe continuity.
  • Two-phase flow: Liquid and gas phases travel at different velocities; separate void-fraction models are required.

Assumptions and Limitations

  • Steady flow: no accumulation or depletion of mass within the control volume.
  • Incompressible fluid: density is constant, valid for liquids and low-speed gas flows.
  • Single-phase, homogeneous fluid with no entrained air or solids.
  • Circular, constant-diameter pipe with a fully developed velocity profile.
  • Neglects friction, minor losses, and any pressure or temperature effects.
  • Does not predict cavitation, water hammer, or pipe stress.
  • Velocity is an average; local profiles and boundary-layer effects are not resolved.

Practical Engineering Use

Pipe flow calculations appear in virtually every process and building services application: HVAC chilled-water and condenser loops, domestic water supply and drainage, fire protection systems, chemical process piping, oil and gas gathering lines, cooling water circuits for power plants, irrigation networks, and slurry transport. The engineer uses the calculation to size pipe diameters, verify pump selections, check that velocities stay within acceptable ranges, and estimate whether the system will operate economically over its design life.

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).

Why does velocity matter if I already know the flow rate?

Velocity determines friction head loss (which grows with v²), erosion risk, noise, and hydraulic transient severity. Two pipes carrying the same Q but with different IDs will behave very differently because of their different velocities.

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.