A plate with a hole

A round plate that is heated evenly and kept cold along its rim, with a hole that lets no heat through.

import sympy as sp
import pdemagic as pm
from pdemagic import curves

x, y = sp.symbols("x y", real=True)
warmth = sp.Function("w")(x, y)
rim = curves.Circle((0, 0), 1)
hole = curves.Circle((0.4, 0.2), 0.25)

pierced = pm.Problem(
    sp.Eq(-pm.laplacian(warmth), 1),
    domain=pm.Region(x, y, rim, hole),
    boundary={rim: sp.Eq(warmth, 0), hole: sp.Eq(pm.normal_derivative(warmth), 0)},
)
pm.solve(pierced).plot()
The figure that the example above draws. The figure that the example above draws.

What it shows

Poisson’s equation on a domain that is drawn from curves. Two circles bound the region, and the one inside the other is a hole. Each curve takes its own condition: the value on the rim, and on the edge of the hole the slope along the normal, which is zero where nothing flows. The plate is warmest near its middle and cools towards the rim. At the hole it does not: the plate stays warm right up to that edge, because no heat leaves through it.

What pdemagic decided

A region of the plane is solved by spectral elements (spectral_elements). The planner cut the plate into 111 quadrilaterals that follow the two circles, and raised the degree of the polynomials on them until the solution was resolved to \(10^{-10}\) in every element. The values are given on a grid of 129 by 129 points over the square that holds the plate, with no number in the hole and outside the rim.

More