Calculate pressure from partition function with separated volume geometric parameters? How does one calculate the pressure from the partition function if it is specified in terms of three parameters defining the space of which the gas occupies, but all three parameters are not always seen together in one term called the volume $V$?
I know that in general pressure is defined as
$$
p = k_B T \dfrac{d \ln(Z)}{d V}
$$
however the partition function for a gas in a gravitational field is
$$
Z
=
\left(
\left(
\dfrac{2m\pi}{\beta}
\right)^{3/2}
\dfrac{1-e^{-\beta g m h}}{\beta g m h}
(V)
\right)^N
$$
which contains both the volume $V$ and the height $h$, where $V=A*h$, and $A$ is the area normal to the gravitational field.
 A: OK the first thing to notice is that in a gravitational field the pressure of a gas is not constant, but decreases with altitude. This means simply asking "what happens when we change the volume of the gas?" is not a well defined question; the amount of work done in the expansion is going to depend on exactly how we change the shape of the container. 
We can ask about the pressure at the top of the container. This is simply given by
$$
p_\mathrm{top} = k_BT\frac{\partial\ln Z}{\partial h}.
$$
Note that you will need to expand $V = Ah$ in taking the derivative.
We can also find the average horizontal pressure in a similar way
$$
\bar{p}_\mathrm{hor} = k_BT\frac{\partial\ln Z}{\partial A}
$$
If you want to know the pressure at a particular height you would have to write $Z$ in some more complicated form that would allow you to parameterise an expansion locally at that altitude. Alternatively you could treat the gas as a series of thin slices which can exchange material as well as energy with each other, find the grand canonical partition function for one of these slices and find the pressure of the slice from that.
