Models and Numerical Methods in Mechanics and Physicochemistry
Lecture 1.
Molecular Dynamics I
Vladislav A. Yastrebov
MINES ParisTech, PSL Research University, Centre des Matériaux, CNRS UMR 7633, Evry, France
@ Centre des Matériaux
February 1, 2016
Outline
1 Matter constituents 2 Chemical bonds 3 Schrödinger equation 4 DFT and electronic structure
calculations
5 From quantum mechanics to Newtonian mechanics
6 Long and short range potentials
1 Lennard-Jones potential 2 Cutoff radius
3 Force calculations 4 Linked cell method 5 Time integration 6 Algorithm
7 Boundary conditions 8 Initial conditions
V.A. Yastrebov 2/85
Matter constituents
V.A. Yastrebov 3/85
Chemical bonds
Nature of bonds : Electrostatic force
Electrons sharing mechanism Strength of bonds :
Strong (ionic, covalent)
Weak (hydrogen, van der Waals) Examples :
Covalent (H
2O, H
2) Hydrogen (H
2O, DNA) Ionic (NaCl, NaF) Metallic (all metals)
Van der Waals (dipole-dipole e.g.
HCl-HCl, induced dipoles)
Linus Pauling “The Nature of the Chemical Bond”
http://scarc.library.oregonstate.edu/coll/pauling/bond/index.html
V.A. Yastrebov 4/85
Assemblies
Lattices
In 2D : 5 Bravais lattices In 3D : 14 Bravais lattices Molecules
Diatomic gas (N
2, O
2) Ethanol (C
2H
50H)
Macromolecules (rubber, DNA, polyethene, protein)
Amorphous Silica SiO
2Metallic glass
V.A. Yastrebov 5/85
Complexity
Non-relativistic Schrödinger equation for a single particle in an electric field
i~ ∂Ψ(r, t)
∂t =
"
− ~
22µ ∇
2+ V(r, t)
# Ψ(r, t),
where Ψ is the wave function, V is particle’s potential energy, µ is its reduced mass
For n particles
i~ ∂Ψ(r
1, . . . , r
n, t)
∂t =
"
− ~
22
∇
21
µ
1+ · · · + ∇
2n
µ
n!
+ V(r
1, . . . , r
n, t)
#
Ψ(r
1, . . . , r
n, t),
Time independent form : EΨ(r
1, . . . , r
n, t) =
"
− ~
22
∇
21
µ
1+ · · · + ∇
2nµ
n!
+ V(r
1, . . . , r
n, t)
#
Ψ(r
1, . . . , r
n, t),
Modern chemistry can solve Schrödinger equation with up to 40-50 electrons (only !).
V.A. Yastrebov 6/85
Density Functional Theory
The DFT is the most successfull approach to compute the electronic structure of matter
(Nicely presented inhttp://www.uam.es/personal_pdi/ciencias/jcuevas/Talks/JC-Cuevas-DFT.pdf)
Applicable from nuclei to solids and fluids :
molecular structures, vibrational frequencies, energies of atomization, ionization energies, electromagnetic properties, reaction paths, etc.
Many-particle Schrödinger equation is reduced to minimization of an energy functional with respect to the non-universal functional V (system-dependent part of the total system energy)
Nobel prize in Chemistry was attributed to Walter Kohn and John Pople for their developments in computational methods in quantum
chemistry
W Kohn, LJ Sham. Self-consistent equations including exchange and correlation effects, Phys Rev, 1965 (37 540 citations)
RG Parr, W Yang. Density-functional theory of atoms and molecules. Oxford university press, 1989 (16 830 citations)
Software : e.g. QuantumEspresso ( www.quantum-espresso.org )
V.A. Yastrebov 7/85
Density Functional Theory
The DFT is the most successfull approach to compute the electronic structure of matter
(Nicely presented inhttp://www.uam.es/personal_pdi/ciencias/jcuevas/Talks/JC-Cuevas-DFT.pdf)
Applicable from nuclei to solids and fluids :
Nobel prize in Chemistry was attributed to Walter Kohn and John Pople for their developments in computational methods in quantum
chemistry
Software : e.g. QuantumEspresso (www.quantum-espresso.org)
128 Water molecules (1024 electrons) in a cubic box 13.35 Å side, MPI only.
Fragment of an Aβ-peptide in water containing 838 atoms and 2312 electrons in a 22.1×22.9×19.9 Å3cell : MPI+OpenMP
V.A. Yastrebov 8/85
Simulating bonds
Straightforward in classical mechanics (Coulomb), non-trivial in quantum one (Schrödinger, DFT)
Ionic bonds
Non-trivial (Schrödinger, DFT) Covalent bonds
If electronic structure of the molecule is well resolved (DFT) then feasible :
Hydrogen bonds Dipole-dipole Induced dipoles
If electronic structure of the lattice is well resolved (DFT) then feasible :
Metallic bonds
V.A. Yastrebov 9/85
From Schrödinger equation to MD I
Split wave function (nuclei R
i, electrons r
j) Ψ(r
i, R
j, t) = φ(r
i, t)χ(R
j, t)
Wave function for nuclei are generated to expectation values
Restriction to the ground state (φ = φ
0is retained, i.e. ∆E(φ
0, φ
1) is big) Simplified mixed quantum-mechanical and classical problem :
M
kR ¨
k(t) = F
Rk= −∇
Rk
V
e(R(t)) i ~
∂φ0∂t(r,t)= H ˆ (R(t), r)φ
0(r, t) Taylor expansion for V
e:
V
e(R) ≈ V
approx(R) = P
i
V
1(R
i) + P
ij
V
2(R
i, R
j) + P
ijk
V
3(R
i, R
j, R
k) + . . . , where potentials V
ncontain electronic degrees of freedom.
[1] Griebel M, Knapek S, Zumbusch G. “Numerical simulation in molecular dynamics”. Springer (2007).
[2] Marx D, Hutter J. “Ab initio molecular dynamics : Theory and implementation”
inModern methods and algorithms of quantum chemistry(2000)
V.A. Yastrebov 10/85
From Schrödinger equation to MD II
Global potential energy hyper-surface V
approx(R) = X
i
V
1(R
i) + X
ij
V
2(R
i, R
j) + X
ijk
V
3(R
i, R
j, R
k) + . . .
Newton’s equation of motion in classical Molecular Dynamics M
kR ¨
k(t) = −∇
Rk
V
approx(R(t))
Potential V
approx(R) is often approximated as a 1D pair potential V
approx(R) ≈ X
ij
V
2(r
ij), r
ij= | R
i− R
j|
Justification and error estimation are problematic
Quantum effects and thus chemical reactions are excluded by construction
V.A. Yastrebov 11/85
MD from the family of Particle Methods
Particle methods SPH
Smooth-particle hydrodynamics (fluids, solids)
DEM
Discrete element method (granular matter)
LBM
Lattice Boltzmann Method (fluids) Multi-body gravity methods (space scale systems)
Common algorithms Search and detection Data structure Parallelization
Coupled SPH and particle level-set Losasso, Talton, Kwatra, Fedkiw. IEEE TVCG
(2008).
Coupling grid+particle Zheng, Zhu, Kim, Fedkiw, J. Comp. Phys.
(2015)
V.A. Yastrebov 12/85
MD from the family of Particle Methods
Particle methods SPH
Smooth-particle hydrodynamics (fluids, solids)
DEM
Discrete element method (granular matter)
LBM
Lattice Boltzmann Method (fluids) Multi-body gravity methods (space scale systems)
Common algorithms Search and detection Data structure Parallelization
DEM simulation Fabio Gabrieli (University of Padova)
geotechlab.wordpress.com
V.A. Yastrebov 13/85
MD from the family of Particle Methods
Particle methods SPH
Smooth-particle hydrodynamics (fluids, solids)
DEM
Discrete element method (granular matter)
LBM
Lattice Boltzmann Method (fluids) Multi-body gravity methods (space scale systems)
Common algorithms Search and detection Data structure Parallelization
Formula 1 simulation
Ship launch simulation
BLM simulations www.xflowcfd.com
V.A. Yastrebov 14/85
Examples of simple pair potentials
Short-range potentials (possible cut-off, fast) Lennard-Jones potential U(r
ij) = αε
σ rij
n−
σrij
m, m < n Morse potential U(r
ij) = α h
1 − exp( − β(r
ij− r
0) i
2Van der Waals potential U(r
ij) = − αε
σ rij
6Long-range potentials (cut-off prohibited, slow) Gravitational potential U(r
ij) = − G
m1rm2ij
Electrostatic (Coulomb) potential : U(r
ij) = −
14πε0 q1q2
rij
Elastic (harmonic) potential : U(r
ij) =
2k(r
ij− r
0)
2Regularization
1 r
ij∼ 1
q r
2ij+ ε
2V.A. Yastrebov 15/85
Examples of simple molecular models
Covalent bonds approximated by harmonic potential
V
l(r
1, r
2) =
k2l( | r
1− r
2| − r
0)
2In-plane angular potential
V
a(r
1, r
2, r
3) =
k2a(1 − cos(φ − φ
0))
2V
a(r
1, r
2, r
3) ≈
ka2
(φ − φ
0)
2Torsional potential
V
t(r
1, r
2, r
3, r
4) ≈
kt2
(θ − θ
0)
2Intra-molecular potential
V
m(r
1, r
2, r
3, . . . , r
n) =
1 2
P
n−1i=1
V
l(r
i) + P
n−2i=1
V
a(φ
i) + P
n−3 i=1V
t(θ
i) Total potential is complemented by an interaction potential with other molecules
V(r) = X
molecules
V
m(r
1, r
2, . . . , r
n) + V
i(r)
V.A. Yastrebov 16/85
Many-body Hamiltonian system
General algorithm Potential : U(r
ij)
System pair potential : V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Compute force f
0on particle r
0: F
0= −∇
r0
V(r) = − P
j,0
∇
r0
U( | r
0− r
j| ) 2
ndNewton’s law :
r ¨
0=
m10
F
0Integrate in time : r
0(t) → r
0(t + ∆t) Properties :
Energy conservation E = 1
2 X
i
m
ir ˙
i2| {z }
Kinetic
+ V(r)
|{z}
Potential
V.A. Yastrebov 17/85
Many-body Hamiltonian system
General algorithm Potential : U(r
ij)
System pair potential : V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Compute force f
0on particle r
0: F
0= −∇
r0
V(r) = − P
j,0
∇
r0
U( | r
0− r
j| ) 2
ndNewton’s law :
r ¨
0=
m10
F
0Integrate in time : r
0(t) → r
0(t + ∆t) Properties :
Energy conservation E = 1
2 X
i
m
ir ˙
i2| {z }
Kinetic
+ V(r)
|{z}
Potential
V.A. Yastrebov 18/85
Many-body Hamiltonian system
General algorithm Potential : U(r
ij)
System pair potential : V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Compute force f
0on particle r
0: F
0= −∇
r0
V(r) = − P
j,0
∇
r0
U( | r
0− r
j| ) 2
ndNewton’s law :
r ¨
0=
m10
F
0Integrate in time : r
0(t) → r
0(t + ∆t) Properties :
Energy conservation E = 1
2 X
i
m
ir ˙
i2| {z }
Kinetic
+ V(r)
|{z}
Potential
V.A. Yastrebov 19/85
Many-body Hamiltonian system
General algorithm Potential : U(r
ij)
System pair potential : V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Compute force f
0on particle r
0: F
0= −∇
r0
V(r) = − P
j,0
∇
r0
U( | r
0− r
j| ) 2
ndNewton’s law :
r ¨
0=
m10
F
0Integrate in time : r
0(t) → r
0(t + ∆t) Properties :
Energy conservation E = 1
2 X
i
m
ir ˙
i2| {z }
Kinetic
+ V(r)
|{z}
Potential
V.A. Yastrebov 20/85
Many-body Hamiltonian system
General algorithm Potential : U(r
ij)
System pair potential : V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Compute force f
0on particle r
0: F
0= −∇
r0
V(r) = − P
j,0
∇
r0
U( | r
0− r
j| ) 2
ndNewton’s law :
r ¨
0=
m10
F
0Integrate in time : r
0(t) → r
0(t + ∆t) Properties :
Energy conservation E = 1
2 X
i
m
ir ˙
i2| {z }
Kinetic
+ V(r)
|{z}
Potential
V.A. Yastrebov 21/85
Many-body Hamiltonian system
General algorithm Potential : U(r
ij)
System pair potential : V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Compute force f
0on particle r
0: F
0= −∇
r0
V(r) = − P
j,0
∇
r0
U( | r
0− r
j| ) 2
ndNewton’s law :
r ¨
0=
m10
F
0Integrate in time : r
0(t) → r
0(t + ∆t) Properties :
Energy conservation E = 1
2 X
i
m
ir ˙
i2| {z }
Kinetic
+ V(r)
|{z}
Potential
V.A. Yastrebov 22/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 23/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 24/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 25/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 26/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 27/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 28/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 29/85
Example : Lennard-Jones potential
Example :
Lennard-Jones 6-12 (LJ 6-12) : U(r
ij) = 4ε
σ r
ij!
12− σ r
ij!
6
Force :
F
i(r
i, r
j) = −∇ U(r
ij) =
= 24ε σ r
ij!
6
1 − 2 σ r
ij!
6
r
j− r
ir
2ijEquilibrium :
• At T = 0 K : r
eij= 2
1/6σ
• At T > 0 : r
eij(T) > 2
1/6σ Stable lattice : hcp (or fcc (111)) Parameters :
σ - length units ∼ lattice spacing ε - energy units ∼ bonding energy.
V.A. Yastrebov 30/85
Mixing rule
Consider a system containing 2 different atoms (molecules) : A, B We know ε
AA, σ
AAand ε
BB, σ
BBTo compute energy and forces between atoms A and B we need σ
ABand ε
ABThe classical mixing rule by Lorentz-Berthelot
[1]:
σ
AB= 1
2 (σ
AA+ σ
BB) ε
AB= √
ε
AAε
BBFrom algorithmic point of view one needs to check atom types
For a liquid drop on surface, values of σ
ABand ε
ABcan be obtained from the macroscopic value of the contact angle
V.A. Yastrebov 31/85
Mixing rule
Consider a system containing 2 different atoms (molecules) : A, B We know ε
AA, σ
AAand ε
BB, σ
BBTo compute energy and forces between atoms A and B we need σ
ABand ε
ABThe classical mixing rule by Lorentz-Berthelot
[1]:
σ
AB= 1
2 (σ
AA+ σ
BB) ε
AB= √
ε
AAε
BBFrom algorithmic point of view one needs to check atom types
For a liquid drop on surface, values of σ
ABand ε
ABcan be obtained from the macroscopic value of the contact angle
V.A. Yastrebov 32/85
Short-range potentials and a cuto ff
Short-range potential V ∼
1rαij
, α < dim System pair potential :
V(r) = X
∀i,j:i<j
U( | r
i− r
j| )
Complexity of the force evaluation : O(N
2) First simplification, for two particles :
F
ij= − F
jiCritical simplification : cutoff radius r
cut:
U(r
ij) =
4ε
"
σ rij
12−
σrij
6#
, if r
ij≤ r
cut0, if r
ij> r
cutCutoff value : r
cut> 2.5σ
Attention : truncated potential is discontinuous, additional errors are introduced.
V.A. Yastrebov 33/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 34/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 35/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 36/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 37/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 38/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 39/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 40/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 41/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
V.A. Yastrebov 42/85
Algorithm : linked-cell method
Create a spatial grid d ≥ r
cutEvery cell contains a list of particles and a list of neighbouring cells
Forces are evaluated in the cell and with respect to the neighbouring cells 3
rdNewton’s law is used Instead of checking 8 neighbouring cells, we check only 4.
Case of periodic BC
V.A. Yastrebov 43/85
Time integration : explicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0Straight forward approach (explicit Euler)
Compute : f
i(x(t)) m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
i˙
x
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t)∆t Let’s see how fast it diverges
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.00001
V.A. Yastrebov 44/85
Time integration : explicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0Straight forward approach (explicit Euler)
Compute : f
i(x(t)) m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
i˙
x
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t)∆t Let’s see how fast it diverges
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.00005
V.A. Yastrebov 45/85
Time integration : explicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0Straight forward approach (explicit Euler)
Compute : f
i(x(t)) m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
i˙
x
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t)∆t Let’s see how fast it diverges
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.00010
V.A. Yastrebov 46/85
Time integration : semi-implicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0A better approach
(semi-implicit Euler) Compute : f
i(x(t))
m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
ix ˙
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t + ∆t)∆t Symplectic integrator ! In average it preserves the energy.
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.01
V.A. Yastrebov 47/85
Time integration : semi-implicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0A better approach
(semi-implicit Euler) Compute : f
i(x(t))
m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
ix ˙
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t + ∆t)∆t Symplectic integrator ! In average it preserves the energy.
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.02
V.A. Yastrebov 48/85
Time integration : semi-implicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0A better approach
(semi-implicit Euler) Compute : f
i(x(t))
m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
ix ˙
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t + ∆t)∆t Symplectic integrator ! In average it preserves the energy.
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.05
V.A. Yastrebov 49/85
Time integration : semi-implicit Euler
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0A better approach
(semi-implicit Euler) Compute : f
i(x(t))
m x ¨
i= f
im
x˙i(t+∆t)∆t−x˙i(t)= f
iCompute :
x ˙
i(t + ∆t) = x ˙
i(t) + ∆t m
if
ix ˙
i(t + ∆t) =
xi(t+∆t)∆t−xi(t)Compute :
x
i(t + ∆t) = x
i(t) + x ˙
i(t + ∆t)∆t Symplectic integrator ! In average it preserves the energy.
Example : σ = 1, ε = 1, m = 1, v
0= 0.2
∆t = 0.10
V.A. Yastrebov 50/85
Time integration : Verlet method
Initial value problem
M X(t) ¨ = F(X)
X(0) = X
0, X(0) ˙ = X ˙
0Velocity-Verlet method
[1]Compute : x
i(t + ∆t) = x
i(t) +
x ˙
i(t) + ∆t 2m
if
i(t) ∆t Store f
i(t)
Compute : f
i(t + ∆t) = f
i(x(t + ∆t)) Compute : x ˙
i(t + ∆t) = x ˙
i(t) + ∆t
2m
ih f
i(t) + f
i(t + ∆t) i Requires additional storage for f
i(t).
Symplectic integrator !
In average it preserves the energy.
[1] Verlet L. “Computer Experiments on Classical Fluids. I. Thermodynamical Properties of Lennard-Jones Molecules”. Phys Rev (1967)
V.A. Yastrebov 51/85
Comparison Verlet vs Euler
V.A. Yastrebov 52/85
Comparison Verlet vs Euler
Explicit Euler method is of no use
Both Velocity-Verlet method and semi-implicit Euler methods are simplectic, i.e. in average they preserve the system energy Velocity-Verlet has better energy preserving properties
V.A. Yastrebov 53/85
General algorithm
Initialize :
1 distribute particles x
i(0) for i ∈ [0, N]
2 assign initial velocity field x ˙
i(0) 3 assign boundary conditions 4 evaluate forces on particles f
i(x(0)) Integrate in time (velocity Verlet method) :
1 t → t + ∆t
2 update boundary conditions 3 compute new positions
x
i(t + ∆t) = x
i(t) + h
˙
x
i(t) +
2m∆tif
i(t) i
∆t 4 store forces f
i(t)
5 evaluate new forces (using, e.g., linked-cell method) f
i(x(t + ∆t)) 6 compute new velocities
˙
x
i(t + ∆t) = x ˙
i(t) +
2m∆tih
f
i(t) + f
i(t + ∆t) i 7 if needed store data and compute energies.
V.A. Yastrebov 54/85
General algorithm
Initialize :
1 distribute particles x
i(0) for i ∈ [0, N]
2 assign initial velocity field x ˙
i(0) 3 assign boundary conditions 4 evaluate forces on particles f
i(x(0)) Integrate in time (velocity Verlet method) :
1 t → t + ∆t
2 update boundary conditions 3 compute new positions
x
i(t + ∆t) = x
i(t) + h
˙
x
i(t) +
2m∆tif
i(t) i
∆t 4 store forces f
i(t)
5 evaluate new forces (using, e.g., linked-cell method) f
i(x(t + ∆t)) 6 compute new velocities
˙
x
i(t + ∆t) = x ˙
i(t) +
2m∆tih
f
i(t) + f
i(t + ∆t) i 7 if needed store data and compute energies.
V.A. Yastrebov 55/85
Boundary conditions I
Animation pbc.gif
V.A. Yastrebov 56/85
Boundary conditions I
Periodic boundary conditions
V.A. Yastrebov 57/85
Boundary conditions I
Periodic boundary conditions
V.A. Yastrebov 58/85
Boundary conditions I
Periodic boundary conditions
V.A. Yastrebov 59/85
Boundary conditions I
Periodic boundary conditions
V.A. Yastrebov 60/85
Boundary conditions I
Periodic boundary conditions
V.A. Yastrebov 61/85
Boundary conditions II
Animation rbc.gif
V.A. Yastrebov 62/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 63/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 64/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 65/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 66/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 67/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 68/85
Boundary conditions II
Reflecting boundary conditions
V.A. Yastrebov 69/85
Boundary conditions II
Reflecting boundary conditions (different approach)
Rigid walls of immobile atoms (only repulsive or combined action) Or walls of moving atoms at certain temperature
V.A. Yastrebov 70/85
Boundary conditions III
Initial velocity (initial value problem) : impact, penetration
Volumetric forces : gravity (additional force F i += m i g)
V.A. Yastrebov 71/85
Boundary conditions III
Initial velocity (initial value problem) : impact, penetration
Volumetric forces : gravity (additional force F i += m i g)
V.A. Yastrebov 72/85
Boundary conditions IV
Mechanical boundary conditions : Dirichlet and Neumann
V.A. Yastrebov 73/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Crystal with vacancy defects (easy to control)
V.A. Yastrebov 74/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
[1]Stacking faults and dislocations Simple geometries
Long molecules
Bi-Crystal (grain boundary)
[1] Coffman & Sethna. Grain boundary energies and cohesive strength as a function of geometry. Phys Rev B 77 (2008)
V.A. Yastrebov 75/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Remove several atoms
V.A. Yastrebov 76/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Stacking fault with partial dislocations
V.A. Yastrebov 77/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Healing stacking fault forms two perfect edge dislocations
V.A. Yastrebov 78/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Dislocations glide
V.A. Yastrebov 79/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Dislocations glide
V.A. Yastrebov 80/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Dislocations form steps on the surface
V.A. Yastrebov 81/85
Initial configuration
Simple configurations : Gas/liquid Perfect crystal
Crystal with vacancy defects Bi-crystals
Stacking faults and dislocations Simple geometries
Long molecules
Layer with a circular hole
V.A. Yastrebov 82/85
Initial configuration
Physically based configurations : Amorphous solid
rapidly solidified from a liquid
Voronoi-based polycrystal
Polycrystalline solid porosity and grain size are controlled by the cooling rate Hight-temperature corrosion heat up and cool down initial configuration
Voronoi tesselation as a basis for construction of a nano-grained material
(adapted from Wikipedia)
V.A. Yastrebov 83/85
Initial configuration
Physically based configurations : Amorphous solid
rapidly solidified from a liquid
Voronoi-based polycrystal
Polycrystalline solid porosity and grain size are controlled by the cooling rate Hight-temperature corrosion heat up and cool down initial configuration
Porous polycrystal obtained from liquid state by relatively fast cooling
V.A. Yastrebov 84/85
General algorithm
Initialize :
1 distribute particles x
i(0) for i ∈ [0, N]
2 assign initial velocity field x ˙
i(0) 3 assign boundary conditions 4 evaluate forces on particles f
i(x(0)) Integrate in time (velocity Verlet method) :
1 t → t + ∆t
2 update boundary conditions 3 compute new positions
x
i(t + ∆t) = x
i(t) + h
˙
x
i(t) +
2m∆tif
i(t) i
∆t 4 store forces f
i(t)
5 evaluate new forces (using, e.g., linked-cell method) f
i(x(t + ∆t)) 6 compute new velocities
˙
x
i(t + ∆t) = x ˙
i(t) +
2m∆tih
f
i(t) + f
i(t + ∆t) i 7 if needed store data and compute energies.
V.A. Yastrebov 85/85
End of part I
End of part I
V.A. Yastrebov 86/85