Change in entropy when mixing water at different temperature

The bottom line is that hot water loses heat at high temperature, giving a small negative entropy change while the cold water gain heat at low temperature resulting in a high entropy change. The net entropy change is positive. We can explicitly see this:

At any instant, the infinitesimal change in the entropy of the system is $$dS=\frac{dQ_H}{T_H}+\frac{dQ_C}{T_C},$$ where $dQ_H<0$ and $dQ_C>0$ are the heat exchanged by the hot and cold water respectively. The corresponding temperatures are $T_H$ and $T_C$. Since $$|dQ_H|=|dQ_C|\equiv dQ>0,$$ we can write $$dS=dQ\left(\frac{1}{T_C}-\frac{1}{T_H}\right)=dQ\left(\frac{T_H-T_C}{T_HT_C}\right)>0.$$ At any instant the temperature of the hot water is greater than the temperature of the cold water. So the $dS$ above is always positive and the process is irreversible at any intermediate state.


To get the entropy change for a system experiencing an irreversible process, the first step is to forget entirely about the actual irreversible process and, instead, devise a reversible process that takes the system between the same initial and final equilibrium states. That is what is meant by $dq_{rev}/T$. The reversible process that you devise does not have to bear any resemblance whatsoever to the actual irreversible process. In the case of the hot and cold masses m of water, the initial state is Th and Tc, and the final state is (Th+Tc)/2. The reversible process I would devise would be to separate the two initial masses, and then subject each of them separately to a continuous sequence of constant temperature reservoirs running from their initial temperature to (Th+Tc)/2, letting the heat transfer with the reservoirs occur very gradually for each. The entropy change for the hot mass would be $$\Delta S=mC\ln{\left[\frac{(T_h+T_c)/2}{T_h}\right]}$$where C is the heat capacity of the water. Similarly, for the cold mass, $$\Delta S=mC\ln{\left[\frac{(T_h+T_c)/2}{T_c}\right]}$$ So, for the combined system, $$\Delta S=mC\ln{\left[\frac{(T_h+T_c)^2}{4T_hT_c}\right]}$$ This entropy change is always greater than zero.


From a strictly by-the-formulas point of view, entropy change is heat transfer divided by the temperature over which the heat transfer occurs. The heat transfer is clearly the same for both volumes but positive for the cold volume and negative for the hot volume (heat flowed out of the hot volume and into the cold volume) but the average temperature over which it occurs is lower for the cold volume (it went from cold to equilibrium) than it is for the hot volume (which went from hot to equilibrium), so the positive heat transfer is divided by a smaller number than the negative heat transfer, therefore the total entropy change is positive.

From a statistical mechanics point of view, there are clearly more configurations of the water molecules resembling the final state than there are for the initial state. In the initial state, molecules of different average energy are bound in separate volumes, while in the final state, all molecules have the same average energy and they are free to move anywhere within the total volume.

Intuitively, consider that it would be extremely unlikely for the final state to spontaneously evolve to the initial state.

And in the most general sense, entropy is a measure of how close a system is to equilibrium. The initial state is not at equilibrium and the final state is.