Linking bulk and surface collision statistics¶
Consider the interaction between $N$ hard spheres in a square box. We study the Claussius virial $$ G= \sum_i {\bf p}_i \cdot {\bf r_i} $$
For a set of particles in a box this is a bounded quantity. Thus the average of its derivative is thus zero: $$ \frac{1}{t_{sim}} \int_0^{t_{sim}} \dot G \, dt \rightarrow 0 $$
We consider \begin{equation} G=\frac{1}{t_{sim}}\int \dot G \, dt =\frac{1}{t_{sim}}\int_0^{t_{sim}} \sum_i \left ( m {\bf v}_i^2 + m {\bf r}_i \cdot \dot {\bf v}_i \right ) \, dt=0 \end{equation} Equipartition in 2d gives $ \sum_i m {\bf v}_i^2 =2 Nk_BT $ . Remaining terms are non-zero when the particle velocity changes, at a collision.
Velocity changes have two origins: collisions with walls, and collisions with pairs.
Start with walls, place origin in centre of box so that collisions occur at $\pm (L/2-\sigma)$. The contribution to W is $$ \Delta G = -\frac{1}{t_{sim}} \sum_{walls} 2m | {\bf v}_i | (L/2-\sigma) = -4 L (L/2-\sigma) P $$ By the definition of the pressure $P$.
Now treat pair collisions. The speed changes occur in pairs $(i,j)$ so write as $$ \Delta G = m\frac{1}{t_{sim}} \sum_{pairs} ({\bf r}_i{\bf \Delta v}_i + {\bf r}_j{\bf \Delta v}_j) = m\frac{1}{t_{sim}}\sum_{pairs} ({\bf r}_i- {\bf r}_j)\cdot \Delta {\bf v}_{ij} $$ since velocity changes are equal and opposite. Here, $$ \Delta {\bf v}_{ij}= - \hat {\bf r}_{ij} (\hat {\bf r}_{ij} \cdot ({\bf v}_i-{\bf v}_j)) $$ Thus $$ \Delta G = -\frac{1}{t_{sim}} m\sum_{pairs} ({\bf v}_i-{\bf v}_j) \cdot ({\bf r}_i-{\bf r}_j) $$
Putting the pieces together we find $$ P (L-2\sigma)L = Nk_BT - \frac{m}{2t_{sim}} \sum_{pairs} ({\bf v}_i-{\bf v}_j) \cdot ({\bf r}_i-{\bf r}_j) $$ Linking the external pressure to internal collisions in the gas. Errors in this identity decay as $1/t_{sim}$. For large box sizes we neglect the particle size and find the conventional form: $$ PV = N k_BT - \frac{m}{2t_{sim}} \sum_{pairs} ({\bf v}_i-{\bf v}_j) \cdot ({\bf r}_i-{\bf r}_j) $$ which corrects the perfect gas law with a "virial". This was first studied in detail by Boltzmann. We recognize that for hard spheres the correction is proportional to $b$ in the quadratic equation and that $b$ is always negative, so that the pressure is increased. Result as derived only valid for 2-dimensions, from memory we require $1/d$ as the virial prefactor in d-dimensions.