M3.D2: Partition functions of atoms#
Learning Objectives#
Use words to express how partition functions can be used to calculate macroscopic properties such as the internal energy of a gas
Use terms such as microstate and macrostate to explain how the microscopic properties affect the macroscopic observations
Plot and explain how the translational partition function of a gas depends on the temperature and the mass of the gas
Calculate the internal energy of an atomic ideal gas.
How to calculate a macroscopic property#
A very important postulate in Statistical Mechanics is that an observed macroscopic property can be calculated with the weighted average of all states.
so for the internal energy (thermal energy) of a macroscopic system \(U\) or \(<E>\). We know that the probability is given by the Boltzmann factor:
It can also be shown that the above expression is similar to deriving the \(ln(Q)\) such that
In other words, if we know the partition function we can calculate macroscopic properties such as the internal energy of a system.
It is important to understand that above \(E_i\) is a microstate of the macroscopic system. Think about the air in your room. Each \(E_i\) is one possible arrangement of all the molecules in the room, that is, \(E_i\) contains the energy of all molecules. As you can see, we need to establish a connection between the energy of one molecule and the energy of the whole system, that is, connecting the microscopic with the macroscopic.
Microscopic - Macroscopic connection#
If we assume that a macroscopic system, imagine a gas made out of moles of particles, is made out of independent particles (atoms or molecules), we can write the overall energy of this system as the summation of the energy of the particles
where E is the macroscopic energy of one microstate (\(E_i\) not \(<E>\)), \(\epsilon_i\) the microscopic energy of particle \(i\), and N is the total number of particles.
Given that the particles are independent of each other, the overall macroscopic partition function Q will be the product of independent particles
If all the particles in the system are made out of the same atom or molecule, then \(Q(NVT) = (q)^N\)
However, because particles are indistinguishable we are overcounting them and we have to divide the above number by \(N!\)
In the next section we will calculate the atomic partition function q. This will allow us to calculate the macroscopic partition function Q and use it to calculate the internal energy and other thermodynamics potentials.
Overall view#
At this point it may be confusing to conceptually identify the different terms such as microstate, microscopic…etc. Often in Chemistry you have dealt with the properties of a single molecule (polarity, structure…) and then extrapolated certain atomic/molecular properties to macroscopic observations. For example, the polarity of one molecule can explain the macroscopic observation of one liquid fully dissolving with another. But this leap is often not connected. Statistical thermodynamics does exactly this connection. The macroscopic observations are the average over time of a large collection of molecules. So we have two axis, time and size.
Notice micro or macrostate does not refer to the size of the system, but to the “summation” over possible number of states of the system over time (note here: the mention of an average over time is not rigorous, but it is useful at this level). The ideal gas approximation tells us that each molecule or particle is independent of each other so we can factorize its energy as a sum of independent particles, and we can calculate overall macroscopic structures using the molecular partition function.
Partition function of an atom#
One atom will not have rotational nor vibrational levels, but it will have electronic and translational
And therefore the partition function of the atom is:
The translational partition function: particle in a box#
We can use the results of the particle in a box studied during M1.D2 to calculate the energy levels of an atomic gas. Remember that in in 3D the energy will depend on three independent quantum numbers \(n_x, n_y, n_z = 1,2,3...\)
the partition function will be adding all possible quantum numbers to obtain all the levels. For a macroscopic/large box \(L\) the energy levels will be very close together so the summation can be approximated by an integral
The electronic partition function#
Because generally the electronic levels are so far apart in energy, only the first level contributes. Given that the lowest energy is set to \(E_{elec} = 0\), for many closed shell molecules \(q_{elec}=1\), that is, only one state is available independent of temperature. And therefore the electronic levels will not contribute to the thermal/internal energy.
How the atomic partition function changes for different atoms#
The code below shows how the atomic partition function changes
import numpy as np
import matplotlib.pyplot as plt
# Constants
h = 6.626e-34 # Planck's constant (J·s)
k_B = 1.381e-23 # Boltzmann constant (J/K)
# Temperature range
T = np.linspace(50, 1000, 500) # Temperature from 50 K to 1000 K
V=1. # Volume in cubic meters
m_H = 1.67e-27 # Mass of a hydrogen atom (kg)
m_He = 6.646e-27 # Mass of a helium atom (kg)
# Translational partition function
q_H = (2*np.pi*m_H*k_B*T/h**2)**(3/2)*V
q_He = (2*np.pi*m_He*k_B*T/h**2)**(3/2)*V
# Plot
plt.figure(figsize=(8, 5))
plt.plot(T, q_H, label='Hydrogen atom', color='b')
plt.plot(T, q_He, label='Helium atom', color='r')
plt.xlabel('Temperature (K)')
plt.ylabel('Translational Partition Function $q_t$')
plt.legend()
plt.grid(True)
plt.show()
Calculating the internal energy of an atomic ideal gas#
Let’s use the atomic partition functions to calculate macroscopic thermodynamic properties. To calculate the internal energy of an atomic ideal gas we have: $\( U = <E_{trans}> + <E_{elec}> \approx <E_{trans}> \)$
The contribution from electronic energy is very small because it has a small density of states. So we can just focus on the contribution from translational energy. We start with the translational partition function for a single particle in a 3D box:
For N indistinguishable particles, the total partition function is:
Taking the natural logarithm and using Stirling’s approximation \( \ln N! \approx N \ln N - N \):
So we can just focus on the \(\ln q_{\text{trans}}\) because it’s the only term that depends on the temperature. So
Remember what the translational partition function looks like $\( ln (q_{trans}) = ln(\left( \frac{2\pi m k_B T}{h^2}\right)^{3/2} V) \)$
If we derive by the temperature we have
And for macroscopic ideal gases we multiply by the number of moles and the terms that do not depend on T will vanish, so the total internal energy of an atomic ideal gas at temperature T is
Remember that the above is only true under the following assumptions
Ideal gas: No interactions between molecules that allows us to split the macroscopic partition function into a product of microscopic ones: \(Q = \frac{q^N}{N!}\)
Monoatomic gas: monoatomic species will not have rotational or vibrational components
Electronic ground state is a singlet and the first excited state has high energy. This would mean that \(q_{electronic}=1\) and therefore it does not depend on the T.
Questions#
Question: Use your words to define: microstate, macrostate, macroscopic system, microscopic system
Explain with your words the difference between the two types of partition functions used above: q(T) and Q(N,V,T)
To the plot showing how the translational partition function of H and He change with the temperature, add another plot showing Neon’s.
Remember the effect of the mass on the “density of states” of the particle in a box. Why is the Helium translational partition function larger than the hydrogen one?
Calculate the internal energy of one mole of atomic hydrogen gas at 300K and compare it with the internal energy of one mole of helium at 300K. Rationalize and explain why the hydrogen and Helium’s partition functions are different but their internal energy are the same.