A ball is thrown straight upward from ground level with (here is taken positive upward)

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Mechanics & Dynamical Systems · Kinematics and Newtonian dynamics of particles

Computational Physics, Ch A falling body that knows about air: the first simulation

Problem

A ball is thrown straight upward from ground level with v0=20 m s−1v_0 = 20\,\mathrm{m\,s^{-1}} (here vv is taken positive upward), mass m=0.060 kgm = 0.060\,\mathrm{kg}, and quadratic drag b=0.00090 kg m−1b = 0.00090\,\mathrm{kg\,m^{-1}} that opposes whichever way it is moving. Someone writes the following, intending the loop to stop when the ball comes back down through the ground (y<0y < 0) or after a generous safety time tmax=200 st_{\rm max} = 200\,\mathrm{s}: (line 1) t, y, v = 0.0, 0.0, v0 (line 2) for n in range(round(t_max/dt)): (line 3) a = -(b/m)*v*abs(v) (line 4) v_new = v + a*dt (line 5) y = y + v*dt (line 6) v = v_new (line 7) t = t + dt (line 8) if y < 0.0: (line 9) break. Run with Δt=0.2 s\Delta t = 0.2\,\mathrm{s}, the first rows of (t,y,v)(t, y, v) are (0, 0, 20.00)(0,\ 0,\ 20.00), (0.2, 4.00, 18.80)(0.2,\ 4.00,\ 18.80), (0.4, 7.76, 17.74)(0.4,\ 7.76,\ 17.74), (0.6, 11.31, 16.80)(0.6,\ 11.31,\ 16.80) in seconds, metres and m s−1\mathrm{m\,s^{-1}}; the run continues with vv falling more and more slowly and yy still climbing, and it is only cut off by the safety cap at t=200 st = 200\,\mathrm{s}, with yy still positive and rising. ((a)) Identify the line that is missing a piece of physics, and say what it should read. ((b)) Explain, from the table, why the loop never reaches y<0y < 0 before the safety cap intervenes.

Browse the problem library