A granular material flowing around a triangle
Channel: Nils Berglund
Date: 2023-08-04

This new simulation of a granular medium implements a suggestion made in several comments, namely to use a polygonal obstacle instead of a circular one. Here the polygon is an equilateral triangle, and it has been turned in such a way that it its symmetry axes are not aligned with gravity, which is directed to the right. One can see that particles have to accelerate when moving around the corners of the triangle. As in previous simulations of granular media, the propagation of defects through the crystalline lattice is also visible.
The particles in this simulation interact via a Lennard-Jones potential, and are subject to a viscous damping term, to a horizontal gravity force, and to a one-sided harmonic repulsion from the obstacle. There are periodic boundary conditions. 
This simulation has two parts, showing the evolution with two different color schemes:
Averaged kinetic energy: 0:00
Averaged direction: 1:40
In part 1, the particle's color depends on their kinetic energy, but averaged over a time window, instead of the instantaneous kinetic energy shown in several previous videos. Red particles have a larger average speed than blue ones. This allows to visualize defects propagating through the lattice. In part 2, a similar averaging is applied to the particles' direction. The hue depends on the direction in which they move, and the luminosity depends on their kinetic energy.
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: 52 minutes 54 seconds
Color scheme: Part 1 - Turbo, by Anton Mikhailovhttps://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a
Part 2 - Twilight by Bastian Bechtold
https://github.com/bastibe/twilight

Music: "Jazzeton" by Quincas Moreira@QuincasMoreira

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 #phonon