# When to include chemical potential in Gibbs equations?

I'm struggling to understand when to and when not to include the chemical potential in the differential forms of the thermodynamic potentials. In principle I would assume that any system wherein the number of particles or the composition is changing should include the term - however I have run into two issues.

1. Whilst studying thermochemistry, my lecturer was quick to bring up some old results from thermodynamics, that the heat of an isobaric process corresponds to the enthalpy change and the heat of an isochoric process corresponds to the internal energy change.

A quick 'derivation' shows this : $$dH=TdS+VdP$$ which at constant pressure becomes $$dH=TdS=q_P$$ however, had we included the chemical potential we would have obtained $$dH=TdS+\sum_i\mu_idn_i=q_P+\sum_i\mu_idn_i$$Thus when interpreting $$\Delta H$$ as heat of reaction under constant pressure, are we not ignoring the effects of composition on H?

1. Earlier, when chemical potential was first being introduced in my Pchem class - a derivation of the condition of spontaneity for transport between phases was put forward:$$dG=-SdT+VdP+\sum_i\sum_j\mu_i^jdn_i^j$$ and from the second law we know that for an irreversible process $$dG<-SdT+VdP$$, thus: $$\sum_i\sum_j\mu_i^jdn_i^j<0$$ However, I would argue that this formulation of the second law is not accurately accounting for chemical potential. Consider the more general $$TdS\geqq dq$$, and the first law $$dU=dq+dw$$, one obtains that $$dG\leqq VdP-SdT+w_{non-PV}$$ which to reproduce the first equation in the case of a reversible proces, I would identify that $$w_{non-PV}=\sum_i\sum_j\mu_i^jdn_i^j \rightarrow dG\leqq -SdT+VdP+\sum_i\sum_j\mu_i^jdn_i^j$$ Of course with this result you can no longer figure out the condition of spontaneity this way as you simply get $$0<0$$. Furthermore wouldn't the lecturer's original derivation technically be applying both a relation that holds specifically for reversible processes and one for irreversible processes together? When it came to entropy as a condition for spontaneity in isolated systems - we knew that only reversible or irreversible pathways existed between two states but not both, preventing such potential contradictions. Though I'm uncertain if a similar interpretation can be made for the formulation in terms of Gibbs energy.

Am I merely confusing myself with the interpretation of chemical potential as a form of non-PV work?

1. You are assuming $$T\text{d}S =\delta Q$$, which is only true if the process is internally reversible; in fact, the other expression, $$\delta Q_P = \text{d}H_P$$, is the general one, as it can be derived directly from the first law for an isobaric process with no "other" work: \begin{align} \text{d}U &= \delta Q - P \text{d}V - \delta W_\text{other}^\text{out} \\ \text{d}U_P &= \delta Q_P - P \text{d}V_P - \underbrace{\delta W_\text{other}^\text{out}}_0 \\ \text{d}U_P + P \text{d}V_P &= \delta Q_P \\ \text{d}H_P &= \delta Q_P \end{align} This expression holds for a closed system undergoing a process with no non-mechanical work or acceleration regardless of whether or not there are chemical reactions.
2. You seem to be confusing expressions for $$W_\text{non-PV}$$ with extremum principles which are derived for the special case where $$W_\text{non-PV}$$ is fixed as zero.

Earlier, when chemical potential was first being introduced in my Pchem class - a derivation of the condition of spontaneity for transport between phases was put forward:$$dG=-SdT+VdP+\sum_i\sum_j\mu_i^jdn_i^j$$

This is true in general.

and from the second law we know that for an irreversible process $$dG<-SdT+VdP$$, thus: $$\sum_i\sum_j\mu_i^jdn_i^j<0$$

This is only true in the special case where $$W_\text{non-PV} = 0$$. Combining these results will just lead to the conclusion $$W_\text{non-PV}= 0$$, which was the starting point.

Relationship between Chemical Potential and "Other" Work

Am I merely confusing myself with the interpretation of chemical potential as a form of non-PV work?

It seems that you are. Although it is generally true that $$\delta W_\text{mechanical} = P\text{d}V$$, it is not generally true that $$\delta W_\text{other} = \sum_i \mu_i \text{d}n_i$$.

