Intro to Statistical Ensembles#

What you will learn

  • Statistical Ensembles: Understanding the role of ensembles in statistical mechanics and how they describe macroscopic systems using probability distributions.

  • Microcanonical Ensemble (NVE): Definition, characteristics, and assumptions—fixed energy, volume, and particle number; statistical weight of microstates.

  • Canonical Ensemble (NVT): Definition and significance—fixed temperature, volume, and particle number; derivation of the Boltzmann factor.

  • Equivalence of Ensembles: Conditions under which the microcanonical and canonical ensembles give equivalent thermodynamic predictions in the thermodynamic limit.

  • Partition Function (Z): Role of the partition function in statistical mechanics, its connection to thermodynamic properties (free energy, entropy, internal energy).

  • Boltzmann Distribution: Probability of a system being in a given energy state at equilibrium, leading to macroscopic observables.

  • Thermodynamic Connections: How ensemble averages link to macroscopic properties such as energy, entropy, and pressure.

  • Fluctuations and Large System Limits: How energy fluctuations in the canonical ensemble become negligible for large systems, reinforcing ensemble equivalence.

Microcanonical Ensemble (NVE)#

  • A collection of all possible microscopic arrangements consistend with an equilibrium thermodynamic state is called statistical ensemble.

  • Ensemble defines sample space over microstates over which we define micro and macro-state probabilities

  • Consider an isolated fluid system with N=const, V=const and E=const. This is called a microcanonical ensemble

  • In the absence of any physical constraints, no micro state is more probable than any other. This is known as “principle of equal a priory probability”.

../_images/940d937a24d3868dd2a911055ef3bfdca04c59451b03db77100a8430f50c3af3.png

A priori equal probability of microstates with energy E

pi=1Ω(N,V,E)
  • i=1,2,3,... distinct configurations or microstates with energy E

  • We can use postulate of equal mircro-state probabilities and plug into probabilisti expression of entropy to obtain a simple relationship between number of microstates and entropy:

S=kBipilogpi=kBΩ1Ωlog1Ω

Entropy in microcanonical ensemble (Boltzmann equation)

S=kBlogΩ
  • Ω is the number of micro-states consistent with a macrostate of our system.

  • S(N,V,E) is the entropy of an isolated system.

  • kB=1.3806491023J/K, Boltzmann’s constant

Simple example of NVE ensemble

  • Consider a system of three spins where and have the same energy ϵ. We have microcanonical ensemble defined by N=3 and E=3ϵ thermodynamic variables.

↑↑↑,↑↑↓,↑↓↑,↓↑↑,↑↓↓,↓↑↓,↓↓↑,↓↓↓
  • There are Ω=23 microstates with entropy being:

S=kBlog23=3kBlog2
  • For N spins we see that Ω=2N and therefore entropy scales linearly with system size N

S=NkBlog2

Exercise

Quantify the number of microstates of three spins given that down spin has energy zero and up spin has energy ϵ for the following two systems:

  • Total energy is E=2ϵ

  • Total energy is E=3ϵ

Microcanonical partition function grows exponentially with system size#

../_images/84c6665d550dd911c9218c4755f4842f8909186ed2216b070a9e4c90329af2fd.png
  • To estimate how the number of microstates behave as a function of system size consider N particles in a volume V, and particle density ρ=NV

  • Dividing the system into M statistically independent subregions of volume M=V/v containing Ωsub microstates in each we get:

Ω(E)=(Ωsub)M=(Ωsub1/ρv)N
  • We find that number of mirostates grows exponentially with syste size N. This implies a large deviation property: entropy scales extensively and grows monotonically with energy.

Large deviation propery of Ω

Ω(E)eNs(E/N)
S(E)=kBlogΩ(E)kBNs(E/N)
  • s(E/N) is an intensive quantity of entropy per-particle.

  • S(E) is an extensive quantity of total entropy of N partice system.

Applications of NVE#

Particles in a box#

  • For a single quantum particle in a cubical box of side L, the allowed energy levels are:

Enx,ny,nz(nx2+ny2+nz2)
  • Where nx,ny,nz are positive integers (quantum numbers).

  • To determine the number of microstates with total energy at most E, we count the number of allowed quantum states (nx,ny,nz) satisfying:

nx2+ny2+nz2E
  • For large E, this corresponds to counting integer lattice points inside a sphere of radius:

