For this system
Total mass =N=N_{1}+N_{2}
Total energy =U=U_{1}+U_{2}
Total entropy =S=S_{1}+S_{2}=N_{1} \underline{S}_{1}+N_{2} \underline{S}_{2}
From the ideal gas equation of state and the fact that V=N \underline{V} , we have
N_{1}^{i}=\frac{P V}{R T}=\frac{2 bar \times 3 m ^{3}}{8.314 \times 10^{-5} \frac{ bar m ^{3}}{ mol K } \times 373.15 K }=193.4 mol =0.1934 kmol
Now since U = constant, T_{1}=T_{2}, \text { and for the ideal gas } \underline{U} is a function of temperature only, we conclude that T_{1}=T_{2}=100^{\circ} C at all times. This result greatly simplifies the computation. Suppose that the pressure in cell 1 is decreased from 2 bar to 1.9 bar by transferring some gas from cell 1 to cell 2. Since the temperature in cell 1 is constant, we have, from the ideal gas law,
N_{1}=0.95 N_{1}^{i}
and by mass conservation, N_{2}=0.05 N_{1}^{i} \text {. Applying the ideal gas relation, we obtain } P_{2}= 0.1 bar.
For any element of gas, we have, from Eq. 4.4-3,
\underline{S}\left(T_{2}, P_{2}\right)-\underline{S}\left(T_{1}, P_{1}\right)=C_{ P }^{*} \ln \left(\frac{T_{2}}{T_{1}}\right)-R \ln \left(\frac{P_{2}}{P_{1}}\right) ( 4.4-3 )
\underline{S}^{f}-\underline{S}^{i}=C_{ P }^{*} \ln \frac{T^{f}}{T^{i}}-R \ln \frac{P^{f}}{P^{i}}=-R \ln \frac{P^{f}}{P^{i}}
Figure 4.5-4 The system entropy change and the pressure in cell 2 as a function of the pressure in cell 1.
since temperature is constant. Therefore, to compute the change in entropy of the system, we visualize the process of transferring 0.05N1i moles of gas from cell 1 to cell 2 as having two effects:
1. To decrease the pressure of the 0.95 N_{1}^{i} moles of gas remaining in cell 1 from 2 bar to 1.9 ba
2. To decrease the pressure of the 0.95 N_{1}^{i} moles of gas that have been transferred from cell 1 to cell 2 from 2 bar to 0.1 bar
Thus
S^{f}-S^{i}=-0.95 N_{1}^{i} R \ln (1.9 / 2)-0.05 N_{1}^{i} R \ln (0.1 / 2)
or
\begin{aligned}\frac{\Delta S}{N_{1}^{i} R} &=-0.95 \ln 0.95-0.05 \ln 0.05 \\&=0.199\end{aligned} \quad\left\{\begin{array}{l}P_{1}=1.9 bar \\P_{2}=0.1 bar\end{array}\right.
Similarly, if P_{1} = 1.8 bar,
\begin{aligned}\frac{\Delta S}{N_{1}^{i} R} &=-0.9 \ln 0.9-0.1 \ln 0.1 \\&=0.325\end{aligned}\left\{\begin{array}{l}P_{1}=1.8 bar \\P_{2}=0.2 bar\end{array}\right.
and so forth. The results are plotted in Fig. 4.5-4.
From this figure it is clear that ΔS, the change in entropy from the initial state, and therefore the total entropy of the system, reaches a maximum value when P_{1}=P_{2}=1 bar. Consequently, the equilibrium state of the system under consideration is the state in which the pressure in both cells is the same, as one would expect. (Since the use of the entropy function leads to a solution that agrees with one’s intuition, this example should reinforce confidence in the use of the entropy function as a criterion for equilibrium in an isolated constant-volume system.)