# Invariant Concentration of Ideal Gas Mixture with Altitude

Consider the following scenario, We have two gasses, $$A$$ and $$B$$, both approximately ideal mixed together in a gravitational field of constant magnitude $$g$$. Let them have masses per particle of $$m_a$$ and $$m_b$$ respectively. At elevation $$z = 0$$, the concetration $$\frac{N_a}{N_b+N_a} = c_0$$, and the total pressure is $$P_0$$. We wish to find the concentration of the two gasses in the mixture at arbitrary elevation $$z$$.

The following is my very problematic analysis. Let's begin with pressures. Because they are both ideal gasses, they will both individually satisfy the barometric equation

$$$$\frac{\partial P}{\partial z} = -\rho g$$$$ or in this particular case, the two equations $$$$\frac{\partial P}{\partial z} = \frac{-Pmgz}{kT}$$$$ Which leads to the obvious solutions $$$$P_a(z) = P_{a0}e^{-m_agz/kT}$$$$ $$$$P_b(z) = P_{b0}e^{-m_bgz/kT}$$$$

Now, let's consider concentration. The chemical potential of a species $$A$$ in a mixture is the pure chemical potential $$\mu_A^o(P,T)$$, with an additional term for the entropy of mixing. Given that the entropy of mixing is $$$$-\Delta S_{mix}/k = N_a \ln(1/c) + N_b\ln\left(\frac{1}{1-c}\right)$$$$ Given that $$c$$ is a function of $$z$$. The chemical potential should be $$$$\mu_{mix,A} = \mu_{A}^o + kT\frac{\partial \Delta S}{\partial N_a} = \mu_A^o + kT\ln(1/c)$$$$ If we now utilize the fact that gas $$A$$ must be in equilibrium, we have that $$$$\mu_{A}^o(P(z),T,0) + kT\ln(1/c) + m_Agz = \mu_{A}^o(P_0,T,0) + kT\ln(1/c_0)$$$$ Equivalently, $$$$kT\ln(c/c_0) = \mu_{A}^o(P(z),T,0) - \mu_A^o(P_0,T,0) + m_agz$$$$

If we now utilize that the chemical potential of an ideal gas is just $$kT\ln(P) - \chi(T)$$, this becomes $$$$kT\ln(c/c_0) = kT\ln(P_a/P_{0a}) + m_agz$$$$ And $$$$c = c_0\frac{P_a(z)}{P_{0a}}e^{m_agz/kT} = c_0e^{-m_agz/kT}e^{m_agz/kT} = c_0$$$$

Thus, one of two things is true. Either I've blundered somewhere and I can't find the mistake, or this is correct and I need to be given an intuition why this is possible. We clearly expect something like a logistic curve where the lighter of the two species becomes more prevalent at higher altitudes. I can derive that result without mixing, but I cannot seem to get it with the mixing factored in. As such, please relieve me of my ignorance!

