A granular material flowing around a disc
Channel: Nils Berglund
Date: 06/07/2023

This simulation is inspired by the web site https://www.migflow.be/results/ that was pointed out to me by a viewer. It shows particles interacting  via a Lennard-Jones potential, subject to gravity acting from left to right and to viscous friction. They interact with the circular obstacle via a one-sided stiff harmonic potential, and there are periodic boundary conditions. By an oversight, part of the particles have a smaller mass (the code was adapted from an earlier simulation), which explains the regions with different speed seen in the second part of the video. 
This simulation has two parts, showing the evolution with two different color schemes:
Number of neighbors: 0:00
Kinetic energy: 1:38
In part 1, the color of the particles depends on the number of neighbors within a fixed distance, which allows to visualize defects in the crystalline arrangement. In part 2, they show the particles' kinetic energy: red particles are faster than blue ones.
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: 1 hour 3 minutes
Color scheme: Turbo, by Anton Mikhailov
https://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a

Music: "Until We Meet Again" by Joe Bagale

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)

#granular_material #lennardjones
 #LennardJones #molecular_dynamics