R=E
  • Since the number of points inside a sphere scales approximately as the volume of the sphere, we get:

Ω(E)43πR3E3/2
  • Thus, for a single particle, the number of accessible microstates grows as:

Ω(E)E3/2
  • For N independent particles, each particle contributes an independent set of quantum numbers, meaning we now count lattice points in a 3N-dimensional hypersphere.

Ω(E)E3N/2
Hide code cell source
# Create a combined figure
fig = plt.figure(figsize=(14, 6))

# ---------------- Plot 1: Scaling of Microstates ----------------
ax1 = fig.add_subplot(131)
E = np.linspace(1, 10, 200)

N=10

Omega = E**(1.5 * N)
ax1.plot(E, Omega, label=f"N = {N}", color='black', lw=3.5)

ax1.set_xlabel("Energy E")
ax1.set_ylabel(r"$\Omega(E) \sim E^{\frac{3N}{2}}$")
ax1.set_title("Scaling of $\Omega(E)$")
ax1.set_yscale('log')  # Logarithmic scale to better display the exponential growth
ax1.grid(True, linestyle='--', alpha=0.7)
ax1.legend()

# ---------------- Plot 2: Growth of Quantum States in 2D ----------------
ax2 = fig.add_subplot(132)
n_max = 15  # Reduce max quantum number for clarity
R_values = [5, 10, 15]
n_x_values = np.arange(1, n_max + 1)
n_y_values = np.arange(1, n_max + 1)

for n_x in n_x_values:
    for n_y in n_y_values:
        energy = n_x**2 + n_y**2
        if energy <= max(R_values)**2:
            ax2.scatter(n_x, n_y, color='black', s=10)

theta = np.linspace(0, 2 * np.pi, 300)
for R in R_values:
    ax2.plot(R * np.cos(theta), R * np.sin(theta), label=f'R = {R}', linewidth=1.5)

ax2.set_xlabel(r'$n_x$')
ax2.set_ylabel(r'$n_y$')
ax2.set_title('Quantum States Growth (2D)')
ax2.legend()
ax2.set_xlim(0, n_max)
ax2.set_ylim(0, n_max)
ax2.grid(True, linestyle='--', alpha=0.5)
ax2.set_aspect('equal')

# ---------------- Plot 3: 3D Representation of Quantum States ----------------
ax3 = fig.add_subplot(133, projection='3d')
n_max_3d = 10  # Reduce quantum number range for clarity

# Generate 3D quantum states
n_z_values = np.arange(1, n_max_3d + 1)
for n_x in np.arange(1, n_max_3d + 1):
    for n_y in np.arange(1, n_max_3d + 1):
        for n_z in np.arange(1, n_max_3d + 1):
            energy = n_x**2 + n_y**2 + n_z**2
            if energy <= max(R_values)**2:
                ax3.scatter(n_x, n_y, n_z, color='black', s=5)

ax3.set_xlabel(r'$n_x$')
ax3.set_ylabel(r'$n_y$')
ax3.set_zlabel(r'$n_z$')
ax3.set_title('Quantum States Growth (3D)')
ax3.view_init(elev=20, azim=45)

# Show the combined figure
plt.tight_layout()
plt.show()
../_images/f97f17881d9c56b2bc910d1a44ba1280ba625ef69e618075fb13655b6fe49766.png

Two state system#

  • Given N non-interacting spins where each spin can be up () with energy ϵ or down () with energy 0. The total energy is:

    E=nϵ
  • Determine fraction of excited states f=nN=ENϵ where n is number of up spins. Show how this fraciton changes with temperature

logΩ(E,N)=logN!n!(Nn)!=N!(E/ϵ)!(NE/ϵ)!
  • Using Striling’s approximation logN!=NlogNN we get:

logΩ(E,N)NlogNEϵlogEϵ(NEϵ)log(NEϵ)
  • We connect number of excited states to equilibrium temperature via thermodynamics

1T=dSdE=kBdlogΩdE
1kBT=1ϵlogEϵ+1ϵlog(NEϵ)
Eϵ=(NEϵ)eϵkBT
f=ENϵ=11+eϵkBT
  • This is the well-known Boltzmann factor result for a two-level system in thermal equilibrium. At high temperatures (kBTϵ), approximately half the particles are excited, while at low temperatures (kBTϵ).

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

