A cooling disk¶
A disk with a warm spot that loses its heat through the rim: the faster, the warmer the rim is.
import sympy as sp
import pdemagic as pm
r, phi, t = sp.symbols("r phi t", real=True)
h = sp.Function("h")(r, phi, t)
disk = pm.Disk(r, phi, radius=1)
X, Y = disk.cartesian
cooling = pm.Problem(
sp.Eq(h.diff(t), pm.laplacian(h)),
domain=disk,
time=(t, 0, 0.2),
initial={h: sp.exp(-12 * ((X - 0.4) ** 2 + Y**2))},
boundary=sp.Eq(h.diff(r) + 2 * h, 0),
)
pm.solve(cooling).plot(time=0.05)
What it shows¶
The heat equation on a disk, in polar coordinates. The condition on the
rim is a mix of the value and the slope, \(\partial h/\partial r + 2h =
0\): the heat that leaves through the rim is in proportion to the
temperature there, as for a body that cools in air. disk.cartesian
gives the Cartesian coordinates as expressions in r and phi, which
places the warm spot off the centre. In the picture, at \(t = 0.05\), the
spot has widened and reached the near rim, where the disk now loses its
heat. The far side is still cold.
What pdemagic decided¶
The planner chose exact propagation in the modes of the disk
(mode_propagator), with Gauss points along the radius and Fourier
waves along the angle: 48 by 96 points. Nothing that is given depends
on time, so each of the 21 recorded times is exact in time.