# Thermodynamic work and potential functions

I was reading about the maximum thermodynamic work of a system (Z) that is going to equilibrium.

$$$$dZ = dU + p_0 + T_0dS$$$$

I then came across the thermodynamic potential functions U, H, A, G. In my textbook, they were derived from Z with specific conditions for the surroundings like constant temperature and constant pressure.

$$$$dU = TdS - pdV$$$$ $$$$dH = TdS + Vdp$$$$ $$$$dA = -SdT - pdV$$$$ $$$$dG = -SdT + Vdp$$$$

My question is, do these potential functions also describe the maximum work that a system can deliver, but in contrast to Z, only for specific conditions? So, for constant pressure and temperature, dZ would turn into dG, the Gibbs free energy, and which would, in this case, express the maximum work a system can perform when evolving to equilibrium.

A follow-up question is, how does this understanding of potential functions relate to the chemical potential $$\mu$$?

From my understanding, the chemical potential is the partial derivative of one of the four potential functions to the number of moles of a component. This means that, from the above interpretation, the chemical potential $$\mu$$ will equal the partial derivative of the Gibbs free energy when the pressure and temperature are kept constant.

$$$$\mu = \frac{\partial G}{\partial n_i}$$$$

The chemical potential will thus express how the maximum work of a system changes when a small number of moles of a component i are added or substracted.

• Something is not quite right with that equation for $dZ$. Anyhow, given any Legendre transform going from $dU=\sum_{k=0}^{K}Y_kdX_k$ with $Y_0, Y_1, Y_2,...=T, -p, \mu_1,...$ and $X_0,X_1,X_2,...=S, V, n_1,...$, to $dF=-X_0dY_0-X_1dY_1-...X_{r-1}dY_{r-1}+Y_rdX_r+Y_{r+1}dX_{r+1}+...Y_KdX_K$ where $F=U-\sum_{k=0}^{r-1}Y_kX_k$ is minimized for all processes that exchange the extensive quantities $X_0=S,X_1+V,...X_{r-1}$ with its environment only at fixed $Y_0=T,Y_1=-p,...,Y_{r-1}$ intensive levels. Commented Jun 15 at 18:13

Exergy Z (or Availability, denoted B) is not a fifth potential, there are only these four. What happens is that exergy is a property of your system depending on that same system in equilibrium, which is why variables arise from this equilibrium and your system under current conditions. Both exergy and the chemical potential that you mentioned at the end are expressions of the same potential: Gibbs Free Energy (G). If there is a change in the number of moles of the species involved, G is also a function of these numbers of moles. Let us talk about exergy first.

Exergy (denoted here as $$Z$$) is a measure of the maximum useful work obtainable from a system as it comes into equilibrium with a reference environment. For a system at a given state, exergy can be related to various thermodynamic potentials. Let's define exergy in terms of the Gibbs free energy, as this is commonly used for systems at constant temperature and pressure.

### Definition of Exergy in Terms of Gibbs Free Energy

For a system at temperature $$T$$ and pressure $$P$$ interacting with an environment at temperature $$T_0$$ and pressure $$P_0$$, the exergy $$Z$$ is defined as the maximum useful work obtainable from the system as it comes into equilibrium with its environment. The Gibbs free energy ( $$G$$) is particularly useful in this context.

#### Gibbs Free Energy

The Gibbs free energy $$G$$ is defined as: $$G = H - TS$$ $$dG = -SdT + VdP$$

For a system in equilibrium with its environment, the Gibbs free energy at environmental conditions ( $$G_0$$) can be expressed as: $$G_0 = H_0 - T_0 S_0$$

#### Exergy ( $$Z$$)

The exergy $$Z$$ is the difference between the Gibbs free energy of the system and the Gibbs free energy at the environmental conditions: $$Z = G - G_0$$

Substituting $$G$$ and $$G_0$$: $$Z = (H - TS) - (H_0 - T_0 S_0)$$ $$Z = (H - H_0) - T(S - S_0) + T_0(S - S_0)$$

Since $$H = U + PV$$ and $$H_0 = U_0 + P_0 V_0$$: $$Z = [(U + PV) - (U_0 + P_0 V_0)] - T(S - S_0) + T_0(S - S_0)$$ $$Z = (U - U_0) + P(V - V_0) - T(S - S_0) + T_0(S - S_0)$$

### Simplified Form

To simplify, let's express the exergy more compactly:

$$Z = (U - U_0) + P(V - V_0) - T(S - S_0) + T_0(S - S_0)$$

### Differential Form of Exergy

To find the differential form of exergy, we differentiate $$Z$$:

$$dZ = dU - dU_0 + P dV + V dP - P_0 dV_0 - V_0 dP_0 - T dS + S dT + T_0 dS - T_0 dS_0$$