# Create a figure with two subplots
fig, axes = plt.subplots(1, 2, figsize=(14, 6))

# Subplot 1: Growth of Ω(E) with Energy for Different Spin System Sizes
N_values = [10, 20, 50]  # Different spin system sizes

for N in N_values:
    energies = np.arange(0, N+1, 1)  # Possible energy levels
    multiplicities = sp.binom(N, energies)  # Compute binomial coefficient
    axes[0].plot(energies, multiplicities, label=f'N = {N}', linestyle='-', marker='o')

# Plot settings for first subplot
axes[0].set_yscale('log')  # Use logarithmic scale to highlight exponential growth
axes[0].set_xlabel(r'Total Energy $E$')
axes[0].set_ylabel(r'$\Omega(E)$ (Number of Microstates)')
axes[0].set_title(r'Growth of $\Omega(E)$ with Energy')
axes[0].legend()
axes[0].grid(True, which='both', linestyle='--')

# Subplot 2: Fraction of Particles in the Excited State vs. Temperature
epsilon = 1.0  # Set energy scale to 1 for simplicity
k_B = 1.0  # Boltzmann constant set to 1 for simplicity
T_values = [0.5, 1.0, 2.0, 5.0]  # Different temperature values

# Define function for fraction of excited particles
def fraction_excited(beta_epsilon):
    return 1 / (1 + np.exp(beta_epsilon))

# Generate beta_epsilon values
beta_epsilon_values = np.linspace(0, 5, 100)

# Plot f for different temperatures
for T in T_values:
    beta_epsilon = epsilon / (k_B * T) * beta_epsilon_values
    f_values = fraction_excited(beta_epsilon)
    axes[1].plot(beta_epsilon_values, f_values, label=f"T = {T}")

# Plot settings for second subplot
axes[1].set_xlabel(r"$\beta \epsilon$")
axes[1].set_ylabel(r"Fraction of Excited Particles $f$")
axes[1].set_title("Fraction of Particles in the Excited State")
axes[1].legend()
axes[1].grid(True, linestyle='--')

# Adjust layout
plt.tight_layout()
plt.show()
../_images/d717ab920389c5a524342c670da909011367acd339cab018386d6d2ebddf97e3.png

Energy partitioning in an isolated system#

../_images/84c67110fe748f9367f4697a05d5235dcdc18c8919f9140e0b93c202301c8043.png
  • ΩT(Et) is the total number of microstates of the whole isoluate box divided into:

    • Ω(E) number of microstates available to the system of interest

    • ΩR(ETE) number of microstates available to the Reservoir

  • Since reservoir and system can be considered statistically independent, the probability of finding the system in a macrostate with energy E is:

    p(E)=Ω(E)ΩR(EtE)ΩT(ET)
  • This is a ratio of all microstate where system gets E and reservoir EtE energies divided by total number of microstates. The latter given as sum of all possible partitionings of energy

    Ωt(Et)=EΩ(E)ΩR(ETE)
  • We can see that probability of macrostates is normalized EP(E)=1. The system is more likely to be in a macrostate E if there are more microstates that reaalize this partitioning.

../_images/fb56bd226eda89c94a681c6a9e2e455f57c978edecb33b9b26ccf0653cb79d5e.png
Hide code cell source
# Re-import necessary libraries since execution state was reset
import numpy as np
import matplotlib.pyplot as plt

# Define different system sizes
system_sizes = [(5, 10), (10, 20), (20, 40)]

# Define total energy
E_total = 5

# Create figure
plt.figure(figsize=(7, 6))

# Loop over different system sizes and plot
for N1, N2 in system_sizes:
    # Define energy range for system 1 (from 0 to E_total)
    E1_values = np.linspace(0.01, E_total, 50)  # Avoid E=0 to prevent singularities
    E2_values = E_total - E1_values  # Energy remaining for system 2

    # Compute microstates using Omega(E) ~ E^(3N/2)
    Omega1 = E1_values**(3 * N1 / 2)
    Omega2 = E2_values**(3 * N2 / 2)

    # Compute total number of microstates (product of subsystems)
    Omega_total = Omega1 * Omega2 / np.sum(Omega1 * Omega2)  # Normalize to get probability

    # Plot results
    plt.plot(E1_values, Omega_total, label=rf'$N_1={N1}, N_2={N2}$')

    # Draw vertical line at the peak (mean energy E = U)
    E_peak = E1_values[np.argmax(Omega_total)]
    plt.axvline(E_peak, color='black', linestyle=':', linewidth=2)

