A hump that sheds ripples

A hump on the line whose short waves outrun the long ones: it leans back, and a train of ripples runs off to the left.

import sympy as sp
import pdemagic as pm

x, t = sp.symbols("x t", real=True)
h = sp.Function("h")(x, t)

ripples = pm.Problem(
    sp.Eq(h.diff(t) + h.diff(x, 3), 0),
    domain=pm.FreeSpace(x),
    time=(t, 0, 0.3),
    initial={h: sp.exp(-(x**2))},
)
plan = pm.plan(ripples)
plan.grid.lower, plan.grid.shape = [-25.0], [256]
pm.solve(ripples, plan).plot()
The figure that the example above draws. The figure that the example above draws.

What it shows

The linear Korteweg–de Vries equation, \(h_t + h_{xxx} = 0\), on the whole line: what is left of the equation of long waves on shallow water when the waves are low. A third derivative neither damps a wave nor moves all waves alike. The wave \(e^{ikx}\) travels to the left with the speed \(3k^2\), so a short wave is much faster than a long one. The hump is made of waves of many lengths, and comes apart: the long ones have hardly moved, and the short ones are far ahead of them, as ripples that get finer with the distance. The picture shows five times, from light to dark.

What pdemagic decided

The planner chose exact propagation in Fourier space (fourier_propagator): every wave is multiplied by \(e^{ik^3 t}\), with no step in time. How far a solution travels in free space has no formula for such an operator, so the planner bounds it from the waves that the hump contains, and chose a box that reaches to \(-50\), where the fastest ripples of a millionth of the hump arrive. The plan cuts the box off at \(-25\), since nothing can be seen beyond. What the box shows is still the solution on the whole line: the transform has 1 000 points, and holds everything that has left the box.

More