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

To establish the mathematical framework for thermodynamics of phase equilibrium.

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

Any function f(x) that possesses the characteristic mapping:

$$\begin{array}{l}x\to \lambda x\\ f(x)\to \lambda f(x)\end{array}$$

is said to be *homogeneous,* with respect to x, to degree 1. By the same token, if f(x) obeys the mapping:

$$\begin{array}{l}x\to \lambda x\\ f(x)\to {\lambda}^{k}f(x)\end{array}$$

then f(x) is homogeneous to degree “k”. In general, a multivariable function f(x_{1},x_{2},x_{3},…) is said to be homogeneous of degree “k” in variables x_{i}(i=1,2,3,…) if for any value of $\lambda $ ,

$$f(\lambda {x}_{1},\lambda {x}_{2},...)={\lambda}^{k}f({x}_{1},{x}_{2},...)$$

For example, let us consider the function:

$$f(x,y)=\frac{x}{{x}^{2}+{y}^{2}}$$

How do we find out if this particular function is homogeneous, and if it is, to what degree? We evaluate this function at $x=\lambda x\text{}and\text{}y=\text{}\lambda y$ to obtain:

$$f(\lambda x,\lambda y)=\frac{\lambda x}{{\lambda}^{2}{x}^{2}+{\lambda}^{2}{y}^{2}}={\lambda}^{-1}\frac{x}{{x}^{2}+{y}^{2}}{\lambda}^{-1}f(x,y)$$

hence, the function f(x,y) in (15.4) is homogeneous to degree -1.

In regard to thermodynamics, extensive variables are homogeneous with degree “1” with respect to the number of moles of each component. They are, in fact, proportional to the mass of the system to the power of one (k=1 in equation 15.2 or 15.3). This is, if we triple the amount of mass in the system, the value of any given extensive property will be tripled as well. Notice that this is not the case for intensive properties of the system (such as temperature or pressure), simply because they are independent of mass. Hence, intensive thermodynamic properties are homogeneous functions with degree “0” — in such a case, k=0 in equation (15.2) or (15.3).

From the previous section, it is clear that we are not only interested in looking at thermodynamic functions alone, but that it is also very important to compute how thermodynamic functions change and how that change is mathematically related to their partial derivatives $\frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\text{and}\frac{\partial f}{\partial z}$. Hence, to complete the discussion on homogeneous functions, it is useful to study the mathematical theorem that establishes a relationship between a homogeneous function and its partial derivatives. This is *Euler’s theorem.*

Euler’s theorem states that if a function f(a_{i}, i = 1,2,…) is homogeneous to degree “k”, then such a function can be written in terms of its partial derivatives, as follows:

$$k{\lambda}^{k-1}f({a}_{i})={\displaystyle \sum _{i}^{}{a}_{i}}{\left(\frac{\partial f({a}_{i})}{\partial (\lambda {a}_{i})}\right)|}_{\lambda x}$$

Since (15.6a) is true for all values of $\lambda $ , it must be true for $\lambda -1$ . In this case, (15.6a) takes a special form:

$$kf({a}_{i})={\displaystyle \sum _{i}^{}{a}_{i}}{\left(\frac{\partial f({a}_{i})}{\partial ({a}_{i})}\right)|}_{x}$$

So far, so good. But…what is the application of all this? Well, first of all, we have to know something more about extensive thermodynamic properties. A very neat thing about them is that they can be written as a function of a sufficient number of independent variables to completely define the thermodynamic state of the system. Such a set is said to be a *complete* set. As it turns out, any thermodynamic system is completely defined when both the masses of all the substances within it are defined and two additional independent variables are fixed. This is *Duhem’s theorem*. From a real-life perspective, it is natural to choose pressure and temperature as those “independent variables” — physical quantities that we have a “feel” for and we think we can control — rather than specific volume or entropy. As we will see later, they are also convenient variables of choice because they are homogeneous of degree zero in mass.

Let “$\Im $ ” be a given extensive property of a multi-component system. From the previous section, we know that the value of “$\Im $ ” must be fixed and uniquely determined once we fix the pressure, temperature, and number of moles of each component in the system. This is,

$$\Im =\Im (P,T,{n}_{1},{n}_{2},...,{n}_{N})$$

Additionally, we recall that extensive properties are homogeneous of degree one *with respect to number of moles* and homogeneous of degree zero with respect to pressure and temperature. Thus, expression (15.6b) is readily applicable:

$$\Im ={\displaystyle \sum _{i}{n}_{i}}{\left(\frac{\partial \Im}{\partial {n}_{i}}\right)}_{P,T,{n}_{i=1}}={\displaystyle \sum _{i}{n}_{i}{\Im}_{i}}$$

where we have just defined:

