Six-sided parabolic resonators with Dirichlet and Neumann boundary conditions @NilsBerglund
Six-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 six 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:52
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 - 47 minutes 59 seconds
Compression: crf 25
Color scheme: Twilight by Bastian Bechtold
github.com/bastibe/twilight

Music: "Numbers" by R.LUM.R@r.lum.r

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
Six-sided parabolic resonators with Dirichlet and Neumann boundary conditionsComparing Dirichlet and Neumann boundary conditions for an invisibility cloakShock propagation with more particles on a rotating sphereWaves escaping a Poisson disc ring of obstacles with Neumann boundary conditionsComparing boundary conditions for waves starting at a generic point of an ellipse: 3D viewComparing invisibility cloaks with and without a cloaked objectComparing Dirichlet and Neumann boundary conditions in an ellipseWaves in an equilateral triangle with Neumann boundary conditionsParticles on a rotating sphere with Earths continentsSmarties on Mars: Particles on a rotating sphere with the topography of MarsSmarties on Mercury: Particles on a rotating sphere with the topography of the MercurySquare grid wave protections: Comparison of two different wavelengths
Nils Berglund |

Six-sided parabolic resonators with Dirichlet and Neumann boundary conditions

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER