[Flash warning] How well does a Sierpinski carpet separate wavelengths?
Channel: Nils Berglund
Date: 2024-02-29

Parts of this video show some flashing due to the formation of standing waves. 
This is a variant of the simulation https://youtu.be/VXV3WxQNF_Y of waves encountering various approximations of a Sierpinski carpet (or 2d Menger sponge) rotated by 45 degrees. The difference is that instead of using a periodic sine wave as input, this simulation uses a sum of two sines with incommensurate frequencies, meaning that the ratio of the two frequencies is not a rational number (it has been taken as sqrt(7)). The main point of the simulation is to find out whether the carpet blocks different wavelengths to a different extent. The idea is that waves have trouble passing the carpet when the distance between the refracting squares becomes smaller than the wavelength. Therefore, the shorter wavelength should be able to cross carpets of a higher level than longer wavelengths. One can indeed observe that while the first levels do not block any of the wavelengths, and the last couple of levels block almost all waves, the intermediate levels (3 and 4) are able to filter out the longer wavelength to some extent.  
This video has 5 parts, showing 5 different approximation levels of the Sierpinski carpet:
Level 2, wave height: 0:00
Level 3, wave height: 1:00
Level 4, wave height: 2:00
Level 5, wave height: 3:00
Level 6, wave height: 4:00
The color hue shows the wave height. 
The boundary conditions are periodic between the top and bottom boundary, absorbing on the right-hand boundary, and time dependent on the left one. 

Render time: 
Level 2 - 19 minutes 20 seconds
Level 3 - 19 minutes 40 seconds
Level 4 - 19 minutes 15 seconds
Level 5 - 19 minutes 14 seconds
Level 6 - 19 minutes 18 seconds
Compression: crf 23
Color scheme: Twilight by Bastian Bechtold
https://github.com/bastibe/twilight

Music: "Exhale" 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 
C code: https://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_equation #fractal #wave_protection