A drum

A square membrane that is held at its rim, a moment after it was let go from a dent off its centre.

import sympy as sp
import pdemagic as pm

x, y, t = sp.symbols("x y t", real=True)
m = sp.Function("m")(x, y, t)
dent = sp.exp(-200 * ((x - 0.4) ** 2 + (y - 0.45) ** 2))

drum = pm.Problem(
    sp.Eq(m.diff(t, 2), pm.laplacian(m)),
    domain=pm.Box({x: (0, 1), y: (0, 1)}),
    time=(t, 0, 1),
    initial={m: dent, m.diff(t): 0},
    boundary=sp.Eq(m, 0),
)
pm.solve(drum).plot(time=0.6)
The figure that the example above draws. The figure that the example above draws.

What it shows

The wave equation on a square with walls, \(m_{tt} = \nabla^2 m\). One equation as boundary holds on all four faces: the membrane is held there. The dent spreads as a ring with the speed 1. At \(t = 0.6\) the ring has reached all four walls, the nearest first. Each wall throws it back with the opposite sign, and the parts that came back cross the parts that are still on their way out.

What pdemagic decided

The planner chose exact propagation in the modes of the box (mode_propagator), on Chebyshev points along both axes. Nothing that is given depends on time, so each of the 21 recorded times is exact in time. The dent is narrow, and the planner took 128 by 128 points to resolve it.

More