Solved thermodynamics exercise

Compression in contact with one reservoir: reversible or sudden

Exercise 20 · Lesson 6 — The Second Law of Thermodynamics

  • single-reservoir compression
  • isothermal
  • work
  • entropy produced
  • thermal reservoir

Statement

A diathermal cylinder contains nn moles of ideal gas at (P0,V0,T0)(P_0,V_0,T_0). It is in contact with a thermal reservoir at T0T_0. A frictionless piston allows the gas to be compressed to pressure P1=xP0P_1=xP_0, with x>1x>1. Compare a reversible compression with a compression obtained by suddenly imposing the constant external pressure P1P_1.

  1. Determine the final equilibrium pressure, temperature and volume for each compression. Is the final state the same?
  2. Calculate the gas's entropy change for each compression.
  3. Calculate QQ and WW in the reversible case and establish the entropy balances for the gas and the reservoir.
  4. Calculate QQ and WW for the sudden compression.
  5. Establish the entropy balances for the gas and the reservoir in the sudden case. Calculate the entropy produced in the combined gas—reservoir system and show that Si=nR(x−1−ln⁡x)>0S_{\mathrm{i}}=nR(x-1-\ln x)>0. Verify that T0Si=Wirr−WrevT_0S_{\mathrm{i}}=W_{\mathrm{irr}}-W_{\mathrm{rev}}.

Hint

Hint
In both cases, ΔU=0\Delta U=0. For the sudden compression, W=−P1(Vf−V0)W=-P_1(V_f-V_0); for the reversible compression, integrate −nRT0 dV/V-nRT_0\,\mathrm dV/V.

Detailed solution

Solution
Question 1. During the reversible compression, the gas remains in thermal equilibrium with the reservoir: its temperature is T0T_0 throughout the process. Its pressure increases gradually from P0P_0 to P1=xP0P_1=xP_0. In the final state,

Pf,rev=xP0,Tf,rev=T0,Vf,rev=nRT0xP0=V0x,P_{f,\mathrm{rev}}=xP_0,\qquad T_{f,\mathrm{rev}}=T_0,\qquad V_{f,\mathrm{rev}}=\frac{nRT_0}{xP_0}=\frac{V_0}{x},

where the initial equation of state nRT0=P0V0nRT_0=P_0V_0 has been used.

For the sudden compression, the external pressure is set to P1P_1. At final mechanical equilibrium, the gas pressure equals this external pressure: Pf,irr=P1=xP0P_{f,\mathrm{irr}}=P_1=xP_0. Final thermal equilibrium with the reservoir requires Tf,irr=T0T_{f,\mathrm{irr}}=T_0. The equation of state then gives

Vf,irr=nRTf,irrPf,irr=nRT0xP0=V0x.V_{f,\mathrm{irr}}=\frac{nRT_{f,\mathrm{irr}}}{P_{f,\mathrm{irr}}} =\frac{nRT_0}{xP_0}=\frac{V_0}{x}.

Both processes therefore lead to the same final state (Pf,Tf,Vf)=(xP0,T0,V0/x)(P_f,T_f,V_f)=(xP_0,T_0,V_0/x).

Question 2. Entropy is a state function: its change depends only on the initial and final states, which are identical in both experiments. For the ideal gas,

ΔSgas=ncVln⁡TfT0+nRln⁡VfV0=ncVln⁡1+nRln⁡1x=−nRln⁡x.\Delta S_{\mathrm{gas}} =nc_V\ln\frac{T_f}{T_0}+nR\ln\frac{V_f}{V_0} =nc_V\ln1+nR\ln\frac1x=-nR\ln x.

Thus ΔSgas,rev=ΔSgas,irr=−nRln⁡x<0\Delta S_{\mathrm{gas,rev}}=\Delta S_{\mathrm{gas,irr}}=-nR\ln x<0. This decrease in the gas's entropy does not determine the entropy produced: exchanges with the reservoir must also be included.

Question 3. During the reversible compression, Pext=P=nRT0/VP_{\mathrm{ext}}=P=nRT_0/V. The work received is

