🇺🇦 Ukrainian

Van der Waals Gas & Real Gas Isotherms

Explore how real gases deviate from ideal behaviour via the Van der Waals equation of state: (P + a/V²)(V − b) = nRT. The P–V diagram shows multiple isotherms coloured blue (cold) to red (hot), marks the critical point, shades the Maxwell equal-area construction, and outlines the liquid–vapour two-phase region. The molecular panel animates LJ-style particles as you compress.

Gas Type

Temperature & Display

Piston (Compression)

Current State

Pressure P
Volume V
Temperature T
Phasegas

Tc
Pc
Vc

P = pause/play  |  R = reset

Van der Waals Equation of State

(P + a·n²/V²)(V − n·b) = nRT

a (Pa·m&sup6;/mol²) — intermolecular attraction. Larger a = stronger cohesive forces, lower boiling point, more pronounced S-curve below Tc.
b (m³/mol) — excluded co-volume per mole. Accounts for finite molecular size.

At the critical point the isotherm has an inflection with zero slope: ∂P/∂V = ∂²P/∂V² = 0, giving Tc = 8a/27Rb,  Pc = a/27b²,  Vc = 3nb.

Below Tc the Van der Waals isotherm has an unphysical S-shaped loop (spinodal region, shown grey/dashed). The Maxwell equal-area rule replaces this with a flat plateau at vapour pressure Psat: the two shaded areas above and below the yellow tie-line are equal, enforcing equal chemical potential in both phases. The dashed yellow envelope is the binodal (liquid–vapour coexistence) curve.

Gas Parameters

Gasa (Pa·m&sup6;/mol²)b (10−5 m³/mol)Tc (K)Pc (MPa)
CO₂0.36584.286304.27.38
H₂O0.55363.049647.122.1
N₂0.13703.870126.23.39
Ideal00

Critical Exponents & Universality

Near the critical point: Δρ ∼ |T−Tc|β with β = 1/2 (Van der Waals / mean-field). Real 3-D fluids have β ≈ 0.326 (Ising universality). In reduced variables (Pr = P/Pc, Vr = V/Vc, Tr = T/Tc) the equation becomes universal for all Van der Waals gases: (Pr + 3/Vr²)(3Vr − 1) = 8Tr.

About this simulation

Real gases deviate from the ideal gas law PV = nRT because molecules attract each other and take up finite space. The Van der Waals equation of state (P + a·n²/V²)(V − n·b) = nRT corrects for both effects with two substance-specific constants: a for intermolecular attraction and b for excluded volume. This simulation plots a family of P–V isotherms for CO₂, H₂O, N₂, or an ideal gas, shades the Maxwell equal-area construction that replaces the equation's unphysical S-shaped loop below the critical temperature, and animates a small LJ-style particle box so you can watch molecules condense from gas to liquid as you compress them.

🔬 What it shows

The main canvas draws multiple isotherms colour-coded from blue (cold) to red (hot), highlights the critical point where the curve's inflection flattens to zero slope, and fills in the binodal (coexistence) dome that separates stable gas, liquid, and two-phase states. The lower canvas animates particles with Lennard-Jones-style attraction and repulsion so you can watch the same phase transition play out molecule by molecule.

🎮 How to use

Pick a Gas Type (CO₂, H₂O, N₂, Ideal), then drag T/Tc to change temperature and Isotherms shown to add or remove curves. The Volume V/Vc slider acts as a piston — sliding it compresses the gas in real time, moving the current-state dot along the isotherm and updating the Phase chip (gas / liquid / two-phase / supercritical).

💡 Did you know?

Above the critical temperature Tc there's no sharp boundary between "gas" and "liquid" at all — the substance becomes a supercritical fluid, the same trick used to make supercritical CO₂ a solvent for decaffeinating coffee.

Frequently asked questions

What does the Van der Waals equation add to the ideal gas law?

It adds two correction terms to PV=nRT: a/V² accounts for the attractive forces between molecules that reduce the pressure they exert on the container walls, and subtracting nb from the volume accounts for the finite size the molecules actually occupy, so they can't be compressed to zero volume.

What do the constants a and b actually represent?

a (in Pa·m⁶/mol²) measures how strongly a gas's molecules attract one another — a larger a means a more pronounced liquefaction curve and higher critical temperature. b (in m³/mol) is the excluded volume per mole, roughly the volume the molecules themselves take up; water and CO₂ have quite different values, which is why their isotherms and critical points look so different in the simulation.

What is the critical point, and what happens there?

The critical point (Tc, Pc, Vc) is where the liquid and vapour phases become identical — the isotherm has a horizontal inflection (∂P/∂V = ∂²P/∂V² = 0). For the Van der Waals equation this works out to Tc = 8a/27Rb, Pc = a/27b², Vc = 3nb; above Tc, no amount of pressure alone will condense the gas into a distinct liquid.

Why does the simulation shade an area instead of drawing the raw S-shaped curve below Tc?

Below the critical temperature, the raw Van der Waals equation predicts an unphysical loop where pressure would rise as volume increases. The Maxwell equal-area construction replaces that loop with a flat horizontal segment at the real vapour pressure, chosen so the shaded areas above and below the line are equal — this enforces that liquid and vapour have the same chemical potential at equilibrium.

What is the molecular panel actually simulating?

It's a simplified 2D particle system with Lennard-Jones-style short-range repulsion and longer-range attraction, scaled by the same parameter a used in the main equation. As you compress the piston or cool the gas, particles slow down and clump together, visually reproducing the same gas-to-liquid transition the P–V diagram shows mathematically.