Rocket comparison 8 - with an unexpected outcome
Channel: Nils Berglund
Date: 2022-10-22

This is an improved version of the video https://youtu.be/dsoJ5gQ0hho comparing rockets with two different types of nozzles, bell shaped (the blue rocket on the left), and "trumpet"-shaped (the red rocket on the right). The chambers of the rockets are rectangular instead of circular, which increases the thrust as we have seen in the simulation https://youtu.be/mwjHeJp5XMI . It turns out that the bell-shaped nozzle does a bit better, though the difference is not huge (it may increase with more propellant particle). Then something unforeseen happens - showing space flight has its dangers.
At the beginning of ths simulation, there are 2267 particles in total, interacting via a Lennard-Jones potential, and via a harmonic potential with the walls of the rockets. They are also coupled to a thermostat which regulates the temperature (measured in average kinetic energy per particle). 
The motion of the rockets is described by Newton's equations for a rotating solid. The acceleration of its center of mass is proportional to the sum of all forces particles exert on it. Its angular acceleration is proportional to the total torque due to the particles. The numbers at the top right show the x- and y-components of the rocket's velocity, as well as its angular velocity, averaged over 100 frames to reduce fluctuations. The units have been chosen so that they match the slow motion part of the simulation: the angular velocity is measure in radians per second, and the velocities in length units per second, where the height of the displayed region is 4.5 units. The plot shows the vertical velocity and angular velocity without averaging.
This simulation has two parts, showing the same evolution at two different speeds:
Time lapse: 0:00
Slow motion: 0:44
In the first part, time has been accelerated by a factor 3. 
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. 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: 57 minutes 10 seconds
Color scheme: Turbo, by Anton Mikhailov
https://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a

Music: "Peridot" by Gunnar Olsen

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

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)