[[Thermodynamics]]
## Residual Properties
Residual properties are corrections from the ideal gas laws
$F(T,P) = F^{IG}(T,P) \qquad (F = V,H,S) \qquad dF^R = dF - dF^{IG}$
$\begin{gather}V^R = V - \frac{RT}{P} = \frac{RT}{P}(Z-1)\\
H^R = \int_{0}^{P}(V - T\frac{\partial V}{\partial T})dP = PV - RT + \int_{∞}^{V}(T\frac{\partial P}{\partial T})dV\\
S^R = \int_{0}^{P}(\frac{R}{P} - \frac{\partial V}{\partial T})dP = Rln(\frac{PV}{RT}) + \int_{∞}^{V}(\frac{\partial P}{\partial T}-\frac{R}{V})dV\end{gather}$
Other properties: $U^R = H^R - PV^R \qquad G^R = H^R - TS^R \qquad A^R = U^R - TS^R$
To compute residual properties, use an equation of state (truncated virial, SRK, etc.) and substitute into second (pressure explicit) form of equation
From SRK:
$\begin{gather}
H^R = RT(Z-1) +\frac{T(da/dT)-a}{b}ln(\frac{Z+B}{Z}) \\
S^R = RTln(Z-B) +\frac{(da/dT)}{b}ln(\frac{Z+B}{Z}) \\
\frac{da}{dT} = -.42748\frac{R^2T_c}{P_c} \frac{(1+\Omega(1-\sqrt{T_R}))}{\sqrt{T_R}}\end{gather}$
Lee-Kesler tables can also be used for $H$ and $S$
$H = h_0 + ⍵h_1, S = s_0 + ⍵s_1$
### Reference States:
Change of a property between two states: $ΔF_12 = ΔF_{12}^{IG} + F_R^2 - F_R^1$
Properties like H and S have no absolute value but can be calculated relative to another state.
Two options for reference state ($T_0, P_0$):
1) $H_0$ and $S_0$ are 0 at reference state
$F = ΔF^{IG} + F_R - F_R^{ref}$
To calculate H at a different $(T, P)$, you must know the residual properties at both states
2) Hypothetical ideal gas state at $(T_0, P_0)$: $H_0^{IG}$ and $S_0^{IG}$ (ideal gas properties) are zero
Therefore $F_0 = F_0^{R}$.
$F = ΔF^{IG} + F_R$
For this calculation you only need to know the residual properties of the second state.
The two reference states give different numbers, but the difference between states is the same and either will work for calculations.
### Vapor-Liquid Equilibrium
**Gibbs Free Energy**: $G = H - TS = G^{IG} + G^{R}$
At equilibrium, residuals of both phases are equal: $G^{R}_L = G^{R}_V$
### Fugacity
**Fugacity**: A property representing the “real” pressure of a gas; substituting it for pressure lets you use ideal gas equations to calculate properties of real gases. The fugacity of a gas is the pressure of an ideal gas with the same chemical potential as the real gas. Fugacity corrects pressure basically the same way compressibility corrects volume.
Definition: $f = \phiP $
ɸ is the fugacity coefficient, defined as $ln(\phi) = G^{R}/RT$
At equilibrium, $f_V = f_L$ and for pure substances $\phi_V = \phi_L$
Fugacity can be calculated by comparing two states: $(G_0, P_0)$ and $(G, P)$
$G = G_0 + RTln(\frac{f}{f_0})$
Use a very low $P_0$ where gas is close to ideal and $P_0 = f_0$. G can be calculated from tabulated H and S values at each temperature.
$dln(f)= \frac{V}{RT}dP$ is the differential form of the previous equation for fugacity, which can be integrated to give various equations.
**Compressed Liquids**: Integrate assuming volume doesn’t change with pressure. $\phi^{sat}$ is the same for liquid and vapor phases; assume the vapor is ideal and $\phi^{sat} = 1$.
$f = \phi^{sat} P^{sat} e^ {\frac{V_L(P-Psat)}{RT}}$
**Compressibility Factor**: in terms of Z, the differential equation is $ln\phi = \int_{P_0}^{P}(Z - 1)\frac{dP}{P}$
For low pressures, using the truncated virial equation for Z gives $ln\phi = Z - 1$
Integrating using the SRK gives $ln\phi = Z - 1 - ln(Z - B) - \frac{A}{B}ln(\frac{Z+B}{Z})$. Other equations of state have similar expressions.
Fugacity can also be found by the Pitzer method using graphs or tables: $ln\phi = (ln\phi)^0 + ω(ln\phi)^1$
**Phase Calculations**: The saturation pressure of a substance at any temperature can be found using the SRK or another EOS by calculating ɸ for liquid and vapor roots of Z at different pressures and locating the pressure where $\phi_L = \phi_V$. Phase diagrams can be constructed by repeating this process over a series of temperatures.