Open Systems#

Information

Fig. 21 Open systems are characterized by variable number of particles and energy#

Grand Canonical Ensemble#

  • Consider small system \( S \) in thermal and particle exchange with a large reservoir \( R \).

  • The total system \( S + R \) is isolated: total energy \( E_{\text{tot}} = E + E_R \), total particle number \( N_{\text{tot}} = N + N_R \).

  • Total volume is constant, and the reservoir is much larger: \( E \ll E_R \), \( N \ll N_R \).

../_images/a2dac150b8c4d126501e4fdfdafe177265c00aa759452b8720ff1c68830ee5e7.png

Microstate Probability#

  • The probability that the system has energy \( E \) and particle number \( N \) is proportional to the number of microstates of the reservoir with \( E_R = E_{\text{tot}} - E \), \( N_R = N_{\text{tot}} - N \):

\[ P(E, N) \propto \Omega_R(E_{\text{tot}} - E, N_{\text{tot}} - N) \]
  • Define entropy of the reservoir \( S_R = k_B \ln \Omega_R \). Then:

\[ \ln \Omega_R(E_R, N_R) = \ln \Omega_R(E_{\text{tot}} - E, N_{\text{tot}} - N) \]
  • Expand to first order:

\[ \ln \Omega_R \approx \ln \Omega_R(E_{\text{tot}}, N_{\text{tot}}) - \left( \frac{\partial S_R}{\partial E_R} \right)_{N_R} \frac{E}{k_B} - \left( \frac{\partial S_R}{\partial N_R} \right)_{E_R} \frac{N}{k_B} \]
  • Use thermodynamic definitions:

\[ \frac{1}{T} = \left( \frac{\partial S_R}{\partial E_R} \right)_{N_R}, \quad \frac{\mu}{T} = -\left( \frac{\partial S_R}{\partial N_R} \right)_{E_R} \]
\[ \ln \Omega_R(E_R, N_R) = \text{const} - \frac{E}{k_B T} + \frac{\mu N}{k_B T} \]
\[ P(E, N) \propto e^{-\beta (E - \mu N)} \]

Grand Canonical Distribution and Partition Function#

Define the grand canonical partition function:

\[ \Xi = \sum_N \sum_{\text{states at } N} e^{-\beta (E - \mu N)} = \sum_N z^N Z_N \]

where:

  • \( z = e^{\beta \mu} \) is called the fugacity.

  • \( Z_N = \sum_{\text{states at fixed } N} e^{-\beta E} \) is the canonical partition function at fixed \( N \)

  • The microstate probability in grand canonical ensemble is:

\[ P(E, N) = \frac{e^{-\beta (E - \mu N)}}{\Xi} \]
  • The macrostate probability over different energy values in grand canonical ensemble is:

\[ P(E, N) = \frac{\Omega(E) e^{-\beta (E - \mu N)}}{\Xi} \]

Grand-Canonical distribution

\[p(E_i, N) = \frac{e^{-\beta(E_i -\mu N)}}{\Xi}\]
\[\Xi(\mu, \beta, V) = \sum_i \sum_N e^{-\beta (E_i-\mu N)} \]

Connections with \(NVE\) and \(NVT\)#

Statistical Dominance of Average Energy and Particle Number#

  • Recall that the canonical ensemble emerges by weighting microcanonical contributions at different energies with an exponential factor \( e^{-\beta E} \).

  • Similarly, the grand canonical ensemble arises by further summing over all particle numbers \( N \), each weighted by the fugacity factor \( e^{\beta \mu N} \). This yields the grand canonical partition function:

    \[ \Xi(T, V, \mu) = \sum_{N=0}^{\infty} \left[ \sum_i e^{-\beta E_i} \right] e^{\beta \mu N} = \sum_{N=0}^{\infty} Z(N, V, T) \, e^{\beta \mu N} \]
  • In the thermodynamic limit, the sum is dominated by the most probable energy and particle number, giving:

    \[ \Xi \approx e^{-\beta (F - \mu \bar{N})} = e^{-\beta (\bar{E} - T S - \mu \bar{N})} = e^{-\beta \Psi(T, V, \mu)} \]
  • We identify a new thermodynamic potential for the grand canonical ensemble that plays same role as free energy in canonical ensemble:

Grand potential

\[ \Psi(T, V, \mu) = E - T S - \mu N \]

Thermodynamics and Legendre transform#

  • In thermodynamics grand potential \( \Psi \) is derived from the internal energy \( E(S, V, N) \) via a Legendre transform that replaces the natural variables \( S \to T \) and \( N \to \mu \):

    \[ E(S, V, N) \rightarrow E - \left( \frac{\partial E}{\partial S} \right) S - \left( \frac{\partial E}{\partial N} \right) N = E - T S - \mu N \]

Grand Potential and Pressure#

  • Using Euler’s relation for extensive thermodynamic variables:

    \[ E = T S + P V + \mu N \]
  • Substituting into the definition of \( \Psi \), we find:

    \[ \Psi = E - T S - \mu N = -P V \]
  • Hence, the grand potential is directly related to the pressure and volume:

    \[ {\Psi(T, V, \mu) = -P V} \]

Fluctuations in particle numbers#

\[ \langle N \rangle = \sum_i p_i N_i = \frac{\partial \log Z_G}{\partial (\beta \mu)} \]
\[ \sigma_N^2 = \langle N^2 \rangle - \langle N \rangle^2 = \frac{\partial^2 \log Z_G}{\partial (\beta \mu)^2} = \frac{\partial \langle N \rangle}{\partial (\beta \mu)} \]
  • We once again find that in case of fluctuating quantities (energy in NVT) the relative fluctuation scales as \(N^{-1/2}\) a hallmark of Central Limit Theorem!

\[ \frac{\sigma_N}{\langle N \rangle} \sim O(N^{-1/2}) \]
  • Using thermodynamics we could also link number fluctuations with isothermal compressibility \(\kappa_T\)

\[\kappa_T = -\frac{1}{V} \frac{\partial V}{\partial p} \geq 0\]
  • The relationship is analogus to what we had established in \(NVT\) between energy flcutuations and heat capcity.

\[ \sigma_N^2 = \frac{N^2 k_B T \kappa_T}{V} \sim O(N) \]
  • It takes a bit more work manipulating variables to get there in this case. See belwo for derivation:

Ideal Gas in the Grand Canonical Ensemble#

  • We begin by considering an ideal gas of indistinguishable, non-interacting particles in a volume \( V \), in thermal and chemical equilibrium with a reservoir at temperature \( T \) and chemical potential \( \mu \).

  • The canonical partition function for \( N \) particles is:

\[ Z(T, V, N) = \frac{1}{N!} \left( \frac{V}{\lambda^3} \right)^N \]
  • Where the thermal de Broglie wavelength is:

\[ \lambda = \frac{h}{\sqrt{2 \pi m k_B T}} \]

Grand Canonical Partition Function#

  • To account for fluctuations in particle number, we compute the grand canonical partition function:

\[ \Xi(T, V, \mu) = \sum_{N=0}^\infty Z(T, V, N)\, e^{\beta \mu N} = \sum_{N=0}^\infty \frac{1}{N!} \left( e^{\beta \mu} \frac{V}{\lambda^3} \right)^N = \exp\left( z \frac{V}{\lambda^3} \right) \]
  • Fugacity: \( z = e^{\beta \mu} \), a dimensionless measure of how favorable it is to add a particle to the system.

  • The average particle number is then obtained by taking first derivative withr espect to N

\[ \langle N \rangle = \frac{\partial \log \Xi}{\partial (\beta \mu)} = \frac{V}{\lambda^3} e^{\beta \mu} = z \frac{V}{\lambda^3} \]

Chemical Potential in Terms of Pressure and Density#

  • We can invert the relation for \( \langle N \rangle \) to express the chemical potential:

\[ \mu = k_B T \log \left( \frac{N \lambda^3}{V} \right) \]
  • Noting that for an ideal gas \( p = \frac{N k_B T}{V} \), this becomes:

Chemical Potential of Ideal Gas

\[ \mu = k_B T \log \left( (k_B T) \lambda^3 \cdot p \right) = \mu^0(T) + k_B T \log p \]
  • \( \mu^0(T)\) is the reference chemical potential at unit pressure.

Number Fluctuations#

  • In the grand canonical ensemble, number fluctuations are given by:

\[ \sigma_N^2 = \langle N^2 \rangle - \langle N \rangle^2 = \frac{\partial \langle N \rangle}{\partial (\beta \mu)} = \langle N \rangle = N \]
  • So the standard deviation \( \sigma_N \sim \sqrt{N} \), and relative fluctuations vanish as \( N^{-1/2} \) in the thermodynamic limit.

Isothermal Compressibility#

  • We relate number fluctuations to the isothermal compressibility \( \kappa_T \):

\[ \sigma_N^2 = \frac{N^2 k_B T \kappa_T}{V} \quad \Rightarrow \quad \kappa_T = \frac{V}{N^2 k_B T} \cdot \sigma_N^2 = \frac{V}{N k_B T} = \frac{1}{p} \]
  • This is the well-known result for the ideal gas compressibility:

  • \( \kappa_T = \frac{1}{p} \geq 0 \), a positive quantity ensuring mechanical stability.

Molecular Adsorption of Ideal Gas on Surfaces#

One Site–One Molecule Model#

We consider a simple model where each adsorption site can hold at most one molecule. The surface is in thermal and chemical equilibrium with a gas reservoir at temperature \( T \) and chemical potential \( \mu \).

  • Each site has two possible states:

    • Empty: energy \( E = 0 \)

    • Occupied: energy \( E = \epsilon \)

  • Then the grand partition function for a single site is:

\[ \Xi = 1 + e^{-\beta(\epsilon - \mu)} \]

\( N \) Independent Sites#

  • If there are \( N \) independent and identical adsorption sites, then the total grand partition function is:

\[ \Xi_{\text{total}} = \Xi^N = \left(1 + e^{-\beta(\epsilon - \mu)}\right)^N \]
  • Since the sites do not interact, their contributions multiply.

Average Number of Adsorbed Molecules#

The average occupation number per site is:

\[ \langle n \rangle = \frac{1}{e^{-\beta(\mu - \epsilon)} + 1} \]

The total number of adsorbed molecules is:

\[ \langle N_{\text{ads}} \rangle = N \langle n \rangle = \frac{N}{e^{-\beta(\mu - \epsilon)} + 1} \]

Average Energy#

The average energy per site is:

\[ \langle E \rangle = \epsilon \langle n \rangle \]

The total energy of the system is:

\[ \langle E_{\text{total}} \rangle = N \epsilon \langle n \rangle \]

Connecting to Pressure#

  • For an ideal gas in the reservoir, the chemical potential is related to pressure via:

\[ \mu = k_B T \log \left( \frac{p}{p_0} \right) \]
  • Substituting this into the expression for \( \langle n \rangle \):

\[ \langle n \rangle = \frac{p}{p_0 e^{\beta \epsilon} + p} \]
  • and thus the total number of adsorbed molecules becomes:

\[ \langle N_{\text{ads}} \rangle = N \cdot \frac{p}{p_0 e^{\beta \epsilon} + p} \]
  • This is the Langmuir adsorption isotherm, describing how the fraction of occupied adsorption sites depends on gas pressure. It captures saturation behavior as \( p \to \infty \), where \( \langle n \rangle \to 1 \).

Hide code cell source
import matplotlib.pyplot as plt
import numpy as np

# Parameters
T = 298  # Temperature in K
epsilon = 10 * 1.38e-23  # Adsorption energy in J (10 k_B T)
k_B = 1.38e-23  # Boltzmann constant
beta = 1 / (k_B * T)
p0 = 1  # Reference pressure (arbitrary units)

# Pressure range
p = np.linspace(0, 5, 500)

# Langmuir isotherm
n_avg = p / (p0 * np.exp(beta * epsilon) + p)

# Plotting
plt.figure(figsize=(8, 5))
plt.plot(p, n_avg, lw=2)
plt.xlabel('Pressure (p / p₀)', fontsize=12)
plt.ylabel('Average Occupancy ⟨n⟩', fontsize=12)
plt.title('Langmuir Adsorption Isotherm', fontsize=14, weight='bold')
plt.grid(True)
plt.ylim(0, 1.05)
plt.xlim(0, 5)
plt.tight_layout()
plt.show()
../_images/2e1a8898f310b9ce6560c9e2a91a3d1207b058ab799f41430b5075c6b96deeea.png

Exercise: Multi-stide binding of molecular gas with internal states

Write down partition function for these scenarious

  1. Molecule A binds to one site and adopts 2 conformations.

  2. Two molecules of B can bind one site. When one molecle is bound it has one conformation and when two bound there are 5 conformations.

Chemical Equilibrium in gas mixtures#

For each species \( i \), the canonical partition function is:

\[ Z_i = \frac{z_i^{N_i}}{N_i!} \quad \text{with} \quad z_i = \frac{V}{\lambda_i^3} q_i^{\text{int}}(T) \]

where:

  • \( \lambda_i = \frac{h}{\sqrt{2\pi m_i k_B T}} \) is the thermal wavelength,

  • \( q_i^{\text{int}} \) is the internal partition function (rotations, vibrations, etc.),

  • \( N_i \) is the number of molecules of species \( i \).

  • For conenvience lets use the Helmholtz free energy (same result with Gibbs Free energy):

\[ F = -k_B T \log Z = -k_B T \sum_i \log Z_i = -k_B T \sum_i \left[ N_i \log z_i - \log N_i! \right] \]
  • Using Stirling’s approximation \( \log N_i! \approx N_i \log N_i - N_i \):

\[ F \approx k_B T \sum_i N_i \left( \log \frac{N_i}{z_i} - 1 \right) \]

Equilibrium via minimization of free energy#

  • Now, we consider a chemical reaction:

\[ aA + bB \rightleftharpoons cC + dD \]
  • We introduce an extent of reaction \( \xi \) which measures how far reaction has progressed from reactants to products:

\[ N_A = N_A^0 - a\xi,\quad N_B = N_B^0 - b\xi,\quad N_C = N_C^0 + c\xi,\quad N_D = N_D^0 + d\xi \]
  • We minimize \( F(\xi) \) at constant \( T, V \) by setting:

\[ \frac{dF}{d\xi} = 0 \]
  • Computing the derivative:

\[ \frac{dF}{d\xi} = \sum_i \frac{\partial F}{\partial N_i} \frac{dN_i}{d\xi} = \sum_i \mu_i \nu_i = 0 \]
  • with \( \nu_i \) the stoichiometric coefficient (\( < 0 \) for reactants, \( > 0 \) for products). Or we can write it in terms of positive stochimoetric coefficients:

Chemical potential and Chemical equilibrium

\[ \sum \nu_i^{react} \mu^{react}_i = \sum_i \nu^{prod}_i \mu^{prod}_i \]
\[ \mu_i = \frac{\partial F}{\partial N_i} = k_B T \log \left( \frac{N_i}{z_i} \right) \]
  • So the equilibrium condition is:

\[ \sum_i \nu_i \mu_i = k_B T \sum_i \nu_i \log \left( \frac{N_i}{z_i} \right) = 0 \]
  • Exponentiating both sides we relate ration of equilibrium numbers or concentrations to partition functions

\[ \prod_i \left( \frac{N_i}{z_i} \right)^{\nu_i} = 1 \]

Equilibrium Constant from Partition Functions

\[ K_{eq} = \frac{N_C^c N_D^d}{N_A^a N_B^b} = \frac{z_C^c z_D^d}{z_A^a z_B^b} \]

Problems#

\(NVT-NVE-\mu V T\)#

  1. Consider a three level single particle system with five microstates with energies 0, ε, ε, ε, and 2ε. What is \(\Omega(\epsilon n)\) n=0,1,2 for this system? What is the mean energy of the system if is in equilibrium with a heat bath at temperature T ?

  2. Derive an expression for the chemical potential of an ideal gas using clssical mechanics model for energy \(E=\frac{p^2}{2m}\) in the \(\mu VT\) ensemble evaluate the fluctuations in particle number.

  3. Consider a system in equilibrium with a heat bath at temperature \(T\) and a particle reservoir at chemical potential \(\mu\). The system can have a minimum of one and a maximum of four distinguishable particles. The particles in the system do not interact and can be in one of two states with energies zero or \(\Delta\). Determine the (grand) partition function of the system.

  4. Combine the Gibbs formula of Entropy \(S=-k_B \sum_i p_i log p_i\) with the Grand canonical prbability distribution \(P(E_i,N)=\frac{e^{-\beta E_i+ \beta \mu N}}{Z_G}\) to show that \(\beta PV=log Z_G\)

  5. Derive partition function for a pressure ensemble \((T, p, N)\) and show its connection with microcanonical ensemble \(N V E\)

  6. At a given temperature T a surface with \(N_0\) adsorption centers has on average \(N\neq N_0\) number of adsorbed molecules. Suppose hat there are no interactions between molecules.

    • Show that the chemical potential of adsorbed gas is given by: \(\mu = k_B T log \frac{N}{N_0 - N a(T)}\)

    • What is the meaning of \(a(T)\)