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

Post on 28-Dec-2015

216 views 1 download

Tags:

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

Free energies and phase transitions

Condition for phase coexistence in a one-component system:

The Gibbs “Ensemble”

NVT Ensemble

Fluid Fluid

NVT Ensemble

G

LL

G

Gibbs Ensemble

GL

Equilibrium!

•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

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

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

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

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

Particle displacement

Volume change

Particle exchange

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

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

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

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

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

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

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

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

Analyzing the results (1)

Well below Tc Approaching Tc

Analyzing the results (2)

Well below Tc Approaching Tc

Analyzing the results (3)

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

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

Solutions:

1. “normal” thermodynamic integration

2. “artificial” thermodynamic integration

3. “particle-insertion” method

How are free energies measured experimentally?

P

Then take the limit V0 .

Not so convenient because of divergences. Better:

0, as V0

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.

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

hence

Or:

And therefore

Examples of application:

F()

0 1

F(0)

F(1)

The second derivative is ALWAYS negative:

Therefore:

Good test of simulation results…

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

Chemical Potentials

Particle insertion method to compute chemical potentials

But N is not a continuous variable. Therefore

Does that help?

Yes: rewrite

s is a scaled coordinate: 0s<1

r = L s (is box size)

Now write

then

And therefore

but

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

Lennard-Jones fluid

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

Hard spheres

NVT

ex UN expdsln 1

r

rrU

0

overlap no1

overlap if0exp U

Probability to insert a test particle!

Particle insertion method to compute chemical potentials

But N is not a continuous variable. Therefore

ACCEPTANCE OF RANDOM INSERTION DEPENDS ON SIZE

ACCEPTANCE OF RANDOM INSERTION DEPENDS ON SIZE

Particle insertion continued….

therefore

But also

As before:

With s a scaled coordinate: 0s<1

r = L s (is box size)

Now write

And therefore

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!!!

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:

And also consider the distribution

p0 and p1 are related:

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.

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

Does it work for hard spheres?

consider U=0

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, …

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.

ANALOGY:

Finding a seat in a crowded restaurant.

Can you seat one person, please…

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…

(Partial) Solution: Biased insertion.

Berend Smit’s lecture tomorrow…

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

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

6 hours 8 hours

Mountain hikes

..

after a bit of global warming…

after a bit of global warming…

after a bit of global warming…

after a bit of global warming…

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

20 minutes

Sampling the valleys

..

Combine this… .. …with this

Parallel Tempering

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

In practice:

System 1 at temperature T1

System 2 at temperature T2

Boltzmann factor Boltzmann factor

Total Boltzmann factor

SWAP move

System 1 at temperature T2

System 2 at temperature T1

Boltzmann factor Boltzmann factor

Total Boltzmann factor

Ratio

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

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

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

GLASSY