Published on *PNG 520: Phase Behavior of Natural Gas and Condensate Fluids* (https://www.e-education.psu.edu/png520)

Module Goal: To establish the mathematical framework for thermodynamics of phase equilibrium.

Module Objective: To establish that there is an unique relationship between partial molar quantities in any mixture.

We have just seen that the chemical potential is a thermodynamic property which is related to *all* thermodynamic properties with units of energy. Its most useful definition is given in terms of constant pressure and temperature:

$${\mu}_{i}={\left(\frac{\partial G}{\partial {n}_{i}}\right)}_{P,T,{n}_{i}\ne {n}_{1}}={\overline{G}}_{i}$$

This constitutes the working definition of chemical potential, the one that relates it to the partial molar quantity concept studied before.

Although the mathematical definition of chemical potential can be stated clearly, its “physical” meaning is not as easy to grasp. It is much easier to understand the physical implications of “pressure,” “temperature,” and “internal energy” than it is to undestand the physical interpretation of “chemical potential.” Given equation (15.24), and recognizing Gibbs free energy (G) as the capacity of a system to do work, we may write the following *formal* definition of chemical potential:

The **chemical potential** of a component in a given phase is the rate of increase of the capacity of the phase to do work per unit addition of the substance to the phase, at constant temperature and pressure.

We may also quote the definition that J.W. Gibbs provided for it:

If to any homogeneous mass, we suppose an infinitesimal quantity of any substance to be added, the mass remaining homogeneous and its entropy and volume remaining unchanged, the increase of energy of the mass divided by the quantity of the substance added is the potential for that substance in the mass considered.

This definition is closely related to the mathematical definition given in (15.20).

$${\mu}_{i}={\left(\frac{\partial U}{\partial {n}_{i}}\right)}_{S,V,{n}_{i}\ne {n}_{1}}$$

To understand the physical implications of the chemical potential of a species, we have to recall that for any thermodynamic process to be carried out, a driving force must be causing it. For instance, a pressure gradient is the driving force that causes the bulk movement of fluids from one point to the other, and a temperature gradient provides the potential difference needed for heat to flow. We also know that if we have a higher concentration of solute in a homogeneous system, it will diffuse to the zones of lower concentration. Here, the chemical potential is responsible for the diffusion of species within two points in space, or even its exchange between two different phases, without the presence of either pressure or temperature gradients. The *chemical potential* is the* potential* describing the ability of species to move from one phase to another.

Intuitively, the concept of equilibrium conveys the message that something “balances out.” Equilibrium describes a state of vanishing driving forces or gradients, where everything remains as it is. If a system is in equilibrium, it retains its current state because there are no driving forces causing anything to change.

If two materials have the same temperature, we say that they are in *thermal equilibrium*. No exchange of heat takes places because there are no thermal gradients. For instance, a liquid and a vapor phase are in *thermal *equilibrium when:

$${T}_{l}=Tv$$

We achieve *mechanical equilibrium* if two substances are found at the same pressure. No bulk movement of fluids takes place because there are no *pressure gradients*. A liquid and a vapor phase are in *mechanical* equilibrium when:

$${P}_{l}=Pv$$

For a thermodynamic system to be in equilibrium, all intensive (temperature, pressure) and extensive thermodynamic properties (U, G, A, H, S, etc) must be constants. Hence, the total change in any of those properties ($d\Im $ ) must be zero at equilibrium.

Now we would like to have a concept of thermodynamic equilibrium for a vapor-liquid equilibrium. Let us consider a closed, heterogeneous vapor-liquid system. Any changes in a total property of the system will be the result of the changes of that property in the liquid phase plus the changes of that property in the vapor phase.

$$d{\Im}^{\left(total\right)}=d{\Im}^{\left(liquid\right)}+d{\Im}^{\left(vapor\right)}$$

In this case, liquid and vapor by themselves are not closed systems; they can exchange matter between themselves but not with the surroundings. To elaborate more upon the concept of equilibrium, let’s look at equation (15.26c). Because it is written in terms of changes in pressure and temperature, two measurable laboratory quantities, it is the “friendliest” of all fundamental equations. We write it for both of the phases:

$$d{\Im}^{\left(liquid\right)}={\left(VdP-SdT\right)}^{l}+{\displaystyle \sum _{i}{\mu}_{i}^{l}d{n}_{i}^{l}}$$

$$d{G}^{\left(vapor\right)}={\left(VdP-SdT\right)}^{v}+{\displaystyle \sum _{i}{\mu}_{i}^{v}d{n}_{i}^{v}}$$

In (16.3), for $\Im =G$ , we get:

$$d{G}^{\left(total\right)}=d{G}^{\left(liquid\right)}+d{G}^{\left(vapor\right)}$$

Hence,

$$d{G}^{\left(total\right)}={\left(VdP-SdT\right)}^{l}+{\left(VdP-SdT\right)}^{v}+{\displaystyle \sum _{i}{\mu}_{i}^{l}}d{n}_{i}^{l}+{\displaystyle \sum _{i}{\mu}_{i}^{v}}d{n}_{i}^{v}$$

Since at equilibrium all extensive properties, such as G, must remain constant, dG^{(total)} must be zero. For this to hold true, and by inspection of equation (16.6), the conditions for thermodynamic equilibrium are:

$$dP=0\text{}\left[\text{Mechanicalequilibrium}\right]$$

E$$dT=0\text{}\left[\text{Thermalequilibrium}\right]$$

$$\sum _{i}{\mu}_{i}^{l}}d{n}_{i}^{l}+{\displaystyle \sum _{i}{\mu}_{i}^{v}}d{n}_{i}^{v}=0\text{}\left[{\mu}_{i}\text{criteriaforequilibrium}\right]$$

