# How to obtain the expression for residual Gibbs energy?

The property involved is Gibbs free energy, the equations that I wrote are presented in my text book Introduction to chemical engineering thermodynamics by Smith and Van Ness, Chapter 6.

The thing is I don't get the meaning of the derivations made to arrive to the expression of residual Gibbs energy. My text book starts with the next identity

$$d(\frac {G}{RT}) \equiv \frac{1}{RT}dG-\frac{G}{RT^2}dT$$

Where does this expression comes from? Why does it exists in the first place? What does it mean?

Is it related to Ideal gases? By this I mean, is it somehow derived from the ideal gases framework?

Then my book makes use of this expression

$$d(\frac {G^R}{RT})_{P=0} \equiv J$$

What is J? Is it just a mathematical tool or does it have a physical meaning? My book doesn't mention any name for such constant.

I'm trying to understand these details to get a sense of how to obtain this final expression

$$\frac {G^R}{RT}= \int_{0}^{P} (Z-1)\frac{dP}{P}$$

Every step looks senseless to me, in a physical sense. I just see manipulations and expressions that work but not why they are chosen, they just pop into existence with no justification to be used out of all thermodynamic relations available. And also, what exactly does this integral mean? Why is $$P=0$$ chosen for ideal gases and no other value such as $$0.1$$ or $$0.0001$$ or even $$1$$?

Everyt capital letter here is written in a per mole basis, so I stick with your nomenclature. E.g., $$G$$ has units of $$\pu{J mol ^{-1}}$$, etc.

Where does this expression comes from? Why does it exists in the first place? What does it mean?

Lets put the function $$G/RT$$ as an exact differential. I see two variables, $$G$$ and $$T$$, so we have to differentiate with respect to $$G$$ and $$T$$ $$\mathrm{d}\left(\frac{G}{RT}\right) = \frac{1}{RT} \mathrm{d}G -\frac{G}{RT^2}\mathrm{d}T \tag{1}$$ In the first term $$T$$ was constant when we differentiated with respect to $$G$$, and in the second term $$G$$ was constant when we differentiated with respect to $$T$$. That's all.

Not every expression is thermodynamics is useful. However, this expression exists because we can eliminate the entropy in favor of enthalpy, and that's the reason. Remember that in its fundamental expression $$\mathrm{d}G = V\mathrm{d}p - S\mathrm{d}T$$, we have $$S$$ there.

We do this. We combine Eqn. (1) with $$G = H-TS$$ and also the fundamental equation $$\mathrm{d}G = V\mathrm{d}p - S\mathrm{d}T$$ \begin{align} \require{cancel} \mathrm{d}\left(\frac{G}{RT}\right) &= \frac{1}{RT} (V\mathrm{d}p - S\mathrm{d}T) -\frac{H - TS}{RT^2}\mathrm{d}T \\ \mathrm{d}\left(\frac{G}{RT}\right) &= \frac{V}{RT}\mathrm{d}p - \cancel{\frac{S}{RT}\mathrm{d}T} - \frac{H}{RT^2}\mathrm{d}T + \cancel{\frac{S}{RT}\mathrm{d}T} \\ \mathrm{d}\left(\frac{G}{RT}\right) &= \frac{V}{RT}\mathrm{d}p - \frac{H}{RT^2}\mathrm{d}T \tag{2} \end{align} and there you go. Eqn. (2) now is a function of enthalpy rather than entropy.

Is it related to Ideal gases? By this I mean, is it somehow derived from the ideal gases framework?

Eqn. (1) doesn't depend on the model, it is very general. It is valid as long as you are talking about a fluid of only one component.

Then my book makes use of this expression $$d(\frac {G^R}{RT})_{P=0} \equiv J$$

I will skip this question and come back after we derived the next one.

I'm trying to understand these details to get a sense of how to obtain this final expression $$\frac {G^R}{RT}= \int_{0}^{P} (Z-1)\frac{dP}{P}$$

We are going to do this: we restrict Eqn. (2) for a constant temperature process, so the guys with $$\mathrm{d}T$$ go away. Then, we write what is left for an ideal gas and also for a real gas \begin{align} \mathrm{d}\left(\frac{G^\mathrm{ig}}{RT}\right) &= \frac{V^\mathrm{ig}}{RT}\mathrm{d}p \tag{3} \\ \mathrm{d}\left(\frac{G}{RT}\right) &= \frac{V}{RT}\mathrm{d}p \tag{4} \end{align} and subtract Eqn. (4) from (3), where we will define the residual property for a general property $$X$$ as $$X^\mathrm{R} = X - X^\mathrm{ig}$$ \begin{align} \mathrm{d}\left(\frac{G}{RT}\right) - \mathrm{d}\left(\frac{G^\mathrm{ig}}{RT}\right) &= \frac{V}{RT}\mathrm{d}p - \frac{V^\mathrm{ig}}{RT}\mathrm{d}p \\ \mathrm{d}\left(\frac{G - G^\mathrm{ig}}{RT}\right) &= \frac{V - V^\mathrm{ig}}{RT}\mathrm{d}p \\ \mathrm{d}\left(\frac{G^\mathrm{R}}{RT}\right) &= \frac{V^\mathrm{R}}{RT}\mathrm{d}p \tag{5} \end{align} Now we would like the compressibility factor to pop up. For an ideal gas the molar volume is $$V = RT/p$$, and for a real gas $$V=ZRT/p$$, so that

