# How does the mixing of two gases increase entropy?

I have learnt that $\mathrm{d}S = \mathrm{d}Q_\mathrm{rev}/T$, where $Q$ is the heat energy absorbed by the system. Now consider an insulated compartment with two chambers, separated by a valve. Each chamber consists of a gas at a particular temperature and volume. Now, the valve is screwed open. We know that the entropy of the isolated system will increase as the gases have more freedom.

But, starting with the assumption that the walls were insulated, where did the heat energy come from?

How did the entropy increase?

• In fact, the formula is -nR*summation(xlnx), where x is the mole fraction of the ith gas. – Newton Nov 12 '15 at 16:37
• The entropy of mixing can be derived by considering the chemical potential of an ideal gas then finding $\Delta G$ and hence $\Delta S$, or equivalently by considering the number of different microstates in the unmixed and mixed states then using Boltzmann's formula $S = k_\mathrm{B} \ln W$. – orthocresol Nov 12 '15 at 16:39
• @orthocresol Just if anyone is interested. I had written up a derivation of the entropy of mixing formula via the $\Delta G$-route in this answer of mine. – Philipp Nov 12 '15 at 16:42
• The process is not reversible, which means that $\mathrm{d}S \gt \mathrm{d}q/T = 0$. The equality only holds in the reversible case, which is why you have a subscript rev. So the whole premise of your question is wrong. The entropy change of an irreversible adiabatic process is always greater than zero. – orthocresol Nov 12 '15 at 16:44
• Can you tell me a way of "reversibly" mixing two gases for which you can work out that $\mathrm{d}q = 0$? Because I can't think of any. As for the second part, entropy is not something that is supposed to be interpreted pictorially. It is not a function that we can observe or control. It is merely defined to be a state function with the property $\mathrm{d}S = \mathrm{d}q_{\mathrm{rev}}/T$. The best we can do is "entropy is a measure of disorder", and obviously a mixed system has greater disorder than one where the two gases are separated. – orthocresol Nov 12 '15 at 16:49

## 1 Answer

Here is a reversible process to do what you are asking for (i.e., unmixing the gases reversibly). You have a cylinder containing the two gases already mixed. The cylinder has a piston. Connected to this main cylinder are two other cylinders joined to it through semipermeable membranes. Each membrane allows one of the gases to pass, but not the other. You gradually advance the piston in the main cylinder while, at the same time moving the other pistons outward in the other two cylinders so that, at any time, the pressures of the pure gases in the attached cylinders are equal to their partial pressures in the main cylinder. The change in entropy for this adiabatic reversible process is zero. This is the first step. Now, in the second step, we close off the semipermeable membranes, and compress each of the pure gases in the two cylinders isothermally and reversibly to the original total pressure that was present in the main chamber. So, if $p_1$ was the partial pressure of one of the gases in the main chamber and $p_2$ was the partial pressure of the other gas in the main chamber, the total pressure of the pure gases in their chambers after completing step 2 will be $p_1+p_2$. The change in entropy for the 2-step process we described is minus the entropy of mixing. So, if the process is done in reverse, the entropy of mixing will be positive.