# Plot settings
plt.xlabel(r"Energy given to System: $E_1$")
plt.ylabel(r"$P(E_1)$")
plt.title("Probability Distribution of Energy Partitioning")
plt.legend()
plt.grid(True)

# Show plot
plt.show()
../_images/5537f9797f532ab87552667b3d858d5f3e5141255e1afe5b4bf1e52f227b6da2.png

Temperature is the driver of energy partitioning#

  • Which paritioning is most likely? For two systems exchanging energy we can write down probability of macrostate and find its maxima with respect to E

ddElogP(E)=ddE[logΩ(E)Ω2(ETE)]=0
ddElogP(E)=[ddElogΩ1ddElogΩ2]=0
  • Since logP(E)S(E)+SR(ETE) we note that Maximizing probability of a macrostate is the same as maximizing entropy of macrostate!

  • We also come to appreacite that inverse temperature β=1kBT, quantifies rate of growth of microstates.

  • At lower temperatures β is larger indicating faster growth of microstates. At higher temperatures β is smaller indicating slower groth of microstates with addition of energy.

Inverse Temperature β

dlogΩdE=1kBdSdE=1kBT=β
  • β has units of inverse energy, e.g J1

Thermal Equilibrium in Ideal Gases#

  • For a system of non-interacting particles in a box, the number of microstates follows ΩE32N. The entropy is defined as:

    StotalkBlogΩ1(E1)Ω2(EtotE1)=32NkBlogE1+32NkBlog(EE1)
  • Maximizing entropy with respect to energy exchange between two subsystems E1 gives use the equilibrium value U1 that system gets.

    StotalE1|E1=U1=32kBN1U132kBN2EU1=0.
  • Plugging the definition of temperature on left hand side which in equilibrium we see is equal for two systems exchangeing energy:

    1kBT=32N1U1=32N2U2.
  • This leads to the well-known result that each degree of freedom receives 12kBT of thermal energy:

    U=32NkBT.
  • Solving for U1 we also see that each system gets energy proportionate to its size

    U1=N1N1+N2Etot

Constant temperature ensemble (NVT)#

../_images/320234124970dda01bbe049cb524930d1cc26572ce04ebf024d71982303e1de0.png
  • We start by considering an islolated box (NVE ensemble) inside which there is a system of interest which is exchanging energy with much larger reserovoir or heat bath.

  • Using the fact that reservoir is much larger than the system EEt we can taylor expand log of microstates (entropy) around Et

p(E)=Ω(E)Ωr(EtE)Ωt(Et)
logΩr(EtE)logΩr(Et)(logΩrE)E=constβE
  • The first factor is a constant independent of energy the second factor in front of energy is recognize as inverse temperature β=dlogΩdE=1kBT

  • We have now have an ensemble of microstates of systems specified by NVT variables and and reservoir influence enters through temperature!

  • Ensemble of NVT microstates has different energies that are exponentially distributed (price for borrowing energy from the bath).

Ωr(EtE)eβE

Boltzmann distribution (NVT)

Probability of a Macrostate

p(E)=Ω(E)eβEZ

Probability of a Microstate

pi=eβEiZ

Partition Function

Z=EΩ(E)eβE=ieβEi

Partition Functions and Thermodynamic limit#

Z=EΩ(E)eβE=Ω(E)eβEdE
  • We find that microcanonical and canonical ensebles are linked via Laplace transform. Recall that E and free energy F via Legendre transform

  • This shows that when going from NVE to NVT ensemble we are adopting a conveneint variable β by replacing E.

  • The number of states grows exponentially with system size N, Ω(E)=eSkBeN while the Boltzmann factor decays exponentially with energy eβEeN

  • The dominant contribution to the partition function comes from narrow region around ensemble average or equilibrium value of energy U=E. Deviations from average are xponentially negligble!

Legendre vs Laplace Transoforms

Z=eβ(ETS)dEeminE[β(ETS)]=eβ(UTS)=eβF
F=UTS
  • U=E is the average energy, with fluctuations of order O(N1/2).

  • F is the Helmholtz free energy.

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

