1.021 , 3.021, 10.333, 22.00 I ntroduc tion to Modeling and Simulation

Spring 2011

Part I C ontinuum and partic le me thods

Basic molecular dynamics

Lecture 2

Markus J. Buehler

Laboratory for Atomistic and Molecular Mechanics Department of Civil and Environmental Engineering Massachusetts Institute of Technology

Content overview

I. Particle and continuum me thods

1. Atoms, molecul e s, chemistry

2. Continuum modeling approac hes and solution approaches

3. Statistical mechanics

4. Molecular dynamics, Monte Carlo

5. Visualization and data analysis

6. Mechanical proper ties applic ation: how things fail (and how to prevent it)

7. Multi-scale modeling par adigm

8. Biological systems (simulation in biophysics) h ow proteins work and how to model them

II. Quantum mechanical methods

1. It’s A Q uantum World: T he Theory of Quantum Mechanics

2. Quantum Mechanics: Practice Makes Perfect

3. The Many-Body Problem: Fr om Many-Body to Single- Particle

4. Quantum modeling of materials

5. From Atoms to Solids

6. Basic pr operties of mater i als

7. Advanced proper ties of materials

8. What else can we do?

Lectures 2-13

Lectures 14-26

Goals of part I (particle methods)

You will be able to

Carry out atomistic simulations of various processes (diffusion, deformation/stre tching, materials failure)

Carbon nanotubes, nanowires, bu lk metals, proteins, silicon crystals, etc.

Analyze atomistic simulations (make sense of all the numbers)

Visualize atomistic/molecular data (bring data to life)

Understand how to link atomistic simulation results with continuum models within a multi-scale scheme

Lecture 2: Basic molecular dynamics

Outline:

1. Introduction

2. Case study: Diffusion

2.1 Continuum model

2.2 Atomistic model

3. Additional remarks h istorical perspective

Goals of today’s lecture:

Through case study of diffusion, illustrate the concepts of a continuum model and an atomistic model

Develop appreciation for distinction of continuum and atomistic approach

Develop equations/models for diffusion problem from both perspectives

Develop atomistic simulation approach (e.g. algorithm, pseudocode, etc.) and apply to describe diffusion (calculate diffusivity)

Historical perspective on computer simulation with MD, examples

from literature 4

1. Introduction

5

Relevant scales in materials

(atom) <<

(crystal)

<< d (grain)

<< dx , dy , dz <<

y A y

yy

H , W , D

Image from Wi ki medi a Common s , h t t p ://c o m mons

Courtesy of Elsevier, Inc.,

Fi g. 8. 7 i n : Bue h l e r, M.

n y

yz

z Image by MIT

yx

xz

xy

n x

A x

xx

x

.wikime d ia .o r g .

http://www.scien c edirect. com . Us ed w i t h p e r m iss i on .

A t o m is t ic Mod e lin g o f M a t e ri a ls Failu re . Sp ring er, 2 008 . © Sp ring er. All rig h ts reserv e d . Thi s co nte n t is ex cl u d e d from

our Creative Common s licen se.

Op en Cou r seW a r e .

Bottom-up

Atomis tic viewpoint :

For more i n fo rmati on, see h t t p :// oc w . m i t . e d u/ f a ir use .

Top-down

•Explic i tly consider discrete atomistic structure

•Solve for atomic trajectories and infe r from these about material properties & behavior

•Features internal length scales (atomic distance)

“Many-particle system with statistical properties” 6

Relevant scales in materials

<<

y

dx , dy , dz

yy

<<

A y

H , W , D

n y

yz

yx

xy

n x

xz

xx

x

z

Image by MIT Op en Cou r seW a r e .

A x

RVE

(atom) <<

(crystal) << d (grain)

Image from Wi ki medi a Common s , h t t p ://c o m mons

.wikime d ia .o r g .

Courtesy of Elsevier, Inc., http://www.scien c edirect. com . Us ed w i t h p e r m iss i on .

Fi g. 8. 7 i n : Bue h l e r, M. A t o m is t ic Mod e lin g o f M a t e ri a ls Failu re. Sp ring er, 2 008 . © Sp ring er. All rig h ts reserv e d . Thi s co nte n t is ex cl u d e d from our Creative Common s licen se. For more i n fo rmati on, see h t t p :// oc w . m i t . e d u/ f a ir use .

