2D Van der Waals Gas — P-V Isotherms & Maxwell Construction
A Canvas2D companion to the 3D Van der Waals simulator: the same universal reduced equation of state Pr = 8Tr/(3Vr-1) - 3/Vr², the same Maxwell equal-area construction found by bisection on the exact antiderivative, and a live kinetic-theory molecular panel whose particle speed and box width track the temperature and piston controls in real time.
2D Van der Waals Gas — Real Isotherms in Plain Canvas2D
This 2D companion runs the same universal reduced Van der Waals equation as the 3D original — every real gas collapses onto one curve once P, V and T are scaled by the critical point — and finds the Maxwell equal-area vapour-pressure plateau by bisection on the exact antiderivative rather than approximating it. A simple kinetic-theory molecular panel below the P-V plot shows the piston box shrinking with V/Vc and particles speeding up with √(T/Tc).
Frequently asked questions
Why does one reduced equation work for every gas?
Scaling P, V and T by the critical-point values Pc, Vc, Tc removes the gas-specific constants a and b from the Van der Waals equation entirely, leaving Pr = 8Tr/(3Vr-1) - 3/Vr² — identical for CO2, H2O, N2 or any other Van der Waals gas. The gas selector only changes which real Tc/Pc values are shown in the readout panel.
How is the Maxwell tie-line actually found?
By bisection on the saturation pressure Psat: the two candidate volumes on either side of the loop are located, and the exact antiderivative of the reduced equation is used to test whether the areas above and below the horizontal tie-line are equal, refining Psat until they are.
What does the molecular panel actually simulate?
A simplified kinetic-theory illustration — particle speed scales with the square root of the reduced temperature and the box width tracks the piston volume Vr directly, so compression visibly raises particle density and, in the liquid region, a gentle cohesive pull draws particles together.
2D Canvas companion computing the universal reduced Van der Waals equation of state, the Maxwell equal-area construction by bisection, critical point, binodal envelope and a kinetic-theory molecular panel.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install