# Free energy change in reversible/irreversible processes

Yet another follow up to this question,

I am struggling to understand the example provided in Chet Miller's answer:

An example of this is expansion of an ideal gas in contact with an ideal constant temperature reservoir at the initial temperature of the gas. The maximum work and decrease in F for a reversible path are $$W=-\Delta F=nRT\ln{(V_2/V_1)}$$The work for an irreversible path, say where we drop the pressure from the initial value $$nRT/V_1$$ to the final pressure $$nRT/V_2$$ and hold it at this final value for the entire expansion, the work is $$W=nRT\left[1-\frac{V_1}{V_2}\right]$$Mathematically, this is less than for the reversible path.

For a non-ideal gas, the internal energy can change even if the temperature is constant. It can also change at constant temperature if there is a phase change or a chemical reaction.

This example discusses the expansion of ideal gas (inside a balloon) in the environment of constant temperature $$T$$. The system (gas) is assumed to be in thermal equilibrium with the environment.

In particular, I have doubts about how the free energy of the gas changes in the reversible expansion and the irreversible expansion. The differential for the system's Helmholtz energy $$F$$ in terms of the total entropy of the universe $$S_{univ}=S+S_{env}$$ is

$$dF=-TdS_{univ}$$

This means if $$S_{univ}$$ does not change, then $$F$$ does not change as well. If we apply the thermodynamic identity for $$F$$ to this equation:

$$dF=-SdT-PdV+\sum_i\mu_i dN_i=-TdS_{univ}$$

We see that $$S_{univ}$$ and $$F$$ are constant when the system is in thermal equilibrium $$dT=0$$, mechanical equilibrium $$dV=0$$ and chemical equilibrium $$dN_i=0$$.

If the gas expansion is irreversible, there is nonzero entropy change $$\Delta S_{univ}>0$$ which makes nonzero Helmholtz energy decrease $$\Delta F<0$$. I have no problems understanding why the system does work on the environment in this case.

However, in the reversible gas expansion, the total entropy of the universe does not change $$\Delta S_{univ}=0$$, so this implies that the gas's Helmholtz energy does not change $$\Delta F=0$$, am I right? If so, why the gas is able to do nonzero expansion work on the environment as in the example?

• I am familiar with the second Helmholtz free energy differential relation, but not the first. Are you sure that one is accurate? Mar 16 at 2:13
• @PoissonAerohead I think so because Schroeder's Introduction to Thermal Physics derived this relation in section 5.2. Mar 16 at 4:35

You always have $$dF=-SdT-pdV+... =-SdT - \delta W$$ between two equilibrium states, where $$\delta W =pdV-..$$ is the work of the system, irrespective of whether the process between them is or is not reversible. If the system is coupled to an entropy reservoir of temperature $$T_0$$ and the process is reversible then $$T=T_0$$ throughout and $$dF=-\delta W$$.

But if the process is not reversible then $$dE=T_0dS^0 - \delta W^0=T_0dS - T_0\sigma - \delta W^0$$ where $$\sigma = dS-dS^0\ge 0$$ is the entropy generated inside the system at temperature $$T$$ while $$dS^0$$ is the entropy received from the reservoir and $$\delta W^0$$ is the work done on the environment.

With $$F=E-TS$$ we have $$dF=T_0dS - T_0\sigma - \delta W^0 -TdS-SdT$$ or $$dF=-SdT-\delta W^0 -T_0\sigma + (T_0-T)dS. \tag{1}\label{1}$$

For a reversible process $$\delta W = \delta W^0$$ and $$\sigma = 0$$, and if as usual you also set $$T=T_0$$ throughout then you get the standard $$dF=-SdT-\delta W$$. But if $$T\ne T_0$$ you need to employ a reversible Carnot engine between the reservoir and the system to deliver transport the entropy, this is the term $$(T_0-T)dS$$.

As you can see, if the process is isothermal throughout, $$T=T_0$$ then $$dF_{\text{isothermal}}=-\delta W^0 -T_0\sigma \tag{2}\label{2}$$ showing that the irreversibility reduces the available work on the environment by the amount of $$T_0\sigma$$ so that $$\delta W^0= dF_{\text{isothermal}}+T_0\sigma$$.

• Thank you for the answer. 1. if as usual you also set $T=T_0$ throughout then you get the standard $dF=-SdT-\delta W$ I don't think that $dF$ should include the $-SdT$ term since the temperature is constant? 2. *so that $\delta W^0= F_{\text{isothermal}}+T_0\sigma$* I think it is a typo. You forgot to add 'd' to $F_{\text{isothermal}}$. Mar 16 at 7:07
• I'm trying to figure out this equation $dF=-TdS_{univ}$ fits your equation... Mar 16 at 7:24
• Oh, I think $\sigma$ in your equations translates to $dS-dS_0=dS+dS_{env}=dS_{univ}$ in my notation. So this equation $dF=-TdS_{univ}$ is valid if the system does no work. Mar 16 at 7:50
• Thanks for catching the typo. And yes, if the system does no work then the free energy decreases by the dissipation, otherwise it decreases by the sum of the work done and the dissipation. Mar 16 at 7:53
• As I started, define $\delta W = pdV-\mu dn+......$ then $dF=-SdT-\delta W$ is always true, and for any isothermal process $dT=0$ and $dF=-\delta W$, but the $\delta W$ latter is not the work done on the environment $\delta W^0 = p^0 dV -\mu^0 dn$ unless the process is reversible. In an irreversible process $p$ is not the external pressure $p^0$, $\mu$ is not the external chemical potential $\mu^0$, etc. All these differences are buried in the dissipation $\delta W^0 -\delta W$ and simultaneous entropy generation. Mar 16 at 8:16