It can be also proven that, at equilibrium, the total free energy of the system (G^{(total)}) must take a minimum value; this reinforces the fact that dG^{(total)}=0 at equilibrium. The minimum Gibbs energy criterion for equilibrium is a restatement of the second law of thermodynamics, from which we know that the entropy of a system in equilibrium must be at its maximum, considering all of the possible states for equilibrium.

It is somehow reasonable that for a true equilibrium condition there should be neither pressure nor temperature gradients (equations 16.7 and 16.8). This is because equilibrium is, at the very least, a state of lack of gradients. But what is equation (16.9) trying to tell us? To demystify equation (16.9), we recall that we are dealing with a closed system, hence, the total amount of moles per species:

$${n}_{i}^{(total)}={n}_{i}^{(l)}+{n}_{i}^{(v)}$$

must be constant (we do not allow for chemical reactions within the system). Thus we write:

$$d{n}_{i}^{(total)}=d{n}_{i}^{(l)}+d{n}_{i}^{(v)}=0$$

Therefore,

$$d{n}_{i}^{(v)}=-d{n}_{i}^{(l)}$$

(16.12) into (16.11) yields:

$$\sum _{i}\left({\mu}_{i}^{(l)}-{\mu}_{i}^{(v)}\right)}d{n}_{i}^{(v)}=0$$

For equation (16.13) to hold true,

$${\mu}_{i}^{(l)}={\mu}_{i}^{(v)}{\text{foralli=1,2,...n}}_{c}$$

We have then arrived at the criteria for vapor-liquid equilibria for a system at constant pressure and temperature: *the chemical potential of every species must be the same in both phases.* We may generalize this finding to any number of phases, for which the chemical potential of every species must be the same in all phases. The chemical potential being the driving force which moves a species from one phase to the other, equation (16.14) is physically reasonable. If the chemical potential of a species in one phase is the same as that in the other, there is zero driving force and thus a zero net transfer of species at equilibrium.

We have seen that, for a closed system, the Gibbs energy is related to pressure and temperature as follows:

$$dG=VdP-SdT$$

For a constant temperature process,

$$dG=VdP\text{@constantT}$$

For an ideal gas,

$$dG=\frac{RT}{P}dP$$

$$dG=RTd\text{InP@constantT}$$

