32
ChE 553 Lecture 07 Review Of Statistical Mechanics 1

ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Embed Size (px)

Citation preview

Page 1: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

ChE 553 Lecture 07

Review Of Statistical Mechanics

1

Page 2: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Objective For Today

• Go over some background statistical mechanics– Define ensemble, partition function,

2

Page 3: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Historical Introduction• Stat mech developed by

Maxwell, Boltzman, Clausius, Gibbs.

• Question: if we have individual molecules – how can there be a pressure, enthalpy, etc?

3

Maxwell

Page 4: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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).

4

Page 5: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Important Concept Can Replace Time Average With Ensemble Average:

5

Replace system with a set of systems "identical" to the first and average over all of the systems. Identical - same thermodynamic state

Page 6: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Statistical Ensemble

We call the set of systems “the statistical ensemble”

6

Page 7: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

7

Page 8: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

All Thermodynamic Properties Can Be Calculated With Any Ensemble

We choose the one most convenient.

PVT properties – canonical ensemble

Vapor-liquid equilibrium – grand canonical ensemble.

8

Page 9: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Can Create Ensemble Of Anything

Simulate the behavior of a refinery (is it robust).

9

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

Page 10: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Example: Consider a System of Oscillators With 9 States Given in the Table Below

10

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

Page 11: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Monte Carlo Procedure

11

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.

Page 12: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

12

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.

Page 13: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

13

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.

Page 14: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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

14

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.

Page 15: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.15

Page 16: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

16

Page 17: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Monte Carlo Procedure In Excel

17

-9temp 1000 beta= =1/0.00198/D2 -7

-5initial state energy average energy new state new energy exp-beta random -81 =INDEX($H$1:$H$10,A5) =AVERAGE(B$5:B5) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D5) =EXP((B5-E5)*beta) =RAND() -6=IF(F5>G5,D5,A5) =INDEX($H$1:$H$10,A6) =AVERAGE(B$5:B6) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D6) =EXP((B6-E6)*beta) =RAND() -4=IF(F6>G6,D6,A6) =INDEX($H$1:$H$10,A7) =AVERAGE(B$5:B7) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D7) =EXP((B7-E7)*beta) =RAND() -5.5=IF(F7>G7,D7,A7) =INDEX($H$1:$H$10,A8) =AVERAGE(B$5:B8) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D8) =EXP((B8-E8)*beta) =RAND() -3.5=IF(F8>G8,D8,A8) =INDEX($H$1:$H$10,A9) =AVERAGE(B$5:B9) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D9) =EXP((B9-E9)*beta) =RAND() -1.5=IF(F9>G9,D9,A9) =INDEX($H$1:$H$10,A10) =AVERAGE(B$5:B10) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D10) =EXP((B10-E10)*beta) =RAND() 0=IF(F10>G10,D10,A10) =INDEX($H$1:$H$10,A11) =AVERAGE(B$5:B11) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D11) =EXP((B11-E11)*beta) =RAND()=IF(F11>G11,D11,A11) =INDEX($H$1:$H$10,A12) =AVERAGE(B$5:B12) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D12) =EXP((B12-E12)*beta) =RAND()=IF(F12>G12,D12,A12) =INDEX($H$1:$H$10,A13) =AVERAGE(B$5:B13) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D13) =EXP((B13-E13)*beta) =RAND()=IF(F13>G13,D13,A13) =INDEX($H$1:$H$10,A14) =AVERAGE(B$5:B14) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D14) =EXP((B14-E14)*beta) =RAND()=IF(F14>G14,D14,A14) =INDEX($H$1:$H$10,A15) =AVERAGE(B$5:B15) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D15) =EXP((B15-E15)*beta) =RAND()=IF(F15>G15,D15,A15) =INDEX($H$1:$H$10,A16) =AVERAGE(B$5:B16) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D16) =EXP((B16-E16)*beta) =RAND()=IF(F16>G16,D16,A16) =INDEX($H$1:$H$10,A17) =AVERAGE(B$5:B17) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D17) =EXP((B17-E17)*beta) =RAND()=IF(F17>G17,D17,A17) =INDEX($H$1:$H$10,A18) =AVERAGE(B$5:B18) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D18) =EXP((B18-E18)*beta) =RAND()=IF(F18>G18,D18,A18) =INDEX($H$1:$H$10,A19) =AVERAGE(B$5:B19) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D19) =EXP((B19-E19)*beta) =RAND()=IF(F19>G19,D19,A19) =INDEX($H$1:$H$10,A20) =AVERAGE(B$5:B20) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D20) =EXP((B20-E20)*beta) =RAND()=IF(F20>G20,D20,A20) =INDEX($H$1:$H$10,A21) =AVERAGE(B$5:B21) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D21) =EXP((B21-E21)*beta) =RAND()=IF(F21>G21,D21,A21) =INDEX($H$1:$H$10,A22) =AVERAGE(B$5:B22) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D22) =EXP((B22-E22)*beta) =RAND()=IF(F22>G22,D22,A22) =INDEX($H$1:$H$10,A23) =AVERAGE(B$5:B23) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D23) =EXP((B23-E23)*beta) =RAND()=IF(F23>G23,D23,A23) =INDEX($H$1:$H$10,A24) =AVERAGE(B$5:B24) =RANDBETWEEN(1,9) =INDEX($H$1:$H$10,D24) =EXP((B24-E24)*beta) =RAND()

