statistical mechanics - ensembles...statistical mechanics - ensembles boltzmann and gibbs ensemble...
TRANSCRIPT
Statistical Mechanics - Ensembles
Boltzmann and Gibbs ensemble methods for systems with interacting particles
1
J. Willard Gibbs
(1839-1903)
Ludwig Boltzmann
(1844 – 1906)
)()()()()( NN EPEPEPEPEP 1312111
How can we determine the state of systems with interacting molecules or
systems which interact with the environment?
N
ijNtot
EEE
UUUKKKE
21
131221
2
The probability for the system total energy is not the product of independent single
molecule energy probabilities
In interacting systems, the total energy does not break up into a sum of one molecule
energies. Interactions between molecules also contribute to the energy
• How do we find the distribution of velocity
and positions for systems with interactions?
• Do attractive forces increase the probability
of finding molecules closer together?
• Do repulsive forces increase the probability
of findng molecules farther apart?
3
• In quantum mechanics, the “state” is represented by a wave function;
• The energy of the states are quantized. Not all possible energy values are observed.
Quantum states with discrete energies
http://physics.stackexchange.com/
questions/102097/why-not-drop-
hbar-omega-2-from-the-quantum-
harmonic-oscillator-energy
For an N-atom quantum system, the state of the system can be represented by a single
discrete quantum index i
4
Possible distributions of microstates Macrostate
Value, X
Degeneracy of
macrostate, Ω(X)
(1,1,1)
{1,1,2}
{1,1,3}{1,2,2}
{1,1,4}{1,2,3} (2,2,2)
{1,1,5}{1,2,4}{1,3,3}{2,2,3}
{1,1,6}{1,2,5}{1,3,4}{2,2,4}{2,3,3}
{1,2,6}{1,3,5}{1,4,4}{2,2,5}{2,3,4}(3,3,3)
{1,3,6}{1,4,5}{2,2,6}{2,3,5}{2,4,4}{3,3,4}
{1,4,6}{1,5,5}{2,3,6}{2,4,5}{3,3,5}{4,4,3}
{1,5,6}{2,4,6}{2,5,5}{3,3,6}{3,4,5}(4,4,4)
{1,6,6}{2,5,6}{3,4,6}{3,5,5}{4,4,5}
{2,6,6}{3,5,6}{4,4,6}{4,5,5}
{3,6,6}{4,5,6}(5,5,5)
{4,6,6}{5,5,6}
{5,6,6}
(6,6,6)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1
3
6 = 3+3
10 = 3+6+1
15 = 3+6+3+3
21=3+6+6+3+3
25=6+6+3+3+6+1
27=6+6+3+6+3+3
27=6+3+6+6+3+3
25=6+6+3+3+6+1
21=3+6+6+3+3
15=3+6+3+3
10=3+6+1
6=3+3
3
1
Distributing indistinguishable dice among microstates • Constraint: Ndice = 3
• There is no constraint on the value of the macrostate
5
Distributing indistinguishable objects among bins
(1234)(1243)(1324)(1342)(1423)(1432)
(2134)(2143)(2314)(2341)(2413)(2431)
(3124)(3142)(3214)(3241)(3412)(3421)
(4123)(4132)(4213)(4231)(4312)(4321)
Ways of arranging four
distinguishable objects 4! = 4×3×2×1
Ways of binning four
distinguishable objects
into two groups of 2 and 2
{(12)(34)}{(12)(43)}{(13)(24)}{(13)(42)}{(14)(23)}{(14)(32)}
{(21)(34)}{(21)(43)}{(23)(14)}{(23)(41)}{(24)(13)}{(24)(31)}
{(31)(24)}{(31)(42)}{(32)(14)}{(32)(41)}{(34)(12)}{(34)(21)}
{(41)(23)}{(41)(32)}{(42)(13)}{(42)(31)}{(43)(12)}{(43)(21)}
{(123)(4)}{(124)(3)}{(132)(4)}{(134)(2)}{(142)(3)}{(143)(2)}
{(213)(4)}{(214)(3)}{(231)(4)}{(234)(1)}{(241)(3)}{(243)(1)}
{(312)(4)}{(314)(2)}{(321)(4)}{(324)(1)}{(341)(2)}{(342)(1)}
{(412)(3)}{(413)(2)}{(421)(3)}{(423)(1)}{(431)(2)}{(432)(1)}
Ways of binning four
distinguishable objects
into two groups of 3 and 1
How many ways are there to bin the four
distinguishable objects into two groups?
6
Distributing indistinguishable objects among bins
Distinct binning of 4
distinguishable objects
into bins in two groups of
2 and 2 regardless of order
in bins
{(12)(34)}{(12)(43)}{(13)(24)}{(13)(42)}{(14)(23)}{(14)(32)}
{(21)(34)}{(21)(43)}{(23)(14)}{(23)(41)}{(24)(13)}{(24)(31)}
{(31)(24)}{(31)(42)}{(32)(14)}{(32)(41)}{(34)(12)}{(34)(21)}
{(41)(23)}{(41)(32)}{(42)(13)}{(42)(31)}{(43)(12)}{(43)(21)}
However, if the order of the balls in the bins is not important, the distinct distributions are:
𝑊 =4!
2! 2!=
4×3×2×1
2×1×2×1 = 6
{(123)(4)}{(124)(3)}{(132)(4)}{(134)(2)}{(142)(3)}{(143)(2)}
{(213)(4)}{(214)(3)}{(231)(4)}{(234)(1)}{(241)(3)}{(243)(1)}
{(312)(4)}{(314)(2)}{(321)(4)}{(324)(1)}{(341)(2)}{(342)(1)}
{(412)(3)}{(413)(2)}{(421)(3)}{(423)(1)}{(431)(2)}{(432)(1)}
Distinct binning of 4
distinguishable objects into
two bins in two groups of 3
and 1 regardless of order in
bins
𝑊 =4!
3! 1!=
4×3×2×1
3×2×1×1 = 4
Distinct binning of N distinguishable objects into k
bins groups of a1 , a2, …, ak regardless of order in
bins
𝑊 =𝑁!
𝑎1! 𝑎2! … 𝑎𝑘!=𝑁!
𝑎𝑗!
7
Distributing systems among microstates with constraints on the macrostate
• Assume a system with equally spaced energy levels of energy 0, Δ, 2Δ, 3Δ, … …
ε6 = 5Δ
ε5 = 4Δ
ε4 = 3Δ
ε3 = 2Δ
ε2 = 1Δ
ε1 = 0
Our problem in statistical mechanics is to find the distributions of molecules
among the levels (“microstates”) satisfying two constraints:
1) The total number of molecules in the system is constant
2) The total energy of the system is constant
The discrete states are analogous to the
discrete outcomes of the role of a dice
Our goal: Given what we know about the structure of the system (the “states”
available to the system) how do we determine the most probable the distribution of
molecules / systems among the states that is consistent with our macroscopic
information on the system?
8
The macrostate: Etot = 5Δ
or equivalently E = Δ
• A system with equally spaced energy levels;
• Find the distributions of 5 independent
molecules among the levels (“microstates”)
satisfying two constraints:
…
ε6 = 5Δ
ε5 = 4Δ
ε4 = 3Δ
ε3 = 2Δ
ε2 = 1Δ
ε1 = 0
Distributing indistinguishable molecules among states
j ja
NW
!
!)(a 5 20 20 30 30 20 1
How many ways can each microstate be constructed (i.e., what is the degeneracy)?
Microstates
Distributions:
{a1, a2, a3, …, a6}
Degeneracy
(Weight)
Probability of
distribution P(di)
d1:{4,0,0,0,0,1}
d2:{3,1,0,0,1,0}
d3:{3,0,1,1,0,0}
d4:{2,2,0,1,0,0}
d5:{2,1,2,0,0,0}
d6:{1,3,1,0,0,0}
d7:{0,5,0,0,0,0}
5
20
20
30
30
20
1
5/126
20/126
20/126
30/126
30/126
20/126
1/126
j iji aNW !! ,
• Many microstates of the molecules satisfy the macrostate conditions
• All 126 microstates are equally probable but different distributions, di, show up
with different probability 9
Distributions (di) show how molecules occupy energy states
126i iW
aj : Number of molecules that occupy state j in each
distribution (occupancy of state j)
a3=2
a2=1
a1=2
Possible microstates satisfying two constraints on the macrostates
Distribution:
{a1, a2, a3, …, a8}
Degeneracy
(Weight)
Probability
{6,0,0,0,0,0,0,1}
{5,1,0,0,0,0,1,0}
{5,0,1,0,0,1,0,0}
{5,0,0,1,1,0,0,0}
{4,2,0,0,0,1,0,0}
{4,1,1,0,1,0,0,0}
{4,1,0,2,0,0,0,0}
{4,0,2,1,0,0,0,0}
{3,3,0,0,1,0,0,0}
{3,2,1,1,0,0,0,0}
{3,1,3,0,0,0,0,0}
{2,4,0,1,0,0,0,0}
{2,3,2,0,0,0,0,0}
{1,5,1,0,0,0,0,0}
{0,7,0,0,0,0,0,0}
7
42
42
42
105
210
105
105
140
420
140
105
210
42
1
7/1716
42/1716
42/1716
42/1716
105/1716
210/1716
105/1716
105/1716
140/1716
420/1716
140/1716
105/1716
210/1716
42/1716
1/1716
Sum of microstates: 1716
N = 7 and Etot = 7Δ; E = Δ determine all possible distributions Macrostate
10
Most probable
distribution
Systems with large numbers of molecules – Example 1
j iji aNW !! ,
Distributions
{a1, a2, a3, …, a10}
Degeneracy
(Weight)
{8,0,0,0,0,0,0,0,0,1}
{7,1,0,0,0,0,0,0,1,0}
{7,0,1,0,0,0,0,1,0,0}
{7,0,0,1,0,0,1,0,0,0}
{7,0,0,0,1,1,0,0,0,0}
{6,2,0,0,0,0,0,1,0,0}
{6,0,2,0,0,1,0,0,0,0}
{6,1,1,0,0,0,1,0,0,0}
{6,1,0,1,0,1,0,0,0,0}
{6,0,1,1,1,0,0,0,0,0}
{6,0,0,3,0,0,0,0,0,0}
{5,3,0,0,0,0,1,0,0,0}
{5,0,3,1,0,0,0,0,0,0}
{5,2,1,0,0,1,0,0,0,0}
{5,1,2,0,1,0,0,0,0,0}
{5,1,1,2,0,0,0,0,0,0}
9
72
72
72
72
252
252
504
504
504
84
504
504
1512
1512
1512
Distributions:
{a1, a2, a3, …, a10}
Degeneracy
(Weight)
{4,4,0,0,0,1,0,0,0,0}
{4,1,4,0,0,0,0,0,0,0}
{4,3,1,0,1,0,0,0,0,0}
{4,3,0,2,0,0,0,0,0,0}
{4,2,2,1,0,0,0,0,0,0}
{3,3,3,0,0,0,0,0,0,0}
{3,4,1,1,0,0,0,0,0,0}
{3,5,0,0,1,0,0,0,0,0}
{2,6,0,1,0,0,0,0,0,0}
{0,9,0,0,0,0,0,0,0,0}
630
630
2520
1260
3780
1680
2520
504
256
1
Sum of microstates:
21722
11
Systems with large numbers of molecules – Example 2
Macrostate:
j iji aNW !! ,
N = 9 and Etot = 9Δ; E = Δ determine all possible distributions
As N in the system increases, a single
distribution has an overwhelming role in
determining the properties of the
macrostate
Review of quantum mechanical particle in a box (ideal gas) system:
Spacing of energy levels and degeneracy
Potential energy for particle in a three-dimensional cubic box model:
zyxzyxzyx nnnnnnnnnzyxUzyxm
,,,,,,2
2
2
2
2
22
),,(2
elsewhere
LzLyLxforzyxU
0;0;00),,(
)/sin()/sin()/sin(,,,, LzjLyjLxjA zyxzjyjxjzjyjxj
222
3/2
2222
2
2
,,88
),1( zyxzyxzjyjxjjjj
mV
hjjj
mL
hV
12
Wave function of particle in a three-dimensional cubic box:
Quantized energy levels of particle in a three-dimensional
cubic box:
L
L 0
Time-independent Schrödinger equation
Degeneracy of microstates of molecules in a 3-dimensional cubic box
6
82,1,1
1,2,1
1,1,2
3/2
2
mV
h
)/2sin()/sin()/sin(2,1,12,1,1 LzLyLxA
)/sin()/2sin()/sin(1,2,11,2,1 LzLyLxA
)/sin()/sin()/2sin(1,1,21,1,2 LzLyLxA 222
3/2
2
1,1,2 1128
),1( mV
hV
Two non-interacting particles in a three-dimensional cubic box gives higher
degeneracy:
22
22
22
21
21
213/2
2
2,18
),2( zyxzyxjj jjjjjjmV
hVE
Degeneracy: Three microstates have the same energy
13
(2,1,1,1,1,1) (1,2,1,1,1,1) (1,1,2,1,1,1)
(1,1,1,2,1,1) (1,1,1,1,2,1) (1,1,1,1,1,2)
Consider the following three states: They all have an energy of:
Six degenerate microstates:
Distribution of non-interacting molecules in states (energy levels)
Take an isolated ideal gas system of N molecules
with the total energy E
Each molecule is in a particle-in-box quantum
state ji = {jxi, jyi, jzi} characterized by energy εi
In the N-molecule system:
a1 molecules are in state 1,
a2 molecules are in state 2,
…,
ai of the molecules may be in state i,
...
ε6
ε5
ε1
ε4 ε3 ε2
14
N
zyx jjjmV
hVNE
1
2,
2,
2,3/2
2
}{8
),(
j
Total energy of the N-molecule system:
L
L
0
A possible distribution of molecules among
states: a6 = 1
a5 = 2
a1= 4
a4 = 5 a3 = 1 a2 = 2
Quantum state energy ε1 ε2 ε3 ε4 ε5 …
Occupancy of states a1 a2 a3 a4 a5 …
jjj
jj
EVa
Na
)(
The collection of molecules (the “ensemble”) are binned to place each molecule into a
box corresponding to its energy state
The distribution of molecules among states
must satisfy the constraints: 15
Distribution of molecules in non-interacting states
N molecules
E total energy
ε1 ε2 ε3 ε4 ε5
ε6 ∙∙∙
εj
εj< εj+1
Make bins and label each with a molecule energy
εj+1
a1
j a
N
aaa
NW
!
!
!!!
!)(
j321 a
EVa
Na
j jj
j j
)(
• The number of ways W(a) molecules can be distributed among energy levels
increases greatly for large numbers of molecules and high energies
• The most probable distribution has the maximum number of ways it can be
achieved, W*(a) and becomes dominant as the number of molecules increases
How do we find the most probable distribution?
Maximize W(a) with respect to the occupancies, ai, subject to the constraints on the
system
16
Finding the most probable distribution for systems with large numbers
of molecules in different states
dx
xdf
xfdx
xfd )(
)(
1)(ln 0
)(
dx
xdf0
)(ln
dx
xfd
A function and its logarithm have the same maxima and minima
So we maximize ln[W(a)] instead of W(a). Why?
Some math
NNNN ln!ln
j jj aaNN
aaaaaaNNN
aaNW
lnln
lnlnln
...)!ln()!ln()!ln()(ln
222111
21
a
j a
N
aaa
NW
!
!
!!!
!)(
j321 a
17
The logarithm of W(a) can be evaluated using Stirling’s approximation for
large integer N,
Finding the distribution with the maximum degeneracy (most probable
distribution)
Giving:
0lnln
j jj
i
aaNNa
Can we just calculate the derivative of lnW(a) with respect to the occupancy of a
specific state i, ai to determine the most probably distribution?
EVa
Na
j jj
j j
)(
No! There are constraints
on the ai’s and they are not
all independent
0)(lnln
EVaNaaaNN
aj jjj jj jj
i
)()1(* Vii eea
Constraints added with Lagrange
multipliers α and β (to be later
eliminated, see below)
18
Occupancy of state i in the most probable distribution
0)(1ln Va ii
iVi
iVi
i ie
NeeeaN
)(
)1()()1(*
Applying the constraint on the occupancies allows elimination of α Lagrange
multiplier:
Add the equations of the constraints to the function and then set the derivative to equal to
0 to find the maximum of the function
Finding the distribution with the maximum degeneracy (most probable distribution):
Method of Lagrange underdetermined multipliers
),(
)(
)(
)(**
Vq
e
e
e
N
aP
Vi
jVj
Vii
i
j jjPMM
Partition function
(sum over states)
Distribution with largest probability: 19
• Probability of state i being occupied in the N molecule system in the most
probable distribution
Knowing probabilities of the different states, averages M of microscopic
quantities Mj can be determined for the most probable distribution
• The Boltzmann factor makes an appearance in the context of probability for
system occupying state j.
iVi
jVj
jj jj
e
eVVNP
)(
)()(
),(
• Energy – from statistical mechanics
• We use the thermodynamic relation for pressure to obtain a microscopic relation
VpSdTpdVd
iVi
jVjj
j jje
eV
V
VNpPp)(
)()(
),(
VNNT T
p
Tp
V,,
1
1
kT
1
Thermodynamic relation:
),(
/)(
/)(
/)(*
TVq
e
e
e
N
aP
kTVi
jkTVj
kTVii
i
• The probability is an exponential decaying function of energy (Boltzmann
factor!)
• The derivation did not depend on the ideal gas law! 20
Determining β by comparing macroscopic and microscopic relations
VNN
pp
V,,
Statistical mechanics relation:
(See Appendix 5.1 of Extended Lecture Notes for proof)
Comparing the thermodynamic relation with the statistical
mechanical relation gives
Probability distribution for occupancy of states from statistical mechanics!
Partition function q(V, T) expressed as sum over energy levels
E0 = 0
E1 = E
E2 = 2E
E0 = 0
E1 = E
E2 = 2E
kTkTkT eeeTq /2//0 423),1(
E3 =2Δ
E2 =1Δ
E1 = 0
kTkTkTkT
kTkTkTkTkT
eeee
eeeeeTq
/2/2/2/2
///0/0/0),1(
jkTjE
eTq/)1(
),1(
E
kTVNEeETq /),()(),1(
21
Gather similar terms
Sum over one-molecule states
Sum over one-molecule energy levels
Degeneracy of the energy state
Assume we have a system with nine states
Expressing the partition function as a sum over energy levels is clarifies the
interpretation / physical content of this function.
Physical interpretation of the partition function for non-interacting molecules
kTkTkT eeeq /2//0 423
E0 = 0
E1 = E
E2 = 2E
E0 = 0
E1 = E
E2 = 2EE3 =2Δ
E2 =1Δ
E1 = 0
T (in Δ/k units) 0 0.5 1.0 1.5 2.0 5.0 10.0 → ∞
q(T) 3 3.34 4.28 5.08 5.68 7.32 8.08 → 9
P1 = 3e-0/kT/q 1 0.90 0.70 0.59 0.53 0.41 0.37 → 0.33
P2 = 2e-Δ/kT/q 0 0.08 0.17 0.20 0.21 0.22 0.22 → 0.22
P3 = 4e-2Δ/kT/q 0 0.02 0.13 0.21 0.26 0.37 0.41 → 0.44 22
Assume we have a system
with nine states
The partition
function is:
Δ
Δ
j
kTVjeTVq/)(
),(
Changes in partition function and probability of energy levels with temperature
Physical interpretation of the partition function
E0 = 0
E1 = E
E2 = 2E
E0 = 0
E1 = E
E2 = 2EE3 = 2Δ
E2 = 1Δ
E1 = 0
23
Variation of partition
function with
temperature
Variation of
probabilities with
temperature
P1 = 3e-0/kT/q
P2 = 2e-Δ/kT/q
P3 = 4e-2Δ/kT/q
),(
)()(
/)(
TVq
eEEP
kTVE
Probability of
occupancy of
energy level E
The partition function gives a measure of the number of states accessible to
the system at the given temperature
States of systems with interacting molecules
rrr i
j
j
j
EUm
2
2
2
The Schrödinger equation can be written for many-
particle systems with complex interactions,
The state of the compound molecular system is
represented by the index i (e.g., the molecular
orbital) and the discrete energy levels by Ei.
http://www.meta-
synthesis.com/webbook/40_polyatomics/pol
yatomics.html
E1
E2
E3
E4
E5
E6
E7
States of systems with interacting molecules
rrr i
j
j
j
EUm
2
2
2
The Schrödinger equation can be written for even the most complex many-
molecule systems with complex interactions,
The state of the compound
system is represented by the
index i and the energy by Ei,
even though in these cases,
we cannot determine these
energy states
Probabilities for systems with interacting particles: The set-up
• The system has a constant volume V with N interacting molecules;
• The N-molecule interacting system as a whole is characterized by a quantum state
i with energy Ei;
• There may be interactions between the molecules in the system, and these are all
captured in the quantum states i;
• The system has walls which allow it to exchange heat with its surroundings;
• The temperature of the system is maintained constant.
26
Infinite bath (surroundings)
at temperature T
System:
Volume V
Molecules N
Quantum states i
Heat exchange
occurs between
system and bath
Probabilities for systems with interacting particles: The “canonical” ensemble
• A large number of replicas of the system (the “ensemble”) are put in contact with
each other and placed in the infinite heat bath. Heat exchange is possible between
systems and bath;
• The system replicas have constant volume and are maintained at constant
temperature. This ensemble (collection) of systems is called the canonical ensemble;
• A more descriptive name would be the “constant temperature – constant volume”
(isothermal-isochoric) ensemble;
• After the ensemble equilibrates with the bath (environment), it is removed from
contact with the bath and placed in an isolated container;
• The replicas of the system will have energies, Ei, from among possible quantum
states
27
• The isolated ensemble is made of A copies
of the original system;
• The total energy of the ensemble of systems is E ;
• E and A are mathematical constructs and do
not have physical meaning.
28
Introducing the ensemble as a mathematical trick
. Ej
E5 E1 E3 E20 E1
…
• The systems in the ensemble have states Ei
consistent with nature of the nature of the
interactions;
• The number of systems in each state i are
given as Ai;
• The distribution of systems in the ensemble
among states must satisfy:
E
A
j jj
j j
EA
A
29
. Ek
E5 E1 E3 E20 E1
…
Molecule
states εi
Total system
states Ei
Analogy between non-interacting system and ensemble
Nj jj
j j
Ea
Na
E
A
j jj
j j
EA
A
Energy can be exchanged
between molecules of the gas
The total gas system energy is distributed
among the states of the molecules:
The ensemble energy is distributed
among the states of the systems:
Energy can be exchanged between
systems in the ensemble
N-molecule quantum state: E1 E2 E3 E4 E5 …
Occupancy of each state: A1 A2 A3 A4 A5 …
j AAAAW
!
!
!!!
!)(
j321
AA
A
30
Ways of assigning systems in the ensemble to different possible quantum states
Constraints
Finding the most probable distribution of systems in the ensemble
...)lnln(ln)(ln 2211 AAAAW A AAFor a large ensemble (using
Stirling’s approximation) :
E
A
j jj
j j
EA
A
0)(ln
EA j
jj
jj
i
EAAWA
A
Maximize lnW(A) with respect to the occupancy of each state Ai using Lagrange
undetermined multipliers:
How do we calculate the occupancies Ai* corresponding to the maximum
W(A) and to determine the most probable distribution?
iEi eeA
)1(*
iiEi
iEi i
eeeeA
A
A )1()1(*
),,(
*
VNQ
e
e
eAP
iE
jjE
iEi
i
A
“Canonical” ensemble
(isothermal-isochoric ensemble)
partition function for system states
31
Similar to a non-interacting system, in the most probable
distribution, the number of systems in the ensemble in
state i are:
j jjPMMAverages of quantities can be calculated from knowledge
of the probabilities
Probability of observing a particular state i in most probable
distribution
Using the first constraint: Ai iA*we eliminate the undetermined multiplier α,
Most probable distribution of systems in the ensemble
iVNE
jVNE
j
j jji
j
e
eVNEVNEPVNE
),(
),(),(
),(),,(
iVNE
jVNEj
j jji
j
e
eV
E
VNpPVNp),(
),(
),(),,(
Eliminating the β undetermined multiplier by comparing
statistical mechanics prediction with thermodynamics relations
Statistical mechanics relation for energy:
Statistical mechanics relation for pressure
32
VNN
pp
V
E
,,
After some steps (see appendix of
Extended Lecture Notes)
VNNT T
p
Tp
V
E
,, 1
1
kT
1
Thermodynamic relation:
33
Comparing statistical mechanics and thermodynamics relations
VNN
pp
V
E
,,
jkTVNE jeTVNQ
/),(),,(
Energy of N-particle interacting system
Statistical mechanics relation:
Canonical ensemble partition function:
Relating thermodynamic quantities from the canonical ensemble partition function:
j
kTVNjEeTVNQ
/),(ln),,(ln
dx
xdf
xfdx
xfd )(
)(
1)(lnRecall:
Instead of Q, we deal with the logarithm
34
The partition function and thermodynamic quantities
VNT
QkTE
,
2 ln
TNV
QkTp
,
ln
Note that this relation is the statistical mechanical form for the equation of state!
We can recognize the average energy in this relation:
ikTVNiE
jkTVNjE
j
VN e
eE
kTT
TVNQ
/),(
/),(
2,
1),,(ln
The temperature derivative of lnQ gives:
Similarly, the pressure derivative of lnQ gives:
Ways to change the energy of a N-molecule
ideal gas system
N
zyx jjjmV
hVNE
1
2,
2,
2,3/2
2
}{8
),(
j
• Change the distribution of
molecules among the available
states
• Change the volume V (which
changes energy levels) without
changing the distribution
• Change the number of
molecules in the system without
changing the levels
ℎ2
8𝑚𝑉2/3 𝑗𝜈,𝑥
2 + 𝑗𝜈,𝑦2 + 𝑗𝜈,𝑧
2
𝑁
𝜈=1
ℎ2
8𝑚𝑉2/3 𝑗𝜈,𝑥
2 + 𝑗𝜈,𝑦2 + 𝑗𝜈,𝑧
2
𝑁
𝜈=1
ℎ2
8𝑚𝑉2/3 𝑗𝜈,𝑥
2 + 𝑗𝜈,𝑦2 + 𝑗𝜈,𝑧
2
𝑁
𝜈=1
The energy is a
function of the
quantum state,
the volume,
and the number
of ideal gas
molecules in
the system;
E{j}(N,V)
Statistical mechanical interpretation of work and heat
36
qwdE Thermodynamics:
j jjPEE
j jjj jj dPEdEPEd
Statistical mechanics:
Energy can change by performing
work or transfer of heat:
The ensemble average energy can varied by changing the system energy levels
or the distribution of systems among the energy levels
• The relation for energy of the particle in a box shows that changing the
energy without change of distributions is done by changing the volume of
the system:
• Therefore j jjdEP
j jjdPE
corresponds to change of energy due to work
must correspond to transfer of heat and
N
zyx jjjmV
hVNE
1
2,
2,
2,3/2
2
}{8
),(
j
Statistical mechanics and thermodynamic functions
QkT
QkTS
VN
lnln
,
Can be shown that:
(see Extended Lecture Notes)
37
From the thermodynamic relation:
),,(ln TVNQkTA
TSEA
Substituting the relation for energy
and entropy gives:
The canonical partition function is the “characteristic” function for the Helmholtz
free energy
),,(),,( TVNQTVNA
SdTpdVdA
We can use the second law of thermodynamics expression:
to relate thermodynamic quantities to the canonical ensemble partition function.
• Ideal gas with N molecules
!
2),,()(
8),1(
2/3
2
222
3/2
2
}{N
V
h
mkTTVNQjjj
mV
hVE
NN
zyx
j
Statistical mechanics of systems under constant pressure
38
• How do we treat systems at constant pressure with statistical mechanics?
• The system has constant pressure p, constant temperature T, with N interacting
molecules;
• The system has flexible walls which allow it to change volume to adjust the
pressure;
• The walls are thermally conducting, allowing exchange of heat energy with its
surroundings
• At each volume Vk, the N-molecule system as a whole is characterized by a
quantum state Ei
System:
-N molecules
-Pressure P
-Quantum states i
(for each volume)
Set-up of the isothermal – isobaric ensemble
39
• Replicas of the system are placed in contact with each other in a large thermal
bath / barostat apparatus;
• The walls of the systems are taken to be flexible allowing the volume of each
system to change within the ensemble;
• After equilibration, the replicas are placed in an isolated container with fixed
volume. This is called the isothermal-isobaric ensemble.
Systems are enclosed in a rigid container of volume V
The isothermal-isobaric ensemble
40
)(
)(
)(
22
11
VEV
VEV
VEV
i
i
i
• In the isothermal-isochoric ensemble different system volumes may be encountered.
• Each volume Vk has its corresponding energy states Ei(Vk)
N, P
E2 (V1) N, P
E3 (V2)
N, P
Ei (Vℓ)
kV jkkj
kV jkjkj
kV jkj
VVA
VEVA
VA
V
E
A
)(
)()(
)(
Constraints on
the ensemble
The continuous volume variation is
represented by the summation to simplify notation
The E, A and V are mathematical constructs
How does the system volume enter into the quantum states?
)(8
),1( 222
3/2
2
}{ zyx
k
k jjjmV
hVE j
Particle in a box quantum states depend on the volume of the box, V
41
)(12
)()( 222
3/5
2}{
}{ zyx jjjmV
h
V
VEVp
jj
V1 V2
)(8
)( 222
3/21
2
1}{ zyx jjjmV
hVE j
Pressure for a particle in a
box state {j}:
)(8
)( 222
3/22
2
2}{ zyx jjjmV
hVE j
Most probable distribution in the isothermal-isobaric ensemble
kV jkj VA
W)!(
!})({
AA
VViEi eeeVA
)(* )(
),,(
)()(
)(
)(
)(*
N
ee
ee
eeVAVP
VViE
kV j
kVkVjE
VViEi
i
A
0)()()()(})({ln)(
VEA
kVk
jkj
kVkj
jkj
kV jkj
i
VVAVEVAVAWVA
A
Isothermal – isobaric
partition function
42
Find the most probable distribution, subject to constraints of the system,
The probability includes an energy (Boltzmann) factor and a volume factor!
Number of systems in ensemble with volume Vℓ in state i in most probable distribution
The ways the members of the ensemble can be distributed
among systems of volume Vk and states j
Constraints on the
distribution
kV jkkj
kV jkjkj
kV jkj
VVA
VEVA
VA
V
E
A
)(
)()(
)(
The probability
),,(ln pTNkTG
pNTkTkS
,
lnln
VkTpV
V EkTpVkTE
eEVNQ
eeEVNpTN
/
//
),,(
),,(),,(
Isothermal-isobaric partition function
TNp
kTV
,
ln
TpNkT
,
ln
We construct the statistical mechanical equivalent. Comparing the two allows us to
identify the Lagrangian multipliers β and δ (see canonical ensemble derivation)
Characteristic thermodynamics function:
43
Sum over energy levels
pNNTT
V
TV
p
H
,,1
1
Using the thermodynamic relation as a guide,
kT
p
kT ;
1
Statistical mechanics of open systems: Grand canonical ensemble
The system set-up:
• Constant volume
• Can exchange molecules with
environment
• Can exchange heat with the
environment
44
Semi-
permeable
membrane
• A system of constant volume which can exchange heat and molecules with the
surroundings;
• For each number of molecules, the system as a whole is characterized by a
quantum state Ei(N)
E1(1), E2(1), E3(1), …, Ei(1), …
E1(2), E2(2), E3(2), …, Ei(2), …
E1(3), E2(3), E3(3), …, Ei(3), …
…
E1(N), E2(N), E3(N), …, Ei(N), …
Thermostat at T
Molecule reservoir at μ
Volume V
Molecules μ
Quantum state i
Grand canonical ensemble – Open systems
45
• The N-molecule system as a whole is characterized by a quantum state Ei
• Replicas of the system are placed in contact with each other in a large
thermal bath / molecule bath
• After equilibration, the replicas which now have the same μ, T, and V are
placed in an isolated container
• The grand canonical ensemble can be called the isopotential-isothermal-
isochoric ensemble
Isolated ensemble at T and μ
Total energy in the ensemble E,
Total number of systems in the ensemble A ,
Total number of molecules in the ensemble N
The energy states of ideal gas systems with different numbers of molecules
kN jkkj
kN jkjkj
kN jkj
NNA
NENA
NA
N
E
A
)(
)()(
)(
)(8
)1( 222
3/2
2
}{ zyx jjjmV
hE j
one-particle
quantum states
)(8
)2( 22
22
22
21
21
213/2
2
}{ zyxzyx jjjjjjmV
hE j
two-particle
quantum states
46
Find the most probable distribution for the states in the grand-canonical ensemble ,
subject to constraints of the system,
μ,V,T
E,j(N1)
μ,V,T
Ek(N7)
μ,V,T
Ei(Nℓ)
Constraints on the system:
NNiEi eeeNA
)()1(* )(
),,(
)()(
)(
)(
)(*
V
ee
ee
eeNANP
NNiE
kN j
kNkNjE
NNiEi
i
A
0)()()()(})({ln)(
NEA
kNk
jkj
kNkj
jkj
kN jkj
i
NNANENANAWNA
A
47
Most probable distribution for the Grand Canonical Ensemble
Number of systems in ensemble with N molecules in state j in most probable distribution
Probability includes energy (Boltzmann) factor and molecule number factor.
Grand canonical
partition function
Greek letter xi
The ways the ensemble can be distributed
among systems with N molecule and state i
Constraints on the
distribution
Find the most probable distribution, subject to constraints of the system,
kN jkj NA
W)!(
!})({
AA
kN jkkj
kN jkjkj
kN jkj
NNA
NENA
NA
N
E
A
)(
)()(
)(
),,(ln TVkTpV
VTkTkS
,
lnln
pV is the characteristic function of the grand canonical ensemble
kNkTkNkTVkNE
E k
kNkTkN
k
eeVNE
eTVNQTV
//),(
/
),,(
),,(),,(
Grand canonical partition function
VkT
VkTp
T
lnln
, TVkT
N
,
ln
TSpVENG
48
We construct the statistical mechanical equivalent of a thermodynamic relation
and compare the two to identify the Lagrange multipliers β and γ
Microcanonical (isoenergy, isobaric) ensemble
NVE
NVE NVE NVE NVE NVE
Each system is confined to
• a constant volume
• a constant energy
A j jA
j jAW
!
!})({
AA
0})({ln
Aj j
i
AAWA
),,(
1*
EVN
AP i
i
A ),,(ln EVNkS 49
50
Partition functions for non-interacting systems
)()2()1()(, NNE itot
jkTNkTjE
eeTVNQ
,,,
/)]()2()1([/),,(
How does the partition function behave for systems with non-interacting molecules:
We replace this expression for energy in the canonical ensemble partition function:
Quantum states for individual molecules
NkTNkTkT
kTN
qqqeee
eTVNQ
21/)(/)2(/)1(
,,,
/)]()2()1([),,(
Sum over all states of N-
molecule system
Sum over all states of
individual molecules
The N-molecule partition function is decomposed to a product of 1-molecule
partition functions
51
Partition functions for non-interacting systems
,,,
/],,,,[/),(
kji
kTelecvibkrotjtransikTeeTVq
electroniclvibrationarotationalnaltranslatioi
We can repeat the process for the internal degrees of freedom of the molecule:
The 1-molecule canonical ensemble partition function decomposes to partition
functions for different degrees of freedom:
elecvibrottrans
kTeleck
kTvibkj
kTrotji
kTtransi
qqqq
eeeeTVq
/,/,/,/,),(
If we use quantum mechanical expressions for the translational, rotational,
vibrational, and electronic energies, we can determine the partition function
for each of these degrees of freedom.
52
Phase space probability distribution of an ideal gas molecule
The phase space for an ideal gas at constant energy {r1,p1,r2,p2, …, rN, pN}:
1) Molecules are uniformly distributed in the volume of the system and their
momentum components are distributed according to the Maxwell (Gaussian)
distribution;
2) Many possible distributions of positions and momenta of
the molecules are possible which would still give the
same total energy, EN, for the system.
V
dxdydz
V
ddP
rrr)(1
Spatial distribution of molecules: Probability of finding
molecule 1 at r within the volume element, dr = dxdydz:
Momentum distribution of the molecules: Probability of molecule 1 having
momentum p within the momentum element dp = dpxdpydpz:
zyxmkTzpypxp
zyx dpdpdpekTm
dpppP2)222(
2/3
12
1),,(
p
53
Classical states and phase space trajectories
p / kg·m·s-1
(x-x0) = ξ
U =
k(x
-x0)2
/2
F =
-k(
x-x 0
)
• In classical mechanics states with a particular energy are represented by a phase
space trajectory;
• Trajectories with all possible total energy values can be observed. The energy of
trajectories can vary continuously.
• For N atom classical systems, the state is represented by a 3N-dimensional point
in phase space {r1, p1, r2, p2, …, rN, pN}
• Each energy values defines a trajectory in phase space
ξ / m
54
Switching over from the classical to the quantum description of states
For our purposes, the description of the state of an N-atom system in terms of a
discrete set of states represented by a single quantum index i is much simpler than in
terms of a continuous variation of the state {r1, p1, r2, p2, …, rN, pN} in phase space.
)()()(1
iNi
i Pff
NNNNN ddddPff prprprprprpr r
r 1111
max,1min,1
}),,,,({}),({}),({
We aim to derive the expression for the probability of observing a system in
different states and use that in calculating different thermodynamic and mechanical
properties of the system
It is easier to do calculations of averages with discrete states
than with continuous states
jkTjE
eTVNQ/
),,(
Classical limit to the canonical partition function
• Sum over N particle quantum states
NNkTNqNpqpH
Ndqdpdqdpe
hNQ 3311
),,...,1,1(
3!
1
Molecules are indistinguishable
h: volume of phase space element from quantum mechanics
• Integral over phase space elements Semi-classical equivalent
dpdq has units of energy·time (h Planck’s constant)
55
state quantumdpdq
),,,...,,,(),...,( 311131 NNNN zyxzyxUppKH
V NkTNqqU
p NmkT
Nppp
Ndqdqedpdpe
hNQ 31
)3,...,1(1
2/)23
22
21
(
3!
1
Hamiltonian of the system represents the energy in a canonical ensemble
NNkT
Nq
NpqpH
Ndqdpdqdpe
hNQ 3311
)3
,3
,...,1
,1
(
3!
1
N
N
V N
kTN
qqUN
Zh
mkT
Ndqdqe
h
mkT
NQ 3
2/3
231
)3
,...,1
(2/3
2
2
!
12
!
1
Momentum integrals are Gaussian!
Configurational integral 56
Classical partition function
We can separate the momentum and position integrals
Evaluating the momentum position integrals
NNkTqpH
kTN
pN
qpqH
NNdpdqdpdqe
epqpqP
3311),(
)3
,3
,,1
,1
(
3311),,,,(
• Classically momenta always follow the Maxwell distribution!!!
Classical expression for probability in the canonical ensemble
),,,...,,,()( 1111
2,
2,
2,2
1NNN
N
zyxmzyxzyxUpppH
NkTqU
kTN
qqU
N
mkTN
pp
NkTqU
kTN
qqU
NmkT
Npp
mkTN
pp
NNkTqpH
kTN
pN
qpqH
dqdqe
e
mkT
e
dqdqe
e
dpdpe
e
dpdqdpdqe
e
31)(
)3
,,1
(
2/3
2/)23
21
(
31)(
)3
,,1
(
312/)2
321
(
2/)23
21
(
3311),(
)3
,3
,,1
,1
(
)2(
57
• This is true for gases, liquids, and solids!
NNkTqpHkTPV
kTPVkTpqH
NNdpdqdpdqedVe
eeVpqpqP
3311),(
0
),(
3311 ),,,,,(
Classical expression for probability in isothermal - isobaric ensembles
58
NN
kTqpHkTPV
NdpdqdpdqedVe
hNVTPN 3311
),(03
0 !
1,,
NkTqUkTPV
kTPVkTNqqU
N
mkTN
pp
NNdqdqedVe
ee
mkT
eVpqpqP
31)(
0
)3,,1(
2/3
2/)23
21
(
3311)2(
),,,,,(
• Momenta always follow the Maxwell distribution!
Probability of observing system volume V and q1, p1, …, q3N, p3N and :
Classical expression for probability in the grand canonical ensemble
59
NNkTqpH
N
kTN
kTNkTpqH
NN
dpdqdpdqee
eeNpqpqP
3311),(
0
),(
3311 ),,,,,(
NN
kTqpH
NN
kTN dpdqdpdqehN
eTV 3311),(
30 !
1,,
NkTqU
N
kTN
kTNkTNqqU
N
mkTN
pp
NN
dqdqee
ee
mkT
eNpqpqP
31)(
0
)3,,1(
2/3
2/)23
21
(
3311)2(
),,,,,(
• Momenta always follow the Maxwell distribution!
Probability of observing N molecules with q1, p1, …, qN, pN :
q p
How do we link ensemble relations to MD and MC simulations?
pqddpqPpqApqA ),(),(),(
pq
pq
dde
ddeqpHE
kTpqH
kTpqH
),(
),(),(
60
Note: time does not enter these equations!
Phase space surface: Each point
(q, p) is weighted according to its
energy H(q, p)
pqpq
dde
eP
kTqpH
kTpqH
),(
),(
),(
Why does a system in a MD
simulation seek minimum
energy states?
timeN
kTqU
kTNqqU
N
mkTN
pp
pqPdqdqe
e
mkT
epqP ),(
)2(),(
31)(
)3,,1(
2/3
2/)23
21
(
Link to MD and Monte Carlo Simulations
timepqMddpqPpqMpqM ),(),(),(),( pq
NNkT
Np
NqpqH
NNkT
Np
NqpqH
dpdqdpdqe
dpdqdpdqeqpHE
3311)
3,
3,,
1,
1(
3311)
3,
3,,
1,
1(
),(
If we can guarantee that the MD or MC sampling follows the canonical
ensemble, all thermodynamic averages can be calculated by the
simulation 61
Probability of observing q1, p1, …, q3N, p3N is determined by the ergodic property of
MD:
Average value of a mechanical quantity is determined by ergodicity:
Monte Carlo simulations sample the phase space probability distribution directly
and do not depend on ergodicity