Modeling a cave-in with Lennard-Jones particles, version with stronger damping
Channel: Nils Berglund
Date: 2022-11-24

This simulation is a variant of the one in the video https://youtu.be/urRP6qCbR3Q in which the viscous friction has been increased by a factor 2.5. The aim of these simulations is to see whether it is possible to use Lennard-Jones particles to model the cave-in of an underground gallery, when the top soil is suddenly allowed to fill the gallery below, after its ceiling collapses. I don't claim this is an accurate simulation, but it shows several interesting phenomena, such as grain boundaries between regions where the particles are close-packed, and little avalanches as particles manage to fill holes below them. 
The simulation features 5884 particles subject to gravity and viscous friction, and interacting via a Lennard-Jones potential. The are harmonic repulsive forces from the horizontal bar in the middle of the picture, and from the rectangular boundaries. 
The simulation has two parts, showing the same evolution with two different speeds:
Time lapse: 0:00
Slow motion: 1:20
In the first part, the speed has been increased by a factor 3. Colors indicate the kinetic energy of the particles: red particles move 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: 2 hour 31 minutes
Color scheme: Turbo, by Anton Mikhailov
https://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a


Music: "Dynamic Synaptic" by South London Hifi@discobiscuit1320

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)