Computer Simulation Methods in Physics
Download
Report
Transcript Computer Simulation Methods in Physics
[email protected] Room 2032
Canada
China
World Countries
Canada
Manitoba
!
!
!
!
!
!
!
!!!!!
!
!
Winnipeg
$!
!
!
Lecture 1
Computer Simulation
Methods in Physics
B.W. Southern
Department of Physics and Astronomy
University of Manitoba
Winnipeg Manitoba
Canada
Computer Simulation
• High speed computers have become more readily
available in recent years
• computer simulation is an important tool used in
all areas of science
Experiment
Analytical Theory
Computer Simulation
Computational Physics in the
Undergraduate Curriculum
• New courses in computational physics emphasizing
computer simulations, numerical methods, and
symbolic manipulation have been developed
• new texts are available
• ideally we should incorporate computational
methods into every course
• a beginning course in computer science is not a good
substitute
• numerical methods are more meaningful when part
of a simulation
Computer Simulation Courses
• computer simulations provide an opportunity for
involving students in open-ended problems
• they can ‘do’ physics in the same way that research
is done
• a good predictor for how students might perform in
graduate work
• the process of converting an abstract model into a
working program makes the model more meaningful
• a broader vision of physics can be introduced using
models of interest to geologists, biologists and
material scientists
Textbook
• I will follow closely the ideas presented in
the textbook by H. Gould and J. Tobochnik
“An Introduction to Computer Simulation
Methods”, second edition, Addison-Wesley
(1996)
• the website http://www.clarku.edu/~sip has
extensive resources available for download
such as a list of compuational physics books
as well as software programs in basic,
fortran and C.
Computer Simulation
• Why should we use computers?
• analytical tools are best suited to the analysis of
linear problems
• the study of nonlinear problems involves
mathematical approximations
• comparison of realistic models with
experimental data leaves many open questions
• computer simulations can deal with a model
without approximations apart from statistical
and controllable systematic errors
Computer simulations are computer
experiments
• construct an idealized model of a physical system
• develop a procedure or algorithm to study the model on a
computer
• model the behaviour of a macroscopic system of 1024
particles by a small system of 102 to 105 particles
• compare the results of the computer experiment with
laboratory experiments
• the design of various programs relies on experience as in
the case of real experimental setups
• does not rely on assumptions, approximations, or the
discarding of “small” terms
Computer Simulation
• There are two common types of simulation
techniques
• Molecular Dynamics
• Monte Carlo methods
Molecular dynamics
• system of classical particles interacting with each
other with two-body forces
• integrate Newton’s equations of motion numerically
• perform a time average of state variables over the
trajectory in phase space (r,p) or (q,p)
• r=(xi,yi,zi,…) p=(pxi,pyi,pzi,…) i=1,N
• 6N dimensional space
• energy is often conserved (microcanonical)
• ergodic hypothesis is crucial
• all regions of phase space d3Nrd3Np equally probable
Molecular Dynamics
• Consider a system of many identical particles
which are described by classical physics
• total energy E=K+U is kinetic plus potential where
U= u(r12)+u(r13)+…+u(r23)+…
• sum of pairwise interactions
• a common potential is the Lennard-Jones potential
characterized by two parameters and
u (r ) 4
r
r
12
6
repulsive
attractive
equilibrium
dri pi
dt m
N
dpi
F (rij )
dt
j i
Phase Space
(ri ..., pi ...)
i 1, N
t n t 0 nt
1
2
xn 1 xn v n t an ( t )
2
1
v n+1 v n (an 1 an ) t
2
Verlet
Algorithm
Molecular Dynamics
• Basic steps:
• start with a random assignment of positions and
velocities of particles
• ensure that the center of mass velocity is zero!
=> total momentum conserved
• iterate the equations for some time to allow system
to equilibrate
• then collect data at each time step and average
Molecular Dynamics
• Follow trajectories in phase space for a
given set of initial conditions
• compute averages over the trajectories
• for example the kinetic energy
N
1
2
K mv i (t )
2 i 1
d
NkT (t )
2
Can estimate the
temperature <T> as a
time average of K
We can obtain the pressure from the virial equation of state
1
PV NkT
d
N
rij . Fij
N
i 1 j i 1
Information about diffusion can be obtained from the
mean square displacement
2
R(t ) | ri (t ) ri (0)|
2
R (t ) 2dDt
2