This expression by itself is strictly applicable to ideal gases. However, Lewis, in 1905, suggested extending the applicability of this expression to all substances by defining a new thermodynamic property called fugacity, f, such that:

$$dG=RTd\text{Inf@constantT}$$

This definition implies that for ideal gases, ‘f’ must be equal to ‘P’. For mixtures, this expression is written as:

$$d\overline{{G}_{i}}=RTd{\text{Inf}}_{i}\text{@constantT}$$

where $\overline{{G}_{i}}{\text{andf}}_{i}$ are the partial molar Gibbs energy and fugacity of the i-th component, respectively. Fugacity can be readily related to chemical potential because of the one-to-one relationship of Gibbs energy to chemical potential, which we have discussed previously. Therefore, the definition of fugacity in terms of chemical potential becomes:

For a pure substance,

$$d\text{In}f=\frac{d\mu}{RT}@\text{constantT}$$

$$\underset{P\to 0}{\mathrm{lim}}\text{}f=P\text{(idealgaslimit)}$$

For a component in a mixture,

$$d\text{In}{f}_{i}=\text{}\frac{d{\mu}_{i}}{RT}@\text{constantT}$$

$$\underset{P\to 0}{\mathrm{lim}}\text{}{f}_{i}={y}_{i}P\text{=partialpressure(idealgaslimit)}$$

The fugacity coefficient (${\varphi}_{i}$ ) is defined as the ratio of fugacity to its value at the ideal state. Hence, for pure substances:

$$\varphi =\frac{f}{P}$$

and for a component in a mixture,

$${\varphi}_{i}=\frac{{f}_{i}}{{y}_{i}P}$$

The fugacity coefficient takes a value of unity when the substance behaves like an ideal gas. Therefore, the fugacity coefficient is also regarded as a *measure of non-ideality*; the closer the value of the fugacity coefficient is to unity, the closer we are to the ideal state.

Fugacity turns out to be an auxiliary function to chemical potential. Even though the concept of thermodynamic equilibrium which we discussed in the previous section is given in terms of chemical potentials, above definitions allow us to restate the same principle in terms of fugacity. To do this, previous expressions can be integrated for the change of state from liquid to vapor at saturation conditions to obtain:

$$\underset{l}{\overset{v}{\int}}d\text{In}{f}_{i}=\frac{1}{RT}{\displaystyle \underset{l}{\overset{v}{\int}}d{\mu}_{i}}$$

$$\text{In}{f}_{i}^{(v)}-\text{In}{f}_{i}^{(v)}=\frac{1}{RT}\left({\mu}_{i}^{(v)}-{\mu}_{i}^{(l)}\right)$$

For equilibrium, ${\mu}_{i}^{(l)}={\mu}_{i}^{(v)}$ ,hence,

$$In\left(\frac{{f}_{i}^{(v)}}{{f}_{i}^{(l)}}\right)=0$$

Therefore:

$${f}_{i}^{(l)}={f}_{i}^{(v);\text{}i=1,\text{}2,\text{}...\text{}{n}_{c}}$$

For equilibrium, fugacities must be the same as well! This is, for a system to be in equilibrium, both the fugacity and the chemical potential of each component in each of the phases must be equal. Conditions (16.14) and (16.25) are equivalent. Once one of them is satisfied, the other is satisfied immediately. Using ${\mu}_{i}^{(l)}={\mu}_{i}^{(v)}\text{or}{f}_{i}^{(l)}={f}_{i}^{(v)}$ to describe equilibrium is a matter of choice, but generally the fugacity approach is preferred.

It is clear that, if we want to take advantage of the fugacity criteria to perform equilibrium calculations, we need to have a means of calculating it. Let us develop a general expression for fugacity calculations. Let us begin with the definition of fugacity in terms of chemical potential for a pure component shown in (16.21a):

$$d\mu =RTd\text{In}f\text{@constT}$$

The Maxwell’s Relationships presented in equation (15.27c) is written for a pure component system as:

$${\left(\frac{\partial \mu}{\partial P}\right)}_{r}=\overline{V}=\tilde{v}$$

