che553lect07

advertisement

ChE 553 Lecture 07

Review Of Statistical

Mechanics

1

Objective For Today

• Go over some background statistical mechanics

– Define ensemble, partition function,

2

Historical Introduction

• Stat mech developed by

Maxwell, Boltzman, Clausius,

Gibbs.

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

Maxwell

3

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

Important Concept Can Replace Time Average

With Ensemble Average:

Replace system with a set of systems "identical" to the first and average over all of the systems.

Identical - same thermodynamic state

5

6

Statistical Ensemble

We call the set of systems “the statistical ensemble”

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

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

Can Create Ensemble Of

Anything

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

 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

9

Example: Consider a System of Oscillators

With 9 States Given in the Table Below n n

1

n

2

U

1

U

2

U n g n

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

Monte Carlo Procedure

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.

11

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.

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.

12

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.

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.

13

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

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.

14

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

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

Monte Carlo Procedure In

Excel initial state

1

=IF(F5>G5,D5,A5)

=IF(F6>G6,D6,A6) energy

=INDEX($H$1:$H$10,A5)

=INDEX($H$1:$H$10,A6)

=INDEX($H$1:$H$10,A7)

=IF(F7>G7,D7,A7)

=IF(F8>G8,D8,A8)

=INDEX($H$1:$H$10,A8)

=INDEX($H$1:$H$10,A9)

=IF(F9>G9,D9,A9) =INDEX($H$1:$H$10,A10)

=IF(F10>G10,D10,A10) =INDEX($H$1:$H$10,A11)

=IF(F11>G11,D11,A11) =INDEX($H$1:$H$10,A12)

=IF(F12>G12,D12,A12) =INDEX($H$1:$H$10,A13)

=IF(F13>G13,D13,A13) =INDEX($H$1:$H$10,A14)

=IF(F14>G14,D14,A14) =INDEX($H$1:$H$10,A15)

=IF(F15>G15,D15,A15) =INDEX($H$1:$H$10,A16)

=IF(F16>G16,D16,A16) =INDEX($H$1:$H$10,A17)

=IF(F17>G17,D17,A17) =INDEX($H$1:$H$10,A18)

=IF(F18>G18,D18,A18) =INDEX($H$1:$H$10,A19)

=IF(F19>G19,D19,A19) =INDEX($H$1:$H$10,A20)

=IF(F20>G20,D20,A20) =INDEX($H$1:$H$10,A21)

=IF(F21>G21,D21,A21) =INDEX($H$1:$H$10,A22)

=IF(F22>G22,D22,A22) =INDEX($H$1:$H$10,A23)

=IF(F23>G23,D23,A23) =INDEX($H$1:$H$10,A24) temp average energy

=AVERAGE(B$5:B5)

=AVERAGE(B$5:B6)

=AVERAGE(B$5:B7)

=AVERAGE(B$5:B8)

=AVERAGE(B$5:B9)

=AVERAGE(B$5:B10)

=AVERAGE(B$5:B11)

=AVERAGE(B$5:B12)

=AVERAGE(B$5:B13)

=AVERAGE(B$5:B14)

=AVERAGE(B$5:B15)

=AVERAGE(B$5:B16)

=AVERAGE(B$5:B17)

=AVERAGE(B$5:B18)

=AVERAGE(B$5:B19)

=AVERAGE(B$5:B20)

=AVERAGE(B$5:B21)

=AVERAGE(B$5:B22)

=AVERAGE(B$5:B23)

=AVERAGE(B$5:B24)

1000 new state

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9)

=RANDBETWEEN(1,9) beta= new energy

=INDEX($H$1:$H$10,D5)

=INDEX($H$1:$H$10,D6)

=INDEX($H$1:$H$10,D7)

=INDEX($H$1:$H$10,D8)

=INDEX($H$1:$H$10,D9)

=INDEX($H$1:$H$10,D10)

=INDEX($H$1:$H$10,D11)

=INDEX($H$1:$H$10,D12)

=INDEX($H$1:$H$10,D13)

=INDEX($H$1:$H$10,D14)

=INDEX($H$1:$H$10,D15)

=INDEX($H$1:$H$10,D16)

=INDEX($H$1:$H$10,D17)

=INDEX($H$1:$H$10,D18)

=INDEX($H$1:$H$10,D19)

=INDEX($H$1:$H$10,D20)

=INDEX($H$1:$H$10,D21)

=INDEX($H$1:$H$10,D22)

=INDEX($H$1:$H$10,D23)

=INDEX($H$1:$H$10,D24)

=1/0.00198/D2 exp-beta random

