Skip to content
Tactiverge

Simulating a falling object with air drag

Add air resistance to a falling-object simulation, discover terminal velocity, and verify the simulation against an exact solution.

Lesson 3 of 6 · 30 min · Self-paced · Free

Why drag matters

Without air, every object falls with the same acceleration, and a feather and a hammer dropped together land together. That really happens on the Moon. On Earth, air pushes back on anything moving through it, and for light objects that push is large. Engineers need to model drag to predict how a parachute slows a payload, how fast a drone loses height when its rotors stop, or how far a part flies when it is thrown off a conveyor. Drag also shows why simulation is so useful: once drag is included, the simple algebra formulas for falling objects no longer apply.

The forces

Take a ball falling straight down, and measure distance and speed downward. Two forces act on it:

  • Weight, m · g, pulling down.
  • Drag, pushing up (opposite to the motion). At everyday speeds, for objects larger than a few millimetres, drag is well described by
F_drag = ½ · ρ · C_d · A · v²

where ρ (rho) is the air density (about 1.2 kg/m³ at room conditions), A is the cross-sectional area facing the airflow, v is the speed and C_d is the drag coefficient, a number that captures how streamlined the shape is. A smooth sphere has C_d of roughly 0.47 over a wide range of speeds; a streamlined shape is much lower.

The important feature is v²: double the speed, and drag quadruples.

From Newton's second law, the acceleration is the net force divided by mass:

a = g − (½ ρ C_d A v²) / m

Terminal velocity, without a simulation

As the ball speeds up, drag grows until it equals the weight. Then the net force is zero, acceleration stops, and the speed stays constant. This is the terminal velocity. Set drag equal to weight and solve for v:

½ ρ C_d A v_t² = m g
v_t = √( 2 m g / (ρ C_d A) )

For a table-tennis ball (mass 2.7 g, diameter 40 mm):

A   = π × 0.020² ≈ 0.001257 m²
v_t = √( 2 × 0.0027 × 9.81 / (1.2 × 0.47 × 0.001257) )
    ≈ √74.7 ≈ 8.65 m/s

A table-tennis ball can never fall faster than about 8.65 m/s in still air, however high you drop it from. A solid steel ball the same size weighs about 260 g, roughly 100 times more, so its terminal speed is about √100 = 10 times higher and drag barely matters over a short drop.

Simulating the drop

How long does the ball take to fall 10 m, and how fast is it going when it lands? There is no simple algebra formula for the time, so we simulate:

import math

G = 9.81          # m/s²
RHO = 1.2         # air density, kg/m³ (room conditions, assumed)
CD = 0.47         # drag coefficient of a smooth sphere (typical value)
MASS = 0.0027     # kg, a table-tennis ball
DIAMETER = 0.040  # m
AREA = math.pi * (DIAMETER / 2) ** 2

def acceleration(v):
    """Downward acceleration: gravity minus drag (v is downward speed)."""
    drag = 0.5 * RHO * CD * AREA * v * v     # newtons, opposes motion
    return G - drag / MASS

def drop(height, dt):
    """Return (time, impact speed) for a ball dropped from rest."""
    t, y, v = 0.0, 0.0, 0.0                  # y = distance fallen
    while y < height:
        a = acceleration(v)
        y = y + v * dt
        v = v + a * dt
        t = t + dt
    return t, v

v_terminal = math.sqrt(2 * MASS * G / (RHO * CD * AREA))
print(f"terminal speed: {v_terminal:.2f} m/s")

t, v = drop(10.0, 0.001)
print(f"with drag:    lands after {t:.2f} s at {v:.2f} m/s")
t0 = math.sqrt(2 * 10.0 / G)
print(f"without drag: lands after {t0:.2f} s at {G * t0:.2f} m/s")

Output:

terminal speed: 8.65 m/s
with drag:    lands after 1.75 s at 8.33 m/s
without drag: lands after 1.43 s at 14.01 m/s

Drag adds about 0.3 s to the fall and cuts the landing speed from 14 m/s to 8.3 m/s, already close to terminal velocity. For a light object, ignoring drag is not a small approximation; it is wrong by a factor of about 1.7 in speed.

