Planar wave hitting a percolation-style random arrangement of obstacles
Channel: Nils Berglund
Date: 2021-07-13

Like the video https://youtu.be/3qw_QOKgK84, this simulation shows a wave encountering a random arrangement of obstacles, only with a planar (or linear) wave instead of a wave originating in one point. 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 periodic boundary conditions on the top and bottom sides of the displayed domain, and absorbing boundary conditions on the sides, which however don't work perfectly, which is why you see some waves reflected from the boundary. 

Music: "Freefall", by Anno domini Beats@AnnoDominiBeats

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!