# Define energy range
E = np.linspace(0, 10, 100)

# Define parameters
beta = 1.0  # Inverse temperature (1/kT)

# Compute the Boltzmann factor
Boltzmann_factor = np.exp(-beta * E)

# Increase the entropy prefactor to shift the peak to the right
S_prefactor_new = 2.5  # Larger prefactor makes entropy increase faster

# Recalculate entropy and probability density
S_new = S_prefactor_new * np.log(1 + E)
Probability_density_new = np.exp(S_new) * Boltzmann_factor

# Create the updated plot
plt.figure(figsize=(8, 6))

# Plot entropy (scaled for visualization)
plt.plot(E, S_new / max(S_new), label=r"Entropy $S(E)$ (scaled)", color="blue", linestyle="--")

# Plot Boltzmann factor (scaled for visualization)
plt.plot(E, Boltzmann_factor / max(Boltzmann_factor), label=r"Boltzmann Factor $e^{-\beta E}$ (scaled)", color="red", linestyle="--")

# Plot updated probability density (product of both)
plt.plot(E, Probability_density_new / max(Probability_density_new), label=r"Probability Density $\Omega(E) e^{-\beta E}$", color="black")

# Highlight new peak region
E_peak_new = E[np.argmax(Probability_density_new)]
plt.axvline(E_peak_new, color="green", linestyle=":", label="New Peak Region")

# Labels and title
plt.xlabel("Energy $E$")
plt.ylabel("Scaled Functions")
plt.title("Shifted Peak: Entropy Growth, Boltzmann Factor Decay, and Probability Density")
plt.legend()
plt.grid(True, linestyle="--", alpha=0.6)

# Show plot
plt.show()
../_images/e9af104601dea02b51610f51d9cc351d067170b61f1823766d81c534df986d61.png

Examples of using NVT#

non-interacting spins#

  • Consider an ensemble of three non-interaacting spins under constant temperature. The up spin has ϵ and down spin 0 energy.

Microstate

Configuration

Total Energy E

Degeneracy Ω(E)

1

↓↓↓

0

1

2

↓↓↑

ϵ

3

3

↓↑↓

ϵ

3

4

↑↓↓

ϵ

3

5

↓↑↑

2ϵ

3

6

↑↓↑

2ϵ

3

7

↑↑↓

2ϵ

3

8

↑↑↑

3ϵ

1

  • The partition function would be sum over all 23=8 microstaes.

Z=1+3eβϵ+3e2βϵ+e3βϵ
  • Probability of a microstate ↓↓↑ is:

p2=eβϵZ
  • Probability of a macrostate E=ϵ is

P(E=ϵ)=3eβϵZ

non-interacting indentical spins

  • Consider three spins where up and down orientations have equal energy ϵ.

  • Show that sum over microstates and sum over macrostates leads to same expression of parition function.

  • Write down free energy for the system and identify entropic and energetic parts.

Solution

Sum over macrostates

Z=EΩ(E)eβE=8e3βϵ

Sum over microstates

Z=ieβEi
  • Since each spin is independent, E=E1+E2+E3 the sum factorizes!

Z=s1eβE1s2eβE2s3eβE3
  • Each sum runs over the two possible spin orientations (, ), both of which have the same energy ϵ, so:

sieβEi=eβϵ+eβϵ=2eβϵ
  • Thus, for three spins:

Z=(2eβϵ)3=8eβϵ

Free energy

F=kBTlogZ=kBTϵlog8+ϵ

Two-state particles (NVT)#

  • Consider a simple two-level system where lower level has energy 0 and upper level ϵ. Determine how the fraction of excited states f=nN changes with temperature.

  • Solving a two-state particle system in an NVT ensemble is much easier because the partition function decouples into single particle contributions.

Z=n=0n=NeβEn=(1+eβϵ)N
F=kBTlogZ=kBTNlog(1+eβϵ)
E=logZ(β)=Nϵ1+eβϵ
f=ENϵ=11+eβϵ
  • We obtained same expression we got when using NVE but it tooks us less number of steps!

Free energy and macrostate probabilities#

  1. Microstates: The relative population of microstates is dictated by the ratio of Boltzmann weights which depends on energy difference ΔE

