Annular Velocity and Hole Cleaning Calculation in Python

Annular velocity hole cleaning calculation showing drilling fluid lifting cuttings through a deviated wellbore

By Saad Iqbal

Poor hole cleaning is behind more stuck-pipe and high-torque headaches than most drilling engineers want to admit, and the single number that tells you whether cuttings are actually leaving the hole is annular velocity. An annular velocity and hole cleaning calculation takes two minutes by hand once you know the equation, and in this tutorial I’ll walk through that equation, work a real numeric example for an 8.5 in hole with 5 in drill pipe, build the flow-rate sensitivity table a well site actually checks against, and hand you the Python function that automates it for any hole and pipe combination.

Step 1: Annular Velocity Hole Cleaning Equation

Annular velocity is the mean upward speed of drilling fluid in the annulus between the drill pipe (or casing) and the hole or casing wall. In oilfield units it is:

Annular velocity equation v equals 24.51 times Q divided by Dh squared minus Dp squared for hole cleaning calculation

where v is annular velocity (ft/min), Q is flow rate (gpm), Dh is the hole or casing internal diameter (in), and Dp is the drill pipe or tubing outside diameter (in). The constant 24.51 folds in the unit conversions: 231 in³ per gallon, divided by π/4 for the annular area, divided by 12 to get feet instead of inches.

Where this comes from: annular cross-sectional area (in²) is π/4 × (Dh² − Dp²). Converting Q from gpm to in³/min (×231) and dividing by that area gives velocity in in/min; dividing by 12 converts to ft/min — and 231 × 4 ÷ (π × 12) works out to 24.51.

Step 2: Set Up Your Hole and Pipe Geometry

The only geometry inputs are the hole (or casing ID, if you’re circulating inside casing) and the drill pipe OD. For an 8.5 in hole with 5 in OD drill pipe:

  • Dh = 8.5 in (open hole diameter, or use casing ID if circulating below casing)
  • Dp = 5.0 in (drill pipe OD — use tool joint OD instead if you’re checking the tightest annular clearance)
  • Dh² − Dp² = 72.25 − 25.00 = 47.25 in²

This is the same kind of clearance-driven geometry check used when sizing bit nozzles in a bit nozzle TFA calculator — get the areas right first, and the velocity math is simple division.

Step 3: Work the Numbers by Hand

Pumping 350 gpm through the geometry above:

  1. Dh² − Dp² = 47.25 in² (from Step 2)
  2. v = 24.51 × 350 / 47.25
  3. v = 8,578.5 / 47.25 = 181.6 ft/min (3.03 ft/s)

Compare that against a typical vertical-well hole-cleaning guideline of roughly 120 ft/min minimum for adequate cuttings transport (the real minimum depends on cuttings size, mud rheology and rate of penetration, but 120 ft/min is a common rule-of-thumb floor). At 181.6 ft/min, this job clears that guideline by about 51%.

Step 4: Check Velocity Across the Full Flow-Rate Range

A single-rate check isn’t enough when the pump can run anywhere from 200 to 500 gpm depending on surface equipment limits and ECD constraints. Here’s the same 8.5 in × 5 in geometry swept across that range:

Flow Rate (gpm)Annular Velocity (ft/min)Annular Velocity (ft/s)vs. 120 ft/min Guideline
200103.71.73Below
250129.72.16Above
300155.62.59Above
350181.63.03Above
400207.53.46Above
450233.43.89Above
500259.44.32Above

Because the equation is linear in Q, annular velocity scales directly with flow rate for a fixed geometry — double the rate and you double the velocity. That table shows the pump needs at least roughly 235 gpm through this geometry to clear the 120 ft/min floor, which is exactly the kind of check that belongs in a pre-spud hydraulics review alongside an erosional velocity check — one guards the floor on hole cleaning, the other guards the ceiling on pipe and equipment erosion.

Step 5: Automate It With One Python Function

Wrap the equation in a function so you can check every hole size, pipe OD and flow rate combination a well plan throws at you without re-deriving the constant each time.

def annular_velocity(q_gpm, dh_in, dp_in):
"""Annular velocity in ft/min for flow rate q_gpm (gpm),
hole/casing ID dh_in (in) and pipe OD dp_in (in)."""
area_factor = dh_in ** 2 - dp_in ** 2
if area_factor <= 0:
raise ValueError("Hole/casing ID must exceed pipe OD")
return 24.51 * q_gpm / area_factor
# Sweep every rate the pump can hit in one call
DH, DP = 8.5, 5.0
MIN_GUIDELINE_FTMIN = 120.0
for rate in [200, 250, 300, 350, 400, 450, 500]:
v = annular_velocity(rate, DH, DP)
status = "OK" if v >= MIN_GUIDELINE_FTMIN else "LOW"
print(f"{rate:4d} gpm v={v:7.1f} ft/min ({v/60:5.2f} ft/s) {status}")

Change the hole ID, pipe OD, or the guideline threshold and re-run for the next well section — the whole sweep runs in milliseconds with nothing beyond Python’s standard library, the same minimal-dependency approach used to automate an everyday Python hydraulics check.

Expected Result

Running the script above should print 181.6 ft/min (3.03 ft/s) at 350 gpm, flagged OK against the 120 ft/min guideline, and should flag the 200 gpm case (103.7 ft/min) as LOW. If your numbers match those, the function is wired correctly.

Verify Your Answer

  • Recompute Dh² − Dp² by hand and confirm it’s positive — a negative or zero result means the pipe OD you entered is larger than the hole, which is physically impossible.
  • Check that velocity scales linearly with flow rate for fixed geometry: doubling Q should exactly double v.
  • Sanity-check units: Dh and Dp must both be in inches and Q in gpm for the 24.51 constant to apply directly — mixing in mm or L/min without converting first will give a nonsense answer.

Common Pitfalls

  • Using pipe ID instead of OD. Annular velocity is governed by the pipe’s outside diameter, since that’s what displaces fluid in the annulus — the pipe’s internal bore is irrelevant here.
  • Ignoring tool joints. Tool joint OD is larger than the pipe body OD and creates the tightest annular clearance; check velocity at the tool joint if hole cleaning near the bit is marginal.
  • Treating one guideline as universal. The commonly cited 100–150 ft/min minimum varies with hole angle, cuttings size and mud rheology — deviated and horizontal wells generally need higher velocities or mechanical cleaning assistance (sweeps, rotation) to avoid cuttings beds.
  • Forgetting washed-out hole. Actual hole diameter often exceeds bit size due to washout; using gauge bit size instead of caliper data will overstate annular velocity in real wells.
Saad Iqbal Avatar

About the author

Saad Iqbal

Petroleum Engineer · Well Intervention & Stimulation Specialist

Saad Iqbal is a petroleum engineer and well intervention and stimulation specialist with more than a decade of field experience in hydraulic fracturing, coiled tubing, CSG, tight sandstone and shale developments. He explores practical AI, automation and data-driven engineering for safer, smarter upstream operations.