# Determining change in entropy and enthalpy during mixing of gases

Question taken from KVPY 2011. Answer key is A.

Logically it makes sense that $\Delta S_{\text{system}}>0$, because the process is spontaneous and as per second law, this means $\Delta S_{\text{universe}}>0)$. System is isolated ($\Delta S_{\text{surrounding}}=0$), hence system's entropy must be increasing.

However, it is also given that $$\Delta S_{\text{system}}=\frac{\Delta q}T$$ So does this mean that heat is transferred in some way? How is that possible for an isolated system?

Also, if there is no heat transfer, we can conclude that $\Delta H = 0$. But is that true?

Your equation for $\Delta S_{system}$ is incorrect. The correct equation is $\Delta S_{system}=\int{\frac{dq_{rev}}{T}}$. I hope you understand the difference, and the fact that the subscript "rev" refers exclusively to a reversible path between the initial and final states of the system. To get that, you need to forget entirely about the actual irreversible path, and instead focus on the two end states. You then have to devise a reversible path between these same two states so that you can determine the value of the integral. For your problem, this recipe will yield a positive value for $\Delta S_{system}.$

Regarding the enthalpy change, you are aware that the enthalpy of mixing of ideal gases is zero, correct?

Gases mix due to the increase in entropy as each one expands into the new volume.

When the partition is removed the gases expand into the other half of the vessel. Because the gases are ideal they are treated as point particles and so effectively each gas expands into a void as a free expansion which is an irreversible process. Thus we can treat each gas as if it were in the vessel on its own. As expansion is in effect into a vacuum the gas does no $pV$ work but the entropy increases. The entropy change is $$\Delta S = nR\ln\left(\frac{V_2}{V_1}\right) \tag {1}$$ for the expansion of $n$ moles from volume $V_1$ to $V_2$. It is twice this when both gases are considered.

As the system is isolated and consists of an ideal gas the temperature defines the internal energy $U$ which is constant, or $\Delta U=0$. Since $\Delta H=\Delta U+p\Delta V$ and as no work is done then $\Delta H = 0$ .

To calculate the entropy change it is necessary to imagine a reversible process by which the gas now filling both vessels can be returned to its initial condition. This is possible because the entropy change only depends on the difference in the values between the final and initial states and not on the path taken between them (state function). So if the entropy change on compression can be calculated it will have same value (except for its sign) as that for expansion between the same two volumes $V_1, V_2$ and at the same constant temperature.

This can be done by imagining that the gas is reversibly compressed (it does not matter how this is done) from $V_2$ to $V_1$ and it is also kept in contact with a thermal reservoir so that the compression is isothermal. (We use a reservoir as the gas must be returned to exactly the same conditions, $T$ and $p$ as before expansion). For a finite reversible change where $w$ is the work done on the gas and $q$ the heat absorbed by the reservoir then $$q_\text{rev} = -w = \int_{V_2}^{V_1}p\,\mathrm dV$$ Using the gas law and substituting for $p$ produces $$q_\text{rev} = -nRT\ln\left(\frac{V_2}{V_1}\right)$$ As the entropy is usually written as $$\mathrm dS = \frac{\delta q_\text{rev}}{T} \text{ or equivalently } \Delta S = \int \frac{1}{T}\,\mathrm dq_\text{rev}$$ this leads to eqn $\text{(1)}$ but with the opposite sign as its the reverse process to expansion. The table of the entropy production is as follows. The $\Delta S$ is that of eqn. $\text{(1)}$. $$\begin{matrix} & \Delta \text{ gas entropy} & \Delta \text{ reservoir entropy} & \text{total } \Delta\text{ entropy produced}\\ \text{irrev expansion} & +\Delta S & 0 & +\Delta S \\ \text{rev compression} & -\Delta S & +\Delta S & 0\\ \text {total both steps} & 0 & +\Delta S & +\Delta S\\ \end{matrix} \$$

The total entropy change for the gas is zero as it has been returned to its original state. No net entropy was produced in the reversible compression since it was taken up by the reservoir, the initial entropy production was in the irreversible process of free expansion.