p1=eβE1Z=eβE1eβF
p2p1=eβ(E2E1)
  1. Macrostates: Probability of macrostates with energy EA is obtained by summing over all microstates with energy E_A or simply by multiplying by ΩA. The latter is related to entropy, which ends up turning the numerator into the free energy of a macrostate A: FA=EATSA

pA=Ω(EA)eβEAZA=eβFAeβF
  • The relative population of macrostates is dictated by the ratio of entropic term times Boltzmann weights which depends on free energy difference ΔF

pBpA=eβ(FBFA)

Log of macrostate probability is free energy

  • Free energy of macrostate or a continuous coordinate X with resepct to some reference state.

F(X)=kBTlogP(X)+const
Hide code cell source
# Define reaction coordinate
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-2, 2, 400)

# Define a tilted asymmetric double-well free energy profile
F_x = 3 * (x**4 - 1.2*x**2) + 2 + 0.5*x  # Added tilt to shift one minimum

# Identify macrostates A and B based on regions left and right of the transition state (x=0)
x_A_region = x[x < 0]  # Left basin (macrostate A)
x_B_region = x[x > 0]  # Right basin (macrostate B)
F_A = np.min(F_x[x < 0])  # Free energy of macrostate A (left well minimum)
F_B = np.min(F_x[x > 0])  # Free energy of macrostate B (right well minimum)
ΔF = F_B - F_A  # Free energy difference

# Compute probability distribution P(X) from free energy F(X)
P_x = np.exp(-F_x)  # Exponential of negative free energy
P_x /= np.trapz(P_x, x)  # Normalize probability

# Create figure with side-by-side subplots: Free Energy and Probability Distribution
fig, axes = plt.subplots(1, 2, figsize=(12, 5), sharex=True)

# --- Free Energy Profile ---
axes[0].plot(x, F_x, label=r'Free Energy $F(X)$', color='b', linewidth=2)
axes[0].fill_between(x_A_region, F_x[x < 0], max(F_x), color='red', alpha=0.3, label="Macrostate A")
axes[0].fill_between(x_B_region, F_x[x > 0], max(F_x), color='green', alpha=0.3, label="Macrostate B")
axes[0].axhline(F_A, color='red', linestyle='--', label=r'$F_A$')
axes[0].axhline(F_B, color='green', linestyle='--', label=r'$F_B$')

# Indicate ΔF with an arrow
axes[0].annotate("", xy=(1.1, F_B), xytext=(1.1, F_A),
                 arrowprops=dict(arrowstyle="<->", color='black', linewidth=1.5))
axes[0].text(1.15, (F_A + F_B) / 2, r'$\Delta F$', va='center', fontsize=12, color='black')

axes[0].set_xlabel("Reaction Coordinate X")
axes[0].set_ylabel("Free Energy $F(X)$")
axes[0].set_title("Free Energy Profile of Macrostates A and B")
axes[0].legend()
axes[0].grid(True, linestyle="--", alpha=0.5)
axes[0].set_xlim([-1.5, 1.5])
axes[0].set_ylim([0, 5])

# --- Probability Distribution ---
axes[1].plot(x, P_x, label=r'Probability $P(X) \propto e^{-F(X)}$', color='black', linewidth=2)
axes[1].fill_between(x_A_region, P_x[x < 0], 0, color='red', alpha=0.3, label="Macrostate A")
axes[1].fill_between(x_B_region, P_x[x > 0], 0, color='green', alpha=0.3, label="Macrostate B")

axes[1].set_xlabel("Reaction Coordinate X")
axes[1].set_ylabel("Probability $P(X)$")
axes[1].set_title("Probability Distribution of Macrostates A and B")
axes[1].legend()
axes[1].grid(True, linestyle="--", alpha=0.5)

# Adjust layout and show the plots
plt.tight_layout()
plt.show()
../_images/570dcd4be7428e8e4e55b6ca4e8cbba94db2b3d1256391c9885e5d3845edc527.png

Exercise

  • Consider state A has 3 energy levels 0,ϵ,2ϵ and state B has four energy levels with 0,2ϵ,3ϵ,4ϵ

  • For state B all excited states have degenercy of 10.

  • Compute how probability of state A vs B changes with temperature.

Energy Fluctuations#

  • Log of canonical parition function logZ has some interesting mathematical properties.

  • We are going to show that first and second derivatives yield average and fluctuations of energy.