Notice the structure: the physics lives in acceleration(v), and drop is the same Euler loop you have seen before. Here the loop runs until a condition is met (y reaches the ground) rather than for a fixed time. The final step overshoots the ground slightly, by less than v · dt ≈ 8 mm, which is negligible with dt = 0.001 s.

Verifying against an exact solution

For this particular case, a ball dropped from rest with v² drag, calculus does give an exact formula for the speed:

v(t) = v_t · tanh(g t / v_t)

where tanh is the hyperbolic tangent, a function that rises smoothly from 0 towards 1. You do not need to derive it to use it as a check. Python provides it as math.tanh.

import math

G, RHO, CD, MASS = 9.81, 1.2, 0.47, 0.0027
AREA = math.pi * 0.020 ** 2
C = 0.5 * RHO * CD * AREA                # drag constant, kg/m
VT = math.sqrt(MASS * G / C)              # terminal speed

dt = 0.01
v = 0.0
print("  t (s)   Euler v   exact v   (m/s)")
for step in range(1, 301):                # 3 seconds
    v = v + (G - C * v * v / MASS) * dt
    if step % 50 == 0:
        t = step * dt
        exact = VT * math.tanh(G * t / VT)
        print(f"  {t:4.1f}   {v:7.3f}   {exact:7.3f}")

Output:

  t (s)   Euler v   exact v   (m/s)
   0.5     4.450     4.439
   1.0     7.044     7.025
   1.5     8.102     8.089
   2.0     8.469     8.463
   2.5     8.589     8.586
   3.0     8.628     8.626

Even with a coarser step of 0.01 s, Euler agrees with the exact speed to within about 0.02 m/s, and both approach 8.65 m/s. The simulation is verified for this case. Now we can trust it for cases with no exact formula: a ball thrown downward, or upward, or sideways, or an object whose drag coefficient changes as a parachute opens.

Assumptions to keep in mind

This model assumes still air, constant air density, a constant drag coefficient, and an object that does not spin or tumble. Each can fail: wind adds sideways forces, density falls with altitude, C_d varies with speed and surface roughness, and spinning balls curve. Validating the model means dropping real objects and comparing, which is exactly what the project below asks you to do.

Recap

  • Drag at everyday speeds is F = ½ ρ C_d A v²; it grows with the square of speed.
  • Terminal velocity is reached when drag equals weight: v_t = √(2mg / (ρ C_d A)).
  • Light objects with large areas have low terminal speeds and are strongly affected by drag.
  • Put the physics in an acceleration function and reuse the Euler loop.
  • Verify against the exact tanh solution, then use the simulation for cases with no formula.

Project

Validate a drag model with paper cupcake cases

Paper cupcake cases (or coffee filters) fall slowly and stack neatly, so you can change the mass without changing the shape.

  1. Measure a fixed drop height of about 1.5–2 m against a wall. Drop from an outstretched arm while standing on the floor; do not stand on chairs or tables.
  2. Drop 1, 2, 4 and 8 stacked cases, timing each fall five times with a phone stopwatch. Record every time and compute the mean and standard error for each stack.
  3. Weigh a stack of cases on a kitchen scale (or estimate from a packet), measure the diameter, and assume C_d ≈ 1.0 as a starting guess for this shape.
  4. Simulate each drop in Python and compare with your measurements. Adjust C_d to fit one stack, then check whether the same C_d predicts the others.
  5. Write down every assumption you made and where the model disagrees with reality.

Deliverables

  • A table of measured fall times (mean ± SE, n = 5) for each stack
  • A Python simulation with predicted fall times for each stack
  • A short validation note: the fitted C_d, how well it predicts the other stacks, and the main sources of disagreement

Knowledge check

Check your understanding

  1. 1. If a ball's speed doubles, what happens to the quadratic drag force on it?
  2. 2. What condition defines terminal velocity for a falling object?
  3. 3. Two spheres have the same size and shape, but one is 4 times heavier. How do their terminal speeds compare?
  4. 4. Why compare the simulation with the formula v_t · tanh(g t / v_t)?

Go further

Simulating a falling object with air drag — Computational Engineering — Tactiverge