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 Etot=E+ER, total particle number Ntot=N+NR.

  • Total volume is constant, and the reservoir is much larger: EER, NNR.

../_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 ER=EtotE, NR=NtotN:

P(E,N)ΩR(EtotE,NtotN)
  • Define entropy of the reservoir SR=kBlnΩR. Then:

lnΩR(ER,NR)=lnΩR(EtotE,NtotN)
  • Expand to first order:

lnΩRlnΩR(Etot,Ntot)(SRER)NREkB(SRNR)ERNkB
  • Use thermodynamic definitions:

1T=(SRER)NR,μT=(SRNR)ER
lnΩR(ER,NR)=constEkBT+μNkBT
P(E,N)eβ(EμN)

Grand Canonical Distribution and Partition Function#

Define the grand canonical partition function:

Ξ=Nstates at Neβ(EμN)=NzNZN

where:

  • z=eβμ is called the fugacity.

  • ZN=states at fixed NeβE is the canonical partition function at fixed N

  • The microstate probability in grand canonical ensemble is:

P(E,N)=eβ(EμN)Ξ
  • The macrostate probability over different energy values in grand canonical ensemble is:

P(E,N)=Ω(E)eβ(EμN)Ξ

Grand-Canonical distribution

p(Ei,N)=eβ(EiμN)Ξ
Ξ(μ,β,V)=iNeβ(Eiμ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βE.

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

    Ξ(T,V,μ)=N=0[ieβEi]eβμN=N=0Z(N,V,T)eβμ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,μ)
  • We identify a new thermodynamic potential for the grand canonical ensemble that plays same role as free energy in canonical ensemble:

Grand potential

Ψ(T,V,μ)=ETSμN

Thermodynamics and Legendre transform#

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

    E(S,V,N)E(ES)S(EN)N=ETSμN

Grand Potential and Pressure#

  • Using Euler’s relation for extensive thermodynamic variables:

    E=TS+PV+μN
  • Substituting into the definition of Ψ, we find:

    Ψ=ETSμN=PV
  • Hence, the grand potential is directly related to the pressure and volume:

    Ψ(T,V,μ)=PV

Fluctuations in particle numbers#

N=ipiNi=logZG(βμ)
σN2=N2N2=2logZG(βμ)2=N(βμ)
  • We once again find that in case of fluctuating quantities (energy in NVT) the relative fluctuation scales as N1/2 a hallmark of Central Limit Theorem!

σNNO(N1/2)
  • Using thermodynamics we could also link number fluctuations with isothermal compressibility κT

κT=1VVp0
  • The relationship is analogus to what we had established in NVT between energy flcutuations and heat capcity.

σN2=N2kBTκTVO(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 μ.

  • The canonical partition function for N particles is:

Z(T,V,N)=1N!(Vλ3)N
  • Where the thermal de Broglie wavelength is:

λ=h2πmkBT

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)
  • Fugacity: z=eβμ, 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

Chemical Potential in Terms of Pressure and Density#

  • We can invert the relation for N to express the chemical potential:

μ=kBTlog(Nλ3V)
  • Noting that for an ideal gas p=NkBTV, this becomes:

Chemical Potential of Ideal Gas

μ=kBTlog((kBT)λ3p)=μ0(T)+kBTlogp
  • μ0(T) is the reference chemical potential at unit pressure.

Number Fluctuations#

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

σN2=N2N2=N(βμ)=N=N
  • So the standard deviation σNN, and relative fluctuations vanish as N1/2 in the thermodynamic limit.

Isothermal Compressibility#

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

σN2=N2kBTκTVκT=VN2kBTσN2=VNkBT=1p
  • This is the well-known result for the ideal gas compressibility:

  • κT=1p0, 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 μ.

  • Each site has two possible states:

    • Empty: energy E=0

    • Occupied: energy E=ϵ

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

Ξ=1+eβ(ϵμ)

N Independent Sites#

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

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

The total number of adsorbed molecules is:

Nads=Nn=Neβ(μϵ)+1

Average Energy#

The average energy per site is:

E=ϵn

The total energy of the system is:

Etotal=Nϵn

Connecting to Pressure#

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

μ=kBTlog(pp0)
  • Substituting this into the expression for n:

n=pp0eβϵ+p
  • and thus the total number of adsorbed molecules becomes:

Nads=Npp0eβϵ+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, where n1.

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:

Zi=ziNiNi!withzi=Vλi3qiint(T)

where:

  • λi=h2πmikBT is the thermal wavelength,

  • qiint is the internal partition function (rotations, vibrations, etc.),

  • Ni is the number of molecules of species i.

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

F=kBTlogZ=kBTilogZi=kBTi[NilogzilogNi!]
  • Using Stirling’s approximation logNi!NilogNiNi:

FkBTiNi(logNizi1)

Equilibrium via minimization of free energy#

  • Now, we consider a chemical reaction:

aA+bBcC+dD
  • We introduce an extent of reaction ξ which measures how far reaction has progressed from reactants to products:

NA=NA0aξ,NB=NB0bξ,NC=NC0+cξ,ND=ND0+dξ
  • We minimize F(ξ) at constant T,V by setting:

dFdξ=0
  • Computing the derivative:

dFdξ=iFNidNidξ=iμiνi=0
  • with ν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

νireactμireact=iνiprodμiprod
μi=FNi=kBTlog(Nizi)
  • So the equilibrium condition is:

iνiμi=kBTiνilog(Nizi)=0
  • Exponentiating both sides we relate ration of equilibrium numbers or concentrations to partition functions

i(Nizi)νi=1

Equilibrium Constant from Partition Functions

Keq=NCcNDdNAaNBb=zCczDdzAazBb

Problems#

NVTNVEμVT#

  1. Consider a three level single particle system with five microstates with energies 0, ε, ε, ε, and 2ε. What is Ω(ϵ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=p22m in the μ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 μ. 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 Δ. Determine the (grand) partition function of the system.

  4. Combine the Gibbs formula of Entropy S=kBipilogpi with the Grand canonical prbability distribution P(Ei,N)=eβEi+βμNZG to show that βPV=logZG

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

  6. At a given temperature T a surface with N0 adsorption centers has on average NN0 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)

    • What is the meaning of a(T)