Lecture 26: Real Fluids and Residual Properties
CBE 20260 / Thermodynamics I
1 Introduction: Breaking the Ideal Gas Mindset
In our last lecture, we used the Maxwell relations and the calculus of thermodynamics to derive exact, general equations for changes in internal energy (\(dU\)) and enthalpy (\(dH\)). We used this to compute an expression for the Joule-Thomson coefficient in terms of P-V-T data. We also introduced the concepts of volume expansivity and isothermal compressibility. In principle, we can now compute changes in any thermodynamic variable if we have an equation of state that relates P-V-T.
Let’s recall the general equation for internal energy: \[dU = C_v dT + \left[ T \left( \frac{\partial P}{\partial T} \right)_V - P \right] dV \tag{1}\]
Note: I am working with molar quantities, but not underlining variables for simplicity. This should be apparent in context, but don’t let it confuse you.
For an ideal gas (\(P = RT/V\)), the bracketed term in Eq. 1 goes to zero, proving mathematically that the internal energy of an ideal gas depends only on temperature. But what about a real gas?
1.1 Motivational Example: \(\Delta U\) for a van der Waals Gas
Let’s evaluate that bracketed term in Eq. 1 for a van der Waals gas: \[P = \frac{RT}{V-b} - \frac{a}{V^2}\]
Taking the partial derivative with respect to temperature at constant volume: \[\left( \frac{\partial P}{\partial T} \right)_V = \frac{R}{V-b}\]
Substitute this back into the bracketed term in Eq. 1: \[T \left( \frac{R}{V-b} \right) - \left( \frac{RT}{V-b} - \frac{a}{V^2} \right) = \frac{a}{V^2}\]
So, for a van der Waals gas, the exact differential is: \[dU = C_v dT + \frac{a}{V^2} dV\]
Note: We no longer have the ideal gas “formula” that \(dU = C_v dT\)!
If we compress a van der Waals gas isothermally (\(dT = 0\)) from \(V_1\) to \(V_2\), the change in internal energy is: \[\Delta U_T = \int_{V_1}^{V_2} \frac{a}{V^2} dV = -a \left( \frac{1}{V_2} - \frac{1}{V_1} \right)\]
Key Takeaway: Internal energy for a real gas does depend on volume! For a van der Waals gas, as the gas is compressed (\(V_2 < V_1\)), the molecules get closer together, and the attractive intermolecular forces (represented by the parameter \(a\)) lower the internal energy of the system.
2 The Roadblock: A Steady-State Compressor Problem
Now let’s look at a very standard chemical engineering problem. Suppose we have a steady-state compressor taking a real gas from state 1 (\(T_1, P_1\)) to state 2 (\(T_2, P_2\)).
From the open-system energy balance, the shaft work is: \[W_s = \Delta H = H(T_2, P_2) - H(T_1, P_1)\]
To find \(\Delta H\), we write the exact general equation for enthalpy: \[dH = C_p(T,P) dT + \left[ V - T \left( \frac{\partial V}{\partial T} \right)_P \right] dP \tag{2}\]
Here is the roadblock: To integrate this equation, we need an equation of state of the form \(V=f(T,P)\) so we can evaluate the term in the bracket, and we need to know how the heat capacity \(C_p\) changes with both temperature and pressure. However, if you look in the appendices of your textbook, you will only find polynomials for \(C_p^{IG}(T)\)—the Ideal Gas heat capacity, which is measured (or calculated) at very low pressures and only depends on temperature.
How can we calculate \(\Delta H\) for a high-pressure compressor when we only have ideal gas heat capacity data? Also, if you had something like the van der Waals equation of state, the term in the bracket looks hard to evaluate.
3 The Solution: Residual Properties
To solve this problem, we introduce the concept of Residual Properties. Residual properties provide a simple way to calculate changes in thermodynamic properties for real fluids that obey a non-trivial equation of state.
A residual property (\(M^R\)) is defined as the difference between the actual property of a real fluid (\(M\)) and the property it would have if it behaved as an ideal gas (\(M^{IG}\)) at the same temperature and pressure. \[M^R(T,P) \equiv M(T,P) - M^{IG}(T,P) \tag{3}\] \[M(T,P) = M^{IG}(T,P) + M^R(T,P) \tag{4}\]
You can think of this as a perturbation theory. The ideal gas law gets us 80% of the way to the true answer (for example), and the residual property acts as a mathematical “correction factor” that accounts for the remaining 20% caused by intermolecular forces and excluded volume.
Residual properties have a reference state. At a given temperature, as pressure approaches zero (\(P \to 0\)), molecules spread infinitely far apart. At this limit, all real gases behave exactly like ideal gases. Therefore, at \(P=0\), \(M = M^{IG}\), which means: \[M^R(T, P=0) = 0\]
4 The Hypothetical Thermodynamic Path
Going back to the compressor example, because enthalpy is a state function, \(\Delta H\) does not depend on the path taken from State 1 to State 2. Instead of trying to calculate the real gas change directly (which we established we cannot do because we lack \(C_p(T,P)\)), we construct a 3-step hypothetical path that routes through the ideal gas state, as shown in Fig. 1
- Depressurize the real gas at \(T_1\) down to \(P=0\) (where it becomes an ideal gas).
- \(\Delta H_1 = -H^R_1(T_1, P_1)\)
- Heat/Cool the ideal gas from \(T_1\) to \(T_2\) at \(P=0\). Here we can finally use our tabulated ideal gas heat capacity data!
- \(\Delta H_2 = \Delta H^{IG} = \int_{T_1}^{T_2} C_p^{IG}(T) dT\)
- Pressurize the ideal gas at \(T_2\) back up to the real gas state at \(P_2\).
- \(\Delta H_3 = +H^R_2(T_2, P_2)\)
Summing these steps gives the master equation for property changes: \[\Delta H = H^R_2 - H^R_1 + \Delta H^{IG}\]
This expression applies to any thermodynamic state function, such as entropy and internal energy: \[\Delta S = S^R_2 - S^R_1 + \Delta S^{IG}\] \[\Delta U = U^R_2 - U^R_1 + \Delta U^{IG}\]
These residual properties (in this example, \(H^R\)) are simply the difference between the true property at a given state point (i.e. \(T\) and \(P\)) and what it would be if it behaved as an ideal gas at the same state point. You can think of determining this difference by slowly turning off all intermolecular interactions and calculating the change in the property. Fig. 2 shows what residual properties look like graphically. At low pressure residual properties are small since at this condition, gases behave almost like ideal gases. As pressure increases, however, the difference gets larger.
5 Deriving the Residual Equations - Pressure-Based
To use this method, we need equations to calculate \(H^R\) and \(S^R\) directly from an equation of state (PVT data).
5.1 1. Volume Residual (\(V^R\))
Using the compressibility factor (\(Z = PV/RT\)), the residual volume is: \[V^R = V - V^{IG} = \frac{ZRT}{P} - \frac{RT}{P} = \frac{RT}{P}(Z - 1) \tag{5}\] Notice that if the gas is ideal, \(Z=1\), and the residual volume is exactly zero.
5.2 2. Enthalpy Residual (\(H^R\))
We start with the pressure-dependent part of the exact \(dH\) equation, evaluated at constant \(T\): \[dH_T = \left[ V - T \left( \frac{\partial V}{\partial T} \right)_P \right] dP\] If we write this same equation for an ideal gas (it’s zero!) and subtract it from the real gas equation, we get the differential for the residual enthalpy. Integrating from \(P=0\) (where \(H^R=0\)) to the system pressure \(P\) gives: \[H^R = \int_0^P \left[ V - T \left( \frac{\partial V}{\partial T} \right)_P \right] dP \tag{6}\]
5.3 3. Entropy Residual (\(S^R\))
Using the Maxwell relation for the pressure dependence of entropy, \(dS_T = -(\partial V/\partial T)_P dP\). Subtracting the ideal gas version \(dS^{IG}_T = -(R/P)dP\) and integrating yields: \[S^R = -\int_0^P \left[ \left( \frac{\partial V}{\partial T} \right)_P - \frac{R}{P} \right] dP \tag{7}\]
5.4 4. Internal Energy Residual (\(U^R\))
We don’t actually need to do another complex integration to find the residual internal energy. Instead, we can rely on the fundamental definition of enthalpy: \[H = U + PV \implies U = H - PV\]
If we write this equation for a real gas and subtract the same equation for an ideal gas at the same temperature and pressure, we get the residual form: \[U^R = H^R - (PV - P V^{IG})\] \[U^R = H^R - P(V - V^{IG})\]
Notice that the term in the parentheses is simply the volume residual, \(V^R\). \[U^R = H^R - P V^R\]
We can make this even more useful by substituting the expression derived earlier for the residual volume, \(V^R = \frac{RT}{P}(Z - 1)\). Multiplying both sides by \(P\) gives \(P V^R = RT(Z - 1)\).
Substituting this into our equation yields the final expression: \[U^R = H^R - RT(Z - 1) \tag{8}\]
Key Takeaway: Once you have evaluated the equation of state to find the compressibility factor (\(Z\)) and the residual enthalpy (\(H^R\)), calculating the residual internal energy requires no extra calculus—just a simple algebraic substitution!
How do you use these equations? Given a particular volume-explicit equation of state (\(V = f(T,P)\)), you evaluate the residual terms in Eq. 5 - Eq. 8 and then apply them along with the ideal gas changes to a particular thermodynamic path. We will do an example later to make that clear. Each equation of state will have its own residual equations, depending on the functional form.
6 Volume-Based Residual Equations
The residual equations derived previously require integrating with respect to pressure (\(dP\)). As mentioned, this works well for a volume-explicit equation of state (\(V = f(T,P)\)). However, most realistic equations of state (like the van der Waals equation or many engineering equations of state that we will shortly introduce, like the Peng-Robinson equation) are pressure-explicit (\(P = f(T,V)\)). For these equations, we cannot easily evaluate a \(dP\) integral. To use these equations of state, we need residual equations that are volume-based. To do this, we must integrate with respect to volume (\(dV\)). As \(P \to 0\), the volume of the gas approaches infinity (\(V \to \infty\)). Therefore, the reference state for integration becomes \(V = \infty\) instead of \(P=0\).
6.1 1. Internal Energy Residual (\(U^R\))
Recall the general exact equation for internal energy at constant temperature: \[dU_T = \left[ T \left( \frac{\partial P}{\partial T} \right)_V - P \right] dV\]
For an ideal gas, \(P = RT/V\), so the bracketed term evaluates to exactly zero. This means \(U^{IG}\) does not change with volume. The residual internal energy can be found by simply integrating the real gas equation from the ideal gas reference state (\(V = \infty\)) to the system volume (\(V\)):
\[U^R = \int_{\infty}^V \left[ T \left( \frac{\partial P}{\partial T} \right)_V - P \right] dV \tag{9}\]
6.2 2. Entropy Residual (\(S^R\))
Deriving the volume-based entropy residual is a bit more involved. By definition, a residual property is the difference between the real and ideal gas properties at the same \(T\) and \(P\): \[S^R(T,P) = S(T,P) - S^{IG}(T,P)\]
Let’s write the isothermal entropy change from the zero-pressure reference state (\(V = \infty\)) to the system state for both the real gas and the ideal gas:
Real Gas: \[S(T,P) - S(T, P=0) = \int_{\infty}^V \left( \frac{\partial P}{\partial T} \right)_V dV \tag{10}\]
Ideal Gas: \[S^{IG}(T,P) - S^{IG}(T, P=0) = \int_{\infty}^{V^{IG}} \frac{R}{V} dV \tag{11}\]
Since real gases behave ideally at zero pressure, \(S(T, P=0) = S^{IG}(T, P=0)\). Subtracting the ideal gas equation (Eq. 11) from the real gas equation (Eq. 10) gives: \[S^R = \int_{\infty}^V \left( \frac{\partial P}{\partial T} \right)_V dV - \int_{\infty}^{V^{IG}} \frac{R}{V} dV\]
To combine these integrals, we can mathematically split the ideal gas integral into two parts—from \(\infty\) to \(V\), and from \(V\) to \(V^{IG}\): \[\int_{\infty}^{V^{IG}} \frac{R}{V} dV = \int_{\infty}^V \frac{R}{V} dV + \int_{V}^{V^{IG}} \frac{R}{V} dV\]
Substitute this back into the \(S^R\) equation so we can combine the integrals that share the same bounds (\(\infty\) to \(V\)): \[S^R = \int_{\infty}^V \left[ \left( \frac{\partial P}{\partial T} \right)_V - \frac{R}{V} \right] dV - \int_{V}^{V^{IG}} \frac{R}{V} dV\]
Finally, we evaluate the remaining integral. Since the ideal gas volume is \(V^{IG} = RT/P\), the ratio \(V/V^{IG} = PV/RT\), which is exactly the compressibility factor \(Z\): \[- \int_{V}^{V^{IG}} \frac{R}{V} dV = -R \ln \left( \frac{V^{IG}}{V} \right) = R \ln \left( \frac{V}{V^{IG}} \right) = R \ln Z\]
This yields the final volume-based entropy residual: \[S^R = \int_{\infty}^V \left[ \left( \frac{\partial P}{\partial T} \right)_V - \frac{R}{V} \right] dV + R \ln Z \tag{12}\]
6.3 3. Enthalpy Residual (\(H^R\))
Just as we saw with the pressure-based derivations, once we have \(U^R\), we do not need to do any more calculus to find \(H^R\). We rely on the fundamental definition \(H = U + PV\):
\[H^R = U^R + PV - P^{IG}V^{IG}\]
Since \(P^{IG}V^{IG} = RT\) for an ideal gas: \[H^R = U^R + PV - RT\]
If we factor out \(RT\), we can write this elegantly in terms of the compressibility factor (\(Z = PV/RT\)): \[H^R = U^R + RT(Z - 1) \tag{13}\]
6.4 4. Residual Volume (\(V^R\))
The residual volume does not require integration with respect to volume. By fundamental definition, a residual property is the difference between the real and ideal gas property evaluated at the same temperature and pressure: \[V^R = V - V^{IG}\]
For an ideal gas, the volume is defined by \(V^{IG} = RT/P\). Substituting this into the definition gives: \[V^R = V - \frac{RT}{P}\]
To express this in a more universally applicable form, the compressibility factor (\(Z = PV/RT\)) is utilized. Rearranging for the real gas volume gives \(V = ZRT/P\). Substituting this into the residual equation yields: \[V^R = \frac{ZRT}{P} - \frac{RT}{P}\]
Factoring out the ideal gas term provides the final algebraic expression: \[V^R = \frac{RT}{P}(Z - 1) \tag{14}\]
Key Takeaway: When using a pressure-explicit equation of state, the state point (\(T\) and \(P\)) is fixed, and the equation of state is solved algebraically for the real volume \(V\) (or the compressibility factor \(Z\)). Once \(V\) or \(Z\) is found, the residual volume is determined directly from this algebraic relation without any calculus.
Once again, to use these residual expressions can be calculated for a given equation of state and used to solve for changes in thermodynamic properties.
7 Resolving the Roadblock: An Analytical Example
Let’s see how this works in practice. Suppose we wish to determine the change in enthalpy and entropy for a gas being compressed from \(T_1\) and \(P_1\) to \(T_2\) and \(P_2\). Rather than assume an ideal gas or look up properties in steam tables, we model the gas in the compressor using a simplified equation of state: \[V = \frac{RT}{P} - \frac{a}{T} + b\]
To compute \(\Delta H\) and \(\Delta S\), we need to apply Eq. 6 and Eq. 7 (because the EOS is a volume-explicit equation and we can differentiate volume). This means we need the partial derivative: \[\left( \frac{\partial V}{\partial T} \right)_P = \frac{R}{P} + \frac{a}{T^2}\]
Now, plug this into the residual enthalpy equation (Eq. 6) \[H^R = \int_0^P \left[ \left( \frac{RT}{P} - \frac{a}{T} + b \right) - T \left( \frac{R}{P} + \frac{a}{T^2} \right) \right] dP\]
Notice how beautifully the ideal gas terms (\(RT/P\)) cancel out! \[H^R = \int_0^P \left( -\frac{a}{T} + b - \frac{a}{T} \right) dP = \int_0^P \left( b - \frac{2a}{T} \right) dP\] \[H^R = P \left( b - \frac{2a}{T} \right)\]
Next, calculate the residual entropy from Eq. 7: \[S^R = -\int_0^P \left[ \left( \frac{R}{P} + \frac{a}{T^2} \right) - \frac{R}{P} \right] dP\] Again, the \(R/P\) terms perfectly cancel! \[S^R = -\int_0^P \frac{a}{T^2} dP = -\frac{aP}{T^2}\]
With \(H^R\) and \(S^R\) fully defined in terms of \(T, P,\) and the constants \(a\) and \(b\), we can now easily solve a compressor problem by calculating \(\Delta H = H^R_2 - H^R_1 + \Delta H^{IG}\) and \(\Delta S = S^R_2 - S^R_1 + \Delta S^{IG}\) using only standard ideal gas heat capacity tables and the expressions we have derived earlier in class for ideal gas property changes!
You might be wondering: Why do we go through the trouble of inventing residual properties? Why not just measure or model how \(C_p\) changes with pressure and integrate Eq. 2 directly?
To see why, let’s look at the exact thermodynamic derivative of \(C_p\) with respect to pressure at constant temperature: \(\left(\frac{\partial C_p}{\partial P}\right)_T\).
By definition, \(C_p = \left(\frac{\partial H}{\partial T}\right)_P\). Substituting this in allows us to swap the order of differentiation: \[\left(\frac{\partial C_p}{\partial P}\right)_T = \frac{\partial}{\partial P} \left[ \left(\frac{\partial H}{\partial T}\right)_P \right]_T = \frac{\partial}{\partial T} \left[ \left(\frac{\partial H}{\partial P}\right)_T \right]_P\]
Using the fundamental property relation for enthalpy (\(dH = TdS + VdP\)), we can find the isothermal pressure derivative of enthalpy: \[\left(\frac{\partial H}{\partial P}\right)_T = T\left(\frac{\partial S}{\partial P}\right)_T + V\]
Using the Maxwell relation \(\left(\frac{\partial S}{\partial P}\right)_T = -\left(\frac{\partial V}{\partial T}\right)_P\), we get: \[\left(\frac{\partial H}{\partial P}\right)_T = V - T\left(\frac{\partial V}{\partial T}\right)_P\]
Now, substitute this back into our swapped derivative equation and apply the product rule: \[\left(\frac{\partial C_p}{\partial P}\right)_T = \frac{\partial}{\partial T} \left[ V - T\left(\frac{\partial V}{\partial T}\right)_P \right]_P\] \[\left(\frac{\partial C_p}{\partial P}\right)_T = \left(\frac{\partial V}{\partial T}\right)_P - \left[ \left(\frac{\partial V}{\partial T}\right)_P + T\left(\frac{\partial^2 V}{\partial T^2}\right)_P \right]\]
The first derivative terms perfectly cancel out, leaving us with a beautiful but terrifying exact thermodynamic relationship: \[\left(\frac{\partial C_p}{\partial P}\right)_T = -T \left(\frac{\partial^2 V}{\partial T^2}\right)_P\]
The Modeling Nightmare: Look closely at that final result. The pressure dependence of \(C_p\) relies entirely on the second derivative of volume with respect to temperature.
- Experimental Amplification: Taking a single derivative of experimental \(P-V-T\) data amplifies noise. Taking a second derivative amplifies that error exponentially.
- EOS Inaccuracy: Equations of State (like van der Waals or Peng-Robinson) are fitted to reproduce bulk \(P-V-T\) behavior (first derivatives). Their second derivatives are notoriously inaccurate, especially near the critical point where real-gas heat capacities spike dramatically.
- Integration Errors: To calculate \(\Delta H\) using \(C_p(T, P)\), you would have to integrate this highly inaccurate second-derivative function with respect to pressure.
The Brilliance of the Residual Framework: By using residual properties, we completely sidestep the second derivative. We rely only on the ideal gas heat capacity \(C_p^{IG}(T)\), which has exactly zero pressure dependence and is easily modeled with extreme precision using spectroscopic data. We then use the EOS to calculate the residual enthalpy \(H^R\), which only requires the first derivative \(\left(\frac{\partial V}{\partial T}\right)_P\). We get the exact same answer using highly accurate polynomials and far more reliable first derivatives!