I get that a gas behaves non-ideally under high pressure and low temperature conditions. At high pressures, the density of a gas increases and attraction forces operate among molecules due to short intermolecular distance. This allows us to somehow modify the ideal gas equation. If a molecule is approaching the wall of container in order to collide, the neighbouring gas molecules soften their impact.


How was the term $\frac{an^2}{V^2}$ derived? My thoughts about that term, $\frac{n^2}{V^2}$ may be the extra pressure thats why the $V$ lies on the numerator (inverse relationship)


3 Answers 3


The most rigorous way to derive corrections to the real gas equation is the virial expansion. At second order this gives Van der Waals law, but this derivation is completely general and can be pushed to higher order.

My answer assumes a basic knowledge of classical mechanics, statistical physics and analysis.

Hamiltonian of the system

We consider a system of identical particles described by the following Hamiltonian: $$H=\sum_i\frac{\vec{p}_i^2}{2m}+\sum_{i\lt j}U(|\vec{r}_i-\vec{r}_j|)$$ If you don't know what a Hamiltonian is, you can consider it as the energy of the system.

Canonical partition function for the perfect gas

For a perfect gas, you consider that the particles are non-interacting, so that $$U(|\vec{r}_i-\vec{r}_j|)=0,\quad\forall i,j.$$ In this particular case, life is easy! In fact you can easily compute the Canonical partition function (this is a definition) $$Z_\mathrm C=\frac1{N!h^{3N}}\int\mathrm d^N\vec{p}\,\mathrm d^N\vec{r}\,\mathrm e^{-\beta H}$$ which, in the case of a non-interacting gas, is simply $$Z_\mathrm{PG}=\frac1{N!h^{3N}}\int\mathrm d^N\vec{p}\,\mathrm d^N\vec{r}\,\mathrm e^{-\beta\sum_i\frac{\vec{p}_i^2}{2m}}=\frac{1}{N!}\left(\frac{2 \pi mk_\mathrm BT}{h^2}\right)^{\frac{3N}{2}}$$ In order to compute this integral, you can simply use the definition of Gaussian integrals. This is the partition function of a perfect gas and you can now derive all the properties of this system.

Canonical partition function for an interacting gas

If you want to consider an interacting gas, your partition function becomes $$Z_\mathrm I=\frac1{N!h^{3N}}\int\mathrm d^N\vec p\,\mathrm d^N\vec r\,\mathrm e^{-\beta\left(\sum_i \frac{\vec{p}_i^2}{2m}+\sum_{i\lt j} U(|\vec{r}_i-\vec{r}_j|)\right)}$$ The integration over momenta can be easily computed as before (using Gaussian integrals). In contrast, the integral $$Q_N=\int\mathrm d^N\vec r\,\mathrm e^{-\beta\sum_{i\lt j}U(|\vec{r}_i-\vec{r}_j|)}$$ is particulary difficult (even for simple forms of the interacting potential $U$). We can write temporarily the partition function of the system as $$Z_\mathrm I=Z_\mathrm{PG}Q_N=\frac1{N!}\left(\frac{2\pi mk_\mathrm BT}{h^2}\right)^{\frac{3N}{2}}Q_N$$

Grand Canonical partition function for the interacting gas

