Eight-sided parabolic resonators with Dirichlet and Neumann boundary conditions @NilsBerglund
Eight-sided parabolic resonators with Dirichlet and Neumann boundary conditions  @NilsBerglund
Uploaded May 2026 | Updated November 2026, 6 days ago
The domains in this wave simulation are "parabolic resonators" with eight sides. This means that the boundaries are pieces of parabolas that share the central point as focal point. As a result, circular waves emitted from that point switch between planar and circular waves each time they hit the parabolic boundaries, with little dispersion, that is mainly due to numerical effects.
So far, most simulations of the wave equation in a domain on this channel used Dirichlet boundary conditions, meaning that the wave height is zero at the boundary of the domain. This is a good model for an elastic membrane, for instance for a drum, or for sound waves. For water waves, however, it would be more realistic to use Neumann boundary conditions, meaning the the wave height has a horizontal tangent at the boundary.
Dirichlet boundary conditions are very easy to implement in a finite difference scheme: it suffices to keep the wave height equal to zero outside the domain, and use this zero value when computing the discrete Laplacian. For Neumann boundary conditions, however, one has to implement the condition that the normal derivative of the wave height is zero at the boundary. This is implemented here by adding "ghost" points next to the grid points in the domain, and computing their value in such a way that the normal derivative is approximately zero. These points are then used to compute the discrete Laplacian at points in the domain next to the boundary.
This video compares the effect of Dirichlet and Neumann boundary conditions in elliptical cavities. It has two parts, showing similar simulations with two different representations:
2D view: 0:00
3D view: 1:40
The color hue, as well as the z-coordinate in the 3D part, depend on the wave height. The domain with Neumann boundary conditions is at the right in the 2D part, and at the bottom right at the beginning of the 3D part. In the 3D part, the observer rotates around the simulated region in the course of the video.

Render time: Part 1 - 27 minutes 5 seconds
Part 2 - 37 minutes 18 seconds
Compression: crf 25
Color scheme: Turbo, by Anton Mikhailov
gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a
bo

Music: "Majestic-12" by Alex Jones/Xander Jones@/UCN9CZDQuFZf2h0ehVvqXdGg

See also
https://images.math.cnrs.fr/des-ondes-dans-mon-billard-partie-i/ for more explanations (in French) on a few previous simulations of wave equations.

The simulation solves the wave equation by discretization. The algorithm is adapted from the paper hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf
C code: github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Many thanks to Marco Mancini and Julian Kauth for helping me to accelerate my code!

#wave #resonator #harmonics
Eight-sided parabolic resonators with Dirichlet and Neumann boundary conditionsA high-pass filter based on two square grids with different spacing3D view of waves escaping a polar ring of obstacles with Neumann boundary conditionsHeavy cations and light anions on a sphere - Longer version with stronger Coulomb forceVoronoi tesselations for particles with a pentagon-symmetric interactionThe Rock-paper-scissors-lizard-Spock reaction for particles on the sphereThe Rock-paper-scissors-lizard-Spock reaction for particles on the sphere at lower temperatureInteracting pentagons on a rotating sphere with a wallComparison of randomized square grid and Poisson disc wave protections with Neumann conditionsDirection of particles on a rotating sphere with two obstaclesTemperature cycling of 80% neutral and 20% charged particles on a sphere: 3D view3D view of comparison of Dirichlet and Neumann boundary conditions in an ellipse
Nils Berglund |

Eight-sided parabolic resonators with Dirichlet and Neumann boundary conditions

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER