First I'll derive the pressure of a system of particles, which would be used in a MD simulation for example, according to Allen's Computer Simulation of Liquids and show where my issue is. This is a good example because most derivations hand-wavingly throw pressure into the equation without any reasoning.

Consider a Hamiltonian system with $N$ interacting particles and generalized coordinates $q_k$. The virial theorem is:

$$ \langle q_k \frac{\partial H}{\partial q_k} \rangle = kT $$

This implies that

$$ \frac{1}{3} \langle \sum_i \mathbf{r}_i \cdot \mathbf{f}_i^{tot} \rangle = NkT $$

where $\mathbf{f}_i^{tot}$ is the total force including interparticle and external forces. So we can split this force into internal and external contributions, $\mathbf{f}_i^{tot} = \mathbf{f}_i^{ext} + \mathbf{f}_i^{int}$. The external part of the force defines the pressure on the system via

$$ \frac{1}{3} \langle \sum_i \mathbf{r}_i \cdot \mathbf{f}_i^{ext} \rangle = -PV $$

  • What is the reasoning behind this equation?
  • Why does the sum of dot products between particle position vectors and external forces equal $-PV$?

1 Answer 1


This is a result for an ideal gas, where the ideal gas law states $PV=nRT$ and for microscopic quantities $nR=k_B N$. Therefore the law can be written as $PV=N k_B T$. Ideal gas has no interactions with itself except for purely elastic collisions. Which in return cancels out $\sum_i \mathbf{r}_i\cdot \mathbf{f}_i^{int}$. So we get as a result $\frac{1}{3}\sum_i \mathbf{r}_i\cdot \mathbf{f}_i^{ext}=N k_B T= PV$.

Hopefully this anwsers your questions.

Edit(additional info,formula corrected): If you take a look on it in a macroscopic view, we change the sum to an integral: $\int\limits_{\delta B} \mathbf{r}\cdot d\mathbf{f}^{ext}=\int\limits_{\delta B} \mathbf{r}\cdot (\mathbf{n}P)da=P\int\limits_{\delta B} \mathbf{r}\cdot \mathbf{n} da=3PV$ and if the sum is taken as an approximation of the integral equation, you can say that $\frac{1}{3}\sum_i \mathbf{r}_i\cdot \mathbf{f}_i^{ext}\approx PV$.

  • $\begingroup$ It doesn't answer the question because the ideal gas law is not used in this derivation. People often state that the sum of the dot product of particle positions and forces is simply $PV$, as if it's general. No discussion of the ideal gas ever comes in, and people often apply this to general non-ideal systems. $\endgroup$ Commented Apr 17, 2020 at 16:27
  • $\begingroup$ Well, the argumentation is that for a real gas you have interaction between the particles. So the total virial has an ideal gas part ($-3PV$) and the interaction between the particles. I showed you how the ideal gas part gets derived based on the assumptions of an ideal gas. $\endgroup$
    – scheepan
    Commented Apr 17, 2020 at 16:58
  • $\begingroup$ I think your additional info is close to providing the correct intuition, but the units don't agree here: $\int\limits_{\delta B} \mathbf{r}\cdot \mathbf{f}^{ext}da=\int\limits_{\delta B} \mathbf{r}\cdot (\mathbf{n}P)da$ since the first integrand has force and the second has pressure. $\endgroup$ Commented Apr 17, 2020 at 19:14
  • $\begingroup$ You are right about my units, I made a mistake there. I wrote it down to fast. So basicly $\mathbf{n}P = \frac{d\mathbf{f}^{ext}}{da}$ and therefore it should state $\int\limits_{\delta B} \mathbf{r}\cdot d\mathbf{f}^{ext}$. $\endgroup$
    – scheepan
    Commented Apr 19, 2020 at 16:38

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.