Page 96 -
P. 96
2.1 Newtonian deterministic mechanics 83
2.1 Newtonian deterministic mechanics
1
In this section, weconsider hard disks and spheres colliding with each
other and with walls.Instantaneouspair collisions conservemomentum,
and wall collisions merely reverse one velocity component, that normal
to the wall. Between collisions, disks move straight ahead, in the same
manner as free particles.To numerically solvethe equations ofmotion—
that is, do amolecular dynamics simulation—wesimply propagate all
disks upto the nextcollision (the nextevent) in the wholesystem.We
then compute the newvelocities ofthe collisionpartners, andcontinue
the propagation (see Fig. 2.1 and the schematic Alg. 2.1 (event-disks)).
procedure event-disks
input {x 1 ,..., x N }, {v 1,..., v N },t
{t pair,k,l}← nextpaircollision
{t wall ,j}← next wall collision
t next ← min[t wall ,t pair]
for m =1,... ,N do
x m ← x m +(t next − t)v m
if (t wall <t pair )then
call wall-collision(j)
else
call pair-collision(k, l)
output {x 1 ,..., x N }, {v 1 ,... , v N },t next
——
Algorithm 2.1 event-disks. Event-driven molecular dynamics algo-
rithm for hard disks in a box (see Alg. 2.4 (event-disks(patch))).
Our aim in the present sectionis to implement this event-driven molec-
ular dynamics algorithm and to set up our ownsimulation ofhard disks
and spheres.The program is both simpleand exact, because the inte-
gration ofthe equations ofmotion needs no differential calculus, and the
numerical treatment contains no time discretization. t 2
t 1
2.1.1 Pair collisions and wall collisions
We determine the time of the nextpaircollisionin the box by considering t 0
all pairs ofparticles {k, l} and isolating them fromthe rest ofthe system
(see Fig. 2.2). This leads to the evolutionequations
x k (t)= x k (t 0 )+ v k · (t − t 0 ), Fig. 2.2 Motion of two disks from time
x l (t)= x l (t 0 )+ v l · (t − t 0 ). t 0 to their pair collision time t 1 .
1 In this chapter, the words “disk” and “sphere” are often used synonymously. For
concreteness, most programs are presented in two dimensions, for disks.