We have a classical ideal gas of particles of mass $m$ at fixed chemical potential $\mu$ and fixed temperature $T$. We have a potential energy $U(z)=mgz$ and the gas is in a rectangular box of height $h$ and base area $A$. How do we calculate quantities like the pressure $p(z)$ and density $\rho(z)$?
I have calculated the grand partition function to be $$\mathcal{Z}(T,\mu,\mathbf{x})=\exp \left( e^{\beta\mu}\left( \frac{2m\pi}{\beta \hbar^2} \right)^{3/2}A(1-e^{-h}) \right)$$
So the grand potential will be $$\Phi=-k_BT\left[e^{\beta\mu}\left( \frac{2m\pi}{\beta \hbar^2} \right)^{3/2}A(1-e^{-h}) \right]$$
I thought this may be possible to do from $d\Phi=-SdT-Nd\mu+\mu dN-pdV$ as we have that $$\frac{\partial \Phi}{\partial V}=-p$$ but this doesnt seem very computable from the given and I have no reason to believe that $p$ will be a function of $z$ alone.