A granular material flowing towards the back of a wedge: Defects and mixing
Channel: Nils Berglund
Date: 29/08/2023

This is a variant of the video https://youtu.be/A4d_j274ac0 , showing the same evolution of a granular material flowing towards a wedge-shaped obstacle, but with different color gradients. The first one is a new representation of lattice dislocations, while in the second one, the color of the particles depends on their initial x-coordinate. 
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:
Lattice of neighbors: 0:00
Initial x coordinate: 1:45
In the first part, the particles are not drawn at all, but the lines joining neighboring particles are. Here neighboring is defined as being within a fixed distance. The color of the lines changes slightly with their length. In the second part, each particle is given a color at the beginning of the simulation, which is a function of its x-coordinate. The particle then keeps the same color throughout the simulation.
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: 36 minutes 14 seconds
Color scheme: Part 1 - Twilight by Bastian Bechtold
https://github.com/bastibe/twilight
Part 2 - HSV/Jet

Music: "Jah Jah Bangs" 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