=EXP((B5-E5)*beta) =RAND()

=EXP((B6-E6)*beta) =RAND()

=EXP((B7-E7)*beta) =RAND()

=EXP((B8-E8)*beta) =RAND()

=EXP((B9-E9)*beta) =RAND()

=EXP((B10-E10)*beta) =RAND()

=EXP((B11-E11)*beta) =RAND()

=EXP((B12-E12)*beta) =RAND()

=EXP((B13-E13)*beta) =RAND()

=EXP((B14-E14)*beta) =RAND()

=EXP((B15-E15)*beta) =RAND()

=EXP((B16-E16)*beta) =RAND()

=EXP((B17-E17)*beta) =RAND()

=EXP((B18-E18)*beta) =RAND()

=EXP((B19-E19)*beta) =RAND()

=EXP((B20-E20)*beta) =RAND()

=EXP((B21-E21)*beta) =RAND()

=EXP((B22-E22)*beta) =RAND()

=EXP((B23-E23)*beta) =RAND()

=EXP((B24-E24)*beta) =RAND()

-9

-7

-5

-8

-6

-4

-5.5

-3.5

-1.5

0

17

Results At 1000 K temp 1000 beta= 0.505051

initial state energy

1

2

2

2

4

4

4

2

5

5

3

4

4

4

4

1

1

1

-9 average energy new state new energy

-9

-7 -8

-7 -7.666666667

2

9

9 exp-beta random

-7 0.364182 0.161714

-1.5 0.062177

0.5171

-1.5 0.062177

0.24002

-7

-8

-7.5

-7.6

-8 -7.666666667

-8 -7.714285714

4

6

2

3

-8 1.657069 0.149528

-4 0.132629 0.905161

-7 0.603475 0.644916

-5 0.219775 0.195027

-5 -7.375

-8 -7.444444444

-7 -7.4

-6 -7.272727273

-6 -7.166666667

5

5

4

4

2

-8 4.55011 0.963357

-7 0.603475 0.083649

-6 0.603475 0.491166

-6 1 0.024579

-8 2.745878 0.043951

-8 -7.230769231

-8 -7.285714286

-8 -7.333333333

-9 -7.4375

-9 -7.529411765

-9 -7.611111111

7

6

1

1

1

3

-5.5

0.28291 0.498697

-4 0.132629 0.285527

-9 1.657069 0.051357

-9 1 0.219948

-9 1 0.283664

-5 0.132629 0.666535

-6

-4

-5.5

-9

-7

-5

-8

-3.5

-1.5

0

18

Results At 1000 K

-2

-3

-4

-5

0

-1

-6

-7

-8

-9

-10

Average energy

Instantaneous energy avg energy

Instantaneous Energy

19

-6

-7

-8

-9

-4

-5

-2

-3

-10

0

-1

Results at 300 K

Instantaneous energy avg energy

20

Analytical Properties Of The Canonical And

Grand Canonical Ensemble

Gibbs showed that the ensemble average was equivalent to a state average

F

  n n

(6.10)

P n

=the probability that the system is in a configuration (state) n.

21

Analytical Properties Cont.

For Canonical Ensemble:



U n p n

N

Q canon

(6.11)

22

with:

For Grand Canonical

Ensemble:



E p

 n n

Q grand

(6.12)

E n

U n

 

N n

(6.13)

23

Partition Function Definitions

N

Q canon

=canonical partition function

Q grand

= grand canonical partition function



U n Q

N canon

  n

(6.15)



E n Q grand

  n

(6.16)

24

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

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

Maxwell Relationships For

Partition Functions

S

  k

B

 n p Ln n p

  g n

(6.40)

  N

A k TLn(Q )

B canon

(6.59)

(

N

LnQ

 canon

)

(6.60)

U

S=-

 

A

T

V,N

=k T

B

LnQ

N canon

T

V,N

N

+k LnQ

B canon

27 (6.61)

Maxwell Relationships Cont.

P

 

 

A

V

T,N

=k T

B

LnQ

N canon

V

T,N

(6.62)

Ν=

PV

 μ

T,V

 

 

A

N

T,V

 k T

B

N

LnQ canon

N

T,V

(6.63)

S

PV

T 

V,

 k T

B

LnQ grand dT

V,

+k Ln(Q )

B grand

(6.64)

28

(6.65)

LnQ grand

 μ

T,V

Equilibrium Constant

The equlibrium constant for a reaction K, the equilibrium constant for the reaction

A+B

C+D is given by

K

 q

C q

D q

A q

B

(6.7)

29

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

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

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

Download