Second Virial Coefficient
The ideal gas ignores all interactions; every real gas deviates, and at low density those deviations admit a controlled expansion in the number density. The second virial coefficient is the first correction term — and it captures the physics of pairs of molecules exactly, since three-body and higher correlations enter only at order and beyond. Because it isolates the two-body problem, is the cleanest bridge in all of statistical mechanics between an interatomic potential and a bench-top thermodynamic measurement: you can compute it from a formula for , and you can measure it from the pressure of a gas. The result is remarkably transparent. From the cluster expansion, — half the negative integral of the Mayer function over all separations. Each region of the potential leaves its mark: a hard core contributes a positive excluded-volume piece, an attractive well a negative piece that grows as the gas cools. Their competition is the whole story of . For hard spheres it equals four times the molecular volume; with an attractive tail it acquires a term and reproduces the van der Waals constants; and the temperature where the two contributions cancel defines the Boyle temperature, where a strongly interacting gas is ideal to first order in density. Beyond its conceptual role, is a workhorse of experimental and computational physics. It is tabulated for real gases, fit to determine pair-potential parameters (Lennard-Jones ; square-well depth and range), and computed ab initio for helium to underpin primary gas thermometry. It is the foundation on which the entire virial series — third and higher coefficients, owned by their own articles — is built, and the single most important number characterizing a dilute real gas.
- The second virial coefficient is the leading correction to the ideal-gas law: , with carrying units of volume.
- It is a single integral over the Mayer function: .
- Its sign balances the repulsive core () against the attractive tail (); the crossover is the Boyle temperature where .
- Hard spheres give the temperature-independent ; a hard core plus weak attraction gives , the van der Waals constants.
- Fit to measured , a two-parameter potential reproduces real-gas non-ideality: Lennard-Jones argon gives cm³/mol, matching experiment.
- Key idea: the entire two-body interaction effect on the pressure is a single integral of the Mayer function, — the half-integrated overlap of two molecules' interaction range.
The entire two-body interaction effect on the pressure is captured exactly by a single integral of the Mayer function: , the half-integrated overlap of two molecules' interaction range.
Where this lives today
The second virial coefficient is the primary experimental probe of intermolecular forces in gases and a cornerstone of modern metrology. Because depends only on the pair potential, precise measurements over a temperature range tightly constrain : fitting for the noble gases yields Lennard-Jones parameters consistent with independent transport and spectroscopic data, and ab initio computed for helium — accurate to parts per million — is now good enough to serve as a primary standard. Acoustic gas thermometry and dielectric-constant gas thermometry, which contributed to the 2019 redefinition of the kelvin via the Boltzmann constant, both rely on the virial equation of state with (and ) as inputs. Its conceptual reach extends into liquid-state theory and beyond. The same is the leading term of the density expansion that, resummed, gives the integral equations (Percus-Yevick, hypernetted chain) of the theory of liquids; the quantum generalization (the Beth-Uhlenbeck formula) expresses the second virial coefficient in terms of two-body scattering phase shifts, tying gas thermodynamics to quantum scattering; and in ultracold atomic gases the second virial coefficient controls the leading interaction correction to the equation of state near unitarity. Wherever a dilute system's thermodynamics must be corrected for pairwise interactions, is the coefficient that does it.
The physical picture
Think of the Mayer function as a visibility marker: it is essentially zero where two molecules are far apart and do not feel each other, plunges to inside a hard core where overlap is forbidden (the Boltzmann factor vanishes), and rises positive in an attractive well where the Boltzmann factor exceeds one. The second virial coefficient integrates this marker over all separations — it measures the net effective volume that one molecule excludes from, or draws toward, another. Repulsion excludes volume and pushes positive; attraction pulls molecules together and pushes it negative. The first figure overlays a realistic pair potential and its Mayer function . Where diverges at small , saturates at (bounded); where dips into the attractive well, rises positive; where at large , so does . The area under , with a factor , is : the positive core lobe and the negative well lobe compete, and their difference is the coefficient.
The sign of tells you at a glance whether the gas pushes harder or softer than ideal at a given temperature. As temperature rises, the attractive well becomes thermally irrelevant — , so in the well flattens toward zero — and only the hard core survives, driving toward a positive plateau set by molecular size. As temperature falls, the well term blows up and plunges negative, the fingerprint of an approaching condensation. The second figure is the punchline: across temperature. It rises from strongly negative at low (attraction wins), crosses zero at the Boyle temperature , and saturates at the positive hard-core plateau at high . That zero crossing — the thesis outlier sitting right on the curve — is a sensitive probe of the potential's shape.
Why only two bodies? In the density expansion , the coefficient of counts pairs per volume that can simultaneously interact. Triplets are rarer by another factor of , so at dilute densities the pair term dominates the correction — which is exactly why is the exact two-body contribution and the natural first step, with three-body physics deferred to (owned by aq-sm-higher-virial-coefficients).
The core equations
The virial expansion (owned by aq-sm-virial-expansion) organizes the compressibility factor in powers of density; is its leading coefficient.
where: — pressure; — number density; — second virial coefficient (units of volume); — third virial coefficient. The equivalent form multiplies through by . The master formula expresses as a single integral of the Mayer function — the two-cluster integral of the cluster expansion.
where: — the two-particle cluster integral (owned by aq-sm-cluster-integrals); — the Mayer function (owned by aq-sm-mayer-f-function); the sign convention makes repulsion give . The base article labelled the two-cluster integral ; the correct label is (with the single-vertex ideal term) — see provenance. For an isotropic potential the angular integral is trivial, leaving a one-dimensional radial integral — the working form for real calculations.
where: — pair separation; with the halved by the . This is the integral you evaluate — analytically for model potentials, numerically for realistic ones. Splitting a hard core from a weak attractive tail gives the van der Waals form, the microscopic origin of and .
where: — excluded volume (four times the molecular volume); — integrated attraction; — core diameter. The zero of then gives the Boyle temperature (van der Waals model ). The full van der Waals derivation is owned by aq-sm-van-der-waals-derivation. For the square-well potential the integral is elementary and displays every feature — core, well, sign change, Boyle point.
where: — well depth; — well outer radius; — reduced range. High gives the hard-core plateau; low makes the bracket negative.
The goal is to derive directly from the canonical partition function, isolating the leading interaction correction to the ideal gas. This is the cleanest way to see why the second virial coefficient is exactly a two-body integral and where the factor comes from — the half is the pair symmetry factor, the minus is the sign convention that makes repulsion positive. The strategy is to expand the configuration integral to first order in the Mayer function, compute the resulting free energy, and differentiate to get the pressure; the point to watch is that all pairs contribute identically, and translational invariance collapses each pair integral to a single relative integral times the volume.
Step 1. Write the configuration integral in Mayer form. , using . Why: this is the exact rewriting (owned by aq-sm-mayer-f-function) that turns the coupled Boltzmann factor into a product of short-ranged bonds, making a density expansion possible.
Step 2. Expand to first order in . , so . Why: the "1" gives the ideal ; each of the equivalent pairs contributes the same integral, and fixing the centre of mass turns the six-dimensional pair integral into . Products of two distinct 's are three-body and enter .
Step 3. Free energy. , using . Why: the interaction correction is small in the dilute regime, so the logarithm linearizes; is the ideal-gas free energy with the thermal wavelength.
Step 4. Pressure and read-off. , so with . Why: taking in the thermodynamic limit and differentiating the dependence gives the term; comparing with equation (1) identifies the boxed result. *Verified: and its equivalence to (via the fugacity inversion) are checked symbolically, and the hard-sphere and square-well cases below numerically, in verify_second-virial-coefficient.py.*
Go deeper · Derivation B · 1 minSquare-well B₂(T): a fully evaluated example with a Boyle temperature
The goal is to evaluate in closed form for the square-well potential, exhibiting the hard core, the attractive well, the sign change, and the Boyle temperature all in one formula. The square well is the simplest potential with both a repulsive core and a finite-range attraction, so it makes every qualitative feature of quantitative and checkable. The strategy is to write the Mayer function piecewise, integrate over each region, and combine; the subtlety is that the well contributes with a positive that grows without bound as , which is what drives negative and eventually breaks the gas description.
Step 1. Mayer function by region. With for , for , beyond: (core), (well), (outside). Why: the infinite core kills the Boltzmann factor (); the well raises it above one (); outside there is no interaction.
Step 2. Core contribution. . Why: this is the hard-sphere excluded volume, always positive and temperature-independent — the repulsive backbone of .
Step 3. Well contribution. . Why: the shell volume is ; the positive makes this negative — attraction lowers , and the effect grows exponentially as falls.
Step 4. Combine and find . ; setting gives , i.e. . Why: at high the bracket and (core only); at the well cancels the core; below the bracket goes negative and attraction wins. *Verified: the square-well closed form, its high- limit , and the equivalence of the two Boyle-temperature forms are checked symbolically and numerically in verify_second-virial-coefficient.py.*
Limiting cases
How behaves across the physically important regimes.
| Case | Result | Meaning |
|---|---|---|
| Hard spheres (diameter ) | Temperature-independent, positive; four times the molecular volume . | |
| High temperature () | Attractive well thermally negligible; only the core survives. | |
| Low temperature () | Attraction dominates; the negative well term diverges, signalling condensation. | |
| Boyle temperature | Core and well cancel; ideal to first order in . Argon K, N₂ K, H₂ K. | |
| Weak attraction split | The van der Waals form; from the core, from the tail. |
Worked examples
1 · Hard-sphere B₂ equals four times the molecular volume (confidence builder)
We evaluate for hard spheres directly and recover the classic excluded-volume factor of four.
Step 1. For hard spheres for and beyond, so .
Step 2. The molecular volume is .
Step 3. The ratio is . The hard-sphere second virial coefficient is exactly four times the molecular volume.
Step 4. The factor of four is geometric: two spheres of diameter cannot approach closer than centre-to-centre, so the excluded region for a pair is a sphere of radius — volume — shared between the two particles, giving each. This is the van der Waals constant , derived from geometry alone.
2 · Lennard-Jones argon: B₂(T) and the Boyle temperature (exam level)
We compute for argon from its Lennard-Jones potential at three temperatures and locate the Boyle point, using the actual numerical integral.
Step 1. With K and nm, numerically integrate for the 12-6 potential . At K the integral (verify script) gives .
Step 2. The measured second virial coefficient of argon at K is about cm³/mol — excellent agreement. The negative sign says attraction wins at room temperature: argon is slightly more compressible than an ideal gas.
Step 3. Repeating at K gives cm³/mol (strongly attractive, condensation approaching), and at K gives cm³/mol (the repulsive core now dominates the shallow well).
Step 4. Since passes from negative through zero to positive as rises, root-finding gives the Boyle temperature K for argon, i.e. the reduced value . Because is a universal number of the 12-6 potential shape, every Lennard-Jones fluid has the same reduced Boyle temperature. A single integral of a two-parameter potential has reproduced the full temperature dependence of the leading equation-of-state correction and its Boyle point.
Origins · 1 minSecond virial coefficient and how this was discovered
The second virial coefficient is the first term in the density expansion of the compressibility factor and the exact contribution of two-body interactions to a gas's equation of state. It entered physics phenomenologically in Kamerlingh Onnes's 1901 virial expansion, where the coefficients were empirical fitting constants named after the Clausius virial. Its microscopic meaning came with the Mayer cluster expansion (1937): , a single integral over the pair potential through the Mayer function. That formula makes the cleanest link between microscopic forces and macroscopic thermodynamics — it can be computed from a model potential and measured from –– data, and the two must agree. Its sign distinguishes net repulsion () from net attraction (); its zero defines the Boyle temperature; its hard-core value is the van der Waals excluded volume. Today, computed ab initio for helium underpins primary acoustic and dielectric gas thermometry, and fitted data remain a standard route to intermolecular-potential parameters for the noble gases and simple molecular fluids.
Going further
Texts. Pathria & Beale, Statistical Mechanics, 3rd ed., Ch. 10 (cluster expansion, virial coefficients). Kardar, Statistical Physics of Particles, §5.2–5.3. Reif, Fundamentals of Statistical and Thermal Physics, Ch. 10. Hill, Statistical Mechanics; Hansen & McDonald, Theory of Simple Liquids (square-well and realistic ).
Provenance. Base article: AllQFT track `sm`, "Second Virial Coefficient" (STAT.INTER.B2VIR.1247); sources Pathria & Beale Ch. 10, Kardar Ch. 5, Reif Ch. 10. All claims re-verified in verify_second-virial-coefficient.py: the master formula , the hard-sphere , the square-well closed form and its Boyle condition, the fugacity inversion , and the actual numerically integrated Lennard-Jones argon values , , cm³/mol with Boyle temperature K. Base error found and fixed: the base labelled the two-cluster integral "" and wrote ; the standard convention (and the exemplar) uses for the single-vertex ideal term and for the two-cluster integral, so — corrected here in the text and cheat sheet.
Prerequisites. Configuration integral · The Mayer f-function · Mayer cluster expansion.
Leads to. Virial expansion of the equation of state · Third and higher virial coefficients · Van der Waals from the virial expansion · Law of corresponding states.
Why exactly one half, and where does it come from?
The half is the two-particle symmetry factor. In the configuration-integral expansion, the sum over interacting pairs is , which for particles is terms — the prevents counting the pair and twice. That same propagates into and hence into . If you saw without the half, someone has either absorbed it into a different definition of the integral or made an error; the standard result carries the explicit factor of one half.
How can B₂ be measured, given it's an integral over a microscopic potential?
You do not measure the integral directly — you measure the equation of state and read off as a slope. From accurate –– data at fixed temperature, plot the compressibility factor against density ; the slope at is exactly . Repeating at several temperatures maps out , whose shape (high- plateau, zero crossing, low- divergence) then constrains the pair potential. So the microscopic integral and the macroscopic slope are two faces of the same coefficient, which is precisely what makes the bridge between force law and thermodynamics.
Does a positive B₂ mean there is no attraction between the molecules?
No. is a net quantity — the competition between the positive core contribution and the negative well contribution. A positive only means the repulsive core wins at that temperature, not that attraction is absent. The very same molecules, cooled below their Boyle temperature, will show as the attraction (which is always there) comes to dominate the thermal average. The temperature dependence of is the honest fingerprint: the attraction reveals itself in how strongly falls as decreases, even while is still positive.
Why does the low-temperature divergence of B₂ signal condensation?
As the attractive-well term grows without bound, so . Physically, molecules spend ever more time in each other's attractive wells, and the "effective volume" one molecule attracts toward another grows without limit. But the virial expansion assumes ; a diverging means that assumption fails at any finite density, i.e. the gas is no longer dilute in the relevant sense. That is the mathematical shadow of condensation: the two-body description breaks down because the molecules are clumping, and the honest response is to abandon the low-density series near the transition.
What is the relationship between B₂ and the van der Waals constants a and b?
Split into its core and tail contributions: the hard core gives the temperature-independent (four times the molecular volume), and the weak attractive tail, linearized as , gives with . So , which is exactly the low-density expansion of the van der Waals equation of state. This is the cleanest microscopic justification of the van der Waals constants: is a geometric excluded volume and is an integrated attraction strength, both computed here from the pair potential rather than fitted. The full re-summation into the van der Waals equation is owned by aq-sm-van-der-waals-derivation.
Is B₂ enough to describe a moderately dense gas, or do I need B₃?
It depends on how dense and how precise. The correction from is ; the correction from is , smaller by roughly . For a gas at ordinary pressures this is tiny, so alone captures non-ideality to a fraction of a percent. As you raise the density toward the critical region, (and higher) become necessary, and near condensation no finite truncation works. For precision equation-of-state work at moderate density, and together (the latter owned by aq-sm-higher-virial-coefficients) are the standard toolkit.