Solved thermodynamics exercise

Two gases separated by an internal partition

Exercise 22 · Lesson 6 — The Second Law of Thermodynamics

  • second law
  • maximum entropy
  • isolated system
  • diathermal partition
  • movable partition
  • thermal equilibrium
  • mechanical equilibrium

Statement

A rigid vessel isolated from its surroundings contains two monatomic ideal gases separated by an internal partition that is initially fixed, impermeable and adiabatic. Compartment 1 contains n1n_1 moles at temperature T1T_1; compartment 2 contains n2=3n1n_2=3n_1 moles at temperature T2=T1/2T_2=T_1/2. Both compartments initially have the same volume VV. The partition's energy and heat capacity are negligible; when released, it moves without friction or any additional force. The experiments in questions 3 and 5 each start from the initial state. Define P0=n1RT1/VP_0=n_1RT_1/V.

  1. Sketch the vessel. Label the gases, the internal partition, the amounts of substance, and the initial temperatures, volumes and pressures. While the partition remains fixed, impermeable and adiabatic, is a temperature or pressure difference enough to cause a change?
  2. Express both initial pressures algebraically in terms of P0P_0.
  3. The partition becomes diathermal but remains fixed and impermeable. Use the first and second laws to justify the thermal-equilibrium condition, then determine the final temperature and pressures.
  4. Calculate the energy exchanged between the gases and identify its form. Establish the entropy balance for the combined system and verify that the entropy produced is positive.
  5. In a second experiment, the partition becomes diathermal and movable. Examine the stationarity of the isolated system's entropy to justify the thermal- and mechanical-equilibrium conditions. Determine the final temperature, pressure and volumes, then establish the entropy balance. Compare with the fixed-partition case.

Hint

Hint
The combined system is isolated: its internal energy is conserved and its entropy is maximal at equilibrium. For an ideal gas,

dS=dUT+PT dV.\mathrm{d}S=\frac{\mathrm{d}U}{T}+\frac{P}{T}\,\mathrm{d}V.

Detailed solution

Solution

Figure
Figure 1

Question 1. The diagram shows a rigid vessel of total volume 2V2V divided by a partition. On the left: (n1,T1,V,P0)(n_1,T_1,V,P_0); on the right: (3n1,T1/2,V,P2,i)(3n_1,T_1/2,V,P_{2,i}). The outer walls are adiabatic. With a fixed, impermeable, adiabatic internal partition, no exchange is allowed: each gas retains its state even if the temperatures and pressures differ. The partition's support sustains the pressure difference.

Question 2 — Algebraic calculation. The ideal-gas equation gives

P1,i=n1RT1V=P0,P2,i=3n1R(T1/2)V=32P0.P_{1,i}=\frac{n_1RT_1}{V}=P_0, \qquad P_{2,i}=\frac{3n_1R(T_1/2)}{V}=\frac32P_0.

Question 3 — Fixed diathermal partition. During a small energy transfer with dU2=−dU1\mathrm{d}U_2=-\mathrm{d}U_1, the volumes remain constant: for each gas, dSj=dUj/Tj\mathrm dS_j=\mathrm dU_j/T_j. Adding gives

dStot=dU1T1+dU2T2=dU1T1−dU1T2.\mathrm dS_{\mathrm{tot}}=\frac{\mathrm dU_1}{T_1} +\frac{\mathrm dU_2}{T_2} =\frac{\mathrm dU_1}{T_1}-\frac{\mathrm dU_1}{T_2}.

The temperatures in this variation refer to the state being considered. Factoring gives

dStot=(1T1−1T2)dU1.\mathrm{d}S_{\mathrm{tot}} =\left(\frac1{T_1}-\frac1{T_2}\right)\mathrm{d}U_1.

At equilibrium, entropy is maximal; the coefficient of dU1\mathrm{d}U_1 must therefore vanish, requiring T1,f=T2,f=TfT_{1,f}=T_{2,f}=T_f. Conservation of energy gives

n132R(Tf−T1)+3n132R(Tf−T12)=0,n_1\frac32R(T_f-T_1) +3n_1\frac32R\left(T_f-\frac{T_1}{2}\right)=0,

Dividing the energy balance by (3/2)n1R(3/2)n_1R gives

(Tf−T1)+3(Tf−T12)=0,4Tf−52T1=0,Tf=58T1.(T_f-T_1)+3\left(T_f-\frac{T_1}{2}\right)=0, \quad 4T_f-\frac52T_1=0, \quad T_f=\frac58T_1.

Then P1,f=n1RTf/V=(Tf/T1)P0P_{1,f}=n_1RT_f/V=(T_f/T_1)P_0 and P2,f=3n1RTf/V=3(Tf/T1)P0P_{2,f}=3n_1RT_f/V=3(T_f/T_1)P_0, so

Tf=58T1,P1,f=58P0,P2,f=158P0.T_f=\frac58T_1, \qquad P_{1,f}=\frac58P_0, \qquad P_{2,f}=\frac{15}{8}P_0.

Because the partition is fixed, mechanical equilibrium between the gases is not required: their final pressures may differ.

Question 4 — Entropy balance. Gas 2 receives energy entirely as heat,

