# Virial coefficient

Virial coefficients ${\displaystyle B_{i}}$ appear as coefficients in the virial expansion of the pressure of a many-particle system in powers of the density, providing systematic corrections to the ideal gas law. They are characteristic of the interaction potential between the particles and in general depend on the temperature. The second virial coefficient ${\displaystyle B_{2}}$ depends only on the pair interaction between the particles, the third (${\displaystyle B_{3}}$) depends on 2- and non-additive 3-body interactions, and so on.

## Derivation

The first step in obtaining a closed expression for virial coefficients is a cluster expansion[1] of the grand canonical partition function

${\displaystyle \Xi =\sum _{n}{\lambda ^{n}Q_{n}}=e^{\left(pV\right)/\left(k_{B}T\right)}}$

Here ${\displaystyle p}$ is the pressure, ${\displaystyle V}$ is the volume of the vessel containing the particles, ${\displaystyle k_{B}}$ is Boltzmann's constant, ${\displaystyle T}$ is the absolute temperature, ${\displaystyle \lambda =\exp[\mu /(k_{B}T)]}$ is the fugacity, with ${\displaystyle \mu }$ the chemical potential. The quantity ${\displaystyle Q_{n}}$ is the canonical partition function of a subsystem of ${\displaystyle n}$ particles:

${\displaystyle Q_{n}=\operatorname {tr} [e^{-H(1,2,\ldots ,n)/(k_{B}T)}].}$

Here ${\displaystyle H(1,2,\ldots ,n)}$ is the Hamiltonian (energy operator) of a subsystem of ${\displaystyle n}$ particles. The Hamiltonian is a sum of the kinetic energies of the particles and the total ${\displaystyle n}$-particle potential energy (interaction energy). The latter includes pair interactions and possibly 3-body and higher-body interactions. The grand partition function ${\displaystyle \Xi }$ can be expanded in a sum of contributions from one-body, two-body, etc. clusters. The virial expansion is obtained from this expansion by observing that ${\displaystyle \ln \Xi }$ equals ${\displaystyle pV/(k_{B}T)}$. In this manner one derives

${\displaystyle B_{2}=V\left({\frac {1}{2}}-{\frac {Q_{2}}{Q_{1}^{2}}}\right)}$
${\displaystyle B_{3}=V^{2}\left[{\frac {2Q_{2}}{Q_{1}^{2}}}{\Big (}{\frac {2Q_{2}}{Q_{1}^{2}}}-1{\Big )}-{\frac {1}{3}}{\Big (}{\frac {6Q_{3}}{Q_{1}^{3}}}-1{\Big )}\right]}$.

These are quantum-statistical expressions containing kinetic energies. Note that the one-particle partition function ${\displaystyle Q_{1}}$ contains only a kinetic energy term. In the classical limit ${\displaystyle \hbar =0}$ the kinetic energy operators commute with the potential operators and the kinetic energies in numerator and denominator cancel mutually. The trace (tr) becomes an integral over the configuration space. It follows that classical virial coefficients depend on the interactions between the particles only and are given as integrals over the particle coordinates.

The derivation of higher than ${\displaystyle B_{3}}$ virial coefficients becomes quickly a complex combinatorial problem. Making the classical approximation and neglecting non-additive interactions (if present), the combinatorics can be handled graphically as first shown by Joseph E. Mayer and Maria Goeppert-Mayer.[2]

They introduced what is now known as the Mayer function:

${\displaystyle f(1,2)=\exp \left[-{\frac {u(|{\vec {r}}_{1}-{\vec {r}}_{2}|)}{k_{B}T}}\right]-1}$

and wrote the cluster expansion in terms of these functions. Here ${\displaystyle u(|{\vec {r}}_{1}-{\vec {r}}_{2}|)}$ is the interaction potential between particle 1 and 2 (which are assumed to be identical particles).

## Definition in terms of graphs

The virial coefficients ${\displaystyle B_{i}}$ are related to the irreducible Mayer cluster integrals ${\displaystyle \beta _{i}}$ through

${\displaystyle B_{i+1}=-{\frac {i}{i+1}}\beta _{i}}$

The latter are concisely defined in terms of graphs.

${\displaystyle \beta _{i}={\mbox{The sum of all connected, irreducible graphs with one white and}}\ i\ {\mbox{black vertices}}}$

The rule for turning these graphs into integrals is as follows:

1. Take a graph and label its white vertex by ${\displaystyle k=0}$ and the remaining black vertices with ${\displaystyle k=1,..,i}$.
2. Associate a labelled coordinate k to each of the vertices, representing the continuous degrees of freedom associated with that particle. The coordinate 0 is reserved for the white vertex
3. With each bond linking two vertices associate the Mayer f-function corresponding to the interparticle potential
4. Integrate over all coordinates assigned to the black vertices
5. Multiply the end result with the symmetry number of the graph, defined as the inverse of the number of permutations of the black labelled vertices that leave the graph topologically invariant.

The first two cluster integrals are

 ${\displaystyle b_{1}=}$ ${\displaystyle =\int d\mathbf {1} f(\mathbf {0} ,\mathbf {1} )}$ ${\displaystyle b_{2}=}$ ${\displaystyle ={\frac {1}{2}}\int d\mathbf {1} \int d\mathbf {2} f(\mathbf {0} ,\mathbf {1} )f(\mathbf {0} ,\mathbf {2} )f(\mathbf {1} ,\mathbf {2} )}$

The expression of the second virial coefficient is thus:

${\displaystyle B_{2}=-2\pi \int r^{2}{{\Big (}e^{-u(r)/(k_{B}T)}-1{\Big )}}~\mathrm {d} r,}$

where particle 2 was assumed to define the origin (${\displaystyle {\vec {r}}_{2}={\vec {0}}}$). This classical expression for the second virial coefficient was first derived by Leonard Ornstein in his 1908 Leiden University Ph.D. thesis.