S16 · Lesson 49 · Ocean and nonlinear lab
A ray traced through a sound-speed gradient layer by layer against its exact circular path, normal-mode cutoffs, group velocities and arrival spreads in shallow water, the harmonics of a distorting plane wave from Fubini's solution checked against the waveform itself, and shock jumps with blast scaling
Lessons 46 to 48 described sound in the ocean and sound too strong to stay linear, with formulas built on idealizations: constant gradients, ideal waveguides, plane waves short of shock formation. In this lab you'll compute each the way a modeling code would: trace a ray through thin layers, list a waveguide's modes and their arrivals, solve a distorting waveform directly and take its Fourier series, and evaluate shock jumps and blast scaling, checking every one against its closed form.
- A plane wave steepens as it travels; σ is the distance traveled as a fraction of the distance at which a shock first forms.
- The solid curve is the fundamental's amplitude and the dashed curve the second harmonic's, from Fubini's solution, , relative to the original amplitude.
- Energy drains from the fundamental into harmonics as the wave steepens; by σ = 1 the second harmonic is about a third of the original amplitude.
Predict
A plane wave has traveled 80% of its shock-formation distance. How large is its second harmonic, relative to the original amplitude?
Fubini's solution gives = = 0.32 at σ = 0.8, while the fundamental has fallen only to 0.92. Task 3 confirms it by solving for the distorted waveform point by point and taking its Fourier coefficients.
Name it
What the lab computes
- Rays: in horizontal layers, Snell's law keeps constant along a ray. Stepping down through layers of thickness Δz where c = c₀ + gz, the ray advances horizontally until would exceed 1, where it turns. For a constant gradient the exact path is a circle of radius , turning at depth after a horizontal distance .
- Modes: in water of depth D with a pressure-release surface and rigid bottom, mode n cuts off at and travels with group velocity ; the arrival spread over a range is the difference between the slowest and fastest propagating modes' travel times.
- Distortion: before shock formation, a wave that started as sin φ is at relative distance σ, solved for u at each φ by Newton's method; its Fourier sine coefficients are Fubini's , with .
- Shocks: across a shock of Mach number M in a gas of ratio γ, the pressure ratio and density ratio ; blasts scale as the cube root of charge mass, so a W-fold heavier charge gives the same overpressure at times the range.
Check
Write trace_ray(c0, g, theta, dz=0.01) returning (turning depth, horizontal distance to the turning point), by stepping through layers.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write mode_arrivals(D, f, R, c=1500.0) returning a list of (cutoff, group velocity, travel time) for every propagating mode, and the arrival spread.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write bessel(n, x) by the integral with 2000 points, fubini(sigma, n), and waveform_harmonic(sigma, n, M=2048): the nth sine coefficient of the solved waveform.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write shock(M, g=1.4) returning (pressure ratio, density ratio, temperature ratio) and blast_range(R1, W1, W2): the range at which a charge of mass W2 matches the overpressure W1 gives at R1.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does a strong sound wave steepen into a shock as it travels?
In a sound wave the local speed of propagation isn't quite constant: where the pressure is high, the air is compressed and warmed and moves forward with the wave, so the crest travels a little faster than c, while the trough travels a little slower. Over distance, the crest gains on the trough ahead of it and the waveform's front grows steeper, transferring energy from the fundamental into harmonics. When the front becomes vertical, the distance the linear theory can't pass, a shock forms, after which dissipation in the thin shock front limits further steepening and the wave loses energy as it goes.