Wrev=−∫V0V0/xnRT0V dV=−nRT0[ln⁡V]V0V0/x=−nRT0ln⁡(1/x)=nRT0ln⁡x>0.\begin{aligned} W_{\mathrm{rev}}&=-\int_{V_0}^{V_0/x}\frac{nRT_0}{V}\,\mathrm dV\\ &=-nRT_0[\ln V]_{V_0}^{V_0/x} =-nRT_0\ln(1/x)=nRT_0\ln x>0. \end{aligned}

The gas returns to its initial temperature, so ΔU=ncV(T0−T0)=0\Delta U=nc_V(T_0-T_0)=0. The first law ΔU=Q+W\Delta U=Q+W gives Qrev=−WrevQ_{\mathrm{rev}}=-W_{\mathrm{rev}}. The reservoir receives the opposite heat at temperature T0T_0:

ΔSth,rev=−QrevT0=nRln⁡x.\Delta S_{\mathrm{th,rev}}=\frac{-Q_{\mathrm{rev}}}{T_0}=nR\ln x.

The entropy received by the gas is Se,rev=Qrev/T0=−nRln⁡xS_{\mathrm{e},\mathrm{rev}}=Q_{\mathrm{rev}}/T_0=-nR\ln x, so Si,rev=ΔSgas−Se,rev=0S_{\mathrm{i},\mathrm{rev}}=\Delta S_{\mathrm{gas}}-S_{\mathrm{e},\mathrm{rev}}=0. The reservoir receives entropy Se,th=−Qrev/T0S_{\mathrm{e},\mathrm{th}}=-Q_{\mathrm{rev}}/T_0, equal to its entropy change: it too produces no entropy. Adding gives ΔSgas+ΔSth,rev=0\Delta S_{\mathrm{gas}}+\Delta S_{\mathrm{th,rev}}=0: no entropy is produced in the combined system.

Question 4. The sudden compression takes place under constant external pressure P1P_1. The work received is therefore

Wirr=−P1(Vf−V0)=−xP0(V0x−V0)=P0V0(x−1)=nRT0(x−1)>0.\begin{aligned} W_{\mathrm{irr}}&=-P_1(V_f-V_0) =-xP_0\left(\frac{V_0}{x}-V_0\right)\\ &=P_0V_0(x-1)=nRT_0(x-1)>0. \end{aligned}

Again ΔU=0\Delta U=0, so Qirr=−nRT0(x−1)Q_{\mathrm{irr}}=-nRT_0(x-1).

Question 5. The reservoir receives −Qirr-Q_{\mathrm{irr}}, hence

ΔSth,irr=−QirrT0=nR(x−1).\Delta S_{\mathrm{th,irr}}=\frac{-Q_{\mathrm{irr}}}{T_0}=nR(x-1).

The entropy balance for the gas is

ΔSgas=QirrT0+Si,Si=−nRln⁡x+nR(x−1).\Delta S_{\mathrm{gas}}=\frac{Q_{\mathrm{irr}}}{T_0}+S_{\mathrm{i}}, \qquad S_{\mathrm{i}}=-nR\ln x+nR(x-1).

For the ideal reservoir, the entropy received is −Qirr/T0-Q_{\mathrm{irr}}/T_0, equal to its change: it produces no entropy. The combined gas—reservoir system receives no heat from any other body; the work received from outside carries no entropy. Its entropy increase is therefore produced internally:

Si=ΔSgas+ΔSth,irr=−nRln⁡x+nR(x−1).S_{\mathrm{i}}=\Delta S_{\mathrm{gas}}+\Delta S_{\mathrm{th,irr}} =-nR\ln x+nR(x-1).

Set f(x)=x−1−ln⁡xf(x)=x-1-\ln x. Then f(1)=0f(1)=0 and f′(x)=1−1/x=(x−1)/x>0f'(x)=1-1/x=(x-1)/x>0 for x>1x>1. The function increases from zero, so Si=nRf(x)>0S_{\mathrm{i}}=nRf(x)>0. Moreover,

Wirr−Wrev=nRT0(x−1)−nRT0ln⁡x=T0Si.W_{\mathrm{irr}}-W_{\mathrm{rev}} =nRT_0(x-1)-nRT_0\ln x=T_0 S_{\mathrm{i}}.

Since Q=−WQ=-W in both cases, the additional work is rejected as heat to the reservoir. This is the cost of irreversibility.