PARTITION FUNCTION
AIM: Computation of the partition function Z(β) for examples
of systems with a finite number of single particle levels (e.g., 2
level, 3 level, etc.) and a finite number of non-interacting
particles N under Maxwell-Boltzmann, Fermi-Dirac and Bose-
Einstein statistics:
a) Study of how Z(β), average energy , energy fluctuation ΔE,
specific heat at constant volume Cv, depend upon the
temperature, total number of particles N and the spectrum of
single particle states.
b) Ratios of occupation numbers of various states for the
systems considered above
c) Computation of physical quantities at large and small
temperature T and comparison of various statistics at large and
small temperature T.
Theory: A partition function is a fundamental concept in
statistical mechanics that summarizes all the statistical
properties of a system in thermodynamic equilibrium. It is the
sum of Boltzmann factors over all possible microstates. Using it
we can derive all macroscopic thermodynamic properties of the
system.
1. Maxwell Boltzmann statistics
Distinguishable particles
Single particle partition function 𝑧 = ∑𝑒 −𝐵𝐸𝑖
𝑧𝑁
System partition function 𝑧 = 𝑁!
2. Fermi Dirac statistics
Obeys Pauli exclusion principle-each single particle energy
level can hold at most one particle
Canonical partition function(fixed N)-
Total energy E=∑𝑛𝑖 𝐸𝑖
Partition function 𝑧 = ∑𝑒 −𝐵∑𝑛𝑖 𝐸𝑖
Grand partition function-
𝑧 = ∏(1 + 𝑒 −𝐵(𝐸𝑖 −𝑢) )
3. Bose Einstien statistics
Each energy level can have more than one particles
Particles are indistinguishable
Canonical partition function-
𝑧 = ∑𝑒 −𝐵∑𝑛𝑖 𝐸𝑖
Grand partition function –
1
𝑧=∏
1 − 𝑒 −𝐵(𝐸𝑖 −𝑢)
From z we derive:
𝑑𝑙𝑛𝑧
a) Internal energy 𝑢 = 𝑘𝑏 𝑇 2 ( )
𝑑𝑇 𝑉
𝑑𝐸
b) Specific heat 𝑐𝑣 = (𝑑𝑇 )
𝑉
c) Helmholtz free energy 𝑓 = −𝑘𝑏 𝑇𝑙𝑛(𝑧)
𝑑𝑓
d) Entropy 𝑠 = − (𝑑𝑇)
𝑣
ALGORITHM:
1. Start the program and initiate constants :set Boltzmann
constant kb .
2. Input parameters
Define the energy levels of the system.
Define number of particles np.
Define the temperature range T with step size dT over
which variation of different thermodynamic quantities is
to be studied.
3. Initialise for loop to calculate value of partition function
for each number of particles and each temperature
value .Expression will be different for different statistical
distributions.
4. Calculate the other thermodynamic quantities using
partition function.
5. Now plot all the thermodynamic quantities and partion
function variations with temperature.
6. End.
CODE: