# NobleGas Applet

## Molecular Dynamics of a Noble Gas

Enter a number of atoms (n_atoms), a temperature (T) in Kelvin and see what happens. Be sure to press <enter> or <return> after you have typed a number.

The number of atoms is limited to 1 <= n_atoms <= 2000.

The temperature is limited to T >= 0 K. If you have entered a new temperature, all atoms get new speeds according to the maxwellian velocity-distribution. Because this is a probability-law, the new mean temperature may slightly differ from what you have entered.

A number of diagnostic variables are constantly calculated and displayed:

The mean temperature is calculated from the actual velocities. It may rise, if potential energy is converted into kinetic energy, or it may decrease if kinetic energy is converted into potential energy. Enter the temperature T in quick succession to force cooling or heating to a certain temperature.

The mean potential energy is averaged over all pairs of atoms. It is zero, if the atoms are independent (ideal gas). It is negative, if the atoms attract each other and are slightly bound together. It is positive, if the system is under pressure from the walls.

The nearest neighbor distance is the shortest distance between any two atoms (center to center) at the very moment.

The steps per frame indicates the number of steps in the numerical integration per displayed frame. A new frame is displayed, if this number reaches 100 or if 10 ms have elapsed. If the steps per frame is smaller than 100, the computational burden has slowed down the simulation. The applet "sleeps" 20 ms after each frame to allow other processes (e.g. the operating system) to accomplish their tasks.

**Background**

The simulation is 2-dimensional, e.g. all atoms move in the same plane. The displayed square box is 10 nm wide. The atoms have a radius of 71 pm, which is the measured value for Argon-gas. If atoms hit the walls, they are elastically reflected. Atoms interact according to the Lennard-Jones potential: E_{pot} = A·r^{-12}-B·r^{-6}. The values for Argon in the diluted gaseous state are used: energy minimum -10.4 meV at a distance (center to center) of 304 pm. The potential (resp. the forces calculated from it) are cut off at long distances to save computational time and held constant at small distances to avoid computational instabilities. The Lennard-Jones potential is a pair-potential, see the literature for the limitations in a condensed state.

The forces are summed over all pairs. From the net forces on the atoms, the accelerations are calculated. The velocity-Verlet integrator is used to numerically integrate the movements of the atoms. The time step is 1 fs. For small number of atoms, the positions are displayed after 100 time steps, i.e. after 0.1 ps (see the number of steps per frame).

And here is the source-code: NobleGas.java

**Note: ** If the image flickers, try the following application, that runs without browser: NobleGas.jar (8 kByte).

Created with BlueJ 3.0.4 (Java version 1.6.0_24) running on Mac OS X 10.6.7

May 10th, 2011, Martin Lieberherr