Free energies and phase transitions. Condition for phase coexistence in a one-component system:

84
Free energies and phase transitions

Transcript of Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Page 1: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Free energies and phase transitions

Page 2: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Condition for phase coexistence in a one-component system:

Page 3: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

The Gibbs “Ensemble”

Page 4: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

NVT Ensemble

Fluid Fluid

Page 5: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

NVT Ensemble

G

LL

G

Page 6: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Gibbs Ensemble

GL

Equilibrium!

Page 7: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 8: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

•Distribute n1 particles over two volumes•Change the volume V1

•Displace the particles

1 13

1 1 1

1 1 1 1

11 1 10 ( ) 0

1 1

G

2 2

( )

exp[ ( )] exp[ ( )]

( ) N

VN n N n

n V n N n

n n N n N n

dV V V V

d U d

Q N

U

V T

s s s s

Page 9: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Distribute n1 particles over two volumes:

1 1 1

!

! !

N N

n n N n

31 1

1 1

1 1 1 1

11 1 10

1 1 2 2

1G 0 ( )

( )

exp

(

[ ( )] exp[ ( )]

) N

V n N n

n n N n N n

N

n V n N ndV V V V

d U d U

Q N V T

s s s s

Page 10: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Integrate volume V1

31 1

1 1 1

1 1

1

1

1G 0 ( ) 1 1 1

1 2 2

0

1exp[ ( )] exp[ ( )]

(( ) )N

V n N

n n N n N

nN

n V n n

n

N

d U d U

dV V VQ N V T V

s s s s

Page 11: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Displace the particles in box 1 and box2

1 13

1 1

1 1 1 1

1

1 1

1G 1 1 10 (

2 2

) 0

exp[ ( )] exp[

)

(

(

)]

( )N

VN n N n

n V n

n

n

n N n N n

N

d U d

Q N V T d

U

V V V V

s s s s

Page 12: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

1 13

1 1 1

1 1 1 1

1G 1 1 10 ( ) 0

1 1 2 2

( ) ( )

exp[ ( )] exp[ ( )]

N

VN n N n

n V n N n

n n N n N n

Q N V T dV V V V

d U d U

s s s s

Probability distribution

1 1

1 1 1 11 11 1 1 2 1 2

1 1

( )( ) exp [ ( ) ( )]

( )

n N nn N n n N nV V V

N n V U Un N n

s s s s

Page 13: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Particle displacement

Volume change

Particle exchange

Page 14: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Acceptance rules

1 1

1 1 1 11 11 1 1 2 1 2

1 1

( )( ) exp [ ( ) ( )]

( )

n N nn N n n N nV V V

N n V U Un N n

s s s s

Detailed Balance:

( ) ( )K o n K n o

( ) ( ) acc( ) ( ) ( ) acc( )N o o n o n N n n o n o

acc( ) ( ) ( )

acc( ) ( ) ( )

o n N n n o

n o N o o n

acc( ) ( )

acc( ) ( )

o n N n

n o N o

Page 15: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

1 1

1 1 1 11 11 1 1 2 1 2

1 1

( )( ) exp [ ( ) ( )]

( )

n N nn N n n N nV V V

N n V U Un N n

s s s s

1

1

1

1 1

1

1 11

1 1

1 11

2

12

1

( )( ) exp [ ( ) ( )]

( )

( )( ) exp [ ( ) ( )]

( )

n N n

n N

N n

N nn

V V VN U n U

n N n

V V VN o

n N

n

no U U

s

s

Displacement of a particle in box 1

1 1

1

1 1

1

1 11 2

1 1

1 11 2

1 1

( )exp [ ( ) ( )]

( )acc( )

( )acc( )exp [ ( ) ( )]

( )

n N nN n

n N nN n

V V VU n U

n N no n

V V Vn oU o U

n N n

s

s

Page 16: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

1 1

1 1 1 11 11 1 1 2 1 2

1 1

( )( ) exp [ ( ) ( )]

