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:

and,

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:

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,

Hence, for a multi-component system, we just keep on adding terms ($n={\displaystyle \sum _{i}{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:

and finally,

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:

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:

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:

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

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:

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

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):

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:

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