Now, as you sais, the critical parameter is the density $\rho$: at low density you recover the perfect gas behavior. Therefore, it seems a good idea to develop our formalism in powers of $\rho$. It is easier to work in the Grand Canonical ensemble (you don't have to worry much about this), where the partition function is given by (this is a definition) $$Z_\mathrm{GC}=\sum_N^\infty\mathrm e^{\alpha N}Z_\mathrm C$$ This is just a generalization of the Canonical partition function $Z_\mathrm C$. With this definition we have, for the interacting gas, $$Z_\mathrm{II}=\sum_N^\infty\mathrm e^{\alpha N}\frac1{N!}\left(\frac{2\pi mk_\mathrm BT}{h^2}\right)^{\frac{3N}2}Q_N=\sum_N^\infty\frac{z^N}{N!}Q_N,$$ where we defined for simplicity $$z=\mathrm e^{\alpha}\left(\frac{2\pi mk_\mathrm BT}{h^2}\right)^{\frac32}$$

Relation between the Grand Canonical partition function and the equation of state

From $Z_\mathrm I$ in the Canonical ensemble we can now compute the ratio $p/(k_\mathrm BT)$. The Grand Canonical potential is defined by $$\phi=-k_\mathrm BT\ln(Z_\mathrm{II})$$ and this Grand Canonical potential is linked to volume and pressure by $$\phi=-pV,$$ so that you finally have a link between the Gran Canonical partition function and the pressure: $$\frac p{k_\mathrm BT}=\frac{1}{V}\ln(Z_\mathrm{II}).$$

Since $Z_\mathrm{II}$ is a development in powers of $z$, the same is valid for $\ln(Z_\mathrm{II})/V$. This gives $$\frac1V\ln(Z_\mathrm{II})=z+\frac{a_2}{2!}z^2+\frac{a_3}{3!}z^3+\cdots$$


Using an easy argument that I will not show here (unless explicitly required), you can then write the density as $$\rho=\frac{\langle N\rangle}V=z\frac{\partial}{\partial z}\left(\frac1V\ln(Z_\mathrm{II})\right),$$ where $\langle N\rangle$ is the average number of particles in your gas. Therefore, for the density we can write $$\rho=z+a_2z^2+\frac{a_3}{2!}z^3+\cdots$$

Developement of the state equation in powers of $\rho$

Since we said that $\rho$ is our critical parameter we can write $$\frac p{k_\mathrm BT}=\rho+b_2\rho^2+b_3\rho^3+\cdots.$$ In fact the perfect gas law was the first-order expansion with respect to the density. For a diluite gas, $\rho \ll 1$ and therefore we simply get $$\frac p{k_\mathrm BT}=\rho.$$

Virial coefficients

It is now easy to link the coefficients $a$ to the coefficients $b$, by equating the powers of $z$. In our case you find: $$b_2=-\frac{a_2}2,\qquad b_3=-a_2^2-\frac{a_3}3.$$ It now remains to link these coefficients to $Q_N$. By definition of $Z_I$ we can write $$\ln(Z_\mathrm I)=\ln\left(1+Q_1z+Q_2\frac{z^2}{2!}+Q_3\frac{z^3}{3!}+\cdots\right)$$ By Taylor expansion of the logarithm we get $$\ln(Z_\mathrm I)=Q_1+Q_2\frac{z^2}{2!}+Q_3\frac{z^3}{3!}-\frac{1}{2}\left(Q_1z+Q_2\frac{z^2}{2}\right)^2+Q_1^3\frac{z^3}{3}+\cdots$$ For $a_1$ and $a_2$ we have $$a_1=\frac{Q_1}V\qquad a_2=\frac1V\left(\frac{Q_2}2-\frac{Q_1^2}2\right)$$ which gives $$b_2=\frac1{2V}\left(Q_1^2-Q_2\right).$$

Computation of $Q_i$

Now, if we compute $Q_1$ and $Q_2$ explicitly (which is much easier than computing $Q_N$ for a general $N$) we get $$Q_1=\int\mathrm d^3\vec r=V$$ $$Q_2=\int\mathrm d^3\vec{r}_1\,\mathrm d^3\vec{r}_2\,\mathrm e^{-\beta U(|\vec{r}_1-\vec{r}_2|)}=Va+V^2$$

Van der Waals law

With the expression for the virial coefficients and the analytical expressions of $Q_1$ and $Q_2$ we finally write $$b_2=-\frac a2$$

Therefore we finally get Van der Waals law $$\frac p{k_\mathrm BT}=\rho-\frac a2\rho^2.$$

At the second order in $\rho$ we get Van der Waals law, but this procedure is completely general and can be used to compute higher order corrections to the perfect gas law. Computing the coefficients $Q_N$ is quite cumbersome, but can be performed using the cluster expansion.


There are dozens of "real gas equations" which try to rationalize one factor or another. Wall effects are never one of the problems considered. Such real gas equations are for the "bulk" gas not what is happening at the surface.

Wall effects are generally ignored entirely...

(1) In general the notion is that the wall collisions are "on average" an adiabatic process.

(2) There is surface adsorption/desorption which is a whole different problem. In general the container's surface absorption is assumed not to be able to change the concentration of the bulk of the gas.

  • $\begingroup$ The pressure is exerted on the wall, and therefore, I think that the wall really plays an important role. A molecule moves in an attractive potential well generated by all other molecules in the gas. To collide on the wall, it has to escape this potential well halfway. $\endgroup$
    – higgsss
    Dec 19, 2015 at 22:52
  • $\begingroup$ @higgsss - If you're trying to model the couple of atomic layers on the surface of the wall then quantum well are important. In general the minute amount of material adsorbed on the wall is insignificant to the total amount of gas. $\endgroup$
    – MaxW
    Dec 19, 2015 at 23:28
  • $\begingroup$ This doesn't have to do with the detail of the wall. In the bulk of the gas, each molecule is surrounded by other molecules from all directions, whereas very close to the wall, there are no molecules beyond the wall. Hence the attractive potential is always weakened near the wall. $\endgroup$
    – higgsss
    Dec 19, 2015 at 23:37
  • $\begingroup$ @higgsss - The "volume" of gas near the wall is in general insignificant. The only situation I can think of where the wall effect would be significant is gas moving through a long narrow tube. $\endgroup$
    – MaxW
    Dec 19, 2015 at 23:54
  • $\begingroup$ The volume of gas near the wall is indeed negligible compared to that of the entire container. But only the gas molecules near the wall are able to collide on the wall, thereby exerting pressure on it. $\endgroup$
    – higgsss
    Dec 20, 2015 at 0:06

It is not "derived" as you may expect. It is an empirical formula based on the guess that you made - the quantity/volume unit is related to pressure. It is squared because you expect 2 molecules to attract each other. Then you stick in an empirical constant to make the whole stuff work.

  • 1
    $\begingroup$ There is certainly a statistical mechanics derivation of the van der Waals equation of state, although it seems that OP wants to know the kinetic aspect of this. $\endgroup$
    – higgsss
    Dec 19, 2015 at 22:39
  • $\begingroup$ @higgsss is right, there is a statistical mechanics derivation of Van der Waals equations of state (see my answer)! For the Van der Waals correction, intuitive arguments can be sufficient, but for higher order correction this is no longer true. $\endgroup$
    – user23061
    Dec 20, 2015 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.