$${\Im}_{i}{\left(\frac{\partial \Im}{\partial {n}_{i}}\right)}_{P,T,{n}_{i=1}}$$

Equation (15.7c) is a very important definition. It defines the concept of a *partial molar quantity*. A partial molar quantity $\overline{{\Im}_{i}}$ represents the change in the total quantity ($\Im $ ) due to the addition of an infinitesimal amount of species “i” to the system *at constant pressure and temperature*. Euler’s theorem gave birth to the concept of *partial molar quantity* and provides the functional link between it (calculated for each component) and the total quantity. The selection of *pressure and temperature* in (15.7c) was not trivial. First, they are convenient variables to work with because we can measure them in the lab. But most important, they are* intensive variables*, homogeneous functions of degree zero in number of moles (and mass). This allowed us to use Euler’s theorem and jump to (15.7b), where only a summation with respect to number of moles survived. The definition of the partial molar quantity followed.

The conventional notation we are going to follow throughout the following section is:

$\Im $ = Total quantity (e.g., total volume, total internal energy, etc),

$\tilde{\Im}$ = Molar quantity, i.e., total quantity per unit mole:

$$\tilde{\Im}=\frac{\Im}{n}(\text{foramixture,}n={\displaystyle \sum _{i}{n}_{i}})$$

$\overline{\Im}$ = Partial molar quantity,

$\widehat{\Im}$ = Mass or specific quantity, i.e., total quantity per unit mass:

$$\widehat{\Im}=\frac{\Im}{m}(\text{foramixture,}m={\displaystyle \sum _{i}{m}_{i}})$$

We can rewrite equation (15.7b) in terms of molar quantity using the definition in (15.8a),

$$\tilde{\Im}=\frac{1}{n}{\displaystyle \sum _{i}{n}_{i}}{\overline{\Im}}_{i}={\displaystyle \sum _{i}{x}_{i}}{\overline{\Im}}_{i}$$

where:

${x}_{i}={\text{molarfractionofspecies"i"=n}}_{i}/n$

Any molar quantity in thermodynamics can be written in terms of the partial molar quantity of its constituents. If we set $\Im =G$ , we end up with,

$$\tilde{G}={\displaystyle \sum _{i}{x}_{i}}{\overline{G}}_{i}$$

Equivalently, if we set $\Im =V$ (total volume),

$$\tilde{v}={\displaystyle \sum _{i}{x}_{i}}{\overline{v}}_{i}$$

Notice that for single component systems (x_{i}=1), *partial molar properties are just equal to the molar property*:

E$$\tilde{G}={\overline{G}}_{i}{\text{(ifx}}_{i}=1,i=1)$$

$$\tilde{v}={v}_{i}{\text{(ifx}}_{i}=1,i=1)$$

This is also a consequence of the definition in (15.7c),

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

For a pure component, $n={n}_{i}\text{,i=1,}\Im \text{=n}\tilde{\Im}$ and:

$$\overline{\Im}={\left(\frac{\partial n\tilde{\Im}}{\partial n}\right)}_{PI}=\tilde{\Im}$$

The reason for the introduction of the concept of a *partial molar quantity* is that often times we deal with mixtures rather than pure-component systems. The way to characterize the state of the mixtures is via partial molar properties. This concept provides the bridge between the thermodynamics of systems of constant composition, which we have studied so far, and the thermodynamics of systems of variable composition, which we will deal with in the next section. Basically, the definition in (15.7c):

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

allows us to quantify how the total, extensive property $\Im $
changes with additions of n_{i} at constant pressure and temperature. If you look at (15.7b) and (15.9), you will also realize that (15.7c) is just an *allocation formula* that allows assigning to each species “i” a share of the total mixture property, such that:

$$\Im ={\displaystyle \sum _{i}{n}_{i}{\overline{\Im}}_{i}}$$

$$\tilde{\Im}={\displaystyle \sum _{i}{x}_{i}{\overline{\Im}}_{i}}$$

We can play with “$\Im $
” a little more. Let us say that we are now interested in looking at the differential *changes* of $\Im $. Since we also know that $\Im $ is a state function, and given the functional relationship in (15.7a), the total differential for $\Im $ is written:

$$d\Im ={\left(\frac{\partial \Im}{\partial P}\right)}_{T{n}_{i}}dP+{\left(\frac{\partial \Im}{\partial T}\right)}_{P,{n}_{i}}dT+{\displaystyle \sum _{i}{\left(\frac{\partial \Im}{\partial {n}_{i}}\right)}_{P,T,n=1}d{n}_{i}}$$

or

$$d\Im ={\left(\frac{\partial \Im}{\partial P}\right)}_{T{n}_{i}}dP+{\left(\frac{\partial \Im}{\partial T}\right)}_{P,{n}_{i}}dT+{\displaystyle \sum _{i}{\overline{\Im}}_{i}}d{n}_{i}$$

