# 20.6: We Must Always Devise a Reversible Process to Calculate Entropy Changes

The second law of thermodynamics can be formulated in many ways, but in one way or another they are all related to the fact that there is a state function S that at least in isolated systems tends to increase. For a long time people have looked at the entire universe as an example of an isolated system and concluded that its entropy must be steadily increasing until $$δS_{universe}$$ becomes zero. As we will see below the second law has important consequences for the question of how we can use heat to do useful work.

Of late cosmologists like Hawkins have begun to question this assumption. The key problem there is the role of gravity and relativity in creating black holes.

## Vacuum expansion

Let's compare two expansions from $$V_1$$ to $$V_2$$ for an ideal gas, both are isothermal. The first is an irreversible one, where we pull a peg an let the piston move against vacuum: The second one is a reversible isothermal expansion from V1 to V2 (and P1 to P2) that we have examined before.

In the first case the is no change in energy because T does not change. There is also no volume work because

$\int -P_{ext}dV = 0$

integrates to zero. The piston has nothing to perform work against until it slams into the right hand wall. At this point V=V2 and then $$dV$$ becomes zero.

No energy, no work that means: no heat!.

Clearly the zero heat is irreversible heat qirr = 0 and this makes it hard to calculate the entropy of this spontaneous process. But then this process ends in the same final state as the reversible expansion from V1 to V2 . We know that dU is still zero, but now δwrev = -δqrev is nonzero. We calculated its value before:

$q_{rev} = nRT \ln \left(\dfrac{V_2}{V_1} \right) \label{Vacuum}$

To find $$ΔS$$ we just can divide Equation $$\ref{Vacuum}$$ by the (constant) temperature:

$ΔS= nR \ln \left(\dfrac{V_2}{V_1} \right)$

As $$S$$ is a state function this equation also holds for the irreversible expansion against vacuum.

Always calculate the entropy difference between two points along a reversible path.

For the irreversible expansion into vacuum we see that

ΔS = ΔSprod + ΔSexchange = nRln[V2/V1] + 0

For the reversible one:

ΔS = ΔSprod + ΔSexchange = 0+ nRln[V2/V1]

## The Mixing of Two Gases

Consider two ideal gases at same pressure separated by a thin wall that is punctured. Both gases behave as if the other one is not there and again we get a spontaneous process, mixing in this case. If the pressure is the same the number of moles of each gas should be proportional to the original volumes Va- and Vb and the total number of moles to the total volume Vtot.

For gas A we can write:

$ΔS_A = n_A R \ln \dfrac{V_{tot}}{V_A} = n_A R \ln \dfrac{n_{tot}}{n_A}$

and similarly for gas B we can write:

$ΔS_B = n_B R \ln \dfrac{V_{tot}}{V_B} = n_B R \ln \dfrac{n_{tot}}{n_B}$

The total entropy change is therefore the sum of constituent entropy changes:

$ΔS = ΔS_A + ΔS_B$

and the entropy change total per mole of gas is

$\dfrac{ΔS}{n_{tot}} =R \dfrac{\left[n_B \ln \dfrac{n_{tot}}{n_B}+ n_A \ln \dfrac{n_{tot}}{n_A} \right ]}{n_{tot}} \label{EqTot}$

Equation $$\ref{EqTot}$$ can be simplified using mole fractions

$\chi_A = \dfrac{n_A}{n_{tot}}$

and the mathematical relationship of logarithms that

$\ln \left( \dfrac{x}{y} \right)= - \ln \left( \dfrac{y}{x} \right)$

to

$ΔS_{molar} = -R \left [\chi_A\ln \chi_A +\chi_B \ln \chi_B \right] \label{Molar Entropy}$

In the case of mixing of more than two gases, Equation $$\ref{Molar Entropy}$$ can be expressed as

$ΔS_{molar} = -R \sum \chi_i\ln \chi_i \label{Sum Entropy}$

This entropy expressed in Equations $$\ref{Molar Entropy}$$ and $$\ref{Sum Entropy}$$ is known as the entropy of mixing; its existence is the major reason why there is such a thing as diffusion and mixing when gases, but also solutions (even solid ones) are brought into contact with each other.