( )

n N nn N n n N nV V V

N n V U Un N n

s s s s

1

1

1

1 1

1

1 11

1 1

1 11

2

12

1

( )( ) exp [ ( ) ( )]

( )

( )( ) exp [ ( ) ( )]

( )

n N n

n N

N n

N nn

V V VN U n U

n N n

V V VN o

n N

n

no U U

s

s

Displacement of a particle in box 1

1

1

exp [ ( )]acc( )

acc( ) exp [ ( )]

U no n

n o U o

Page 17: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Acceptance rules

1 1

1 1 1 11 11 1 1 2 1 2

1 1

( )( ) exp [ ( ) ( )]

( )

n N nn N n n N nV V V

N n V U Un N n

s s s s

Adding a particle to box 2

1

11

1

1 111

1 11 2

1 11 2

1 1

( )( ) exp [ ( ) ( )]

( )

(

acc(

)( ) exp [ ( ) (

1

)

)]( )

1

( )

acc( ) ( )

N

n N

nn

n

V V VN U U

N

V V VN o U o U o

n N n

o n N n

n o

n nn n

N o

n

Page 18: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Moving a particle from box 1 to box 2

11

1 1

11

1 1

111

111 1

1 21 1

1 1

11 2

1 1

1 1

11 1

1

2

1

( )( ) exp [ ( ) ( )]

( 1) 1

( )( ) exp [ ( ) ( )

( )e

]( )

xp [ ( ) ( )]( 1) 1acc( )

( )acc( )exp [

( )

N nn

n N

N nn

n N n

n

V V VN n U

V V VU n U n

n N n

n U nn N n

V V VN o U o U o

n N n

o n

V V Vn oU

n N n

1 2( ) ( )]o U o

Page 19: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

11

1 1

11

1 1

111

111 1

1 21 1

1 1

11 2

1 1

1 1

11 1

1

2

1

( )( ) exp [ ( ) ( )]

( 1) 1

( )( ) exp [ ( ) ( )

( )e

]( )

xp [ ( ) ( )]( 1) 1acc( )

( )acc( )exp [

( )

N nn

n N

N nn

n N n

n

V V VN n U

V V VU n U n

n N n

n U nn N n

V V VN o U o U o

n N n

o n

V V Vn oU

n N n

1 2( ) ( )]o U o

Moving a particle from box 1 to box 2

Page 20: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

11

1 1

11

1 1

111

111 1

1 21 1

1 1

11 2

1 1

1 1

11 1

1

2

1

( )( ) exp [ ( ) ( )]

( 1) 1

( )( ) exp [ ( ) ( )

( )e

]( )

xp [ ( ) ( )]( 1) 1acc( )

( )acc( )exp [

( )

N nn

n N

N nn

n N n

n

V V VN n U

V V VU n U n

n N n

n U nn N n

V V VN o U o U o

n N n

o n

V V Vn oU

n N n

1 2( ) ( )]o U o

Moving a particle from box 1 to box 2

Page 21: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

11

1 1

111 1

2

21 2

1

1 21 1

1 11 2

1 1

1

1acc( )exp [ ]

acc

( )( ) exp [ ( ) ( )]

( 1) 1

( )( ) exp [ ( ) ( ]

( )

)( )

N nn

n N n

V V VN n U n U n

n N n

V V VN o U o U o

n

Vno n

U

n

n

Vn

N

Uo

Moving a particle from box 1 to box 2

Page 22: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 23: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 24: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 25: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 26: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 27: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 28: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Analyzing the results (1)

Well below Tc Approaching Tc

Page 29: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Analyzing the results (2)

Well below Tc Approaching Tc

Page 30: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Analyzing the results (3)

Page 31: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Condition for phase coexistence in a one-component system:

Page 32: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

With normal Monte Carlo simulations, we cannot compute “thermal” quantities, such as S, F and G, because they depend on the total volume of accessible phase space.

For example:

and

Page 33: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

F cannot be computed with importance sampling

NNNN

NVTNVT

UANQ

A rexprdr!

113

NNN PA rrdr

NN

NNN

P

PA

rdr

rrdr

NN

NNN

UC

UCA

rexpdr

rexprdr

NN

NNN

U

UA

rexpdr

rexprdr

Generate configuration using MC:

NMCNMC UCP rexpr

NM

NNNN r,r,r,r,r 4321 Ni

M

i

AM

A r1

1

with

NMCN

NMCNN

P

PA

rdr

rrdr

NMCN

NMCNN

UC

UCA

rexpdr

rexprdr

NN

NNN

U

UA

rexpdr

rexprdr

!

rexpr

3 NQ

UP

NNVT

NN

Page 34: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Solutions:

1. “normal” thermodynamic integration

2. “artificial” thermodynamic integration

3. “particle-insertion” method

Page 35: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

How are free energies measured experimentally?

P

Page 36: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Then take the limit V0 .

Not so convenient because of divergences. Better:

0, as V0

Page 37: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

This approach works if we can integrate from a known reference state - Ideal gas (“T=”), Harmonic crystal (“T=0”),

Otherwise: use “artificial” thermodynamic integration (Kirkwood)

Suppose we know F(N,V,T) for a system with a simple potential energy function U0: F0(N,V,T).

We wish to know F1(N,V,T) for a system with a potential energy function U1.

Page 38: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Consider a system with a mixed potential energy function (1-)U0+ U1: F (N,V,T).

hence

Page 39: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Or:

And therefore

Examples of application:

Page 40: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

F()

0 1

F(0)

F(1)

The second derivative is ALWAYS negative:

Therefore:

Good test of simulation results…

Page 41: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

1. Any atomic or molecular crystal.

Reference state: Einstein crystal

2. Nematic Liquid crystal:

Start from isotropic phase. Switch on “magnetic field” and integrate around the I-N critical point

isotropic nematic

density

field

Page 42: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Chemical Potentials

Page 43: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Particle insertion method to compute chemical potentials

But N is not a continuous variable. Therefore

Page 44: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Does that help?

Yes: rewrite

s is a scaled coordinate: 0s<1

r = L s (is box size)

Page 45: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Now write

then

Page 46: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

And therefore

but

Page 47: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

So, finally, we get:

Interpretation:

1. Evaluate U for a random insertion of a molecule in a system containing N molecule.

2. Compute

3. Repeat M times and compute the average “Boltzmann factor”

4. Then

Page 48: Free energies and phase transitions. Condition for phase coexistence in a one-component system:
Page 49: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Lennard-Jones fluid

Page 50: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

NQ

NQ 1ln

NN

NGNG

1

))1

LUVPVVN

Q NNNNNPT ;sexpdsexpd

!

13

LUVPVV

LUVPVV

N

NNNN

NNN

N

N

;sexpdsexpd

;sexpdsexpd

!1

!11

ln111

3

33

Other ensembles: NPT

NPTQG lnTVN

F

,

TPN

G

,

NPT: Gibbs free energyNVT: Helmholtz free energy

LUVPVV

ULUVVPVV

N NNN

NNNN

;sexpdsexpd

expds;sexpdsexpd

1

1ln

1

3

LUVPVV

UVLUVPVV

N

PP

NNN

NNNN

;sexpdsexpd

expds;sexpdsexpd

1lnln

13

UN

PVP N expds

1lnln 1

3

NN

NGNG

1

))1 NVT:

NVT

UN expdslnln 1

The volume fluctuates!

UN

PVU

N

PVNN

expds1

expds1

11

NPT:

UN

PVP N expds

1lnln 1

3

Page 51: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Hard spheres

NVT

ex UN expdsln 1

r

rrU

0

overlap no1

overlap if0exp U

Probability to insert a test particle!

Page 52: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Particle insertion method to compute chemical potentials

But N is not a continuous variable. Therefore

Page 53: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

