Kinetic gas theory
This program calculates the movement of atoms and molecules in a gas by solving Newton's equations of motion. It is possible to mix different ensembles of atoms and molecules of different masses and bring them into thermodynamic equilibrium with each other. Thermodynamic quantities and velocity distributions can then be displayed for each of these ensembles. By realistically modeling the particle interaction with a Lennard-Jones potential, phase transitions into the liquid and solid phase can be observed as the gas cools. With the typical particle numbers used in the program (usually less than 100), this results in small droplets or solid clusters. The possibility of using diatomic molecules also allows the distribution of energy over the various degrees of freedom (translation, rotation and oscillation) to be studied. It should be noted that, due to the classical calculation (without quantization), all degrees of freedom also contribute at low temperatures. The representation corresponds to a slow motion of 10-12, i.e. the representation of one picosecond per second. The three-dimensional space is shown in perspective, whereby the atoms and molecules that are further back are shown in reduced size.
Operation
After starting the program, the first step is to add atoms or molecules to the volume. This is done using the "Add" button. The particle type (atoms or molecules) must first be selected, the mass of the atoms in grams per mole entered, the color of the particles selected for the display and the number of particles to be added specified. Note that the mass always refers to the mass of the atoms, i.e. the mass of an atom in the molecule. The color is entered by clicking on the color field with the left mouse button and then selecting the color. It is recommended to use dark colors. When using less than about 50 atoms, the program calculates fast enough to give a good impression of the movement. Each time particles are added, they are assigned to a new ensemble. The thermodynamic quantities of these ensembles can be displayed later. It is recommended to use different colors for particles with different properties in order to distinguish them in the graph.
Before starting, the size of the volume must be specified, which always has the shape of a cube whose edge length is entered. The initial velocity must also be specified. As an arbitrary initial condition, all particles are started to the right at the same speed. After some time, the statistical movement is set automatically. Of course, the particles must collide with each other frequently enough for this to happen, which is why the volume should not be too large. The temperature in Kelvin is displayed under the start button. Energy can be removed from or added to the system using the "cool" and "heat" buttons. This changes the temperature. Each click removes or adds 5% of the kinetic energy.
By ticking the "Show parameters for ensemble" box, a window opens that displays the average values for the speed and energy of an ensemble. In the parameter window, the ensemble for which the parameters are to be displayed should be selected first. A particle of the ensemble is displayed for a better overview. Further down, the mean velocity components, the mean value of the translation velocity and the square root of the mean velocity square are displayed. Below this, the mean energies in the individual degrees of freedom are displayed. The data is displayed in joules per mole or joules per particle. The energies can also be written as multiples of kB*T, whereby a separate temperature is given for each degree of freedom. This makes it easy to check the distribution of the energy over the individual degrees of freedom. To make it easier to read the mean values, you can average over a period of time (check mark above), which results in a time average in addition to the ensemble average. However, this averaging also leads to the correct mean values in equilibrium. The general particle properties of the ensemble are displayed at the bottom.
By ticking the "Velocity distribution" box, you can check whether a Maxwell-Boltzmann distribution is obtained for the ensemble. The ensemble must be selected again in the corresponding window. Once a thermodynamic equilibrium has been reached, the time averaging should be restarted (button at the bottom left of this window) and you should wait a sufficiently long time until good statistics have been obtained for the distribution. During the calculation, you can switch back and forth between the ensembles to compare the distribution of different heavy particles. The graph can be saved as an image or printed out. The character set and line thickness can also be selected via the menu.
Numerical realization
The trajectories of the particles are calculated by solving Newton's equations of motion with 4th order Runge-Kutta. The step size is one femtosecond (10-15s). This means that 50 time steps per frame and 20 frames per second are calculated. A Lennard-Jones potential is used as the potential. A parabolic potential with a minimum at the bond distance is used for the bonding of the atoms in a molecule. This prevents the molecules from dissociating. Bond distances are optimized for neon and nitrogen.