4.3.15. The Pressure and Temperature Dependence of the Gibbs Energy#
4.3.15.1. Learning Goals#
After reading and understanding these notes, you will be able to
Derive the relationship between Gibbs free energy and pressure for an ideal gas
Express the fugacity of a real gas in terms of a virial expansion
Derive the relationship between Gibbs free energy and temperature (Gibbs-Helmholtz equation)
Calculate \(G(T)\) from data on heat capacity and phase transitions for a substance.
4.3.15.2. Coding Concepts#
The following coding concepts are used in this notebook:
4.3.15.3. Differential Form of the Gibbs Energy#
The differential form of the Gibbs energy as a function of only two variables is
which implies the following first derivative relationships
These two equations can be used to determine the pressure and temperature dependence of \( G\).
4.3.15.4. Pressure Dependence of \(G\)#
The partial derivative relationship can be used to determine the pressure dependence of \( G\). The derivation is as follows
For an ideal gas we have \(V = \frac{nRT}{P}\) yielding
\(P = 1\) bar is used as a standard reference so if we set that as the initial state we get
where \(G^\circ(T)\) is the Gibbs free energy of the substance at \(P=1\) bar and the temperature of interest.
The logarithmic dendence of \(G\) on \(P\) is an entirely entropic effect.
The equation above is most commonly written as
4.3.15.4.1. For a Non-Ideal Gas#
The above equation was derived for an ideal gas. It is useful to derive a similar expression for non-ideal gasses. Here we will use the virial expansion for the equation of state of general non-ideal gas. This has the form
If we substitute this equation of state in for the volume in the above derivation we get
Doing the integrtion yields
This can be rewritten as
where \(f\) is called the fugacity and is given by (for virial expansion)
It can also be shown that \(f^\circ = P^\circ\)
4.3.15.5. Temperature Dependence of \(G\)#
The partial derivative relationship can be used to determine the temperature dependence of \( G\). The derivation is as follows
Unlike for the pressure dependence, this does not get us far because we cannot typically measure \(S\). Rather, we will do the following manipulations
This last equation is called the Gibbs-Helmholtz equation. We will use it in subsequent parts of this course to investigate the temperature dependence of the Gibbs free energy of chemical equilibria. Applied to a process, this becomes
The implications of this equation are that we can compute the Gibbs free energy of a substance at a given \(T\) from tabulated enthalpy and entropy information. Or, equivalently
4.3.15.5.1. Example: Temperature Dependence of \(G\) for Propene#
Given the following fata for propene, plot \(\bar{G}(T) - \bar{H}(0)\) versus \(T\). (assume ideal gas behavior)
and
We want \(\bar{G}(T) - \bar{H}(0)\) which we know to be equal to
So we calculate \(\bar{H}(T)-\bar{H}(0)\) and \(\bar{S}(T)\) separately.
From previous discussions, we know that
Similarly, we know that
Below I will use code and numeric integration to make this plot.
import numpy as np
import scipy.integrate as integrate
R = 8.314 # J/K/mol
# heat capacity of first solid state
def cp_s1(T):
return R*12*np.pi**4/5*(T/100)**3
# heat capacity of second solid state
def cp_s2(T):
return R*(-1.663 + 0.001112*T - 9.791e-4*T**2 + 3.740e-6*T**3)
# heat capacity of liquid
def cp_l(T):
return R*(15.935 - 0.08677*T + 4.294e-4*T**2 - 6.276e-7*T**3)
# heat capacity of gass
def cp_g(T):
return R*(1.4970 + 2.266e-2*T - 5.725e-6*T**2)
int_cp_s1 = integrate.quad(cp_s1,0,15)[0]
print("int 0 to 15", int_cp_s1, "J/mol")
int_cp_s2 = integrate.quad(cp_s2,15,87.90)[0]
print("int 15 to 87.90", int_cp_s2, "J/mol")
int_cp_l = integrate.quad(cp_l,87.90,225.46)[0]
print("int 87.90 to 225.46", int_cp_l, "J/mol")
int 0 to 15 24.599472679272154 J/mol
int 15 to 87.90 -2343.2433212427372 J/mol
int 87.90 to 225.46 12213.373101852707 J/mol
import matplotlib.pyplot as plt
%matplotlib inline
#def f(T)
def H(T_array):
f = []
for T in T_array:
if T<=15:
f.append(integrate.quad(cp_s1,0,T)[0])
elif T>15 and T<=87.90:
f.append(int_cp_s1 + integrate.quad(cp_s2,15,T)[0])
elif T>87.90 and T<=225.46:
f.append(int_cp_s1 + int_cp_s2 + 3e3 + integrate.quad(cp_l,87.90,T)[0])
else:
f.append(int_cp_s1 + int_cp_s2 + 3e3 + int_cp_l + 18.42e3 + integrate.quad(cp_g,225.46,T)[0])
return np.array(f)
# setup plot parameters
fontsize=16
fig = plt.figure(figsize=(8,8), dpi= 80, facecolor='w', edgecolor='k')
ax = plt.subplot(111)
ax.grid(b=True, which='major', axis='both', color='#808080', linestyle='--')
ax.set_xlabel("$T$",size=fontsize)
ax.set_ylabel("$H(T) - H(0)$ (kJ/mol)",size=fontsize)
plt.tick_params(axis='both',labelsize=fontsize)
T = np.arange(0.1,1000,0.1)
plt.plot(T,H(T)/1000,lw=3,c='k')
ax.axvspan(0, 15, alpha=0.5, color='red')
ax.axvspan(15, 87.90, alpha=0.5, color='blue')
ax.axvspan(87.90, 225.46, alpha=0.5, color='green')
ax.axvspan(225.46, 1000, alpha=0.5, color='yellow')
<matplotlib.patches.Polygon at 0x7f8c587798b0>
import numpy as np
import scipy.integrate as integrate
R = 8.314 # J/K/mol
# heat capacity of first solid state
def s_s1(T):
return cp_s1(T)/T
# heat capacity of second solid state
def s_s2(T):
return cp_s2(T)/T
# heat capacity of liquid
def s_l(T):
return cp_l(T)/T
# heat capacity of gass
def s_g(T):
return cp_g(T)/T
int_s_s1 = integrate.quad(s_s1,0,15)[0]
print("int 0 to 15", int_s_s1, "J/mol/K")
int_s_s2 = integrate.quad(s_s2,15,87.90)[0]
print("int 15 to 87.90", int_s_s2, "J/mol/K")
int_s_l = integrate.quad(s_l,87.90,225.46)[0]
print("int 87.90 to 225.46", int_s_l, "J/mol/K")
int 0 to 15 2.18661979371308 J/mol/K
int 15 to 87.90 -47.300135968020605 J/mol/K
int 87.90 to 225.46 83.74783642272298 J/mol/K
import matplotlib.pyplot as plt
%matplotlib inline
#def f(T)
def S(T_array):
f = []
for T in T_array:
if T<=15:
f.append(integrate.quad(s_s1,0,T)[0])
elif T>15 and T<=87.90:
f.append(int_s_s1 + integrate.quad(s_s2,15,T)[0])
elif T>87.90 and T<=225.46:
f.append(int_s_s1 + int_s_s2 + 3e3/87.90 + integrate.quad(s_l,87.90,T)[0])
else:
f.append(int_s_s1 + int_s_s2 + 3e3/87.90 + int_s_l + 18.42e3/225.46 + integrate.quad(s_g,225.46,T)[0])
return np.array(f)
# setup plot parameters
fontsize=16
fig = plt.figure(figsize=(8,8), dpi= 80, facecolor='w', edgecolor='k')
ax = plt.subplot(111)
ax.grid(b=True, which='major', axis='both', color='#808080', linestyle='--')
ax.set_xlabel("$T$",size=fontsize)
ax.set_ylabel("$S(T)$ (kJ/mol/K)",size=fontsize)
plt.tick_params(axis='both',labelsize=fontsize)
T = np.arange(0.1,1000,0.1)
plt.plot(T,S(T)/1000,lw=3,c='k')
ax.axvspan(0, 15, alpha=0.5, color='red')
ax.axvspan(15, 87.90, alpha=0.5, color='blue')
ax.axvspan(87.90, 225.46, alpha=0.5, color='green')
ax.axvspan(225.46, 1000, alpha=0.5, color='yellow')
<matplotlib.patches.Polygon at 0x7f8c885f8fa0>
import matplotlib.pyplot as plt
%matplotlib inline
#def G(T)
def G(T):
return H(T) - T*S(T)
# setup plot parameters
fontsize=16
fig = plt.figure(figsize=(8,8), dpi= 80, facecolor='w', edgecolor='k')
ax = plt.subplot(111)
ax.grid(b=True, which='major', axis='both', color='#808080', linestyle='--')
ax.set_xlabel("$T$",size=fontsize)
ax.set_ylabel("$G(T) - H(0)$ (kJ/mol)",size=fontsize)
plt.tick_params(axis='both',labelsize=fontsize)
T = np.arange(0.1,1000,0.1)
plt.plot(T,G(T)/1000,lw=3,c='k')
ax.axvspan(0, 15, alpha=0.5, color='red')
ax.axvspan(15, 87.90, alpha=0.5, color='blue')
ax.axvspan(87.90, 225.46, alpha=0.5, color='green')
ax.axvspan(225.46, 1000, alpha=0.5, color='yellow')
<matplotlib.patches.Polygon at 0x7f8c78a06c10>