Merry Christmas to you all!
This simulation solves the wave equation in a domain made of three different media. The central tree-shaped region has a lower index of refraction and a positive damping coefficient. It is surrounded by a layer with higher index of refraction (by a factor 3) and no dissipation, which is itself surrounded by a perfectly reflecting layer, which however does not reach all the way to the top of the tree. The outer region has the same properties as the intermediate layer with higher index of refraction.
In effect, the intermediate layer acts as a wave guide or optical fiber, which transports the light produced by an oscillating source at its bottom. If you see faces in the interference pattern, it is just your brain playing tricks on you!
The color hue shows the wave energy, averaged from the beginning of the simulation, on a logarithmic scale. There are absorbing boundary conditions on the borders of the displayed rectangle.
A short version of this video showing the wave height appears here: • A Christmas wave guide (short version...
Render time: 1 hour 17 minutes
Compression: crf 18
Color gradient: Inferno by Nathaniel J. Smith and Stefan van der Walt
https://github.com/BIDS/colormap
Music: "Auld Lang Syne (Instrumental Jazz)" by E's Jammy Jams@ethaneubanks749
See also https://images.math.cnrs.fr/Des-ondes... 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...
C code: https://github.com/nilsberglund-orlea...
https://www.idpoisson.fr/berglund/sof...
Many thanks to Marco Mancini and Julian Kauth for helping me to accelerate my code!
#wave_equation #fiberoptics #christmas