Loading the engineShared by all simulations, so the next one opens instantly.
The physics

The same atoms can be a gas, a liquid or a crystal; which one depends on how their thermal energy compares with the energy that binds them. Lennard-Jones particles, the standard model of noble-gas atoms such as argon, show all three phases. Here a thermostat holds the temperature where you set it, so you can cool a gas until it condenses into drops, and cool the drops until they freeze.

What you see

Particles in an 800 by 800 pixel box with periodic edges: whatever leaves one side comes back in at the opposite one, and pairs interact across the edges. Lines join neighbors closer than 1.55 σ. The panel shows the temperature T∗=kBT/ε and the virial pressure P∗=Pσ2/ε, both in reduced units.

Every run starts with the particles on a square grid in the upper part of the box, at random velocities scaled to the target temperature.

Model

Each pair interacts through the Lennard-Jones potential

V(r)=4ε[(σr)12−(σr)6],

repulsive inside 21/6σ≈1.12σ and attractive beyond, with a well of depth ε. The motion is integrated with velocity Verlet at Δt=1/480 s. After each step a Berendsen thermostat rescales all velocities by λ=1+c(T0/T−1), which closes a fraction c of the gap between the kinetic temperature T and the target T0.

In two dimensions the Lennard-Jones fluid has its critical point near T∗=0.53 and its triple point near T∗=0.41: above 0.53 there is a single fluid phase, between the two a liquid can coexist with its vapor, and below the triple point the condensed phase is a crystal. The density ρ∗=Nσ2/A decides how much of the box the condensed phase fills.

Presets

Hot gas: 60 particles, T∗=1, density ρ∗=0.19. Particles fly freely and meet in brief collisions; at any moment about a quarter have no neighbor within 1.5 σ. The pressure fluctuates around P∗≈0.2, close to the ideal-gas value ρ∗T∗=0.19.

Condensing liquid: 100 particles, T∗=0.45, ρ∗=0.32, inside the coexistence region. Within ten seconds the particles gather into a liquid drop or band that holds almost all of them, with a few vapor atoms evaporating and condensing at its surface. Inside the drop the neighbors are close but disordered.

Crystal: 150 particles, T∗=0.25, ρ∗=0.47. The particles freeze into a hexagonal crystal, with six neighbors each and the bond lines forming triangles, broken by holes and grain boundaries. The particles vibrate about their sites but no longer move past one another.

Moving the temperature slider takes the system between these states: heat the crystal past about 0.41 and it melts, heat the drop past 0.53 and it dissolves into the gas.

Parameters

Particles: 20 to 200; with the diameter it sets the density. Applies on Reset.

Diameter σ (px): 20 to 90, and Well depth ε: 10,000 to 200,000 in units of ½mv² (px²/s²). The thermostat targets T∗ε, so the reduced temperature keeps its meaning as ε changes.

Temperature T*: the thermostat’s target, 0.05 to 3.

Thermostat coupling: the fraction c, 0 to 0.2 per step. At 0 the thermostat is off and the total energy is conserved.

The force sliders add a uniform acceleration, like gravity, and the rotation slider a rotating frame.

Diameter, well depth, temperature and coupling apply immediately.