# Pressure of a gas on the inside walls of a cylinder canonical ensemble

First post on here. I need some clarification on this topic. I have an ideal gas rotating with angular velocity $$\omega$$ in a cylinder of radius $$R$$ and lenght $$L$$. Working with the canonical ensemble, from the Hamiltonian of the gas particles I have derived the partition function and therefore the free energy $$F=-k_b T log(Z)$$.

I know that the average pressure of a gas is calculated with $$\langle p\rangle=\frac{\partial F}{\partial V}$$, would that also be the pressure on the inside wall of my cylinder? I thought intuitively to derive the Free energy with respect to the radius $$R$$ but I don't know if that would be right and why

New contributor
JimmyB is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Commented Sep 5 at 9:09

That's a good question. Which is similar to the (more common) question: "What's the pressure of a gas in a gravitational field" (for which you will be able to find more information). The punchline is that, as you guessed, the gas pressure will not be constant. Same thing for the density. While, indeed, if you perform a naive $$p = \color{red}-\frac{\partial F}{\partial V}$$, you obtain a constant pressure. That is because, the statistical mechanics with the formalism taught at school is more or less only applicable to homogeneous system.

We can assume that at every point in space, the thermodynamic laws are holding. Which means that we are not limited to having one given value for the pressure, energy, density in our system but that these things depend on the position. In this case, for an ideal gas (ideal because particles don't interact):

$$p(\vec r) = \rho(\vec r) k_bT$$

That is, we ask for the pressure $$p$$ and density $$\rho$$, to follow the ideal gas law at every point in space. $$T$$ is a constant because we are in a canonical ensemble. From Gibbs weight (canonical probability), we also know that:

$$\rho(r) = \rho_0 e^{-U(r)/k_bT}.$$

With $$\rho_0$$ the density at $$U(r)=0$$ (in your case the density at $$r = 0$$). Here the only energy is the rotating one: $$U(|\vec r|)=\frac{1}{2}m\omega^2 |\vec r|^2$$, thus we immediately obtain that the pressure is a varying function of the distance:

$$p(r) = \rho_0k_b Te^{-\dfrac{m\omega^2 r^2}{2k_bT}} = p_0 e^{-\dfrac{m\omega^2 r^2}{2k_bT}}.$$

Thus the pressure on the boundaries of your cylinder is $$p(R)$$.

There is a more formal way to do all of this that is called Classical density functional theory (you can take a look at the book theory of simple liquids by Hansen and McDonald) which transforms the free energy into a functional of the density: $$F\to \mathcal{F}[\rho(r)]$$, the pressure is then related to this free energy by functional differentiation: $$p(r)\sim \frac{\delta \mathcal F}{\delta \rho(r)}$$. These things are slightly advanced...

You can also derive the last formula using hydrostatic equilibrium. By equating the gradient of the pressure with the centrifugal force density (which is maybe closer to what you had in mind when you said "that you wanted to derivate F with respect to R")

### Edit

You cannot really compute $$\rho(r)$$ using only $$Z$$. The density is related to the probability $$P$$ of finding a particle at some point, which is given by:

$$\rho(r)\propto P(r) = \dfrac{e^{-\beta U(r)}}{2\pi h\int_0^R dr re^{-\beta U(r)}}=\dfrac{e^{-\beta U(r)}}{\tilde Z}$$

So you cannot, from $$Z$$ only obtain $$\rho(r)$$ or $$P(r)$$. Because, with $$Z$$ you somehow lost the information about the single particle probability.

Now, if you really want to derive some pressure from $$Z$$. You can do as follow (note that I'm unsure about the explanation here):

The free energy change of a homogeneous system is $$dF=-SdT-pdV$$, the problem with this formula is that, as we said, $$p$$ is not the same everywhere, and hence, different volume change (for example extending along $$z$$ the cylinder or extending it along $$r$$) would lead to different free energy change. But it makes sense, in your system, to define it a little bit differently. If your cylinder has radius $$R$$ and height $$h$$ then, at fixed $$h$$ for a small variation of radius, the free energy change can be well defined as: $$dF=-SdT-\tilde p\underbrace{h\pi[(R+dR)^2-R^2]}_{dV}$$ (at fixed $$T$$ this is understood as the work performed to change the radius of the cylinder).

Thus, in your case, at fixed $$T$$ (canonical ensemble):

$$dF = -\tilde p 2\pi hRdR\to \tilde p = -\frac{1}{2\pi}\frac{1}{hR}\frac{\partial F}{\partial R}$$

I think $$\tilde p$$ should be equal to $$p(R)$$, and from $$Z$$ you should be able to obtain it, but here, be wary that a computation of $$Z$$ with the "full" Hamiltonian is probably required:

$$$$H = \frac{1}{2m}\biggr[(p_x + m\omega y)^2 + (p_y - m\omega x)^2 \biggr] +\frac{1}{2} m{\omega}^2r^2$$$$

• Thanks @Syrocco ! That clears some of my doubts, I got the general idea of how to do it. Would there be a way of calculating it using the partition function $Z$? If there is a way to compute the radial distribution $\rho (r)$ from $Z$ then I could simply use $p(r)=\rho (r) / \beta$ Commented Sep 5 at 13:24
• @MatteoBalducchi I edited my answer, note that I'm not particulary sure about the validity of my last point Commented Sep 5 at 14:24
• @MatteoBalducchi This might interest you: physics.stackexchange.com/q/197857/232790 Commented Sep 5 at 14:34
• Yours was actually the explanation I was trying to get, thank you. And yes, I will have to compute $Z$ using the full Hamiltonian from the gas particles with both the transactional and rotational term Commented Sep 5 at 14:51
• @MatteoBalducchi Cool, happy that I could help. But please, be wary that I'm not particularly sure about this last thing... Commented Sep 5 at 14:59