Isn't the change in Gibbs free energy for a reversible process zero?

In problem 6, part 6.5 of the 2020 IChO ([PDF](https://icho2020.tubitak.gov.tr/storage/IChO%202020%20Problems/IChO%202020%20Problems%20&%20Solutions.pdf#page=53)), a thermodynamic cycle is given for “*one mole of monoatomic perfect gas*”:



> 
> * $\mathrm{A \to B}$; isothermal reversible expansion receiving $\pu{250 J}$ by heat transfer $(q\_H)$ at a temperature of $\pu{1000 K}$ $(T\_H)$ from a hot source.
> * $\mathrm{B \to D}$; reversible adiabatic expansion.
> * $\mathrm{D \to C}$; isothermal reversible compression at a temperature of $\pu{300 K}$ $(T\_C)$ releasing some amount of heat $(q\_C)$ to a cold sink.
> * $\mathrm{C \to A}$; reversible adiabatic compression.
> 
> 
> [![pressure vs volume graphical representation of thermodynamic cycle](https://i.stack.imgur.com/8TYC4.png)](https://i.stack.imgur.com/8TYC4.png)
> 
> 
> 6.5 Calculate the entropy change $(\Delta S)$ for $\mathrm{A \to B}$ and $\mathrm{D \to C}$ processes in the heat engine in terms of $\pu{J K^-1}.$
> 
> 
> 


To my understanding, the answer should be $\pu{0 J}$ for both steps since $\Delta G = 0$ for any reversible process, which $\mathrm{A \to B}$ and $\mathrm{D \to C}$ are. But the solution below gives non-zero values of $\Delta G.$ $ΔS$ for both steps was calculated in previous parts, $\pu{+0.25 J}$ for $\mathrm{A \to B},$ $\pu{-0.25 J}$ for $\mathrm{D \to C}.$ What is wrong with my reasoning here?


$$\Delta G = \Delta H - T\,\Delta S,\tag{1}$$


but $\Delta H = 0$ for an isothermal process, so


$$\Delta G = - T\,\Delta S.\tag{2}$$


$$
\begin{align}
\Delta G\_\mathrm{A \to B} &= \pu{-0.25 J K^-1}\times\pu{1000 K} = \pu{-250 J}\tag{3}\\ 
\Delta G\_\mathrm{D \to C} &= \pu{0.25 J K^-1}\times\pu{300 K} = \pu{75 J}\tag{4}
\end{align}
$$




The cycle shown is a classic reversible Carnot cycle. An intuitive reason for the change in Gibbs free energy not being equal to zero for such a step is that *the pressure is not constant*: the internal and external pressure are throughout in equilibrium, but since $p\_\mathrm{ext} = p = nRT/V = \mathrm{constant}/V$, $p$ is not constant. A condition for applying $\Delta G$ as a criterion of spontaneity (reversibility) is that the pressure is constant.




---


In fact you can show (by extension of the calculations show below) that the free energy change is equal to the expansion or compression work done in that step: $$\Delta G\_\mathrm{isothermal} = w$$ as follows.


Computing the entropy changes for the isothermal steps from the heats is straightforward using the first law of thermodynamics, since


* for an ideal gas undergoing an isothermal expansion or compression $\Delta U=0$ so that $w=-q$
* for a reversible isothermal process $q=T \Delta S$


such that we can compute


* for the first step, $\Delta S = \frac{\pu{250 J}}{\pu{1000 K}} = \pu{0.250 J K-1}$


For the second isothermal step ($D\rightarrow C$) we use the fact that the total entropy change for the system, given that it is a cyclic process, is $\Delta S = 0$, therefore


* for the second isothermal step, $\Delta S\_\mathrm{DC} = - \Delta S\_\mathrm{AB} = \pu{-0.250 J K-1}$


Regarding now the free energy computation, you would use (sure enough)
$$\Delta G\_\mathrm{isothermal} = \Delta H\_\mathrm{isothermal} - T \Delta S\_\mathrm{isothermal} = - T \Delta S\_\mathrm{isothermal}=-q=w$$


since $\Delta H\_\mathrm{isothermal}=0$ for such a process.


 10