• Is the total volume of the mixture fixed? I.e., are the gases in a rigid container? Commented Mar 30, 2022 at 11:48
• @BobD, no the intention is to model a non-convective atmosphere Commented Mar 31, 2022 at 12:03
• Why do you write "If we now utilize that the chemical potential of an ideal gas is just kTln(P)−χ(T)" when the chemical potential in a gravitational field should contain a dependence on the height z? Also, I don't see where χ is defined. Commented Apr 4, 2022 at 17:27
• @Chemomechanics Your right, I was a little untidy. What I mean is that this is a standard chemical potential at $h=0$, as you can see, I account for the potential energy difference separately, so its really just an issue of nomenclature. The $\chi(T)$ is meant to represent some function of $T$ which we will later ignore (It drops from the equations because it does not vary with height). Let it be arbitrary. (Of course, in a real atmosphere, the temperature would change, but I'm ignoring that effect. Commented Apr 4, 2022 at 18:11
• In the equation following "If we now utilize the fact that gas A must be in equilibrium, we have that," you seem to double count the influence of gravity: you write $\mu_A^0=\mu_A^0(P(z), T,z)$ as incorporating $z$ already, but you also add the term $m_agz$. Doesn't this term already effectively appear inside $\mu_A^0$? Commented Apr 4, 2022 at 19:00

1. Your definition for the entropy of mixing has a sign error. The resulting chemical potential should be $$\mu_{\text{mixture,}A}=\mu_A^\circ+kT\ln c$$. That is, the chemical potential of a solute tends to be lower where it is more dilute, which promotes diffusional mixing because matter moves to areas of lower chemical potential.

2. After writing "If we now utilize that the chemical potential of an ideal gas is just...," you conflate the total pressure $$P$$ with the partial pressure of A, $$P_A$$. They aren't equal or linearly proportional. It's the total pressure that brings in information about B that's needed to explain the concentration dependence on height.

Here's another approach to compare:

The chemical potential of A must satisfy

$$\frac{\partial (\mu_{\text{mixture,}A}+m_Agz)}{\partial z}=0.$$

(This corresponds to your equation setting the chemical potentials equal at different heights, now expressed more powerfully as a derivative equaling zero.)

Since $$\mu_{\text{mixture,}A}=\mu_{\text{mixture,}A}(T,P,c)$$, we have

$$\frac{\partial \mu_{\text{mixture,}A}}{\partial T}\frac{\partial T}{\partial z}+\frac{\partial \mu_{\text{mixture,}A}}{\partial P}\frac{\partial P}{\partial z}+\frac{\partial \mu_{\text{mixture,}A}}{\partial c}\frac{\partial c}{\partial z}+m_Ag=0,$$

where we seek $$\frac{\partial c}{\partial z}$$. Now,

• For height-independent temperature, $$\frac{\partial T}{\partial z}=0$$, so the first term disappears;
• We always have $$\frac{\partial \mu_i}{\partial P}=V_i$$ (or $$\frac{kT}{P}$$ for an ideal gas);
• $$\frac{\partial P}{\partial z}=-\rho g=-\frac{m_\text{mixture}}{V}g$$ (hydrostatic equilibrium, where $$m_\text{mixture}=cm_A+(1-c)m_B$$ is the total mass); and
• $$\frac{\partial \mu_{\text{mixture,}A}}{\partial c}=\frac{kT}{c}$$ (from the equation in (1)), giving

$$0-m_\text{mixture}g+\frac{kT}{c}\frac{\partial c}{\partial z}+m_Ag=0;$$

$$kT\frac{\partial \ln c}{\partial z}=m_\text{mixture}g-m_Ag;$$

$$\frac{c}{c_0}=\exp\left(\frac{(m_\text{mixture}-m_A)gz}{kT}\right),$$

Do these steps make sense?

You can get to this result from your (corrected) equation

$$\mu_{A}^\circ(P,T) + kT\ln(c) + m_Agz = \mu_{A}^\circ(P_0,T) + kT\ln(c_0)$$

as long as we integrate $$\frac{\partial\mu_A^\circ}{\partial P}=\frac{kT}{P}$$ to obtain $$\mu_A^\circ(P)=\mu_A^\circ(P_0)+kT\ln\left(\frac{P}{P_0}\right)=\mu_A^\circ(P_0)-m_\text{mixture}gz$$. This again gives $$-m_\text{mixture}gz + kT\ln\left(\frac{c}{c_0}\right) + m_Agz = 0$$ and thus

$$\frac{c}{c_0}=\exp\left(\frac{(m_\text{mixture}-m_A)gz}{kT}\right).$$

As noted in a comment, the result from this derivation strategy matches that from simply using partial pressures as a surrogate for concentrations:

$$\frac{c}{c_0}=\frac{\frac{P_{A}}{P}}{\frac{P_{A,0}}{P_0}}=\frac{P_{A}P_0}{P_{A,0}P}=\exp\left(\frac{(m_\text{mixture}-m_A)gz}{kT}\right).$$

Since we’re assuming ideal gases, this a perfectly valid solution strategy, albeit less extensible to other materials than the chemical potential approach outlined above.

• This looks right to me! I withdraw my answer, it was wrong and I was just being too lazy when writing it. Commented Apr 7, 2022 at 19:37
• A very strange way to determine the relative densities... Why not use the partial pressures $P_i = n_i kT_i/m_i$, divide $n_i/n_j$, done? This exercise has nothing to do with chemistry, but everything to do with mechanical forces, which obey the hydrostatic equation. Commented Apr 7, 2022 at 21:59
• It's not always possible to use the partial pressure as a surrogate for concentration. (I agree that it's possible in this case, however.) It's useful to know more than one way to derive a result, especially more general ways that can be applied to different material classes. Commented Apr 7, 2022 at 22:16
• @Chemomechanics: I agree with the sentiment that it is useful to know more ways. But why I denoted this as strange is that usually solution follows the nature of a problem: In this case one would not think of applying entropies to the problem, as the species do not exchanges numbers, it is a purely mechanical, not chemical problem. Commented Apr 7, 2022 at 23:18
• Be sure not to confuse the chemical potential with chemistry or chemical reactions. It is the partial molar Gibbs free energy. The problem focuses on equilibrium at ambient temperature and pressure; thus, we look to the Gibbs free energy as the natural potential that is minimized. Nature doesn't care whether one considers this a mechanical force-balancing problem or a chemical-potential minimization problem! In any case, your comments are probably best directed to the author of the question, as I wasn't the one who chose to incorporate the entropy of mixing. Commented Apr 7, 2022 at 23:56