Page 18: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Results At 1000 K

18

-9temp 1000 beta= 0.505051 -7

-5initial state energy average energy new state new energy exp-beta random -8

1 -9 -9 2 -7 0.364182 0.161714 -62 -7 -8 9 -1.5 0.062177 0.5171 -42 -7 -7.666666667 9 -1.5 0.062177 0.24002 -5.52 -7 -7.5 4 -8 1.657069 0.149528 -3.54 -8 -7.6 6 -4 0.132629 0.905161 -1.54 -8 -7.666666667 2 -7 0.603475 0.644916 04 -8 -7.714285714 3 -5 0.219775 0.1950273 -5 -7.375 4 -8 4.55011 0.9633574 -8 -7.444444444 2 -7 0.603475 0.0836492 -7 -7.4 5 -6 0.603475 0.4911665 -6 -7.272727273 5 -6 1 0.0245795 -6 -7.166666667 4 -8 2.745878 0.0439514 -8 -7.230769231 7 -5.5 0.28291 0.4986974 -8 -7.285714286 6 -4 0.132629 0.2855274 -8 -7.333333333 1 -9 1.657069 0.0513571 -9 -7.4375 1 -9 1 0.2199481 -9 -7.529411765 1 -9 1 0.2836641 -9 -7.611111111 3 -5 0.132629 0.666535

Page 19: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Results At 1000 K

19

-10

-9

-8

-7

-6

-5

-4

-3

-2

-1

0 Instantaneous energy avg energy

Instantaneous Energy

Average energy

Page 20: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Results at 300 K

20

-10

-9

-8

-7

-6

-5

-4

-3

-2

-1

0 Instantaneous energy avg energy

Page 21: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

21

Page 22: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Analytical Properties Cont.For Canonical Ensemble:

22

pg e

Qn

nU

canonN

n

(6.11)

Page 23: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

For Grand Canonical Ensemble:

23

pg e

Qnn

E

grand

n

(6.12)

with:

E U Nn n n (6.13)

Page 24: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Partition Function Definitions

24

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)

Page 25: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

25

Page 26: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

26

Page 27: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Maxwell Relationships For Partition Functions

27

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

Page 28: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Maxwell Relationships Cont.

28

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

μ μ

Page 29: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

Equilibrium Constant

The equlibrium constant for a reaction K, the equilibrium constant for the reaction A+B C+D is given by

29

BA

DC

qq

qqK

(6.7)

Page 30: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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

30

Page 31: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

31

Page 32: ChE 553 Lecture 07 Review Of Statistical Mechanics 1

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.

32