Assuming the reference state (environment) is constant ( $$dU_0 = 0$$, $$dV_0 = 0$$, $$dP_0 = 0$$, $$dS_0 = 0$$):

$$dZ = dU + P dV + V dP - T dS + S dT + T_0 dS$$

Substituting the differential form of internal energy $$dU = TdS - PdV$$:

$$dZ = (TdS - PdV) + P dV + V dP - T dS + S dT + T_0 dS$$

Combining like terms:

$$dZ = T dS - PdV + P dV + V dP - T dS + S dT + T_0 dS$$ $$dZ = (T - T) dS + (P - P) dV + V dP + S dT + T_0 dS$$ $$dZ = T_0 dS + V dP + S dT$$

### Final Form

For systems where temperature $$T$$ and pressure $$P$$ are constant, and considering the entropy change $$dS$$:

$$dZ = T_0 dS$$

If $$S$$ and $$T$$ are constant:

$$dZ = V dP + S dT$$

### Summary

Exergy $$Z$$, defined in terms of the Gibbs free energy, provides a measure of the maximum useful work obtainable from a system as it reaches equilibrium with its environment. The differential form of exergy captures the changes in internal energy, entropy, pressure, and temperature:

$$Z = (U - U_0) + P(V - V_0) - T(S - S_0) + T_0(S - S_0)$$ $$dZ = T_0 dS + V dP + S dT$$

This formulation helps in understanding the work potential of a system relative to its environment.

To derive the differential form of the Gibbs free energy when it is a function of the number of moles of the present species ( $$n_i$$), we need to use the concept of the chemical potential. The Gibbs free energy $$G$$ can be expressed as a function of temperature $$T$$, pressure $$P$$, and the number of moles of each species $$n_i$$:

$$G = G(T, P, n_1, n_2, \ldots, n_k)$$

Here, $$k$$ is the number of different chemical species in the system. The differential form of the Gibbs free energy can be derived using the total differential.

### Total Differential of Gibbs Free Energy

The total differential of $$G$$ is:

$$dG = \left( \frac{\partial G}{\partial T} \right)_{P, n_i} dT + \left( \frac{\partial G}{\partial P} \right)_{T, n_i} dP + \sum_{i=1}^{k} \left( \frac{\partial G}{\partial n_i} \right)_{T, P, n_{j \neq i}} dn_i$$

### Partial Derivatives

1. Temperature Dependence: The partial derivative of $$G$$ with respect to $$T$$ at constant $$P$$ and $$n_i$$ is related to the entropy $$S$$: $$\left( \frac{\partial G}{\partial T} \right)_{P, n_i} = -S$$

2. Pressure Dependence: The partial derivative of $$G$$ with respect to $$P$$ at constant $$T$$ and $$n_i$$ is related to the volume $$V$$: $$\left( \frac{\partial G}{\partial P} \right)_{T, n_i} = V$$

3. Mole Number Dependence: The partial derivative of $$G$$ with respect to $$n_i$$ at constant $$T$$, $$P$$, and $$n_{j \neq i}$$ is the chemical potential $$\mu_i$$ of species $$i$$: $$\left( \frac{\partial G}{\partial n_i} \right)_{T, P, n_{j \neq i}} = \mu_i$$

### Differential Form of Gibbs Free Energy

Substituting these partial derivatives into the total differential, we get:

$$dG = -S \, dT + V \, dP + \sum_{i=1}^{k} \mu_i \, dn_i$$

This is the differential form of the Gibbs free energy, which shows how $$G$$ changes with temperature, pressure, and the number of moles of each species.

### Partial Summary

The differential form of the Gibbs free energy $$G$$ when it is a function of temperature $$T$$, pressure $$P$$, and the number of moles of species $$n_i$$ is given by:

$$dG = -S \, dT + V \, dP + \sum_{i=1}^{k} \mu_i \, dn_i$$

where:

• $$S$$ is the entropy,
• $$V$$ is the volume,
• $$\mu_i$$ is the chemical potential of species $$i$$,
• $$n_i$$ is the number of moles of species $$i$$.

This form captures how the Gibbs free energy varies with changes in temperature, pressure, and the composition of the system.

Given the differential form of the Gibbs free energy $$G$$:

$$dG = -S \, dT + V \, dP + \sum_{i=1}^{k} \mu_i \, dn_i$$

We want to calculate the differential form of the internal energy $$U$$ using the relationship:

$$U = G + TS - PV$$

### Step-by-Step Calculation

First, let's find the differential form of $$G + TS - PV$$.

1. Differential of $$G$$: $$dG = -S \, dT + V \, dP + \sum_{i=1}^{k} \mu_i \, dn_i$$

2. Differential of $$TS$$: $$d(TS) = T \, dS + S \, dT$$

3. Differential of $$PV$$: $$d(PV) = P \, dV + V \, dP$$

Now, combine these differentials:

