Let it snow! (4K, crf 28)
Channel: Nils Berglund
Date: 2023-12-24

Jolly Yuletide y'all! As has by now become a tradition on this channel, here is a little Christmas-themed entertainment, based on my Lennard-Jones code. Hope you enjoy it!
The pine trees and ground are made of repelling segments, while the snowflakes are randomly generated particles interacting via a Lennard-Jones potential, subject to viscous friction and gravity. The color of the segments changes with the time-averaged pressure experience by them: segments hit by more snowflakes take on a warmer color.
To save on computation time, particles are placed into a "hash grid", each cell of which contains between 3 and 10 particles. Then only the influence of other particles in the same or neighboring cells is taken into account for each particle. 
The Lennard-Jones potential is strongly repulsive at short distance, and mildly attracting at long distance. It is widely used as a simple yet realistic model for the motion of electrically neutral molecules. The force results from the repulsion between electrons due to Pauli's exclusion principle, while the attractive part is a more subtle effect appearing in a multipole expansion. For more details, see https://en.wikipedia.org/wiki/Lennard-Jones_potential

Render time: 29 minutes 11 seconds
Color scheme: Particle color - Turbo, by Anton Mikhailov
https://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a
Tree color - Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric Firing

Music: "O Christmas Tree (Instrumental)" by the Jingle Punks

Current version of the C code used to make these animations: 
https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Some outreach articles on mathematics:
https://images.math.cnrs.fr/_Berglund-Nils-1343_.html
(in French, some with a Spanish translation)

#molecular_dynamics #christmas