Q1→2=ΔU2=3n132R(58T1−12T1)=916n1RT1.Q_{1\to2}=\Delta U_2 =3n_1\frac32R\left(\frac58T_1-\frac12T_1\right) =\frac9{16}n_1RT_1.

Gas 1 receives the opposite heat: Q1=−Q1→2<0Q_1=-Q_{1\to2}<0, whereas Q2=Q1→2>0Q_2=Q_{1\to2}>0. The partition is fixed, so W1=W2=0W_1=W_2=0. The combined system is isolated, so Se=0S_{\mathrm{e}}=0 and Si=ΔStotS_{\mathrm{i}}=\Delta S_{\mathrm{tot}}. Since the volumes are constant,

ΔS1=32n1Rln⁡TfT1=32n1Rln⁡58,ΔS2=32(3n1)Rln⁡TfT1/2=92n1Rln⁡54.\Delta S_1=\frac32n_1R\ln\frac{T_f}{T_1} =\frac32n_1R\ln\frac58, \Delta S_2=\frac32(3n_1)R\ln\frac{T_f}{T_1/2} =\frac92n_1R\ln\frac54.

Gas 1 loses entropy and gas 2 gains it. Their sum is

Si=32n1R[ln⁡ ⁣(58)+3ln⁡ ⁣(54)]>0.S_{\mathrm{i}} =\frac32n_1R\left[ \ln\!\left(\frac58\right) +3\ln\!\left(\frac54\right) \right]>0.

This entropy production reflects spontaneous heat transfer between gases initially at different temperatures. To verify the sign without numerical values, combine the logarithms:

ln⁡58+3ln⁡54=ln⁡[58(54)3]=ln⁡625512>0.\ln\frac58+3\ln\frac54 =\ln\left[\frac58\left(\frac54\right)^3\right] =\ln\frac{625}{512}>0.

Question 5 — Movable diathermal partition. With dU2=−dU1\mathrm{d}U_2=-\mathrm{d}U_1 and dV2=−dV1\mathrm{d}V_2=-\mathrm{d}V_1,

dStot=(1T1−1T2)dU1+(P1T1−P2T2)dV1.\mathrm{d}S_{\mathrm{tot}} =\left(\frac1{T_1}-\frac1{T_2}\right)\mathrm{d}U_1 +\left(\frac{P_1}{T_1}-\frac{P_2}{T_2}\right)\mathrm{d}V_1.

The partition independently allows energy and volume to be redistributed. Stationarity must therefore hold for every dU1\mathrm dU_1 and every dV1\mathrm dV_1: both coefficients vanish. The first requires T1,f=T2,fT_{1,f}=T_{2,f}; the second then gives P1,f/Tf=P2,f/TfP_{1,f}/T_f=P_{2,f}/T_f, or P1,f=P2,fP_{1,f}=P_{2,f}. Conservation of energy again gives Tf=5T1/8T_f=5T_1/8. At common pressure and temperature, volumes are proportional to amounts of substance. Since their sum is 2V2V,

V2,fV1,f=3n1RTf/Pfn1RTf/Pf=3,V1,f+3V1,f=2V.\frac{V_{2,f}}{V_{1,f}}=\frac{3n_1RT_f/P_f}{n_1RT_f/P_f}=3, \qquad V_{1,f}+3V_{1,f}=2V.

Thus V1,f=V/2V_{1,f}=V/2 and V2,f=3V/2V_{2,f}=3V/2.

The common pressure is Pf=n1R(5T1/8)/(V/2)=(5/4)P0P_f=n_1R(5T_1/8)/(V/2)=(5/4)P_0. Hence

V1,f=V2,V2,f=3V2,Pf=54P0.V_{1,f}=\frac V2, \qquad V_{2,f}=\frac{3V}{2}, \qquad P_f=\frac54P_0.

The internal-energy changes are the same as for the fixed partition, but energy is now exchanged as both heat and work. The entropy balance contains the same temperature terms as in question 4, with additional volume terms:

ΔS1=32n1Rln⁡58+n1Rln⁡V/2V,ΔS2=92n1Rln⁡54+3n1Rln⁡3V/2V.\Delta S_1=\frac32n_1R\ln\frac58+n_1R\ln\frac{V/2}{V}, \Delta S_2=\frac92n_1R\ln\frac54+3n_1R\ln\frac{3V/2}{V}.

Adding gives

Si=ΔStot=32n1R[ln⁡ ⁣(58)+3ln⁡ ⁣(54)]+n1R[ln⁡ ⁣(12)+3ln⁡ ⁣(32)]>0.S_{\mathrm{i}}=\Delta S_{\mathrm{tot}} =\frac32n_1R\left[ \ln\!\left(\frac58\right)+3\ln\!\left(\frac54\right) \right] +n_1R\left[ \ln\!\left(\frac12\right)+3\ln\!\left(\frac32\right) \right]>0.

The increase compared with the fixed-partition case is

n1R[ln⁡12+3ln⁡32]=n1Rln⁡[12(32)3]=n1Rln⁡2716>0.n_1R\left[\ln\frac12+3\ln\frac32\right] =n_1R\ln\left[\frac12\left(\frac32\right)^3\right] =n_1R\ln\frac{27}{16}>0.

Allowing the partition to move therefore increases the final entropy accessible to the system.