States of Matter Simulator
Heat or cool a box of argon-like atoms and watch a crystal melt into a liquid and evaporate into a gas, with each atom’s state read from its neighbours.
Simulator
- State Read from the atoms, not from the temperature: it names every state that at least a fifth of them are in.
- Solid
- Temperature From the atoms’ kinetic energy over the last 43 ps. With so few atoms it wobbles by a few percent around the setting.
- 20 K
- Potential energy Energy stored in the attractions, per mole of atoms, zero when they are far apart. Its rise on melting and evaporating is the latent heat.
- −2.82 kJ/mol
- Mean speed Set by the temperature alone, whether the atom is in the solid, the liquid or the gas.
- 80 m/s
- Solid-like At least three close neighbours on average, holding a steady hexagonal pattern.
- 100%
- Liquid-like At least three close neighbours on average, but not in a steady pattern.
- 0%
- Gas-like Fewer than three neighbours within 0.51 nm on average. Includes the odd atom at a corner of a small crystal.
- 0%
- Kinetic energy
- Potential energy
- Solid-like
- Liquid-like
- Gas-like
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
Lennard-Jones (1931), the 12-6 potential between atoms
What happens to the particles in a solid, a liquid and a gas?
The same particles make all three, and what changes is how their motion compares with the
pull between them. In a solid the attraction holds each atom in a fixed place in a regular
pattern, where it vibrates; in a liquid the atoms are nearly as close but slide past each
other; in a gas they have enough energy to escape each other and fill their container. This
simulator shows that change happening. A box of argon-like atoms, 150 unless you change it,
sits in a heat bath at the temperature you set, and every pair of atoms pulls and pushes on
each other through one rule, the Lennard-Jones potential
U(r) = 4ε[(σ/r)¹² − (σ/r)⁶]. Nothing tells the atoms which state to be in: the
readouts work it out from where they are.
Raise the temperature and the crystal melts from its edges inwards, then the liquid evaporates until the box is full of gas. Lower it again and the gas condenses and freezes. The atoms are coloured by the state each one is in, and the two plots record the energy and the share of atoms in each state as it happens.
One rule for every pair of atoms
The (σ/r)⁶ term is the weak attraction between neutral atoms at a distance, the
London dispersion force, and the (σ/r)¹² term is the steep repulsion when their
electron clouds are pushed into each other. Between them the energy of a pair has a minimum of
−ε at r = 2^(1/6) σ. With the values that fit argon, ε/k = 119.8 K
and σ = 0.3405 nm (Rowley, Nicholson and Parsonage, 1975), the well is
1.654 × 10⁻²¹ J deep, or 0.996 kJ/mol for a mole of pairs, and its bottom lies 0.3822 nm
apart, close to the spacing of the atoms in the crystal. Lennard-Jones proposed this 12-6 form
in 1931.
Pairs more than 2.5σ, 0.85 nm, apart are ignored, a common shortcut: a pair that far apart has only 1.6 percent of the well depth left, and the potential is shifted by that much so that the energy does not jump when a pair crosses the line. The walls push back like stiff springs on any atom that touches them. Every atom then moves by Newton’s second law, stepped forward every 10.8 fs by the velocity Verlet method, and the heat bath gives each atom a fresh random velocity for the set temperature on average once every 10.8 ps, as if a molecule of something surrounding the box had struck it. Between those kicks the motion is Newton’s laws and nothing else.
Worked example: how fast are the atoms in the solid?
Temperature fixes the average kinetic energy of an atom, and in two dimensions that average
is kT, half of kT for each direction it can move in. At 20 K it is
1.380649 × 10⁻²³ J/K × 20 K = 2.761 × 10⁻²² J. The mean speed in two dimensions is
v̄ = √(πkT/2m), and an argon atom’s mass is 39.948 u, 6.634 × 10⁻²⁶ kg, so
v̄ = √(π × 2.761 × 10⁻²² / (2 × 6.634 × 10⁻²⁶)) = 80.9 m/s.
That is the crystal at 20 K, and the Mean speed readout sits close to 81 m/s there, about 290 km/h. The atoms of a solid are not still: the pull of their six neighbours turns each one back before it gets anywhere. At 120 K, where the box is all gas, the mean speed is √6, about 2.45, times larger, 198 m/s. Six times the temperature buys only two and a half times the speed.
The energy holding the crystal together is just as easy to estimate. Each bond sits near the bottom of the well, −0.996 kJ/mol, and each atom has six bonds, each shared with a neighbour, so a large flat crystal holds about 3 × −0.996 = −2.99 kJ/mol, or −3.15 kJ/mol counting the weaker pull of atoms further out. The 150-atom crystal starts at −2.82 kJ/mol, because 42 of its atoms sit at the edge with fewer neighbours to hold them. That is what the potential energy readout shows the moment the box is built, and it is the energy you would have to supply to pull every atom free. Warmed to 20 K, the crystal reads about −2.63 kJ/mol.
Watch a solid melt
Start from the crystal and raise the temperature a few kelvin at a time, giving it a moment at each setting. At the default size it is still about nine tenths solid-like at 30 K. Near 35 K the atoms at its edge start to come loose and turn liquid-like while the middle holds its pattern, which is why melting starts at a surface. By 40 K about half the atoms are solid-like, and a crystal this small does not settle there: the solid share rises and falls by tens of percent over a few hundred picoseconds as it freezes a little and melts again. By 45 K it is a drop of liquid with gas around it.
Watch the energy plot while it happens. Jump from 20 K to 45 K and the kinetic energy climbs most of the way within the first 50 ps or so, then lags while the crystal melts, because the heat bath’s energy is going into loosening the atoms rather than into speeding them up. The potential energy goes on rising for several hundred picoseconds. That energy, taken in with the temperature nearly steady, is the latent heat. The latent heat calculator works out how much a real sample needs, and the heating curve calculator adds it to the warming between the changes of state.
Why a sealed box has no single boiling point
Keep heating and the liquid evaporates, but gradually. At the default size about a fifth of the atoms are gas-like at 45 K, about half at 55 K and nine in ten by 70 K. A boiling point is the temperature at which a liquid’s vapour pressure reaches the pressure above it, 87.3 K for argon under one atmosphere, and in a sealed box of fixed size there is no fixed pressure above the liquid: the vapour builds up as the temperature rises, so the drop shrinks steadily instead of boiling away at one temperature.
There is a limit, too. Above the critical temperature a liquid and its vapour stop being different at all, and for this flat, cut-off version of the potential Smit and Frenkel (1991) put it at 0.459 ε/k, which is 55 K. Near it the drop becomes ragged and gas-like and liquid-like atoms are hard to tell apart; well above it, the box holds a gas and nothing else. Its atoms still attract, so it is not quite the ideal gas of the kinetic theory gas simulator, whose hard discs never do.
Cooling it down: condensing and freezing
Choose Scattered atoms and a low temperature and the reverse happens. The atoms stick where they meet and the clusters drift together, and at 25 K most of them are solid-like within about 300 ps. The solid that forms this way is usually not one crystal but several, joined along boundaries where the pattern breaks, and it holds more energy than the crystal the other start builds: at 25 K between −2.2 and −2.4 kJ/mol, against about −2.57 kJ/mol for the single crystal. That difference is energy locked into the boundaries, which a real solid gives up only if it is warmed and cooled slowly enough to reorganise. It is also why the simulator reads the state from the atoms instead of looking it up from the temperature: two boxes at the same temperature can hold different solids.
How the simulator decides which state an atom is in
Every 1.08 ps it counts each atom’s neighbours within 0.51 nm, one and a half atomic
diameters, a distance that falls in the empty gap between the crystal’s first ring of
neighbours and its second. It also records how the directions to those neighbours are
arranged, as the bond order ψ₆, the average of e^(6iθ) over the
bonds, which is 1 when the neighbours sit at the corners of a hexagon. Both are averaged over
the last 10.8 ps. An atom with fewer than three neighbours on average is gas-like. One whose
neighbours have also held a steady hexagonal pattern, an average bond order of at least 0.7,
is solid-like. Any other is liquid-like: packed in, but rearranging.
The headline names every state at least a fifth of the atoms are in, and keeps naming it until fewer than 15 percent are, so it does not flicker when a share sits near the line. The thresholds are choices rather than laws, and an atom at a surface or a defect can fall either way, which is why the shares are shown as well as the headline.
Why the liquid is a round drop
There is no gravity in the box, so nothing pulls the liquid down into a puddle, and at this size it would make no difference. The strongest pull between two argon atoms is 1.16 × 10⁻¹¹ N, about 1.8 × 10¹³ times an atom’s weight. On Earth a drop of water is flattened by its own weight only once it is wider than about 2.7 mm, its capillary length, and a drop a few nanometres across is round.
What this model leaves out
- The third dimension. A flat crystal gives each atom six nearest neighbours instead of twelve, so these atoms melt and evaporate at lower temperatures than real argon, which melts at 83.8 K. The same potential in three dimensions melts at 0.69455 ε/k (Schultz and Kofke, 2018), 83.2 K. Melting in two dimensions can also pass through an in-between hexatic phase, though for these atoms only when they are hotter and squeezed far harder than anything in this box (Li and Pica Ciamarra, 2020).
- Size. A few hundred atoms at most, so every change of state is spread over several kelvin and the temperature itself wobbles by a few percent around the setting. A gram of argon holds 1.5 × 10²² atoms, and its changes of state are sharp.
- Pressure. The box never changes size, so you cannot squeeze the gas into a liquid, and a boiling point, which is defined at a fixed pressure, does not exist here.
- Quantum effects. The atoms follow classical mechanics, which gets the coldest behaviour of any real solid wrong.
- Anything but argon. Real argon also feels small three-atom forces, and molecules have shapes and bonds that a single pair potential cannot describe.
Common mistakes
- Thinking the particles of a solid are still. At 20 K these average 81 m/s. A solid’s atoms vibrate about fixed places; they do not stop.
- Thinking the particles themselves expand or melt. Every atom is the same in every state. Only their arrangement and their motion change.
- Thinking heat always raises the temperature. While the crystal melts, most of the energy goes into the potential energy, and the kinetic energy that the temperature measures barely moves.
- Picturing gas particles as bigger. They are the same size and much further apart, nearly a nanometre on average here against 0.38 nm in the crystal.
- Treating a melting point as fixed for any sample. Small crystals melt lower, because more of their atoms sit at a surface. Buffat and Borel measured it for small gold particles in 1976.
- Reading a sealed box as boiling at one temperature. With no fixed pressure above it, the liquid evaporates steadily as the temperature rises.
Model and assumptions
- Method
- Direct particle stepping under Newton’s laws
- Fixed step
- 10.8 fs
- Repeatability
- Random. A shared link reproduces the settings, not the particular run.
What it assumes
- Every pair of atoms interacts through the Lennard-Jones potential with argon’s fitted values, ε/k = 119.8 K and σ = 0.3405 nm, cut off at 2.5σ and shifted so the energy is continuous there.
- The atoms move in two dimensions, in a square box whose walls push back like springs, with no gravity and no force but the pair potential.
- Temperature is held by an Andersen heat bath, which gives each atom a fresh Maxwell-Boltzmann velocity at random moments, on average once every 10.8 ps, and leaves the motion to Newton’s laws in between.
- Each atom is classified from its own neighbours over the last 10.8 ps: fewer than three within 0.51 nm makes it gas-like, and a steady hexagonal arrangement of them makes it solid-like.
Where it stops holding. These argon-like atoms melt and evaporate well below real argon’s 83.8 K and 87.3 K, because a flat cluster of a few hundred has fewer neighbours per atom and a large share of them at its surface. Real samples are three-dimensional, far larger and usually heated at a fixed pressure, so each change of state happens at one temperature, with an energy set by measured specific and latent heats. The Heating Curve Calculator is the right tool there.
Numerical accuracy
Two kinds of error, and the one this tool is about is the larger by far. The motion is stepped by velocity Verlet at 10.8 fs, which has a small step error of its own: with the heat bath switched off it holds the total energy to within about a tenth of a percent of the kinetic energy over a nanosecond, measured in the model’s tests. The readings are averages over 43 ps of a few hundred atoms at most, kicked at random by the heat bath and started from random velocities, so the temperature wobbles by a few percent around its setting and the shares of solid-like, liquid-like and gas-like atoms shift from moment to moment and from run to run. Near a change of state they can swing by tens of percent.
Common questions
How are the particles arranged in a solid, a liquid and a gas?
In a solid they hold a fixed, regular pattern and vibrate about their places; in a liquid they are packed almost as closely but keep changing neighbours; in a gas they are far apart and fly freely between collisions. This simulator shows all three with the same atoms. In its flat crystal each atom touches six neighbours about 0.38 nm away, the liquid is nearly as crowded but disordered, and the gas spreads through the whole box, its atoms nearly a nanometre apart on average.
Do the atoms in a solid move?
Yes. They vibrate about fixed places, and at a given temperature they move just as fast on average as atoms in a liquid or a gas, because temperature sets the average kinetic energy whatever the state. At 20 K the atoms of this crystal average about 81 m/s. What makes it a solid is not stillness but that the pull of its neighbours turns each atom back before it gets anywhere.
Where does the energy go while a solid melts or a liquid evaporates?
Into pulling the atoms apart rather than into speeding them up. The heat bath goes on supplying energy while the crystal melts, but the temperature, which measures only the atoms’ motion, settles at its new value while the potential energy stored between the atoms keeps rising. That stored energy is the latent heat. In this box the potential energy climbs from about −2.5 kJ/mol in the crystal at 30 K to about −0.5 kJ/mol in the gas at 75 K.
Why do these atoms melt at about 40 K when real argon melts at 83.8 K?
Because they are flat and few, not because the attraction is wrong. The same potential with the same argon parameters, in three dimensions and a large sample, melts at 0.69455 in units of ε/k (Schultz and Kofke, 2018), which is 83.2 K, within 1 percent of real argon. A flat crystal gives each atom six nearest neighbours instead of twelve, so less holds it together, and a crystal of 150 atoms has 42 of them at its edge, where melting starts. Small crystals melt low in real life too: Buffat and Borel measured it for small gold particles in 1976.
How does the simulator decide which state an atom is in?
From the atom’s own neighbours over the last 11 ps, never from the temperature. An atom with fewer than three neighbours within 0.51 nm on average is gas-like, one whose neighbours have also held a steady hexagonal pattern is solid-like, and any other is liquid-like. The headline names every state at least a fifth of the atoms are in, so a supercooled liquid is reported as a liquid and a crystal that is melting as solid and liquid.