Wave crashing into a percolation-style random arrangement of obstacles
Channel: Nils Berglund
Date: 2021-07-11

Like the video https://youtu.be/SrOcj3F2BJ4, this simulation shows a random arrangement of obstacles that seems to be good at trapping the energy of an incoming wave. The random arrangement chosen here is inspired by models in the theory of percolation (see https://en.wikipedia.org/wiki/Percolation_theory ). Take a relatively closely packed regular arrangement of circles, and then keep each circle with a fixed probability p, independently of all others. Here the probability of keeping a circle is 0.25, so that relatively large open channels remain. The colors in the upper half of the video show the waves' height, while the lower half shows the energy (obtained by adding squares of the time-derivative of the wave height, and the wave speed times the norm of their spatial gradient). There are absorbing boundary conditions on the sides of the displayed domain, which however don't work perfectly, which is why you see some waves reflected from the boundary. 

Music: "Saucers Unaware", by JAde Wii@JAdeWii_

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 
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!