@NilsBerglund
  @NilsBerglund
Nils Berglund | Triangles falling through a funnel @NilsBerglund | Uploaded August 2024 | Updated October 2024, 57 seconds ago.
This simulation was requested in a comment to a previous video. It shows particles having the shape of equilateral triangles, interacting (mostly) via contact forces. The particles are subject to gravity, and initially land in a funnel-shaped container. Once the bottom of the funnel opens, the particles are able to spill to a lower level.
To compute the force and torque of triangle j on triangle i, the code computes the distance of each vertex of triangle j to the faces of triangle i. If this distance is smaller than a threshold, the force increases linearly with a large spring constant. In addition, radial forces between the vertices of the triangles have been added, whenever a vertex of triangle j is not on a perpendicular to a face of triangle i. This is important, because otherwise triangles can approach each other from the vertices, and when one vertex moves sideways, it is suddenly strongly accelerated, causing numerical instability. A weak Lennard-Jones interaction between triangles has been added, as it seems to increase numerical stability.
Unlike in previous videos involving interacting polygons, there is no thermostat in this simulation. Instead, friction forces (both linear and angular) have been added for numerical stability. Still, one can see some energy bursts, most likely due to round-off errors.
This simulation has two parts, showing the evolution with two different color gradients:
Kinetic energy: 0:00
Orientation: 1:22
In the first part, the particles' color depends on their kinetic energy, averaged over a sliding time window. In the second part, it depends on their orientation modulo 120 degrees.
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 en.wikipedia.org/wiki/Lennard-Jones_potential

Render time: 1 hour 57 minutes
Compression: crf 23
Color scheme: Part 1 - Turbo, by Anton Mikhailov
gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a
Part 2 - HSL/Jet

Music: "Whisper" by Riot

Current version of the C code used to make these animations:
github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Some outreach articles on mathematics:
https://images.math.cnrs.fr/auteurs/nils-berglund/
(in French, some with a Spanish translation)

#molecular_dynamics #polygons
Triangles falling through a funnelAll those moments will be lost in time: Longer simulation of DNA replicationDNA-like molecules in higher temperature and flying ice cubesRattling the sieves in a particle sorter avoids cloggingNon-coherent waves in a magnetron-shaped resonatorBloopers 16: DNA or TIE fighters?Vortices on a sphereCherenkov radiation for increasing wave speedRefraction and reflection of a shock wave - Source in medium with refractive index 3A particle sorter with linearly increasing gapsWeather on the Earth with a random initial state - Velocity and wind directionExciting resonant modes in a circle

Triangles falling through a funnel @NilsBerglund

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER