4.2.5. Partition Function for a Diatomic Ideal Gas#
4.2.5.1. Motivation#
So far we have derived the partition function for a monatomic ideal gas and showed that this can be used to derive the ideal gas law, the average energy of an ideal gas, and the heat capacity of an ideal gas. In the current notes we will see how the partition function changes when we consider a diatomic ideal gas.
4.2.5.2. Learning Goals#
After reading these notes, students should be able to:
Identify the translational, electronic, rotational, and vibrational partition functions for a diatomic molecule.
Use the various molecular partition functions to compute associated quantities
Describe the meaning of \(D_e\) in the context of a diatomic molecule
Repeat the derivations of the various partition functions.
4.2.5.3. Coding Concepts#
Variables
Functions
Arrays
Plotting with matplotlib
4.2.5.4. Introduction#
A diatomic molecule consists of two atoms and can be either homodiatomic (two of the same atoms) or heterodiatomic (two different atoms). The energy of a diatomic ideal gas system can still be written a sum of molecular energies since there are no inter-molecular interactions
where \(j\) denotes a specific energy level of the system and \(\epsilon_{i,j}\) is the energy of molecule \(i\) in system energy level \(j\).
The separation of the total energy into a sum of molecular energies allows us to write the overall partition function as a product of molecular partition functions
where we have assumed that all molecules are identical and indistinguishable.
The inclusion of a second atom in the molecule of the ideal gas adds additional degrees of freedom that can absorb energy. The molecule can absorb energy in its single vibration or in its rotational degrees of freedom. We will approximate the energy of a diatomic ideal gas as a sum of separate terms
where \(\epsilon_{trans}\) is the translational energy, \(\epsilon_{elec}\) is the electronic energy, \(\epsilon_{vib}\) is the vibrational energy, and \(\epsilon_{rot}\) is the rotational energy.
The separation of energy into a sum of terms (an approximation - but a reasonable one) allows us to separate the molecular partition function into a product of terms
We will tackle each of these terms separately.
4.2.5.5. Translational#
The translation energy of a diatomic ideal gas is given as
where \(m_1\) is the mass of atom 1, \(m_2\) is the mass of atom 2, \(h\) is Planck’s constant, \(a=V^{1/3}\) is the linear box length, and \(n_x\), \(n_y\), and \(n_z\) are the quantum numbers of the translational energy.
We see that this equation is different from the translational energy for a monatomic particle only in the mass value. Here, the mass is the sum of the mass of the two particles. This does not change the overall form of the energy and thus the translational partition function will be similar to that of a monatomic particle. We will not rederive if but will just provide it here
4.2.5.6. Electronic#
We will only consider diatomic molecules in their ground electronic state but we still need to include a finite term for the electronic energy because define the zero of energy as that of the two separated atoms. As the particles come together, the chemical bond between them will form via sharing of electrons. This will release energy and thus we expect the “electronic” energy of the molecule to be lower than that of the two free atoms.
This equates to only considering the electronic energy to be a scalar quantity the value of which depends on the particular diatomic molecule.
where \(D_e\) is the dissociation energy of the diatomic molecule and is defined in the figure below.
Since there is only a single energy to account for, the molecular electronic partition function is
where \(g_{e,g}\) is the degeneracy of the ground state electronic energy level.
Show code cell source
# Make a plot of a Morse potential for a diatomic molecule and label the dissociation energy
# import libraries
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# set parameters for Morse potential
De = 1.0
re = 1.0
a = 1.0
r = np.arange(0.2,10,0.01)
# define morse potential function
def morse(r, De, re, a):
return De*(1-np.exp(-a*(r-re)))**2
# setup plot
fontsize=14
fig = plt.figure(figsize=(6,6), dpi= 80, facecolor='w', edgecolor='k')
ax = plt.subplot(111)
ax.grid(b=True, which='major', axis='both', color='#808080', linestyle='--')
ax.set_xlabel("$r$",size=fontsize)
ax.set_ylabel("$E(r)$",size=fontsize)
# draw arrow for De
ax.annotate("",
xy=(0.8*r[-1], 0.0), xycoords='data',
xytext=(0.8*r[-1], De), textcoords='data',
arrowprops=dict(lw=2,arrowstyle="<->"),
)
# label arrow
ax.annotate("$D_e$", xy=(0.8*r[-1]+0.1, 0.5*De),fontsize=fontsize)
plt.tick_params(axis='both',labelsize=fontsize)
plt.plot(r,morse(r, De, re, a),lw=3)
[<matplotlib.lines.Line2D at 0x7f9f16c8f070>]
4.2.5.7. Rotational#
The rotational energy of a diatomic molecule is given as
where \(\hbar = \frac{h}{2\pi}\) is called reduced Planck’s constant, \(J\) is the rotational quantum number and \(I \) is the moment of intertia of the molecule. Additionally, each rotational energy level has a degeneracy, denoted \(g_J\), of
From the rotational energy and the degeneracy, we can write the molecular rotational partition function as
For convenience, we introduce a new variable, \(\Theta_{rot}\), called the rotational temperature as
where \(B=\frac{h}{8\pi^2I}\). Using this variable simplifies the rotational p.f. to
To calculate this sum, we will use an integral to approximate it. This is not as good of an approximation as for the translational p.f. because the rotational energy levels are not as closely spaced as the translational energy levels. That said, it is still a fairly good approximation (stated without evidence).
where I have made a \(u\) substitution in the last step (\(u=J(J+1)\) and \(du=(2J+1)dJ\)). This integral can be looked up and you get
4.2.5.7.1. Example 1: Compute the probability of observing a molecule of CO, \(\Theta_{rot} = 2.77\) K, in the \(J=5\) rotational energy level at \(T=300\) K.#
We start by thinking about the generic probability of an event
In this case, since we are working in the Canoncial ensemble it is really
The weight of a rotational states is the degeneracy weighted Boltzmann factor. Namely,
Now to plug-in the numbers for this specifc problem:
import numpy as np
print(2.77*(2*5+1)*np.exp(-2.77*30/300)/300)
0.07699306842319063
4.2.5.8. Vibrational#
The vibrational energy of a diatomic molecule can be approximated as a single quantum harmonic oscillator the energy for which can be expressed as
where \(\nu = \frac{\sqrt{\frac{k}{\mu}}}{2\pi}\) is the vibrational frequency of the oscillator with spring force constant \(k\) and reduced mass \(\mu\) and \(v\) is the vibrational quantum number. Notice that, confusingly, there is both a \(v\) (the quantum number) and \(\nu\) in the equation above.
From this we get that the vibrational partition function is
Unlike the translational and rotational p.f.s, here we don’t need to approximate this sum using an integral. Instead, we will employ the concept of a convergent geometric series
The \(x\) in our equation is \(e^{-\beta vh\nu}\) which will be strictly less than one. Thus we get
Plugging this back into the equation for \(q_{vib}\) yields
We can again ‘simplify’ this expression by introducing the concept of a vibrational temperature, \(\Theta_{vib} = \frac{h\nu}{k_B}\) to get
4.2.5.8.1. Example 2: Compute the probability of observing a molecule of CO, \(\Theta_{vib} = 3103\) K, in the \(v=1\) vibrational energy level at \(T=300\) K.#
This porblem is similar to the rotation example but here we will use vibrations. But this still boils down to
The vibrational states are all singley degenerate so we don’t need to worry about those. Here is the work
For our particular problem this yields
import numpy as np
print(np.exp(-3103/300) - np.exp(-2*3103/300))
3.220575029911928e-05
4.2.5.9. Combined Partition Function#
The combined molecular partition function for a diatomic molecule is