Solution (source code)

= Solution

This is the one-mole, or equivalently <molar volume>, form of the <Van der Waals equation>, an approximate <equation of state> for a <real gas>:
$$
p=\frac{RT}{V-b}-\frac{a}{V^2}.
$$
Here $p$ is the gas <pressure>, $T$ its absolute <temperature>, $R$ the <molar gas constant>, and $V$ the <volume> occupied by one mole. If $V$ denotes <molar volume> explicitly, its units are $\mathrm{m^3\,mol^{-1}}$.

The positive parameter $b$ represents <excluded volume> arising from the finite size and short-range repulsion of the <molecules>. The <volume> available for translational motion is reduced from $V$ to $V-b$. This is an effective <excluded volume>, not simply the sum of the <molecules>' geometric <volumes>. Its molar units are $\mathrm{m^3\,mol^{-1}}$.

The positive parameter $a$ measures intermolecular attraction in a <mean-field approximation>. Attractions reduce the <force> exerted on the walls, lowering the measured <pressure> by $a/V^2$ relative to the repulsion-only expression. Thus $p+a/V^2$ is the <pressure> corrected for this attraction. The squared inverse-volume dependence reflects a contribution proportional to the square of the molecular <number density>. The molar units of $a$ are $\mathrm{Pa\,m^6\,mol^{-2}}$.

For an arbitrary amount $n$ measured in moles, with total container <volume> $V_{\rm tot}$, the corresponding formula is
$$
\boxed{\left(p+\frac{an^2}{V_{\rm tot}^2}\right)(V_{\rm tot}-nb)=nRT.}
$$
At low <density>, when $b\ll V$ and $a/V^2\ll RT/V$, it reduces to the <ideal gas law>. The model captures qualitative attraction, repulsion and liquid-gas behavior, but does not supply an exact <equation of state> for every material.