Young's double-slit experiment with waves: log of energy and cumulative energy
Channel: Nils Berglund
Date: 29/04/2022

This new variant of a simulation of Young's classical double-slit experiment shows first the energy of the wave, and then the cumulative energy that has passed through each point from the beginning of the simulation to the current time. If an oscillating source had been used as in the simulations https://youtu.be/D1s40lkdWRc and https://youtu.be/2ao6OS4g7Yg the cumulative energy would have kept growing, ultimately getting off scale. Therefore, a single pulse has been used here as initial state. An alternative would have been to plot the average energy (the cumulative energy divided by the time since the beginning of the simulation).
Energy (log scale): 0:00
Cumulative energy (log scale): 0:48
For purposes of visualization, the log has been "floored" to zero, meaning that whenever the log is negative, the z-coordinate is set to zero, and the color hue to purple. Forthcoming videos will also show situations where this flooring operation is not carried out. 
The boundary conditions in the simulation are absorbing on the sides of the displayed rectangular region, but they do not work perfectly, which is why one sees some waves reflected on the sides in the first part. 

Render time: 54 minutes 20 seconds
Color scheme: Inferno by Nathaniel J. Smith and Stefan van der Walt
https://github.com/BIDS/colormap

https://github.com/yuki-koyama/tinycolormap

Music: "Indigo" by Eveningland@EveninglandMusic

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!