B152 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

B1 · Lesson 52 · Simulating motion with drag

When there's no formula, integrate Newton's law numerically

Every projectile formula in lesson 3 ignored air. With real air drag, which grows with the square of speed, there is no formula for the path at all: the horizontal and vertical motions are tied together through the speed. Engineers handle this the way circuit simulators handle nonlinear circuits: step Newton's law forward in small time steps on a computer. In this lab you'll write that simulation, check it against the drag-free formula, and use it to find the best launch angle when drag matters.

  • The solid curve is the drag-free parabola. The dashed curve is the path with drag proportional to velocity, 𝐅=−bm𝐯, one of the few drag laws with an exact solution.
  • Raise b: the path falls short and comes down more steeply than it went up.
  • Real air drag goes as v2, which has no closed form; the lab simulates it.

Predict

With air drag, is the launch angle that throws farthest above or below 45°?

Name it

The equations

With quadratic drag 𝐅d=−12ρCdA|𝐯|𝐯, Newton's law for a mass m is

d𝐯dt=−g𝐲^−k|𝐯|𝐯,k=ρCdA2m

with k in 1/m. The speed |𝐯| couples the two directions, so they can't be solved separately. Along with d𝐫dt=𝐯, that's four first-order equations for x, y, vx and vy.

Stepping in time

Starting from the launch state, advance by small steps Δt. The RK4 method (A8.45) evaluates the acceleration four times per step and is accurate to order Δt4; Euler's method, using only the start of the step, is accurate only to order Δt and needs far smaller steps for the same accuracy.

Finding the landing point

The projectile crosses y=0 between two steps. Interpolate linearly between the last point above and the first below: if they're at heights y1>0 and y2<0, the crossing is a fraction f=y1y1−y2 of the way through the step, which pins the range far more precisely than the step size.

Trusting a simulation

  1. Check a case you can solve. With k=0 the range must match v02sin⁡2θg.
  2. Halve the step. If the answer barely changes, the step is small enough.
  3. Check the physics. With drag the range must be shorter, and the falling half of the path steeper.

Worked example

A ball leaves at 30 m/s and 45°. Without drag, how far does it go? With k=0.01 /m, what does an accurate simulation give?

Show the solution
  1. Without drag. R=3029.81=91.7m in 4.32 s.
  2. With drag. With k=0.01 /m, RK4 with Δt=1 ms gives 55.8 m in 3.72 s.
  3. Check the step. Halving the step changes the range by less than a micrometer.
  4. Compare. Drag cost 39% of the range.

Answer 91.7 m without drag, and 55.8 m with it.

Worked example

What is the terminal speed for k=0.01 /m?

Show the solution
  1. Drag balances gravity. Falling straight down at terminal speed, kv2=g
  2. Terminal speed. vt=9.810.01=31.3m/s
  3. What it means. The ball launched at 30 m/s is already near its terminal speed, which is why drag affects it so strongly.

Answer the terminal speed is 31.3 m/s.

Check

Step 1. Write accel(v, k) returning the acceleration as a NumPy array [ax, ay] for velocity v (an array [vx, vy]), with gravity 9.81 m/s² and quadratic drag −k|𝐯|𝐯.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 2. Write simulate(v0, theta, k, dt) that launches from the origin at speed v0 and angle theta (degrees), steps with RK4, and returns (range, flight_time), interpolating the landing between steps. accel is included.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 3. Write best_angle(v0, k) that tries every whole-degree angle from 30° to 50° with simulate (use dt=4e-3) and returns the angle with the longest range. simulate is included.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 4. What terminal speed does a falling object reach with quadratic drag coefficient k = 0.01 /m?

Write units the way you normally would: 1.5 m/s, 1500 mm/s and 0.0015 km/s are the same answer.

Explain why

Why check the simulation against the drag-free case before trusting it with drag?

Practice

Keep practicing

4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.