# Chemical potential and equilibrium condition

My question is about the $dG=0$ condition for the equilibrium in a system, say, solid + gas (water and ice, if you prefer).

Almost every textbook gives the following recipe to understand phase equilibrium.

First, from the laws of thermodynamics, it is stated that the transition from one state to another (in a one-component one-phase system) couldn't go more efficiently then $$\delta Q \leq TdS \tag{1}$$ Using $dU = -pdV + \delta Q$ we hence conclude $dU \leq -pdV + TdS$ or $$dU + pdV - TdS \leq 0 \tag{2}$$

Introducing Gibbs energy fucntion, $G=U+pV-TS$, we see that under constant temperature (T) and pressure (p) $$dG = dU + pdV - TdS \leq 0 \tag{3}$$ What this one states is the following: if $p$ and $T$ are kept constant then everything that could happen to the system will lead to the decrease of G. Otherwise, we're in the equilibrium and $G$ stays constant. So far, so good.

But then, in case of water+ice system, chemical potential terms are being added: $$dU = -pdV + TdS + \mu_w dN_w + \mu_i dN_i \tag{4}$$

If we follow the logic of (1) and (2), substituting the updated version of $dU$, i.e. (4), then the result we get is: $$dG - \mu_w dN_w - \mu_i dN_i \leq 0 \tag{5}$$ But in the textbook people somehow get $dG \leq 0$ instead and then using (4) and the definition of G $$dG = d(U+PV-TS) = dU + pdV + Vdp - TdS - SdT = \\ = Vdp - SdT + \mu_w dN_w + \mu_i dN_i \tag{6}$$ state that under constant $p$ and $T$ the following is true during the equilibrium: $$dG = \mu_w dN_w + \mu_i dN_i = 0 \tag{7}$$ while in my case it is (5).

What's wrong in my reasoning scheme?

• This question is more about physical chemistry or chemical engineering thermodynamics than about physics. – David White Aug 4 '18 at 23:33
• @DavidWhite - it seems to fit in just fine with my thermodynamics/statistical mechanics undergraduate class. It is physics... – Jon Custer Aug 5 '18 at 2:51
• For the OP, in (3) under what conditions is the left-hand-side less than ("<") vs equal to zero? Now, what conditions hold in melting/solidification at the melting point? – Jon Custer Aug 5 '18 at 2:53

For the water, $dG_w=\mu_wdN_w$ and for the ice $dG_i=\mu_idN_i$. So, for the combined system, $$dG=\mu_wdN_w+\mu_idN_i$$ But, $$dN_w=-dN_i$$So, $$dG=(\mu_w-\mu_i)dN_w$$And, for equilibrium dG=0, which requires $$\mu_w=\mu_i$$
Your Equations (2) and (3) are true only with the equality sign and are true irrespective of the process being reversible or irreversible if the parameters $p$ and $S$ refer to that of the system itself. It is always true that $\delta Q \le TdS$ and you can always write that both $$dU=\delta Q + \delta W$$ and also $$dU=TdS-pdV$$ from which you get $$-pdV \le \delta W$$ but you cannot infer from these your (2) or (3) except for a reversible process when the equality holds. Adding the chemical potential terms does not change this conclusion.