Top-down

Continuum viewpoint :

•Treat material as matter with no internal structure

•Develop mathematical model (governi ng equation) based on representative volume element (RVE, contains “enough” ma terial such that internal structure can be neglected

•Features no characteristic length scales, provided RVE is large enough

“PDE with parameters” 7

2. Case study: Diffusion

Continuum and atomistic modeling

Goal of this section

Diffusion as example

Continuum description ( top-down approach ), partial differential equation

Atomistic description ( bottom-up approach ), based on dynamics of molecules, obtained via numerical simulation of the molecular dynamics

Introduction: Diffusion

Particles move from a domain with high concentration to an area of

low concentration

Macroscopically , diffusion measured by change in concentration

Microscopically , diffusion is process of spontaneous net movement of particles

Result of random motion of particles (“Brownian motion”)

High concentration

Low concentration

c = m/V = c ( x, t ) 10

Ink droplet in water

hot cold

© s o ur c e u n k n ow n. Al l rights res e rv ed. Thi s co ntent i s ex cl u d ed from our Creati ve

Co mmo ns lice n se . F o r mo r e in fo r m a t io n , s e e http:/ /o c w .mi t .edu /fai ru se . 11

Microscopic observation of diffusion

12

Microscopic mechanism: “Random walk” or Brownian motion

Brownian motion was first observ ed (1827) by the British botanist Robert Brown (1773-1858) when studying pollen grains in water

Initially thought to be sign of life, but later confirmed to be also present in inorganic particles

The effect was finally explained in 1905 by Albert Einstein , who realiz ed it was caused by water molecules randomly smacking into the particles.

Publ i c domai n i m age.

13

Brownian motion leads to net particle movement

time

Particle “slowly” moves a w ay from its initial position

Robert Brown’s microscope

Robert Brown's Mic roscope

1827

Instrument with whic h Robert Brown studied Brownian motion and which he used in his work on identifying the nucleus of the living cell

Instrument is preserved at the Linnean Society in London

It is made of brass and is mount ed onto the lid of the box in which it can be stored

http://www.brianjford.com/pbrownmica.jpg

Simulation of Brownian motion

http://www.scienceisart.com/A_Diffus/Jav1_2.html

Macroscopic observation of diffusion

Macroscopic observation: concentration change

S e e al so:

Ink dot

Tissue

© source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/fairuse .

18

ht t p :// www. ui c. edu/ classes/phy s / phys45 0 /MA R K O /N0 04. html

Brownian motion leads to net particle movement

Time t

c 1 =m 1 /V (low)

c 2 =m 2 /V (high)

© s o ur c e u n k n o w n. Al l rights res e rv ed. Thi s co ntent i s ex cl u d ed from our Creative Common s licen s e. For more in fo r m a t io n , se e h t t p ://ocw.m i t .e d u / f a i r u se .

© T h e Mc Gr a w H ill Co mp a n ies . A l l r i g h ts reserved . T h i s content is e x c l ud ed from our Creative Common s licen se . F o r m o re in fo rm a t io n , s ee h t t p :// oc w . m i t . e d u/ f a ir use .

19

Diffusion in biology

Image removed due to copyright restrictions. See the image now: http://www.biog1105-1106.org/demos/105/unit9/media/diffusion-after-act- pot.jpg .

20

http://www.biog1105-1106.org/demos/105/unit9/r oleofdiffusion.html

2.1 Continuum model

How to build a continuum model to describe the physical phenomena of diffusion?

Approach 1: Continuum model

Develop differential equation based on differential element

m L m R

x

J

W= 1 H= 1

x x

J: Mass flux (mass per unit time per unit area)

Concept: Balance mass [here], force etc. in a differential volume element; much greater in dimension than inhomogeneities (“ sufficiently large RVE ”)

Approach 1: Continuum model

Develop differential equation based on differential element

m L m R

x

J

W= 1 H= 1

x x

Probability of mass m

crossing the central boundary during a period t is equal to p

Approach 1: Continuum model

Develop differential equation based on differential element

m L m R

x

J

W= 1 H= 1

x x

Probability of mass m

crossing the central boundary during a period t is equal to p

J 1 p m

Mass flux from left to right

L 1 1 t L

J 1 p m

Mass flux from right to left

[ J ] = mass per unit time per unit area

R 1 1 t R

Approach 1: Continuum model

Develop differential equation based on differential element

m L m R

x

J

W= 1 H= 1

x x

Probability of mass m

crossing the central boundary during a period t is equal to p

J 1 p m

Mass flux from left to right

Effective mass flux

L 1 1 t L

J 1 p m m

J 1 p m

Mass flux from right to left

1 1 t L R

R 1 1 t R

More mass, more flux ( m L is ~ to number of particles) 25

Continuum model of diffusion

Express in terms of mass concentrations

c m

V

m c V

J p m

t L

m R

c L c R

x

J

W= 1 H= 1

x x

Continuum model of diffusion

Express in terms of mass concentrations

c m

V

m c V

J p m

t L

m R

J 1 p c c x 1 1

c L c R

x

J

1 1 t L R

c V

W= 1 H= 1

x x

Continuum model of diffusion

Express in terms of mass concentrations

c m

1 1 t

V

J

1 p c

c R x 1 1

x

J

c L c R

L

c

V

Concentration gradient

W= 1 H= 1

J p

t

c x

p

t

x 2 c

x

x x

expand x

Continuum model of diffusion

Express in terms of mass concentrations

c m

1 1 t

V

J

1 p c

c R x 1 1

x

J

c L c R

L

c

V

Concentration gradient

W= 1 H= 1

J p

t

c x

p

29

t

x 2 c

x

x x

D p

x 2

J p x 2 dc D dc

t

dx

dx

t

Parameter that measures how “fast” mass moves (in square of distance per unit time)

Diffusion constant & 1 st Fick law

Reiterate: Diffusion constant D describes th e how much mass moves per unit time

Movement of mass characterized by square of displac ement from initial pos ition

Flux

J

p

t

x 2 dc

dx

D dc

dx

1 st Fic k law

(Adolph Fick, 1829-1901)

D p t

x 2

D ~ p

Diffusion constant relates to the ab ility of mass to m o ve a distance

x 2 over a time t (strongly temperature dependent, e.g. Arrhenius) 30

2 nd Fick law (time dependence)

J 2

c

dc

J D

dx

1 st Fic k law

J 1 x

J 1 J 2 1 1

1 1

c

t

x

x 0 x x 1

J: Mass flux (mass per unit time per unit area)

2 nd Fick law (time dependence)

J 2

c

dc

J D

dx

1 st Fic k law

J 1 x

x 0 x x 1

c J 1 J 2 1 dc dc

t x

D

x dx

| D dx

|

x x 0 x x 1

J 1

J ( x

x ) D dc

0 dx

|

x x 0

2 nd Fick law (time dependence)

J 2

c

dc

J D

dx

1 st Fic k law

J

J 1

x 0 x

x

x 1

c 1 D dc

| D dc |

t x

dx x x 0 dx x x 1

c d J d D dc

t dx dx dx

Change of concentration in time equals change of flux with x (mass balance)

2 nd Fick law (time dependence)

J 2

c

dc

J D

dx

1 st Fic k law

J

J 1

x 0 x

x

x 1

c 1 D dc

| D dc |

t x

dx x x 0 dx x x 1

c d J d D dc

t dx dx dx

Change of concentration in time equals change of flux with x (mass balance)

c d 2 c

t

D

dx 2

2 nd Fic k law

Solve by apply ing ICs and BCs…

PDE

34

Example solution 2 nd Fick’s law

c

t

d 2 c D dx 2

Concentra t ion

c 0

c 0 x

time t

c ( x , t )

BC: c ( x = 0) = c 0 x

IC: c ( x > 0, t = 0) = 0

Need diffusion coefficient to solve for distribution!

How to obtain diffusion coefficient?

Laboratory experiment

Study distribution of concentrations (previous slide)

Then “fit” the appropriate diffusion coefficient so that the solution matches

Approach can then be used to solve for more complex geometries, situations etc. for which no lab experiment exists

“Top down approach”

Matching with experiment (parameter identification)

Concentra t ion

c 0

time t 0

experiment

continuum model solution

c ( x , t 0 )

x

Summary

Continuum model requires paramet er that describes microscopic processes inside the material

Typically need experimental measurements to calibrate

Microscopic

Co

ntinuum

model

mechanisms

???

Time scale

“Empirical”

or experimental parameter feeding

2.2 Atomistic model

How to build an atomistic bottom-up model to describe the physical phenomena of diffusion?

Approach 2: Atomistic model

Atomis tic model provides an al ternative approach to describe diffusion

Enables us to directly calculat e the diffusion constant from the trajectory of atoms (“microscopic definition”)

Approach: Cons ider set of atoms/molecules

Follow their trajectory and calculate how fast atoms leave their initial

position

Follow this quantity over time

D p t

x 2

Recall : Diffusion constant relates to th e “abil i t y of partic le to move a distance x 2 over a time t

Molecular dynamics s imulate trajectory of atoms

Goal: Need an algorithm to predict positions , veloc ities, accelerations as

function of time 41

To solve those equations: Discretize in time ( n steps), t time step:

r i ( t 0 ) r i ( t 0 t ) r i ( t 0 2 t ) r i ( t 0 3 t ) ... r i ( t 0 n t )

Solving the equations: What we want

Solving the equations

To solve those equations: Discretize in time ( n steps), t time step:

r i ( t 0 ) r i ( t 0 t ) r i ( t 0 2 t ) r i ( t 0 3 t ) ... r i ( t 0 n t )

Recall : Taylor expansion of function f around point a

Solving the equations

To solve those equations: Discretize in time ( n steps), t time step:

r i ( t 0 ) r i ( t 0 t ) r i ( t 0 2 t ) r i ( t 0 3 t ) ... r i ( t 0 n t )

Recall : Taylor expansion of function f around point a

Taylor series expansion r i ( t ) around

a t 0

x t 0 t

x a t 0 t t 0 t

Solving the equations

To solve those equations: Discretize in time ( n steps), t time step:

r i ( t 0 ) r i ( t 0 t ) r i ( t 0 2 t ) r i ( t 0 3 t ) ... r i ( t 0 n t )

Recall : Taylor expansion of function f around point a

Taylor series expansion r i ( t ) around

a t 0

x t 0 t

x a t 0 t t 0 t

r ( t t ) r ( t ) v ( t )

t a ( t )

1

t ...

2

i 0

i 0

i 0

2

i 0

45

Taylor expansion of

r i ( t )

r i ( t 0

t )

r i ( t 0

) v i

( t 0

) t

1

2 a i

( t 0

) t 2

...

r ( t

r ( t ) v ( t

) t 1 a ( t

) t 2

...

t )

i 0

i 0 i 0

2 i 0

a t 0 a t 0

x t 0 x t 0

t

t

x a x a

t 0

t 0

t

t

t 0

t 0

t

t

Taylor expansion of r i ( t )

r ( t t ) r ( t ) v ( t

) t 1 a ( t

) t 2

...

i 0 i 0 i 0

2 i 0

r ( t t ) r ( t ) v ( t

) t 1 a ( t

) t 2

...

+ i 0

i 0 i 0

2 i 0

r i ( t 0

t )

r i ( t 0

t )

2 r i ( t 0

) v i

( t 0

) t

v i

( t 0

) t

a i

( t 0

) t 2

...

Taylor expansion of r i ( t )

r ( t t ) r ( t ) v ( t

) t 1 a ( t

) t 2

...

i 0 i 0 i 0

2 i 0

r ( t t ) r ( t ) v ( t

) t 1 a ( t

) t 2

...

+ i 0

i 0 i 0

2 i 0

r i ( t 0

t )

r i ( t 0

t )

2 r i ( t 0

) v i

( t 0

) t

v i

( t 0

) t

a i

( t 0

) t 2

...

r ( t t ) 2 r ( t ) r ( t t ) a ( t

) t 2

...

i 0 i 0 i 0 i 0

Taylor expansion of r i ( t )

r ( t t ) r ( t ) v ( t

) t 1 a ( t

) t 2

...

i 0 i 0 i 0

2 i 0

r ( t t ) r ( t ) v ( t

) t 1 a ( t

) t 2

...

+ i 0

i 0 i 0

2 i 0

r i ( t 0

t )

r i ( t 0

t )

2 r i ( t 0

) v i

( t 0

) t

v i

( t 0

) t

a i

( t 0

) t 2

...

r ( t t ) 2 r ( t ) r ( t t ) a ( t ) t 2 ...

i 0

i 0

i 0

i 0

Positions

at t 0

Positions

at t 0 - t

Accelerations

at t 0

49

Physics of particle interactions

Laws of Motion of Isaac Newton (1642 1727):

1. Every body continues in its stat e of rest, or of uniform motion in a right line, unles s it is compelled to change that state by forces impressed upon it.

2. The change of motion is proportional to the motive force impresses, and is made in the direction of the right line in which that force is impressed.

3. To every action there is always opposed an equal reaction: or, the mutual action of two bodies upon each other are always equal, and directed to contrary parts.

f m

d 2 x

dt 2

ma

2 nd law

Verlet central difference method

r ( t t ) 2 r ( t ) r ( t t ) a ( t

) t 2

...

i 0 i 0 i 0 i 0

Positions at t 0

Positions at t 0 - t

Accelerations at t 0

How to obtain

accelerations?

f i ma i

a i f i / m

Need forces on atoms!

Verlet central difference method

r ( t t ) 2 r ( t ) r ( t t ) f ( t

) / m t 2

...

i 0 i 0 i 0 i 0

Positions at t 0

Positions at t 0 - t

Forces at t 0

Forces on atoms

Consider energy landscape due to chemical bonds

Ener gy U

r

1/r 12 (or Exponential)

Repulsion

Radius r (Distance between atoms)

e

Attraction

1/r 6

Image by MIT OpenCou r seWare.

Attraction: Formation of chemic al bond by sharing of electrons

Repulsion: Pauli exclusion (too many electrons in small volume) 53

Often: Assume pair-wise interaction between atoms

How are forces calculated?

Force magnitude: Derivative of potential energy with respect to atomic distance

f d U ( r )

d r

f

r

x 2

x 1

To obtain force vector f i , t ake projections into the three axial directions

x

f i f i

54

r

Note on force calculation

Forces can be obtained from a variety of models for interatomic energy, e.g.

Pair potentials (e.g. LJ, Morse, Buck ingham)

Multi-body potentials (e.g. EA M, CHA R MM, UFF, DREI DING)

Reactive potentials (e.g. ReaxFF)

Quantum mechanic s (e.g. DFT) p a r t I I

Tight- b inding

…will be discussed in next lectures

55

Molecular dynamics

Follow trajectories of atoms

“Verlet central difference method”

r ( t t ) 2 r ( t ) r ( t t ) a ( t

) t 2

...

i 0 i 0 i 0 i 0

a i

f i / m

Positions at t 0

Positions at t 0 - t

Accelerations at t 0

56

Summary: Atomistic simulation numerical approach “molecular dynamics M D”

Atomis tic model; requires atomis tic microstructure and atomic pos ition at beginning

Step through time by integration scheme

Repeated force calculat ion of atomic forces

Explic it notion of chemical bonds c aptured in interatomic potential

Pseudocode

Set particle positions (e.g. crystal lattice) Assign initial velocities

For (all time steps):

Calculate force on each particle (subroutine) Move particle by time step t

Save particle position, velocity, acceleration Save results

Stop simulation

Atomic positions (initial conditions)

Typically, have cubical cell in which particles are places in a regular or irregular manner

“gas (liquid)” “solid - crystal”

Atomistic description

Back to the application of diffusion problem…

Atomis tic description provides alternative way to predict D

Simple solve equation of motion

Follow the trajectory of an atom

Relate the average distance as functi on of time from initial point to diffusivity

Goal: Calculate how particle s move “randomly”, away from initial position

JAVA applet

Courtesy of t he Center for Polymer S t udi e s at Bosto n Uni v e r si ty. U se d wi th pe rmi s si o n .

URL http://polymer.bu.edu/java/java/LJ/index.html 61

Link atomistic trajectory with diffusion constant (1D)

Diffusion constant relates to the “abili ty” o f a particle to move a distance x 2

x 2

(from left to right) over a time t

x 2

D p t

Idea U se MD simulation to measure squar e of dis p lacement from initial

pos ition of particles, r 2 ( t ) :

Link atomistic trajectory with diffusion constant (1D)

Diffusion constant relates to the “abili ty” o f a particle to move a distance x 2

(from left to right) over a time t

x 2

x 2

D p t

MD simulation: Measure square of displacement from initial position

of particles, r 2 ( t ) :

r 2

Link atomistic trajectory with diffusion constant (1D)

Diffusion constant relates to the “abili ty” o f a particle to move a distance x 2

x 2

(from left to right) over a time t

x 2

D p t

MD simulation: Measure square of displacement from initial position

r 2

of particles, r 2 ( t ) and not x 2 ( t ) ….

1 r 2

Replace

D p

x 2

t

D 2 t

Factor 1/2 = no directionality in (equal probability to move forth or back)

Link atomistic trajectory with diffusion constant (1D)

MD simulation: Measure square of displacement from initial position

of particles, r 2 ( t ) :

r 2 2 Dt

r 2

t

r

2

D R ~

2 t

t

Link atomistic trajectory with diffusion constant (2D/3D)

D p

x 2

t

Higher dimensions

2 d t

Since:

D 1 1

r 2

Factor 1/2 = no directio nality in (forth/back)

Factor d = 1, 2, or 3 due to 1D, 2D, 3D (dimensionality)

2 dD t ~ r 2

2 dD t C r 2

C = constant (does not affect D )

Example: MD simulation

r 2

slope = D

D 1 2 d

lim d

t d t

r 2

1D=1, 2D=2, 3D=3

source: S. Yip, lecture notes

D 1 2 d

lim d

t d t

r 2

.. = average over all particles

Example molecular dynamics

C our tes y o f the Cente r fo r Po lyme r Stud ie s a t Bos t on U n ive r s i ty. U sed w i th pe rmis s i on .

r 2

Particles Trajectories

Mean Square Displacement function

Average square of dis p lacement of all particles

r 2 ( t )

1

0 ) 2

