@NilsBerglund
  @NilsBerglund
Nils Berglund | This is not Tetris: Interacting falling squares @NilsBerglund | Uploaded June 2024 | Updated October 2024, 8 minutes ago.
Like the video youtu.be/5_xw3fIPmak , this one shows "molecules" composed of neutral and charged particles subject to gravity and a Coulomb interaction. The difference is that here, the molecules have a square shape, which allows them to assemble into a more regular structure.
Each molecule is composed of 9 atoms, all interacting via a stiff harmonic potential, making them hard to deform. The molecules have a square symmetry, except that the symmetry is broken by the charge they are carrying. Each molecule carries two atoms with positive charge and two atoms with a negative charge, the other atoms being neutral. When molecules come close enough, they can merge, gradually forming larger clusters.
The particles interact via a Coulomb potential when they belong to different molecules, and a harmonic potential within the same molecule. The Coulomb potential is complemented by a Lennard-Jones interaction between particles of opposite charge, to avoid their collapse on a single point. The temperature is controlled by a thermostat with increasing temperature.
This simulation has two parts, showing the evolution with two different color gradients:
Charge: 0:00
Orientation: 1:08
In the first part, the particles' color depends on their charge, while the background indicates the local charge density, slightly averaged over space and time. In the second part, the molecules' color depends on the orientation modulo 90 degrees, because of the four-fold symmetry.
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 temperature is controlled by a thermostat, implemented here with the "Nosé-Hoover-Langevin" algorithm introduced by Ben Leimkuhler, Emad Noorizadeh and Florian Theil, see reference below. The idea of the algorithm is to couple the momenta of the system to a single random process, which fluctuates around a temperature-dependent mean value. Lower temperatures lead to lower mean values.
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: 45 minutes 45 seconds
Compression: crf 23
Color scheme: Part 1 - Twilight by Bastian Bechtold
github.com/bastibe/twilight
Part 2 - HSL/Jet

Music: "Modern Time" by An Jones@SOYEMILIA

Reference: Leimkuhler, B., Noorizadeh, E. & Theil, F. A Gentle Stochastic Thermostat for Molecular Dynamics. J Stat Phys 135, 261–277 (2009). doi.org/10.1007/s10955-009-9734-0
maths.warwick.ac.uk/~theil/HL12-3-2009.pdf

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/_Berglund-Nils-1343_.html
(in French, some with a Spanish translation)

#molecular_dynamics #ions #Tetris
This is not Tetris: Interacting falling squaresA magnetron-shaped resonator with longer wavelengthWinnowing 2: Separating triangles by size using windVideo #1300: What if the Earths oceans were much shallower?Trajectories in a mass spectrometerA laminar flow over an immersed octahedronThe Allen-Cahn equation on the sphere, with improved behavior at the polesRefraction and reflection of a shock waveWaves escaping a ring of obstacles: Sunflower gridBloopers 19: Asteroid impact in the Indian Ocean, with a too strong Coriolis forceSorting hexagons by sizeA tide simulation with a more realistic lunar forcing

This is not Tetris: Interacting falling squares @NilsBerglund

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER