TITLE: Pressure in the grand canonical ensemble when momentum integration limits depends upon volume
QUESTION [1 upvotes]: When one does not want to consider the thermodynamic limit, it is possible in some systems to consider a dependance of the volume on the integration limits of the momentum. For example:
$$\mathcal{Z} = \sum\limits_{N} \int d^{3N}r \int\limits_{0}^{f(V)}d^{3N}p \, e^{-\beta(\mathcal{H} - \mu N)} $$ where $f(V)$ is an arbitrary function of the volume. You can think of an ideal gas in which the particles has less momentum near the walls than in the center.
If one wants to calculate the pressure, there are two ways, that in this example, does not yield the same results if one doesn't take the thermodynamic limit. They are, $pV= k_B T \ln \mathcal Z$ and $p = -\frac{\partial (-k_B T\ln\mathcal Z)}{\partial V}\Big|_{T,\mu}$. Why does this happens? Which one is wrong? Is it because the identification of $-k_B T\ln \mathcal Z$ with the grand potencial is neessary to use the first one, and it cannot be done without taking the thermodynamic limit so mean quantities are equal to most probable?
Any help will be much appreciated.

REPLY [1 votes]: You are right, $pV= k_B T \ln \mathcal Z$ is only guaranteed in some systems (namely extensive ones). If you suspect your system is not extensive, for example if it has physics that depend on surface area and not just volume, then you can't use this expression and you have to use the partial derivative you named.
But careful, in this case your system's pressure is probably not just a single number. If you change the system boundary in one place you will see a different pressure than making a change in another place. In other words in extensive systems there is not just volume, but also shape dependence.
For example take a fluid system in a gravity well, not quite the same as your system but it definitely it is non-extensive since the particle's energy is position-dependent. Then you find that pressure is different on the top and the bottom.
{"set_name": "stack_exchange", "score": 1, "question_id": 156231}