Waves hitting a Sierpinski carpet
Channel: Nils Berglund
Date: 2021-06-16

After having done a number of simulations solving the heat equation in fractal domains, we are ready to do the same for the wave equation. This animation shows solutions of the wave equation outside 4 different approximations of a Sierpinski carpet. It illustrates why fractal materials can have an insulating effect, by trapping and reflecting sound waves. 
See https://youtu.be/LTsCx2T-4hA for a version showing the energy density instead of the height of the waves.
Level 1: 0:00
Level 2: 1:32
Level 3: 3:05
Level 4: 4:36
(courtesy of My Craft)

Music: "The Emperor's Army", by Jeremy Blake@RedMeansRecording

See also https://images.math.cnrs.fr/Des-ondes-dans-mon-billard-partie-I.html 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 https://hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf 

Reflections on the boundaries of the rectangle are minimized by adding Neumann-type boundary conditions on the time-derivative of the wave.
C code: https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html 
Many thanks to my colleague Marco Mancini for helping me to accelerate my code!