$$dU = d(G + TS - PV)$$ $$dU = dG + d(TS) - d(PV)$$

Substitute the differentials:

$$dU = (-S \, dT + V \, dP + \sum_{i=1}^{k} \mu_i \, dn_i) + (T \, dS + S \, dT) - (P \, dV + V \, dP)$$

### Simplify the Expression

Combine like terms:

$$dU = -S \, dT + V \, dP + \sum_{i=1}^{k} \mu_i \, dn_i + T \, dS + S \, dT - P \, dV - V \, dP$$

$$dU = (-S \, dT + S \, dT) + V \, dP - V \, dP + T \, dS - P \, dV + \sum_{i=1}^{k} \mu_i \, dn_i$$

$$dU = T \, dS - P \, dV + \sum_{i=1}^{k} \mu_i \, dn_i$$

### Final Form

The differential form of the internal energy $$U$$ is:

$$dU = T \, dS - P \, dV + \sum_{i=1}^{k} \mu_i \, dn_i$$

### Summary

Using the relationship $$U = G + TS - PV$$ and the differential form of the Gibbs free energy, we derived the differential form of the internal energy $$U$$ as:

$$dU = T \, dS - P \, dV + \sum_{i=1}^{k} \mu_i \, dn_i$$

This equation shows how the internal energy changes with respect to entropy, volume, and the number of moles of each species in the system. Now I will repeat all the developments above in the case of $$i$$ present species.

To rewrite the exergy $$Z$$ in terms of the number of moles of the present species, we need to take into account the differential form of the Gibbs free energy, which includes the chemical potentials. We will express the exergy $$Z$$ in a way that incorporates the changes in the number of moles of each species.

### Exergy Definition

The exergy $$Z$$ is defined as the maximum useful work obtainable from a system as it comes into equilibrium with its environment. For a system at temperature $$T$$ and pressure $$P$$ interacting with an environment at temperature $$T_0$$ and pressure $$P_0$$, the exergy can be expressed in terms of the Gibbs free energy.

$$Z = G - G_0$$

Where $$G_0$$ is the Gibbs free energy at the environmental conditions.

### Gibbs Free Energy and Differential Form

The differential form of the Gibbs free energy $$G$$ when it depends on temperature $$T$$, pressure $$P$$, and the number of moles $$n_i$$ of each species is:

$$dG = -S \, dT + V \, dP + \sum_{i} \mu_i \, dn_i$$

### Differential Form of Exergy

To find the differential form of the exergy $$Z$$, we need to consider the differential of the Gibbs free energy difference:

$$dZ = d(G - G_0)$$

Since $$G_0$$ is the Gibbs free energy of the environment, which is usually considered constant for a given reference state, $$dG_0 = 0$$:

$$dZ = dG$$

Therefore, the differential form of exergy $$dZ$$ is:

$$dZ = -S \, dT + V \, dP + \sum_{i} \mu_i \, dn_i$$

This equation shows how the exergy changes with respect to temperature, pressure, and the number of moles of each species.

### Incorporating Environmental Conditions

If we need to account for the environment's temperature $$T_0$$ and pressure $$P_0$$, we can modify the expression to reflect the changes as the system moves to equilibrium with the environment.

### Final Form of Exergy Differential

For a more detailed expression that includes the environmental reference state, we can write:

$$Z = (U - U_0) + P(V - V_0) - T(S - S_0) + T_0(S - S_0)$$

Given that:

$$dU = T dS - P dV + \sum_{i} \mu_i \, dn_i$$

The differential form of the exergy $$Z$$ is:

$$dZ = dU - dU_0 + P dV + V dP - P_0 dV_0 - V_0 dP_0 - T dS + S dT + T_0 dS - T_0 dS_0$$

Assuming $$dU_0 = 0$$, $$dV_0 = 0$$, $$dP_0 = 0$$, and $$dS_0 = 0$$:

$$dZ = dU + P dV + V dP - T dS + S dT + T_0 dS$$

Substituting $$dU = T dS - P dV + \sum_{i} \mu_i \, dn_i$$:

$$dZ = (T dS - P dV + \sum_{i} \mu_i \, dn_i) + P dV + V dP - T dS + S dT + T_0 dS$$

Combine like terms:

$$dZ = (T dS - T dS) - (P dV - P dV) + \sum_{i} \mu_i \, dn_i + V dP + S dT + T_0 dS$$

$$dZ = \sum_{i} \mu_i \, dn_i + V dP + S dT + T_0 dS$$

### Simplified Final Form

Thus, the differential form of exergy $$Z$$ that accounts for the number of moles of the present species is:

$$dZ = \sum_{i} \mu_i \, dn_i + V dP + (S + T_0) dS$$

This form includes the contribution of chemical potentials, volume, and entropy, providing a comprehensive measure of how exergy changes with respect to these variables.