Using a beam splitter to filter out high frequencies
Channel: Nils Berglund
Date: 2024-02-06

The input signal in this simulation is the sum of two sine waves with incommensurate frequencies (the frequency ratio is sqrt(7)). The beam splitter transmits part of the incoming wave and reflects another part upward. The upward beam is dominated by the longer wavelength in the signal, meaning that the higher-frequency component has been filtered out of the signal to some extent.
The beam splitter consists of a slab of material with index of refraction equal to 2. Due to the combination of reflection and transmission at the two interfaces, the beam is split into a horizontal transmitted part, and a vertical reflected part. The intensities of the transmitted and reflected parts depend on the wavelength, the index of refraction of the slab, and its thickness. By choosing these parameters appropriately, so that there is a phase shift close to pi between the waves reflected on the two boundaries of the beam splitter, one can in effect cancel one wavelength in one of the outgoing beams.
This video has two parts, showing the same simulation with two different color gradients:
Wave height: 0:00
Wave energy: 1:40
In the first part, the color hue depends on the wave height (or electric field intensity). In the second part, it shows the energy of the wave. 
There are absorbing boundary conditions on the top, bottom and right boundaries, and a time-quasiperiodic signal is imposed on the left boundary. The displays at the bottom and right show the wave height or energy along the horizontal and vertical lines that splits the displayed region into two equal parts.

Render time: 36 minutes 19 seconds
Compression: crf 23
Color scheme: Part 1 - Twilight by Bastian Bechtold
https://github.com/bastibe/twilight
Part 2 - Inferno by Nathaniel J. Smith and Stefan van der Walt
https://github.com/BIDS/colormap

Music: "Ben" by William Rosati@willrosati353

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 #interferenceoflight #beam_splitter