States of Matter

Heat a box of atoms and watch matter change state in front of you. Cold, the atoms lock into a vibrating solid crystal. Add heat and the lattice breaks apart and starts to flow — it melts into a liquid. Add more and the fastest atoms tear free and fill the box — it boils into a gas. Remove heat and it all runs backwards. Nothing here is a canned animation: the atoms attract and repel through the real Lennard-Jones force, and the temperature and phase you read are measured from their own motion. Pick a substance, work the heat control, and it all runs on your device.

You are in the Physics lab.

Add heat to melt and boil; remove heat to freeze
Temperature
State
Melting and boiling are a tug-of-war between attraction and thermal motion. Every atom is pulled toward its neighbours by the Lennard-Jones force and jostled by its own heat energy. When the pull wins, the atoms hold a fixed, ordered pattern — a solid. Add heat and the jostling grows until atoms can slip past each other but stay close — a liquid. Add more and the motion overwhelms the pull completely, so the atoms fly apart to fill the container — a gas. The temperature is nothing more than the average kinetic energy of the atoms, which is why heating and cooling move you between the states.

Reading the simulation

What the bonds, the colours and the thermometer are telling you.

1

The bonds show the structure

Faint lines join atoms that are close enough to feel each other. In a solid those bonds form a rigid, repeating triangular mesh; warm it to a liquid and the mesh keeps reforming as atoms slide past one another; heat it to a gas and the bonds all but vanish because the atoms are too far apart and too fast to hold together. The colour of the atoms, bonds and thermometer all shift with the phase — blue for solid, green for liquid, orange for gas.

2

The thermometer marks the phase

The gauge on the right tracks the temperature read from the atoms' motion, with the three phase bands drawn on it. As you add heat the column climbs out of the blue solid band, through the green liquid band, and into the orange gas band — and the label in the box changes at exactly the same moment, because both come from the same measured temperature.

3

The substance sets the scale

Seven substances span a wide range of bond strength, from helium — so weakly bound it stays a gas until within a few degrees of absolute zero — up through neon, nitrogen, oxygen, argon and krypton to water, which needs by far the most heat to melt and boil. The atoms behave the same way in reduced units; the substance just relabels the temperature in kelvin using its own Lennard-Jones ε, so the same melting you see happens at a very different reading for helium than for water.

How It Works

Real forces between atoms, a heat control, and phases that emerge on their own.

1

Atoms with real forces

Each atom attracts its neighbours at a distance and repels them when squeezed too close, following the Lennard-Jones potential. The tool integrates their motion step by step, so the crystal, the puddle and the gas are all consequences of those forces — not pre-drawn shapes.

2

Add or remove heat

The heat control sets a target temperature. Raise it and a thermostat feeds energy in, speeding the atoms up; lower it and energy is drawn out. Watch the ordered lattice loosen and melt, then boil, as you push the control up — and re-freeze as you bring it back down.

3

Read the temperature and phase

The temperature is computed from the atoms' average kinetic energy and labelled in kelvin using the chosen substance's interaction strength. The phase — solid, liquid or gas — is read straight from that temperature, so the label changes exactly when the atoms' behaviour does.

What are the three states of matter?
The three everyday states are solid, liquid and gas. In a solid the atoms are locked in a fixed, ordered arrangement and only vibrate, so it keeps its shape. In a liquid they are still close together but can slide past one another, so it flows and takes the shape of its container. In a gas the atoms are far apart and move quickly and independently, filling all the space available. This simulation shows real atoms passing between all three as you add or remove heat.
How does adding heat change the state of matter?
Heat is energy that makes atoms move faster. In a solid, adding heat makes the atoms vibrate more strongly until they break out of their fixed positions and start sliding — the solid melts into a liquid. Add more and the fastest atoms escape the pull of their neighbours entirely and spread out — the liquid boils into a gas. Removing heat reverses each step. In this tool the heat control raises or lowers a target temperature and you watch the atoms respond in real time.
Is this a real molecular simulation?
Yes. The atoms attract and repel each other through the Lennard-Jones potential — the same model chemists and physicists use for noble gases — and their motion is integrated step by step with the velocity-Verlet method. Nothing about the melting or boiling is scripted: the solid, liquid and gas behaviour emerges from the forces between the atoms. The temperature shown is calculated from the atoms' average kinetic energy, and the phase label is read from that temperature.
Why do the atoms form a regular pattern when cold?
At low temperature the atoms do not have enough energy to escape each other's attraction, so they settle into the arrangement with the lowest energy. In two dimensions that is a triangular (hexagonal) lattice, where each atom sits snugly between six neighbours. This is the ordered structure of a crystalline solid. As you warm it, thermal vibration grows until the pattern breaks up and the material melts.
Why does the temperature depend on the substance I choose?
The simulation runs in reduced units and then labels the temperature in kelvin using each substance's interaction strength (its Lennard-Jones ε). Weakly bound atoms like neon melt and boil at much lower temperatures than strongly bound ones, so the same amount of thermal motion reads as a different temperature for neon, argon, oxygen or water. The kelvin values are approximate and meant to show the trend, not exact melting points.

Teaching or blogging about matter and heat? You can embed this simulator on your own site free — one line of code, no sign-up.