Home▸Chemistry & Materials▸Van der Waals Gas — 2D Isotherms (2D)

Van der Waals Gas — 2D Isotherms (2D)

Real disks attract and repel through the same Lennard-Jones-like pair potential behind the van der Waals equation of state — tune temperature, density, attraction and excluded volume and watch the gas condense into a liquid droplet below the critical temperature while a live P-V isotherm plot tracks exactly where the current state sits.

Chemistry & Materials2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-van-der-waals-gas ↗ Open standalone

This 2D companion runs the same Lennard-Jones-like pair-potential molecular dynamics as the 3D lab, flattened from a cubic box to a square one so the condensation transition is easy to read at a glance: a few hundred disks move under short-range repulsion (the excluded volume b) and longer-range attraction (the constant a), integrated with velocity-Verlet and held at a target temperature by a velocity-rescaling thermostat. Drop the temperature below Tc or push the attraction and density up, and the disks cluster into a visible liquid droplet surrounded by vapour — the same van der Waals phase transition, drawn directly on a flat canvas instead of an orbiting 3D scene. A side isotherm plot shows the reduced van der Waals P-V curve at the critical temperature and at the current one, with a marker tracking the live virial-pressure state as you tune the controls.

⚙ Under the hood

A 2D Lennard-Jones molecular-dynamics gas: real disks attract and repel through the pair potential behind the van der Waals equation, condensing into a liquid droplet below the critical temperature while a live P-V isotherm plot tracks the state.

van der waalsreal gasphase transitionmolecular dynamicscritical pointlennard-jonesisotherm

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)