Ideal gas concentration under temperature gradient I'm trying to calculate the concentration of an ideal gas in an adiabatic container as a function of position where the top and bottom plates of the container are fixed at temperatures $T_1$ and $T_2$, respectively, with $T_2 > T_1$.  Thus, there is a temperature gradient from bottom to top, i.e. $T(z) = T_2 - (T_2-T_1)\frac{z}{h}$, where $h$ is the height of the container.  How do I calculate the concentration of the gas, $n(z)$, which I expect to be smaller at the bottom (near the hot plate) and larger at the top?
EDIT: I started with a similar problem but which included the gravitational field.  The correct insight was to realize that the difference in pressure between $z$ and $z+dz$ was equal to the gravitational force due to the mass in the volume between $z$ and $z+dz$.  From this it's easy to follow the math.  In the present case, however, is the correct insight simply that the pressure is uniform? I.e., since there is no mass to balance, there are no pressure differences?  If so, I have found the solution: $n(z) = n(0)T_2(T_2 - (T_2-T_1)\frac{z}{h})^{-1}$, which is inversely proportional to the temperature, and which seems kind of nice, but how can I properly justify that the pressure is uniform?
 A: Edit My original answer was wrong.  The pressure is in fact constant; if there were a gradient, then the layer between $z$ and $z+dz$ would have a net force on it, and the gas would not be in a steady state.  This is in contrast to the fact that in a gravitational field, there must be a net force on such a layer that counteracts gravity in the steady state as you indicated.  I should not get credit for this observation; see this question I just posted: Ideal gas temperature and pressure gradients?
On another note however, are you sure that the temperature gradient would be linear as you have indicated?  This would be true if ideal gases had a constant thermal conductivity, but as far as I can tell according to these notes, the thermal conductivity of an idea gas scales as the square root of temperature; $k=\alpha\sqrt{T}$ in which case by Fourier's Law one gets that the temperature gradient in the $z$-direction is
$$
  T(z) = \left[T_1^{3/2}+(T_2^{3/2}-T_1^{3/2})\frac{z}{L}\right]^{2/3}
$$
Moreover, now I'm curious to know where my first argument about chemical potential breaks down; I guess the assumption about diffusive equilibrium doesn't hold in this case.
Original (Incorrect) Answer
Cool question!  Anytime one wants to compute concentration gradients, the first thing that comes to my mind is the chemical potential since it is associated with particle number; when diffusive equilibrium is achieved, each "infinitesimal" gas layer is in equilibrium with the next which means that the chemical potential as a function of $z$ is a constant.
$$
  \mu(z) = \mu(0).
$$
On the other hand, the chemical potential of an ideal gas (according to Kittel & Kroemer) is
$$
  \mu =kT\ln\left(\frac{n}{n_Q}\right)
$$
where $n$ is the concentration $n_Q$ is the so-called *quantum concentration" and is defined as
$$
  n_Q = \left(\frac{m k T}{2\pi\hbar^2}\right)^{3/2}
$$
and $m$ is the molecular mass.  In your setup, the temperature is a function of $z$, which makes the quantum concentration a function of $z$, and so is the concentration.  By plugging the expression for the chemical potential into the condition for diffusive equilibrium, we obtain the following equation for $n(z)$:
$$
  k T(z)\ln\left(\frac{n(z)}{n_Q(z)}\right) =\mu(0)
$$
Whose solution, after plugging in the explicit expressions for $n_Q(z)$ and $\mu(0)$ is
$$
  \boxed{n(z) = \left(\frac{m k \,T(z)}{2\pi\hbar^2}\right)^{3/2}\exp\left[\frac{\mu(0)}{ k\,T(z)}\right]}
$$
Barring a massive conceptual error, I think this is call correct.  It's also nice cause it apparently applies to any temperature gradient $T(z)$.  Please tell me of any errors (conceptual or otherwise) if you think of any!  Yay thermo!
Cheers!
A: I think pressure should be uniform, yes. Because equilibrium conditions are defined by the constance of thermodynamical potentials, namely temperature, pressure, and chemical potential. In this case temperature is not constant because of an external factor, exactly as pressure wasn't when you were dealing with gravity.
However, without gravity, if pressure isn't constant and you reproduce the same argument you used with gravity, you'll find that the force between $z$ and $z+dz$ is not null, which contradicts equilibrium conditions.
I would appreciate if someone confirms, I am not sure and I don't want user1544418 to make mistakes because of me.
