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 y (above the ground) and downward speed v by vn+1=vn+gΔt,yn+1=yn−vnΔt, starting from v0=0 and a stated y0, with g=9.8ms−2. The quantity conserved by the true physics, per unit mass, is En=21vn2+gyn. A stone is dropped from y0=800m and its fall is followed to t=10s.
(a) Show that a single Euler step always changes E by exactly ΔEstep=21g2(Δt)2, whatever the speed vn at that step.
(b) Hence show that after N=t/Δt steps the fractional energy drift is E0ΔE=2y0gΔtt.
(c) Evaluate this fractional drift, as a percentage, at Δt=0.4s and at Δt=0.05s.
(d) State the ratio of the two drifts and compare it with the ratio of the two step sizes.