che 452 lecture 17 review of statistical mechanics 1
TRANSCRIPT
ChE 452 Lecture 17 Review Of Statistical Mechanics
1
Overview
2
Most theories of reaction rates are based on statistical mechanics, so we need it for the remainder of the course. It was covered in Chem 344!!! I thought that I had better do it again.
Key Concepts From Stat Mech
All thermodynamic properties an average. Internal energy of molecules in a box - average of the internal energies of each molecule, which is then also averaged over time.
There are alternative ways to compute the averages.
- Time average- Ensemble average (defined later)
Always give the same answer
3
Key Concepts Cont.
When you do statistical mechanics, you use all of the normal state variables that you learned about in thermodynamics: pressure, temperature, volume, free energy, enthalpy … In addition there are some special state variables called partition functions.
The partition functions are like any other state
variable. The partition functions are completely defined if you know the state of the system. You can also work backwards, so if you know the partition functions, you can calculate any other state variable of the system.
4
Partition Function Definition
Tk
1
B
5
Q g ecanonN
nn
U n
(6.15)
Q g egrand n
n
E n
(6.16)
Partition Functions Properties
Partition functions easily calculate from the properties of the molecules in the system (i.e. energy levels, atomic masses etc).
Convenient thermodynamic variables. If you know the properties of all of the molecules, you can calculate the partition functions.
Can then use Maxwell’s Equations and calculate any thermodynamic property of the system.
6
Equilibrium Constant
The equlibrium constant for a reaction K, the equilibrium constant for the reaction A+B C+D is given by
7
BA
DC
qqK
(6.7)
Historical Introduction
Stat mech developed by Maxwell, Boltzman, Clausius, Gibbs.
Question: if we have individual molecules – how can there be a pressure, enthalpy, etc?
8
Key Concept In Stat Mech
Idea: macroscopic properties average of microscopic properties:
macroscopic properties of function
F = the time average of F (Take a series of snapshots of the system and average the properties over all of the snapshots).
9
Important Concept Can Replace Time Average With Ensemble
Average:
10
Replace system with a set of systems "identical" to the first and average over all of the systems. Identical - same thermodynamic state
Statistical Ensemble
We call the set of systems “the statistical ensemble”
11
Common Statistical Ensembles
Canonical ensemble - set of all systems with a fixed number of molecules in equilibrium with a heat bath
Grand canonical ensemble - set of all systems in equilibrium with a source of molecules a fixed chemical potential
Micro canonical ensemble - systems consisting of individual molecules or groups of molecules in equilibrium with a heat bath.
12
All Thermodynamic Properties Can Be Calculated With Any
EnsembleWe choose the one most convenient.
PVT properties – canonical ensemble
Vapor-liquid equilibrium – grand canonical ensemble.
13
Can Create Ensemble Of Anything
Simulate the behavior of a refinery (is it robust).
14
Create a series of computer models at refineries identical to the one of interest
Create some disorder (i.e. add temperature) randomly
See how refinery responds
Example: Consider a System of Oscillators With 9 States Given in the
Table Below
15
n n1 n2 U1 U2 Un gn 1 1 1 -4 -5 -9 1 2 1 2 -4 -3 -7 1 3 1 3 -4 -1 -5 1 4 2 1 -3 -5 -8 1 5 2 2 -3 -3 -6 1 6 2 3 -3 -1 -4 1 7 3 1 -0.5 -5 -5.5 1 8 3 2 -0.5 -3 -3.5 1 9 3 3 -0.5 -1 -1.5 1
Construct an algorithm to step through the cannonical ensemble and calculate the average
energy
Monte Carlo Procedure
16
1) Step through the canonical ensemble and measure the state of the system at each stage. 2) Calculate properties as an ensemble average of the properties of the system, as described in Example 6.F.
Consider the System of Oscillators Described in Example 6.E
The canonical ensemble for this example is a set of systems identical to the first.
Can represent that ensemble via a series of boxes.
Each box is labeled with the number n, the quantum number for the system, where n goes from one to nine.
17
1 1 3 8 7 5 3 1 1 3 2 2 1 5 4 1 2 1 5 4 2 2
Figure 6.G1 Part of the canonical ensemble for the example above.
Monte Carlo Method
Need an algorithm to step through these boxes.
Results will eventually converge to the exact result in the limit of a large enough number of boxes.
18
1 1 3 8 7 5 3 1 1 3 2 2 1 5 4 1 2 1 5 4 2 2
Figure 6.G1 Part of the canonical ensemble for the example above.
Metropolis [1953] Algorithm
1) Start at some system in the ensemble.2) Move to the next system in the
ensemble. That system may have the same state or a different state. See Figure 6.G1
3) Use and algorithm to calculate the next state
19
1 1 3 8 7 5 3 1 1 3 2 2 1 5 4 1 2 1 5 4 2 2
Figure 6.G1 Part of the canonical ensemble for the example above.
Method to Choose the Next State Via the Metropolis Algorithm
1) Choose a second state either at random, or by incrementing/decrementing one of the quantum numbers, or by moving one of the atoms.
2) If energy goes down assume that the next box is in that state.
3) If energy goes up to calculate exp(-U) and rand, where rand is a random number between 0 and 1.
4) If exp (-U) > rand assume that the next box is in the new state.
5) If exp (-U) < rand assume that the new box has the same state as the previous box.
6) Repeat.
20
Metropolis Algorithm Continued
Metropolis et al. proved that after a long time, the distribution of states generated by such a procedure is equal to the exact distribution of states.
This is called the Monte Carlo method to calculate properties.
21
Metropolis Algorithm to Calculate the Average Energy of a System of Oscillators
in C
float u[9]={-10.,-8.,-6.,-8.,-6.,-4.,-6.,-4.,-2.};
main(){ int i,newi,kount; float uavg, deltau,beta,ran; beta=.3333; printf(“\n enter a value for
beta“);scanf(” %f”, &beta); i=rndf(9); /* rndf(x) returns a
random number between 0 and x */
for(kount=0;kount<100;kount++) /* 100 steps to randomize*/
{ newi=rndf(9);/* choose a new random state for the system */ deltau=u[newi]-u[i]; if( exp( -beta*deltau)>rndf(1.0) )i=newi;
i=rndf(9); /* rndf(x) returns a random number between 0 and x */
for(kount=0;kount<100;kount++) /* 100 steps to randomize*/
{ newi=rndf(9);/* choose a new random state for the system */ deltau=u[newi]-u[i]; if( exp( -beta*deltau)>rndf(1.0) )i=newi;
} uavg=0; for(kount=0;kount<1000;kount++) /* 1000 steps to
compute avg energy*/ { newi=rndf(9);/* choose a new random state for
the system */ deltau=u[newi]-u[i]; ran=rndf(1.0); if( exp( -beta*deltau)>ran )i=newi; uavg=uavg+u[i]; } uavg=uavg/1000.; printf(“\nAverage Energy = %5.3f”,uavg); return 0;}
22
Results
Average energy varies with temperature
23
Next Analytical Properties Of The Canonical And Grand Canonical
Ensemble
Gibbs showed that the ensemble average was equivalent to a state average
F F pnn
n
(6.10)
Pn=the probability that the system is in a configuration (state) n.
24
Analytical Properties Of The Canonical And Grand Canonical
Ensemble
Gibbs showed that the ensemble average was equivalent to a state average
F F pnn
n
(6.10)
Pn=the probability that the system is in a configuration (state) n.
25
Analytical Properties Cont.For Canonical Ensemble:
26
pg e
Qn
nU
canonN
n
(6.11)
For Grand Canonical Ensemble:
27
pg e
Qnn
E
grand
n
(6.12)
with:
E U Nn n n (6.13)
Partition Function Definitions
28
Qcanon
N =canonical partition function Qgrand= grand canonical partition function
Q g ecanonN
nn
Un
Q g egrand nn
E n
(6.15)
(6.16)
Partition Functions Are State Variables
If you know the volume, temperature, and the energy levels of the system you can calculate the partition function.
If you know T and the partition function you can calculate all other thermodynamic properties via a Maxwell relationship.
Thus, stat mech provides a link between quantum and thermo. If you know the energy levels you can calculate partition functions and then calculate thermodynamic properties.
29
Maxwell Relationships For Partition Functions
30
nB n
n n
pS k p Ln
g
NB canonA k TLn(Q )
( )LnQUcanon
N
(6.40)
(6.59)
(6.60)
(6.61)
NNcanon
B B canonV,N V,N
LnQAS=- =k T +k LnQ
T T
Maxwell Relationships Cont.
31
Ncanon
BT,N T,N
LnQAP =k T
V V
(6.62)
Ncanon
BT,V T,V
LnQAk T
N N
(6.63)
grandB B grand
V, V,
LnQPVS k T +k Ln(Q )
T dT
(6.64)
(6.65)
grandB
T,V T,V
LnQPVΝ= =k T
μ μ
Key Concepts From Stat Mech
All thermodynamic properties an average. Internal energy of molecules in a box - average of the internal energies of each molecule, which is then also averaged over time.
There are alternative ways to compute the averages.
- Time average- Ensemble average (defined later)
Always give the same answer
32
Summary Continued
When you do statistical mechanics, you use all of the normal state variables that you learned about in thermodynamics: pressure, temperature, volume, free energy, enthalpy … In addition there are some special state variables called partition functions.
The partition functions are like any other state
variable. The partition functions are completely defined if you know the state of the system. You can also work backwards, so if you know the partition functions, you can calculate any other state variable of the system.
33
Summary Continued
Partition functions can be easily calculated from the properties of the molecules in the system (i.e. energy levels, atomic masses etc).
Convenient thermodynamic variables. If you know the properties of all of the molecules, you can calculate the partition functions.
Can then use Maxwell’s Equations and calculate any thermodynamic property of the system.
34
Class Question
What did you learn new today?
35