Earth
Seismic waves through Earth
Set off an earthquake and watch a fan of rays bend through the mantle, refract sharply into the slow liquid core and leave a shadow zone on the far side; switch to S waves and see them stop at the core, or give the core a solid’s rigidity and let them through. Read the first arrivals at five stations, move the source deeper, and check the model against a homogeneous Earth whose rays are straight chords.

What happens
A spherically layered Earth - crust, upper and lower mantle, liquid outer core, inner core - with velocities linear in radius inside each layer. Each ray of a fan of takeoff angles is traced by RK4 along its length with dn/ds = −(∇v − (n·∇v)·n)/v, cut exactly at every boundary where Snell’s law refracts or totally reflects it, and stopped where the shear velocity is zero. The ray parameter r·sin i/v stays constant along a ray, and the slope of the travel-time curve is that parameter. The rays are drawn as far as the waves have travelled at the current time; the front joins their tips. Five stations on the rim read their first arrivals; the shadow zone lies between the last mantle ray and the first core ray.
Try this
Let the fronts run and read the arrivals at 30°, 60° and 90°, then watch the 120° station wait in the shadow. Switch to S waves and see them end at the core; make the core solid and they pass.
The model and its limits
A five-layer teaching velocity model, not PREM; no converted phases, surface reflections or attenuation; rays only, no amplitudes. Arrival times and the shadow edges are those of this model.
Equations used in the module
Equations dn/ds = −(∇v − (n·∇v)·n)/v p = r·sin i/v = const, dT/dΔ = p sin i_2/v_2 = sin i_1/v_1 R = (ρ_2·v_2 − ρ_1·v_1)/(ρ_2·v_2 + ρ_1·v_1)


