Chapter 1's drag-free explicit Euler integrator for a body falling under gravity…

PHYSICS · Subjective · Fermi University Physics · Computational Physics · Research software practice, verification and validation · Simulating classical dynamical systems

Computational Physics, Ch A workspace that can be rerun next year

Problem

Chapter 1's drag-free explicit Euler integrator for a body falling under gravity updates the height yy (above the ground) and downward speed vv by vn+1=vn+gΔt,yn+1=yn−vnΔt,v_{n+1}=v_n+g\Delta t,\qquad y_{n+1}=y_n-v_n\Delta t, starting from v0=0v_0=0 and a stated y0y_0, with g=9.8 m s−2g=9.8\,\mathrm{m\,s^{-2}}. The quantity conserved by the true physics, per unit mass, is En=12vn2+gynE_n=\tfrac12v_n^2+gy_n. A stone is dropped from y0=800 my_0=800\,\mathrm{m} and its fall is followed to t=10 st=10\,\mathrm{s}. (a) Show that a single Euler step always changes EE by exactly ΔEstep=12g2(Δt)2\Delta E_{\rm step}=\tfrac12 g^2(\Delta t)^2, whatever the speed vnv_n at that step. (b) Hence show that after N=t/ΔtN=t/\Delta t steps the fractional energy drift is ΔEE0=g Δt t2y0\dfrac{\Delta E}{E_0}=\dfrac{g\,\Delta t\,t}{2y_0}. (c) Evaluate this fractional drift, as a percentage, at Δt=0.4 s\Delta t=0.4\,\mathrm{s} and at Δt=0.05 s\Delta t=0.05\,\mathrm{s}. (d) State the ratio of the two drifts and compare it with the ratio of the two step sizes.

Browse the problem library