$$V^\mathrm{R} = V - V^\mathrm{ig} = \frac{ZRT}{p} - \frac{RT}{p} = (Z-1)\frac{RT}{p} \tag{6}$$ Combining Eqns. (5) with (6) and integrating \begin{align} \require{cancel} \mathrm{d}\left(\frac{G^\mathrm{R}}{RT}\right) &= \dfrac{(Z-1)\dfrac{\cancel{RT}}{p}}{\cancel{RT}}\mathrm{d}p \\ \mathrm{d}\left(\frac{G^\mathrm{R}}{RT}\right) &= \dfrac{Z-1}{p}\mathrm{d}p \rightarrow \boxed{ \frac{G^\mathrm{R}}{RT}(p) = \frac{G^\mathrm{R}}{RT}(p \to 0) + \int_0^p \dfrac{Z-1}{p}\mathrm{d}p} \tag{7} \end{align}

There we have derived the expression. I will make the following points to your other questions:

• In chemical engineering we sometimes face real gases, so the approach to obtain more accurate values is the followinge. First we calculate all thermodynamic properties as gases behaved ideally, and then we correct them. This makes some derivations easier, hence why residual properties exist. For example, you know that for a constant temperature process, the change in Gibbs free energy when pressure changes is $$\begin{equation} \Delta G^\mathrm{ig} = RT\ln\frac{p_2}{p_1} \end{equation}$$ How can we correct this value for real gases? We write Eqn. (7) two times, one for $$p_1$$ and the other for $$p_2$$, and subtract them \begin{align} \frac{G^\mathrm{R}}{RT}(p_1) = \frac{G^\mathrm{R}}{RT}(p \to 0) &+ \int_0^{p_1} \dfrac{Z-1}{p}\mathrm{d}p \qquad \frac{G^\mathrm{R}}{RT}(p_2) = \frac{G^\mathrm{R}}{RT}(p \to 0) + \int_0^{p_2} \dfrac{Z-1}{p}\mathrm{d}p \\ \frac{G^\mathrm{R}}{RT}(p_2) - \frac{G^\mathrm{R}}{RT}(p_1) &= \int_0^{p_2} \dfrac{Z-1}{p}\mathrm{d}p - \int_0^{p_1} \dfrac{Z-1}{p}\mathrm{d}p \\ \frac{\Delta G^{R}}{RT} &= \int_{p_1}^{p_2} \dfrac{Z-1}{p}\mathrm{d}p \tag{9} \end{align}
• That $$J$$ that appears in book has to do with what happens with the quantity $$G^\mathrm{R}/RT$$ as the pressure goes to zero. Sometimes, we can state how a thermodynamic property will behave in some extreme limits. In this case, we don't know what happens to this quantity in general. It is said to be indertermined However, don't go so deep, because you will always be interested in changes of $$G$$. As you see in Eqn. (9), the constant is blown off, so we are happy. We could have chosen other lower limit of integration and things would have worked fine.
• If you want to have higher precision in your calculations, you need to integrate Eqn. (9). You can do this with measurements of $$pVT$$ data in the laboratory, or use an equation of state where $$Z$$ may be function of two variables.
• Until this moment I didn't noticed entropy just "disappeared" when applying the identity with $G/RT$, your answer cleared a lot of my doubts, thank you! Oct 27 at 5:34

Let's start with the first identity (line $$5$$). Maybe you are not familiar with differentials. Maybe you prefer reasoning with derivates. So transform your first differential expression, namely $$d(\frac{G}{RT})= ...$$ into a derivate with respect to any other variable, for example the time $$t$$. So $$G$$ and $$T$$ become $$G(t)$$ and $$T(t)$$ and you can calculate the derivate of $$\frac{G(t)}{RT(t)}$$ with respect to $$t$$. A simple application of calculus gives : $$\frac{d}{dt}(\frac{G(t)}{RT(t)}) = \frac{1}{RT(t)}\frac{dG(t)}{dt} - \frac{G(t)}{RT(t)^2} \frac{dT(t)}{dt}$$ Hopefully you understand this quite general formula, which has nothing to do with physical chemistry. If not, you should open your book about linear algebra. Now all you have to do is to multiply this expression by $$dt$$, suppress the parenthesis $$(t)$$ and the identity on line $$5$$ is obtained.

The second expression has nothing special. It is just a definition of the parameter $$J$$.

The third expression has no meaning for me, as I don't know what is $$Z$$, and I don't know why the pression $$P$$ is introduced here.