The first law connects fluxes across the system boundary to property changes within the system; "other" work is a flux, while the chemical potential term is a property change: \begin{align} \overbrace{\delta Q \underbrace{- P\text{d} V - \delta W_\text{other}}_{-\delta W}}^\text{\text{d}U in terms of fluxes} &= \overbrace{T\text{d}S - P\text{d}V + \sum_i \mu_i \text{d}n_i}^\text{\text{d}U in terms of properties} \end{align}

I imagine that you are thinking that $$\delta W_\text{other}$$ must equal $$\sum_i \mu_i \text{d}n_i$$ in order to be able to derive the Gibbs Equation, but this is not the case - they aren't equal, and the Gibbs Equation is derived in a different way.

Deriving the Gibbs Equation from the First Law

The easiest way I know to derive the Gibbs Equation for $$U$$ from the First Law is to consider a process in which $$\delta W_\text{other} = 0$$ and the composition is changed by reversibly adding/removing chemical components rather than by chemical reactions (diffusion becomes reversible in the limit where the driving concentration gradient approaches zero, just as heat transfer becomes reversible in the limit where the temperature gradient approaches zero). Since this process is reversible, we can say $$\delta Q = T \text{d}S$$. If we define the chemical potential of species $$i$$, $$\mu_i$$, as $$\mu_i \equiv \left( \frac{\partial U}{\partial n_i} \right)_{S,V,n_{j\neq i}}$$ then we can conclude that total $$U$$ added to the system by mass transfer in this model process is $$\sum_i \mu_i \text{d}n_i$$, and thus $$\text{d}U_\text{model process} = \underbrace{T \text{d} S}_\text{Heat} - \underbrace{P \text{d} V}_\text{Work} + \underbrace{\sum_i \mu_i \text{d} n_i}_\text{Mass Transfer}$$ Since $$U$$ is a property (as opposed to a flux), changes in $$U$$ depend only on the initial and final states (not on the path between them), so we can conclude that for any arbitrary process - even one involving "other" work or chemical reactions - the expression $$\text{d}U = T \text{d} S - P \text{d} V + \sum_i \mu_i \text{d} n_i$$ continues to hold. Note that the labelling of the individual terms as heat, work, and transfer by mass is specific to the model process; in general, we can't identify the individual terms in the equation with fluxes - we can just identify the sum of the terms with the sum of the fluxes.

• Many thanks for your answer! 1. My problem here id that to derive $dH_p=\delta Q_p$ as you did, one must assume that only PV work is significant. But isn't composition change another way to alter the energy of the system and therefore another form of 'work'? Else, what about a chemical reaction between ideal gases at constant temperature and volume, where I reversibly add heat to the system to drive an endothermic reaction forward? Under these conditions: $\Delta U=0, W=0$. So where is the heat going? Shouldn't it be going into changing the chemical potential? Jun 10, 2019 at 8:01
• Chemical potential isn't a work mode - it's more of a way that the system can store energy. In your example, $\Delta U \neq 0$ - you are heating the system, so the first law says $\Delta U > 0$ (I assume you were thinking that $\Delta T = 0$ implies $\Delta U = 0$, but this is only true for a pure substance - i.e. if there are no chemical reactions). If there are endothermic chemical reactions but $T$ is constant, then the system will store the energy as chemical potential without changing $T$. Jun 10, 2019 at 19:52
• I was going on the notion that $\Delta T=0$ implies $\Delta U=0$ for Ideal gases. But, I see what you are saying. This condition comes from analysis of pure substance systems. My confusion remains, however. If chemical potential cannot be taken to be work, how can one write $dU = \delta Q - PdV - \delta W_{other}$ without considering energy being stored as chemical potential? shouldn't the more general form be $dU = \delta Q - PdV - \delta W_{other} + \sum_i \mu_i dn_i$? This reduces to $dU = TdS - PdV + \sum_i \mu_i dn_i$ for a reversible process, which is the Gibb's equation for U. Jun 11, 2019 at 0:11
• I've edited my response to address your last comment Jun 11, 2019 at 1:45
• Thanks a lot! With that explanation I think I finally understand. I was getting hung up on trying to identify each term on the Gibbs equation for U with a flux, but the Gibbs equation is fundamentally a differential expansion of U strictly in terms of properties and not fluxes as you said. It seems so obvious now that there need not be a one-to-one correspondance with the expression of dU in terms of fluxes (from the first law). I'm sorry that it took this much for me to get it, but really thank you for guiding me through it! Jun 11, 2019 at 12:35