Brian Bi

## Does mixing a cup of dry black sand and dry yellow sand increase the thermodynamic entropy of the universe?

The purpose of this question is to test to what extent we can use the dS = dQ/T definition of entropy to meaningfully calculate entropy for non-chemical, non-thermal processes.

There are lots of people who claim that cleaning a room decreases the entropy of the room, which is a dubious claim.

It does increase entropy.

Evidently, your question is how this fact can be reconciled with the definition of entropy as $\mathrm{d}S = \delta q / T$ and the fact that no heat is transferred.

The key fact is that this formula can only be used to calculate the change in entropy as long as $T$ is actually well-defined. $T$ is only well-defined at equilibrium. Thus, you must carry out the process reversibly by breaking it down into an infinite number of infinitesimal steps, where, in each step, the system deviates from equilibrium only infinitesimally and is allowed to equilibrate before the next step begins. If a process is carried out irreversibly, you may still calculate $\int \delta q/T$, but there won't be a single well-defined value of $T$ to use (is it the temperature of the environment? of one part of the system? of another?) and you won't get the correct value of $\Delta S$.

It is easier to talk about an ideal gas than sand. The idea is the same: when two different ideal gases at the same temperature are mixed, the entropy increases, despite the fact that no heat is transferred. In order to calculate the entropy change from first principles, we must find some path along which the process can be carried out reversibly. If the gases are initially placed into a box with a partition, and then the partition is suddenly removed, you are not carrying out the process reversibly, because in the instant after the partition is removed and the gases are free to mix, the system is far away from equilibrium, which will only be restored once the gases have finished mixing evenly.

When the process is carried out reversibly, the gases do some work, which causes them to absorb some heat from the environment. Therefore, the entropy change is positive. Here is a straightforward way to carry out the process reversibly:

• We have a partitioned box with gas A in the left half and gas B in the right half, initially at 1 atm. Both gases are in thermal equilibrium with each other and with the environment.
• The box is partitioned by two semipermeable barriers, initially both at the midpoint of the box. The one on the left is permeable only to gas A, while the one on the right is permeable only to gas B.
• Both barriers are initially fixed in place.
• First, we take the left barrier, which is impermeable to gas B, and allow it to relax toward the left side of the box, until it merges with the wall. This allows gas B to enter part of the left half of the box. After this step is complete, gas A still only occupies the left half of the box, but gas B is evenly distributed throughout the entire box.
• Second, we take the right barrier, which is impermeable to gas A, and push it toward the right side of the box, until it merges with the wall. After this, both gases are evenly mixed.

During the first step, the region on the left between the two barriers has pressure greater than 1 atm, because the partial pressure of gas A is 1 atm while there is also a nonzero partial pressure due to the presence of gas B. The barrier therefore experiences a force tending to push it to the left. As gas B does work on the barrier, it absorbs an equal amount of heat from the environment. The amount of work done on the barrier is the same as the amount of work that would be done if gas A were absent entirely, so the entropy change is the same here as if gas B alone expanded isothermally to the entire volume of the box. During the second step, the remaining barrier likewise experiences a force pushing it to the right, gas A does work on the barrier, and heat is taken up from the environment. The entropy change here is the same as for the isothermal expansion of gas A alone.

The net entropy change for the entire mixing process is the sum of the entropy changes for two isothermal expansions, one for each gas, as though it were alone in its half of the box then allowed to expand to fill the entire box.

When mixing systems that aren't gaseous, we can construct a reversible process like this: individually heat each system reversibly until it vaporizes, then mix the hot gases reversibly like above, then allow the resulting mixture to cool reversibly to the original temperature.