N

r i ( t )

i

r i ( t

68

Example calculation of diffusion coefficient

r 2 ( t )

1 r ( t ) r ( t

0 ) 2

N

i i

i

Position of

atom i at time t

Position of

atom i at time t=0

slope = D

D 1 lim d

2 d

t d t

r 2

r 2

1D=1, 2D=2, 3D=3

69

Summary

Molec ular dynamic s provides a po werful approach to relate the diffusion constant that appears in continuum models to atomistic trajectories

Outlines multi-scale approach: Feed parameters from atomistic simulations to continuum models

Time scale

Co ntinuum model

MD

“Empirical”

or experimental parameter feeding

Quantum

mechanics

Len g th scale

70

Multi-scale simulation paradigm

Courtesy of Elsevier, Inc., http://www.scien c edirect. com . Used with p e rmi s sion. 71

3. Additional remarks

Historical development of computer simulation

Began as tool to exploit computin g machines developed during World War II

MANIA C (1952) at Los Alamos us ed for computer simulations

Metropolis, R o senbluth, Teller (1953 ): Metropolis Monte Carlo method

Alder and Wainwright (Livermore National Lab, 1956/1957): dynamics of hard spheres

Vineyard (Brookhaven 1959-60): dy namics of radiation damage in copper

Rahman (Argonne 1964): liquid argon

Application to more complex fluids (e.g. water) in 1970s

Car and Parrinello (1985 and following): ab-initio MD

Since 1980s: Many applications, including:

Karplus, Goddard et al.: Applic ations to polymers/biopolymers, proteins since 1980s

Applications to fracture since mid 1990s to 2000

Other engineering applications (nanotechnology, e.g. CNTs, nanowires etc.) since mid 1990s-2000

MIT OpenCou rse Wa re

ht t p :// ocw.mit.edu

3.021 J / 1.021J / 10.333J / 18.361J / 22.00J I ntroduction to Modeli ng and Simulati on

Sp r i ng 2012

F o r in fo r m a t ion about c i ting these ma te ria l s o r our Ter m s o f use , vis i t: htt p :// oc w. mit.edu/ t e rms .