Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Open Systems

figure-md - Unknown Directive
<img src="./figs/bottleocean.jpg" alt="Information" style="width:10%">

Open systems are characterized by variable number of particles and energy

Grand Canonical Ensemble

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

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

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

<Figure size 700x600 with 1 Axes>

Microstate Probability

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

P(E,N)ΩR(EtotE,NtotN)P(E, N) \propto \Omega_R(E_{\text{tot}} - E, N_{\text{tot}} - N)
  • Define entropy of the reservoir SR=kBlnΩR S_R = k_B \ln \Omega_R . Then:

lnΩR(ER,NR)=lnΩR(EtotE,NtotN)\ln \Omega_R(E_R, N_R) = \ln \Omega_R(E_{\text{tot}} - E, N_{\text{tot}} - N)
  • Expand to first order:

lnΩRlnΩR(Etot,Ntot)(SRER)NREkB(SRNR)ERNkB\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:

1T=(SRER)NR,μT=(SRNR)ER\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ΩR(ER,NR)=constEkBT+μNkBT\ln \Omega_R(E_R, N_R) = \text{const} - \frac{E}{k_B T} + \frac{\mu N}{k_B T}
P(E,N)eβ(EμN)P(E, N) \propto e^{-\beta (E - \mu N)}

Grand Canonical Distribution and Partition Function

Define the grand canonical partition function:

Ξ=Nstates at Neβ(EμN)=NzNZN\Xi = \sum_N \sum_{\text{states at } N} e^{-\beta (E - \mu N)} = \sum_N z^N Z_N

where:

  • z=eβμ z = e^{\beta \mu} is called the fugacity.

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

  • The microstate probability in grand canonical ensemble is:

P(E,N)=eβ(EμN)Ξ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)=Ω(E)eβ(EμN)ΞP(E, N) = \frac{\Omega(E) e^{-\beta (E - \mu N)}}{\Xi}

Connections with NVENVE and NVTNVT

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βE e^{-\beta E} .

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

    Ξ(T,V,μ)=N=0[ieβEi]eβμN=N=0Z(N,V,T)eβμN\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:

    Ξeβ(FμNˉ)=eβ(EˉTSμNˉ)=eβΨ(T,V,μ)\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:

Thermodynamics and Legendre transform

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

    E(S,V,N)E(ES)S(EN)N=ETSμNE(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=TS+PV+μNE = T S + P V + \mu N
  • Substituting into the definition of Ψ \Psi , we find:

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

    Ψ(T,V,μ)=PV{\Psi(T, V, \mu) = -P V}

Fluctuations in particle numbers

N=ipiNi=logZG(βμ)\langle N \rangle = \sum_i p_i N_i = \frac{\partial \log Z_G}{\partial (\beta \mu)}
σN2=N2N2=2logZG(βμ)2=N(βμ)\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 N1/2N^{-1/2} a hallmark of Central Limit Theorem!

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

κT=1VVp0\kappa_T = -\frac{1}{V} \frac{\partial V}{\partial p} \geq 0
  • The relationship is analogus to what we had established in NVTNVT between energy flcutuations and heat capcity.

σN2=N2kBTκTVO(N)\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 V , in thermal and chemical equilibrium with a reservoir at temperature T T and chemical potential μ \mu .

  • The canonical partition function for N N particles is:

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

λ=h2πmkBT\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:

Ξ(T,V,μ)=N=0Z(T,V,N)eβμN=N=01N!(eβμVλ3)N=exp(zVλ3)\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βμ 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

N=logΞ(βμ)=Vλ3eβμ=zVλ3\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 N \langle N \rangle to express the chemical potential:

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

Number Fluctuations

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

σN2=N2N2=N(βμ)=N=N\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 σNN \sigma_N \sim \sqrt{N} , and relative fluctuations vanish as N1/2 N^{-1/2} in the thermodynamic limit.

Isothermal Compressibility

  • We relate number fluctuations to the isothermal compressibility κT \kappa_T :

σN2=N2kBTκTVκT=VN2kBTσN2=VNkBT=1p\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:

  • κT=1p0 \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 T and chemical potential μ \mu .

  • Each site has two possible states:

    • Empty: energy E=0 E = 0

    • Occupied: energy E=ϵ E = \epsilon

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

Ξ=1+eβ(ϵμ)\Xi = 1 + e^{-\beta(\epsilon - \mu)}

N N Independent Sites

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

Ξtotal=ΞN=(1+eβ(ϵμ))N\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:

n=1eβ(μϵ)+1\langle n \rangle = \frac{1}{e^{-\beta(\mu - \epsilon)} + 1}

The total number of adsorbed molecules is:

Nads=Nn=Neβ(μϵ)+1\langle N_{\text{ads}} \rangle = N \langle n \rangle = \frac{N}{e^{-\beta(\mu - \epsilon)} + 1}

Average Energy

The average energy per site is:

E=ϵn\langle E \rangle = \epsilon \langle n \rangle

The total energy of the system is:

Etotal=Nϵn\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:

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

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

Nads=Npp0eβϵ+p\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 p \to \infty , where n1 \langle n \rangle \to 1 .

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()
<Figure size 800x500 with 1 Axes>

Chemical Equilibrium in gas mixtures

For each species i i , the canonical partition function is:

Zi=ziNiNi!withzi=Vλi3qiint(T)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:

  • λi=h2πmikBT \lambda_i = \frac{h}{\sqrt{2\pi m_i k_B T}} is the thermal wavelength,

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

  • Ni N_i is the number of molecules of species i i .

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

F=kBTlogZ=kBTilogZi=kBTi[NilogzilogNi!]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 logNi!NilogNiNi \log N_i! \approx N_i \log N_i - N_i :

FkBTiNi(logNizi1)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+bBcC+dDaA + bB \rightleftharpoons cC + dD
  • We introduce an extent of reaction ξ \xi which measures how far reaction has progressed from reactants to products:

NA=NA0aξ,NB=NB0bξ,NC=NC0+cξ,ND=ND0+dξ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(ξ) F(\xi) at constant T,V T, V by setting:

dFdξ=0\frac{dF}{d\xi} = 0
  • Computing the derivative:

dFdξ=iFNidNidξ=iμiνi=0\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 νi \nu_i the stoichiometric coefficient (<0 < 0 for reactants, >0 > 0 for products). Or we can write it in terms of positive stochimoetric coefficients:

μi=FNi=kBTlog(Nizi)\mu_i = \frac{\partial F}{\partial N_i} = k_B T \log \left( \frac{N_i}{z_i} \right)
  • So the equilibrium condition is:

iνiμi=kBTiνilog(Nizi)=0\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

i(Nizi)νi=1\prod_i \left( \frac{N_i}{z_i} \right)^{\nu_i} = 1

Problems

NVTNVEμVTNVT-NVE-\mu V T

  1. Consider a three level single particle system with five microstates with energies 0, ε, ε, ε, and 2ε. What is Ω(ϵn)\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=p22mE=\frac{p^2}{2m} in the μVT\mu VT ensemble evaluate the fluctuations in particle number.

  3. Consider a system in equilibrium with a heat bath at temperature TT 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=kBipilogpiS=-k_B \sum_i p_i log p_i with the Grand canonical prbability distribution P(Ei,N)=eβEi+βμNZGP(E_i,N)=\frac{e^{-\beta E_i+ \beta \mu N}}{Z_G} to show that βPV=logZG\beta PV=log Z_G

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

  6. At a given temperature T a surface with N0N_0 adsorption centers has on average NN0N\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: μ=kBTlogNN0Na(T)\mu = k_B T log \frac{N}{N_0 - N a(T)}

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