Pi=eβEiZ,Z=ieβEi
  • The ensemble average energy can be related to the derivative of log of partition function:

E=iPiEi=1ZiEieβEi=1ZZβ=lnZβ
  • To quantify fluctuations, we define the variance of energy and proceed to show that this is equal to second erivative of logZ

(ΔE)2=E2E2
  • Taking first derivative:

lnZβ=1ZiEieβEi=E
  • Taking the second derivative:

2lnZβ2=1ZiEi2eβEi(1ZiEieβEi)2
2lnZβ2=E2E2=(ΔE)2
  • Since β=1kBT, we can use chain rule and express this in terms of temperature:

(ΔE)2=kBT2ET=kBT2Cv
  • Where in the last line we used definition of heat capacity CV=dEdT

Moments of Energy in NVT ensemble

E=lnZβ
σE2=E2E2=2lnZβ2

Fluctuation-Response Theorem

(ΔE)2=kBT2CV
  • The probability distribution of energy, P(E), follows a Gaussian distribution in equilibrium:

    P(E)exp((EE)22kBT2CV)
  • Relative energy fluctuations decrease with N. In the thermodynamic limit N, fluctuations become negligible, justifying ensemble equivalence.

    σEECV1/2EO(N1/2)

Statistical nature of irreversibility#

  • From the perspective of the NVE ensemble, we can state that if the number of accessible microstates increases upon the removal of a constraint, then reinstating the constraint will not spontaneously reduce it. This reflects the fundamental irreversibility of spontaneous processes in an isolated system:

ΔS=logΩBΩA0.
  • A similar conclusion holds in the NVT ensemble: Under constant temperature, the number of microstates, represented by the partition function Z, increases during a spontaneous process when a system is in contact with a heat bath.

    βΔF=logZBZA0.
  • This formulation underscores the irreversibility of thermodynamic processes and highlights the natural tendency of a system to evolve towards configurations with higher entropy (in the microcanonical ensemble) or lower free energy (in the canonical ensemble).

Problems#

Problem 1 Shottky defects#

Schotky defects are vacancies in a lattice of atoms. Creating a single vacancy costs an energy ϵ. Consider a lattice with N atoms and n vacacnies. In this model the total energy is solely a function of defects: E=nϵ

  • Write down number of states and compute the entropy via Boltzmann formula. Plot number of states as a function of energy. You can use log of number of states for plotting.

  • Compute how the temperature would affect the fraction of vacancies on the lattice. Plot fraction of vacancies as a function of temperature.

  • How would the total energy depend on temperature T. Derive expression for the high temeprature limit (ϵkbT1).

  • Plot total energy as a function of temperature E(T)

Problem 2 Lattice gas#

Consider N particles distributed among V cells (with NV). This is a lattice model of a dilute gas. Suppose that each cell may be either empty or occupied by a single particle. The number of microscopic states of this syste will be given by:

Ω(N,V)=V!N!(VN)!
  • Obtain an expression for the entropy per particle s(v)=1NS(N,V) where v=VN.

  • From this simple fundamental equation, obtain an expression of equation of state p/T.

    • Write an expansion of p/T in terms of density 1/v. Show that the first term gives Boyle law of ideal gases.

  • Sketch a graph of μ/T, where μ(ρ) is a chemical potential as a function of density. Comment on ρ0 and ρ1 limits.

Problem 3 Polymer Elasticity#

Solve the problem 2.7 from the book.

Problem 4#

Consider a system of N classical and non-interacting particles in contact with a thermal reservoir at a temperature T. Each particle can have be in three states with energy 0, ϵ or 3ϵ where ϵ>0.

  • Obtain an expression for Z then compute the average and fluctuation of energy.

  • Plot the heat capacity as a function of temperature Cv(T)

  • Plot the average enegy as a function of temperature U(T)

  • Plot the entropy as a function of temperature S(T).

Problem 5#

Consider N lattice sites which have quantum spins s=1 (not to be confused with entropy) with a mangnetic moment μ. Spins are subject to a uniform mangeitc field in z direction B=Bz making the energy of each spin μBm where m is the magnetic quantum number thattakes on three possible values m=0,±1.

  • Compute the entropy S and the mangeitzation of the system M

  • Plot entropy as a function of temperatures and study the limit of low temperatures S(T0)