Basically, equations (15.13) tell us that any change in P, T, or n_{i} will cause a corresponding change in the total property, $\Im $
. This is a reinforcement of what is explicitly declared in (15.7a). If we recall (15.7b), an alternate expression for the total differential in (15.13) is written:

$$d\Im =d\left({\displaystyle \sum _{i}{n}_{i}{\overline{\Im}}_{i}}\right)={\displaystyle \sum _{i}{\overline{\Im}}_{i}}d{n}_{i}+{\displaystyle \sum _{i}{n}_{i}d{\overline{\Im}}_{i}}$$

If we subtract (15.14) from (15.13b), we get:

$$d\Im -d\Im ={\left(\frac{\partial \Im}{\partial P}\right)}_{T,{n}_{i}}dP+{\left(\frac{\partial \Im}{\partial T}\right)}_{P,{n}_{i}}dT+{\displaystyle \sum _{i}{\overline{\Im}}_{i}d{n}_{i}-}{\displaystyle \sum _{i}{\overline{\Im}}_{i}d{n}_{i}-{\displaystyle \sum _{i}{n}_{i}d{\overline{\Im}}_{i}}}$$

Therefore,

$${\left(\frac{\partial \Im}{\partial P}\right)}_{T,{n}_{i}}dP+{\left(\frac{\partial \Im}{\partial T}\right)}_{P,{n}_{i}}dT-{\displaystyle \sum _{i}{n}_{i}d{\overline{\Im}}_{i}}=0$$

Equation (15.16) is the well-known Gibbs-Duhem equation. It can be applied to any extensive thermodynamic property: U, S, H, G, A, and it must hold true. It represents a thermodynamic constraint between the intensive variables P, T and $\tilde{\Im}$ . Pressure, temperature and partial molar properties cannot vary in just any fashion; any change taking place among them must satisfy (15.16). The change in any one of them can be calculated as a function of the change in the other two by means of the Gibbs-Duhem equation. This equation is the basis for thermodynamic consistency checks of experimental data.

To extend all of the previous concepts to systems of variable mass, we must now consider at least one new variable: *number of moles, n*. To account for this effect, you will see below that we will have to introduce a “*new”* thermodynamic property. Let us take the case of the internal energy. For a constant composition system, we wrote:

$$dU=TdS-PdV$$

and,

$$dU={\left(\frac{\partial U}{\partial S}\right)}_{V}dS+{\left(\frac{\partial U}{\partial V}\right)}_{S}dV$$

If this system has a single component, and now we allow its mass (and hence, number of moles, n) to change (an open system), the change in U (dU) is no longer just a function of dS and dV. We now have to account for changes in ‘n’, thus:

$$dU={\left(\frac{\partial U}{\partial S}\right)}_{V,n}dS+{\left(\frac{\partial U}{\partial V}\right)}_{S,n}dV+{\left(\frac{\partial U}{\partial n}\right)}_{S,V}dn$$

If we had a binary system, we would have two new variables, ‘n_{1}’ and ‘n_{2}’ (n=n_{1}+n_{2}) and we would have to expand (15.17) accordingly,

$$dU={\left(\frac{\partial U}{\partial S}\right)}_{V,n}dS+{\left(\frac{\partial U}{\partial V}\right)}_{S,n}dV+{\left(\frac{\partial U}{\partial {n}_{1}}\right)}_{S,V,{n}_{2}}d{n}_{1}+{\left(\frac{\partial U}{\partial {n}_{2}}\right)}_{S,V,{n}_{1}}d{n}_{2}$$

Hence, for a multi-component system, we just keep on adding terms ($n={\displaystyle \sum _{i}{n}_{i}}$ ):

$$dU={\left(\frac{dU}{dS}\right)}_{V,n}dS+{\left(\frac{dU}{dV}\right)}_{S,n}dV+{\displaystyle \sum _{i}{\left(\frac{\partial \Im}{\partial {n}_{i}}\right)}_{S,V,{n}_{i}\ne {n}_{1}}}d{n}_{i}$$

Thermodynamics defines this ‘coefficient’ which multiplies the change in the number of moles of each component (dn_{i}) as the ‘*chemical potential’* of that component(μ_{i}). See how the chemical potential is a thermodynamic property that must be defined for the proper description of a system of *variable composition* — that is, an open system.

Then, we write:

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

and finally,

$$dU=TdS-PdV+{\displaystyle \sum _{i}{\mu}_{i}}d{n}_{i}$$

The same can be done with the thermodynamic definitions for dH, dG, and dA (the rest of equations 14.22). In fact, the chemical potential may be defined in at least four different and equivalent ways. You can now show that for equations (14.22) to account for systems of variable composition, we would have to expand them into:

$$dH={\left(\frac{\partial H}{\partial S}\right)}_{P,n}dS={\left(\frac{\partial H}{\partial P}\right)}_{S,n}dP+{{\displaystyle \sum _{i}\left(\frac{\partial H}{\partial {n}_{i}}\right)}}_{S,P,n}{}_{{}_{i}\ne {n}_{1}}d{n}_{i}$$

$$dG={\left(\frac{\partial G}{\partial P}\right)}_{T,n}dP={\left(\frac{\partial G}{\partial T}\right)}_{P,n}dT+{{\displaystyle \sum _{i}\left(\frac{\partial G}{\partial {n}_{i}}\right)}}_{P,T,n}{}_{{}_{i}\ne {n}_{1}}d{n}_{i}$$

$$dA={\left(\frac{\partial A}{\partial V}\right)}_{T,n}dS={\left(\frac{\partial A}{\partial T}\right)}_{V,n}dT+{{\displaystyle \sum _{i}\left(\frac{\partial A}{\partial {n}_{i}}\right)}}_{T,V,n}{}_{{}_{i}\ne {n}_{1}}d{n}_{i}$$

Because thermodynamics defines the ‘coefficient’ which multiplies the change in the number of moles of each component (dn_{i}) as the ‘*chemical potential’* of that component(${\mu}_{i}$
), we have three new ways to express it:

$${\mu}_{i}={\left(\frac{\partial H}{\partial {n}_{i}}\right)}_{S,P,n}{}_{{}_{i}\ne {n}_{j}}$$

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

$${\mu}_{i}={\left(\frac{\partial A}{\partial {n}_{i}}\right)}_{T,V,n}{}_{{}_{i}\ne {n}_{j}}$$

Don’t any of these three equations ring a bell? Don’t forgot the definition of (15.7c). Of all the four available definitions for chemical potential, there is __one__ that suits our definition of a *partial molar quantity *perfectly. Compare equation (15.23b) to (15.7c). What we can say is that the chemical potential of a component “i” is equal to the partial molar Gibbs energy of such component:

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

Notice that, for a pure component, the chemical potential is equal to the molar Gibbs energy of the substance (see equation 15.9),

E$$\mu =\tilde{G}$$

When we introduce the definition of chemical potential into each of equations (15.22), the fundamental thermodynamic expressions that apply to systems of variable composition become:

$$dU=TdS-PdV+{\displaystyle \sum _{i}{\mu}_{i}}d{n}_{i}$$

$$dH=TdS+VdP+{\displaystyle \sum _{i}{\mu}_{i}}d{n}_{i}$$

$$dG=VdP-SdT+{\displaystyle \sum _{i}{\mu}_{i}}d{n}_{i}$$

$$dA=-PdV-SdT+{\displaystyle \sum _{i}{\mu}_{i}}d{n}_{i}$$

It is clear that equations (14.23) still hold — evaluated at constant “n” (total number of moles) — as shown:

$$T={\left(\frac{\partial U}{\partial S}\right)}_{V,n}P=-{\left(\frac{\partial U}{\partial V}\right)}_{S,n}$$

$$T={\left(\frac{\partial H}{\partial S}\right)}_{P,n}V={\left(\frac{\partial H}{\partial P}\right)}_{S,n}$$

$$V={\left(\frac{\partial G}{\partial P}\right)}_{T,n}S=-{\left(\frac{\partial G}{\partial T}\right)}_{P,n}$$

$$P=-{\left(\frac{\partial A}{\partial V}\right)}_{T,n}S=-{\left(\frac{\partial A}{\partial T}\right)}_{V,n}$$

The same reasoning applies to Maxwell’s relationships. From the above expressions, equation (15.22b) is the only one that matches equation (15.13). Notice that the following additional identities can be also identified (see equations 14.20):

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

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

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

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

We can see that chemical potential can be calculated by solving any of these differential expressions. To do this, experimental information is needed on how the other properties (T, V, S, P) change with additions of the given species (n_{i}) under certain restraining conditions.

In some instances, we may have an *open system* of *constant* composition. This is the case of a system of a pure component exchanging mass with its surroundings. For such a system, n_{c} = 1 and equations (15.26) are written as:

$$dU=TdS-PdV+\mu dn$$

$$dH=TdS+VdP+\mu dn$$

$$dG=VdP-SdT+\mu dn$$

$$dA=-PdV-SdT+\mu dn$$

Equations (14.23) and (15.27) will still hold with ${n}_{i}=n,\text{}{\mu}_{i}=\mu $ .

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

*Please note:*

- Your answers 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.

- For a design project involving a binary C
_{1}/C_{2}system, an engineer needs to know the partial molar volumes of C_{1}and C_{2}at the same conditions. Due to budget constraints, he was able to measure only one of them. Speculate on how to go about obtaining the second one.