ACCEPTANCE OF RANDOM INSERTION DEPENDS ON SIZE

Page 54: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

ACCEPTANCE OF RANDOM INSERTION DEPENDS ON SIZE

Page 55: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Particle insertion continued….

therefore

But also

Page 56: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

As before:

With s a scaled coordinate: 0s<1

r = L s (is box size)

Page 57: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Now write

Page 58: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

And therefore

Page 59: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Interpretation:

1. Evaluate U for a random REMOVAL of a molecule in a system containing N+1 molecule.

2. Compute

3. Repeat M times and compute the average “Boltzmann factor”

4. Then

DON’T EVEN THINK

OF IT!!!

Page 60: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

What is wrong?

is not bounded. The average that we compute can be dominated by INFINITE contributions from points that are NEVER sampled.

What to do?

Consider:

Page 61: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

And also consider the distribution

p0 and p1 are related:

Page 62: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

UpUFUp 01 lnln

UUpUf 5.0ln 00

UUpUf 5.0ln 11

UfUfF 01

3211 UcUbUaCUf

3200 UcUbUaCUf

01 CCF

Simulate system 0: compute f0

Simulate system 1: compute f1

Fit f0 and f1 to two polynomials that only differ by a constant.

Page 63: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Chemical potentialSystem 1: N, V,T, USystem 0: N-1, V,T, U + 1 ideal gas

exFFF 01

UfUfex 01System 0: test particle energy System 1: real particle energy

01 UUU

Page 64: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Does it work for hard spheres?

consider U=0

Page 65: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Problems with Widom method:

Low insertion probability yields poor statistics.

For instance:

Trial insertions that consist of a sequence of intermediate steps.

Examples: changing polymer conformations, moving groups of atoms, …

Page 66: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

What is the problem with polymer simulations?

Illlustration:

Inserting particles in a dense liquid

Trial moves that lead to “hard-core” overlaps tend to be rejected.

Page 67: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

ANALOGY:

Finding a seat in a crowded restaurant.

Can you seat one person, please…

Page 68: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Next: consider the random insertion of a chain molecule (polymer).

Waiter! Can you seat 100 persons… together

please!

Random insertions of polymers in dense liquids usually fail completely…

Page 69: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

(Partial) Solution: Biased insertion.

Berend Smit’s lecture tomorrow…

Page 70: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Simulations of soft matter are time consuming:

1. Because of the large number of degrees of freedom (solution: coarse graining)

2. Because the dynamics is intrinsically slow. Examples:

1. Polymer dynamics

2. Hydrodynamics

3. Activated dynamics

Page 71: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Slow dynamics implies slow equilibration. This is particularly serious for glassy systems.

6 hours 8 hours

Mountain hikes

..

Page 72: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

after a bit of global warming…

Page 73: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

after a bit of global warming…

Page 74: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

after a bit of global warming…

Page 75: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

after a bit of global warming…

Page 76: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

.. .. .. .. .. .. .. .. ..

20 minutes

Page 77: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Sampling the valleys

..

Combine this… .. …with this

Page 78: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Parallel Tempering

COMBINE Low-temperature and high-temperature runs in a SINGLE Parallel simulation

Page 79: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

In practice:

System 1 at temperature T1

System 2 at temperature T2

Boltzmann factor Boltzmann factor

Total Boltzmann factor

Page 80: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

SWAP move

System 1 at temperature T2

System 2 at temperature T1

Boltzmann factor Boltzmann factor

Total Boltzmann factor

Page 81: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Ratio

Page 82: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Systems may swap temperature if their combined Boltzmann factor allows it.

Page 83: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

number of MC cycles

Win

dow

0 10000 20000

300

200

100

NOTES:

1. One can run MANY systems in parallel

2. The control parameter need not be temperature

Page 84: Free energies and phase transitions. Condition for phase coexistence in a one-component system:

Application: computation of a critical point INSIDE the glassy phase of “sticky spheres”:

GLASSY