@NilsBerglund
  @NilsBerglund
Nils Berglund | Waves of two different frequencies crossing a "sunflower" lattice @NilsBerglund | Uploaded June 2024 | Updated October 2024, 1 minute ago.
Some recent simulations on this channel, such as youtu.be/Y9Zn8T8dYgg , showed waves of two different frequencies, produced by two different sources, crossing a regular lattice of scatterers. Here the regular lattice has been replaced by a "sunflower" pattern of discs. This pattern is obtained by staring with a disc at the center of the display, and then gradually adding shifted discs, each time turning by a "golden" angle of (phi - 1) times 360°, where phi = 1.618... is the golden ratio or golden mean. The distance to the original circle is gradually increased, in such a way that the density of circles remains constant. This arrangement has appeared before on this channel, see for instance youtu.be/fQaVL3mE6VY or youtu.be/c8sKkM8ZDTs .
The frequency of the lower source is three times the frequency of the upper one. The resulting wavelengths are such that the open intervals in the grating are between both wavelengths. As a result, waves of the lower source pass the grating more easily, as can be best seen on the energy plot.
This video has two parts, showing the same evolution with two different color gradients:
Wave height: 0:00
Averaged wave energy: 1:19
In the first part, the color hue depends on the height of the wave. In the second part, it depends on the energy of the wave, averaged over a sliding time window. The contrast has been enhanced by a shading procedure, similar to the one I have used on videos of reaction-diffusion equations. The process is to compute the normal vector to a surface in 3D that would be obtained by using the third dimension to represent the field, and then to make the luminosity depend on the angle between the normal vector and a fixed direction.
There are absorbing boundary conditions on the borders of the simulated rectangle. The display at the right shows a time-averaged version of the signal near the right boundary of the simulated rectangular area. More precisely, it shows the square root of an average of squares of the respective field value (wave height or energy).

Render time: 35 minutes 28 seconds
Compression: crf 23
Color scheme: Part 1 - Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric Firing
Part 2 - Inferno by Nathaniel J. Smith and Stefan van der Walt
github.com/BIDS/colormap

Music: "Raw Deal" by Gunnar Olsen

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 hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf
C code: 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 #diffraction #grating
Waves of two different frequencies crossing a sunflower latticeSorting particles at lower frictionA laminar flow over an immersed cubeUsing six sources to excite resonant modes in a circleVortices in the compressible Euler equation on the sphere with Coriolis forceThe shallow water equation on the sphereSymmetric low-frequency pulses in a magnetron-shaped resonator[Flash warning] Two planar waves crossing a gradient index lensConveyor belts with a separatorWaves from a point source crossing a percolation-style arrangement of obstaclesDNA-like molecules with dissociation of non-matching base pairsUnzipping more flexible DNA-like molecules with enzymes

Waves of two different frequencies crossing a "sunflower" lattice @NilsBerglund

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER