This simulation is similar to the recent simuation • A granular medium with two types of p... , but with a mass ratio that is 8 times as large.
It features particles of two different sizes and masses. The larger particles are 1.4 times as large, and 20 times as heavy as the smaller ones. Initially, particles are put on a regular lattice, and each particle is randomly assigned type 1 or 2, with probability 1/2 each. It appears that particles have a larger tendency to group in patches of the same type, as is the case in phase separation in alloys or mixtures of different fluids. Another effect is that the light particles tend to gather behind the circular obstacle, an effect that is reinforced by the periodic boundary conditions.
The particles in this simulation interact via a Lennard-Jones potential, and are subject to a viscous damping term, gravity directed to the right, and to a one-sided harmonic repulsion from the obstacle.
This simulation has two parts, showing the evolution with two different color schemes:
Type of particle: 0:00
Number of neighbors: 2:12
In the first part, the color of the particles depends on their type. In the second part, the particles' color depends on the number of neighbors within a certain distance, and thus reflects the density of the granular material.
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...
Render time: 27 minutes 14 seconds
This is much faster than the previous similar simulation, as I discovered an improvement in the way particles are drawn - in fact, many previous sims of LJ particles drew them as circles made of an unnecessarily large number of segments.
Color scheme: Turbo, by Anton Mikhailov
https://gist.github.com/mikhailov-wor...
Music: "Houston Vibes Score" by the Unicorn Heads@UnicornHeads
Current version of the C code used to make these animations:
https://github.com/nilsberglund-orlea...
https://www.idpoisson.fr/berglund/sof...
Some outreach articles on mathematics:
https://images.math.cnrs.fr/_Berglund...
(in French, some with a Spanish translation)
#granular_material #lennardjones #LennardJones #molecular_dynamics #phonon