Consequently,

$$d\mu =\tilde{v}dP\text{@constT}$$

Substituting (16.28) into (16.26),

$$RTd\text{In}f=\tilde{v}dP\text{@constT}$$

Introducing the concept of fugacity coefficient given in equation (16.23a),

$$\varphi =\frac{f}{P}$$

$$\text{ln}\varphi =\mathrm{ln}\text{f-ln}P$$

We end up with:

$$RTd\text{ln}\varphi \text{=}\tilde{v}dP-RTd\text{ln}P$$

or equivalently,

$$RTd\text{ln}\varphi \text{=}\tilde{v}dP-RT\frac{dP}{P}$$

Integrating expression (16.31b),

$$\underset{\mathrm{ln}{\varphi}^{m}}{\overset{\mathrm{ln}\varphi}{\int}}d\text{ln}\varphi ={\displaystyle \underset{{P}^{m}}{\overset{P}{\int}}\left\{\frac{\tilde{v}}{RT}-\frac{1}{P}\right\}}}dP$$

It is convenient to define the lower limit of integration as the ideal state, for which the values of fugacity coefficient, volume, and compressibility factor are known.

At the ideal state, in the limit $P->0$ ,

$${\varphi}^{*}->1\therefore \mathrm{ln}{\varphi}^{*}->0$$

Substituting into (16.32),

E$$\mathrm{ln}\text{}\varphi ={\displaystyle \underset{0}{\overset{P}{\int}}\left\{\frac{\tilde{v}}{RT}-\frac{1}{P}\right\}dP}$$

Equation (16.34) is the expression of fugacity coefficient as a function of pressure, temperature, and volume. Notice that this expression can be readily rewritten in terms of compressibility factor:

$$\mathrm{ln}\text{}\varphi ={\displaystyle \underset{0}{\overset{P}{\int}}(\frac{\frac{P\tilde{v}}{RT}-1}{P}})dP={\displaystyle \underset{0}{\overset{P}{\int}}\left\{\frac{Z-1}{P}\right\}}dP$$

Let us also derive the expression for the fugacity coefficient for a component in a multicomponent mixture. Following a pattern similar to that which we have presented, beginning with the definition of fugacity for a component in terms of chemical potential:

$$d{\mu}_{i}=RTd\text{ln}{f}_{i}@const\text{T}$$

This time, it is more convenient to use the Maxwell’s Relationships presented in equation (15.27d):

$${\left(\frac{\partial {\mu}_{i}}{\partial V}\right)}_{T,n}=-{\left(\frac{\partial P}{\partial {n}_{i}}\right)}_{T,V,{n}_{i\ne 1}}$$

After you introduce the definitions of fugacity coefficient and compressibility factor:

$${\varphi}_{i}=\frac{{f}_{i}}{{y}_{i}P}$$

$$P=\frac{ZnRT}{V}$$

and recalling that our lower limit of integration is the ideal state, for which, at the limit $P->0$ :

$${V}^{*}->\infty $$

$$\varphi {i}^{*}->1\text{andhenceln}\varphi {\text{i}}^{*}-0$$

$${z}^{*}->1\text{andhence}\mathrm{ln}{Z}^{*}-0$$

it can be proven that:

$$\mathrm{ln}\text{}{\varphi}_{i}=\frac{1}{RT}{\displaystyle \underset{\infty}{\overset{v}{\int}}\left\{\frac{RT}{V}-{\left(\frac{\partial P}{\partial {n}_{i}}\right)}_{T,V,{n}_{i\ne 1}}\right\}dV-\mathrm{ln}Z}$$

The multi-component mixture counterpart of equation (16.35) becomes:

$$\mathrm{ln}\text{}{\varphi}_{i}={\displaystyle \underset{0}{\overset{P}{\int}}\left\{{\overline{Z}}_{i}-1\right\}\frac{dP}{P}}$$

where:

$${\overline{Z}}_{i}={\left(\frac{\partial Z}{\partial {n}_{i}}\right)}_{P,T,{n}_{i\ne 1}}=\frac{P}{RT}{\left(\frac{\partial V}{\partial {n}_{i}}\right)}_{P,T,{n}_{i\ne 1}}=\frac{P\overline{{V}_{i}}}{RT}$$

Equations (16.34), (16.35), (16.40), and (16.41) are very important for us. Basically, they show that fugacity, or the fugacity coefficient, is a function of pressure, temperature and volume:

$$f=f(P,V,T)$$

This tells us that if we are able to come up with a PVT relationship for the volumetric behavior of a substance, we can calculate its fugacity by solving such expressions. It is becoming clear why we have studied equations of state — they are just what we need right now: PVT relationships for various substances. Once we have chosen the equation of state that we want to work with, we can calculate the fugacity of each component in the mixture by applying the above expression. Now that we know how to calculate fugacity, we are ready to apply the criteria for equilibrium that we just studied! That is the goal of the next module.

Expressions (16.34) and (16.40) are particularly suitable for the calculation of fugacity with P-explicit equations of state, which cubic equations of state are. One can take every cubic EOS we have presented and proceed with the integration, coming up with the expression for fugacity for that particular equation of state. We will spare the reader these derivations. The fugacity expressions for the cubic EOS of most interest to us (SRK and PR EOS) are presented below:

$$ln\text{}\varphi =Z-1-\mathrm{ln}(Z-B)-\frac{A}{B}\mathrm{ln}\left(1+\frac{B}{Z}\right)$$

$$ln\text{}{\varphi}_{i}={(BB)}_{i}(Z-1)-\mathrm{ln}(Z-B)-\frac{A}{B}{({(AA)}_{i}-BB)}_{i})\mathrm{ln}\left[1+\frac{B}{Z}\right]$$

$$ln\text{}\varphi =Z-1-\mathrm{ln}(Z-B)-\frac{A}{2\sqrt{2}B}\mathrm{ln}\frac{Z+(1+\sqrt{2})B}{Z+(1-\sqrt{2})B}$$

$$ln\text{}{\varphi}_{i}={(BB)}_{i}(Z-1)-\mathrm{ln}(Z-B)-\frac{A}{2\sqrt{2}B}({(AA)}_{i}-{(BB)}_{i})\mathrm{ln}\left[\frac{Z+(\sqrt{2}+1)B}{Z-(\sqrt{2}-1)B}\right]$$

The expressions for $A\text{,}B\text{,}{b}_{i},\text{}{b}_{m},\text{(a}\alpha {\text{)}}_{m},\text{(a}\alpha {\text{)}}_{ij}$
are the same as given before in the previous modules. (AA)_{i} and (BB)_{i} are calculated as:

$${(AA)}_{i}=\frac{2}{{(a\alpha )}_{m}}\left[{\displaystyle \sum _{j}^{{n}_{c}}{(a\alpha )}_{ij}}\right]$$

$${(BB)}_{i}=\frac{{b}_{i}}{{b}_{m}}$$

A and B parameters and the Z-factor of each phase are needed in order to calculate the corresponding fugacity coefficients. Now that we know how to calculate fugacity via EOS, and how this concept can be applied for equilibrium calculations (Section 16.2), we are ready to resume our discussion on Vapor-Liquid Equilibrium as we left it in Module 13. In our next module, we will concentrate on Vapor-Liquid Equilibrium via EOS.

Answer the following problem, and submit your answer to the drop box in Canvas that has been created for this module.

*Please note:*

- Your answer must be submitted in the form of a Microsoft Word document.
- Include your Penn State Access Account user ID in the name of your file (for example, "module2_abc123.doc").
- The due date for this assignment will be sent to the class by e-mail in Canvas.
- Your grade for the assignment will appear in the drop box approximately one week after the due date.
- You can access the drop box for this module in Canvas by clicking on the Lessons tab, and then locating the drop box on the list that appears.

- Provide a short lay person definition of Chemical Potential and Fugacity. Explain how these variables can be used to describe phase equilibrium.