The tones of a room

One of the lowest tones of a room with hard walls: the pressure on the floor, with two nodes along the room and one across it.

import sympy as sp
import pdemagic as pm

x, y, z = sp.symbols("x y z", real=True)
E = sp.Symbol("E")
p = sp.Function("p")(x, y, z)
sides = {x: (0, 5), y: (0, 4), z: (0, 3)}
hard = {(axis, end): sp.Eq(p.diff(axis), 0) for axis in sides for end in sides[axis]}

room = pm.Problem(
    sp.Eq(-pm.laplacian(p), E * p),
    domain=pm.Box(sides),
    boundary=hard,
    eigenvalue=(E, 14),
)
pm.solve(room).plot(state=13, cut={z: 0})
The figure that the example above draws. The figure that the example above draws.

What it shows

The modes of a box of 5 by 4 by 3 in which sound stands: the pressure obeys \(-\nabla^2 p = E\,p\), and has no slope along the normal on a hard wall. Each face takes its condition, and the mapping hard gives the same one to all six. A room sounds at the frequencies \(c\sqrt{E}/2\pi\) for the eigenvalues \(E\) of its modes. They are \(\pi^2(l^2/25 + m^2/16 + n^2/9)\) for whole numbers \(l\), \(m\) and \(n\), and the lowest is zero, for the constant. The picture shows the fourteenth, with \(l = 2\), \(m = 1\) and \(n = 1\), on the floor: cut= chooses the plane that is drawn. Along the lines where the two colours meet the tone is silent.

What pdemagic decided

The planner chose the modes of the box (collocation_modes): they are products of the modes of its three axes, from collocation at Chebyshev points, sorted by their eigenvalue. That takes milliseconds. The grid has 48 by 38 by 29 points, the coarsest on which every mode that is asked for is resolved.

More