DynamO Workshop
Introduction to Event-Driven Dynamics and DynamO Dr Marcus N. Bannerman & Dr Leo Lue
m.campbellbannerman@abdn.ac.uk leo.lue@strath.ac.uk
MNB & LL DynamO Workshop 23/01/2015 1 / 32
DynamO Workshop Introduction to Event-Driven Dynamics and DynamO Dr - - PowerPoint PPT Presentation
DynamO Workshop Introduction to Event-Driven Dynamics and DynamO Dr Marcus N. Bannerman & Dr Leo Lue m.campbellbannerman@abdn.ac.uk leo.lue@strath.ac.uk MNB & LL DynamO Workshop 23/01/2015 1 / 32 Agenda Section Outline Agenda What
m.campbellbannerman@abdn.ac.uk leo.lue@strath.ac.uk
MNB & LL DynamO Workshop 23/01/2015 1 / 32
Agenda
MNB & LL DynamO Workshop 23/01/2015 2 / 32
Agenda
MNB & LL DynamO Workshop 23/01/2015 3 / 32
What is DynamO?
MNB & LL DynamO Workshop 23/01/2015 4 / 32
What is DynamO?
◮ DynamO stands for Dynamics of discrete Objects. ◮ It is a particle dynamics package and is one of the very few which uses an
◮ Event-driven dynamics is mainly applied to relatively simple potentials
◮ To illustrate this, we introduce particle dynamics using more traditional
MNB & LL DynamO Workshop 23/01/2015 5 / 32
What is DynamO? What is the particle dynamics approach?
◮ Particle dynamics is a classical mechanics approach to simulating physical
◮ To model a system, its mass is divided into a number of discrete particles: ◮ These particles typically represent some fundamental unit of mass in the
MNB & LL DynamO Workshop 23/01/2015 6 / 32
What is DynamO? What is the particle dynamics approach? MNB & LL DynamO Workshop 23/01/2015 7 / 32
What is DynamO? What is the particle dynamics approach? MNB & LL DynamO Workshop 23/01/2015 8 / 32
What is DynamO? What is the particle dynamics approach?
◮ Each of these systems are simulated by integrating Newton’s equation of
◮ It is the model expressions used for the forces, F i, which distinguishes which
MNB & LL DynamO Workshop 23/01/2015 9 / 32
What is DynamO? What is the particle dynamics approach?
◮ Although force models are common in time-stepping simulations, the forces
◮ Impulsive and continuous forces may be dissipative or conservative, but we
◮ This allows us to compare time-stepping and event-driven approaches
MNB & LL DynamO Workshop 23/01/2015 10 / 32
What is DynamO? Spring-mass: Analytical
◮ To illustrate this, consider the simplest one-dimensional particle system: a
◮ Inserting Hooke’s law for the force of a spring (rest position of ri = 0) into
◮ Taking the initial conditions that the spring is at rest ri(t = 0) = 0 and in
◮ This is the goal of particle dynamics: to determine the time-evolution of the
MNB & LL DynamO Workshop 23/01/2015 11 / 32
What is DynamO? Spring-mass: Analytical
MNB & LL DynamO Workshop 23/01/2015 12 / 32
What is DynamO? Spring-mass: Time-stepping
◮ Assume that Newton’s EOM cannot be analytically integrated due to its
◮ In time-stepping simulations, numerical integration is used to solve Newton’s
◮ For example, take a Taylor series of ri and vi at the current time t and
◮ This forward-Euler integration allows us to “take a time step” and estimate
MNB & LL DynamO Workshop 23/01/2015 13 / 32
What is DynamO? Spring-mass: Time-stepping
MNB & LL DynamO Workshop 23/01/2015 14 / 32
What is DynamO? Spring-mass: Time-stepping
∆t = 0.8
∆t = 0.05
MNB & LL DynamO Workshop 23/01/2015 15 / 32
What is DynamO? Spring-mass: Event-driven
◮ Now consider the Event-Driven Particle Dynamics (EDPD) approach. ◮ Assuming Newton’s EOM is too complex to analytically integrate, we must
◮ To demonstrate this, we decouple the action of the spring. ◮ Consider the energetic potential of the spring:
i /2 ◮ To simulate this system using EDPD we must consider a discrete or
MNB & LL DynamO Workshop 23/01/2015 16 / 32
What is DynamO? Spring-mass: Event-driven
MNB & LL DynamO Workshop 23/01/2015 17 / 32
What is DynamO? Spring-mass: Event-driven
◮ Between discontinuities, ∂Ui/∂ri = 0 and
◮ As the force is zero, the particle is
◮ This is a successful decoupling as between
◮ We must be careful not to cross a
◮ Instead, these must be separately treated
∆U = 0.25
MNB & LL DynamO Workshop 23/01/2015 18 / 32
What is DynamO? Spring-mass: Event-driven
◮ If we can detect a priori the crossing of a
◮ . . . and calculate the resulting impulse at the
◮ we can skip the solution of the
◮ EDPD algorithm:
∆U = 0.25
MNB & LL DynamO Workshop 23/01/2015 19 / 32
What is DynamO? Spring-mass: Event-driven
◮ To detect a crossing of a discontinuity (event), consider two particles i and j
◮ The test for the event is expressed as a search for the (positive) roots of an
◮ Solving for the event impulse, ∆P is a search for the appropriate solution to
i + 1
j + ∆U = 1
MNB & LL DynamO Workshop 23/01/2015 20 / 32
What is DynamO? Spring-mass: Event-driven
◮ Event-driven dynamics can only be applied if stable root-detection algorithms
◮ If these exist, event-driven dynamics is an “exact” (to machine precision)
◮ Energy is conserved to machine precision. ◮ Round-off error is generally reduced as, during events which don’t involve
◮ Aside from round-off error, the simulated dynamics is reversible (preserves
◮ Although the stepped spring model is not exactly equivalent to Hooke’s law,
MNB & LL DynamO Workshop 23/01/2015 21 / 32
What is DynamO? Spring-mass: Event-driven
MNB & LL DynamO Workshop 23/01/2015 22 / 32
EDPD versus time-stepping approaches
MNB & LL DynamO Workshop 23/01/2015 23 / 32
EDPD versus time-stepping approaches Performance
3
1
2
MNB & LL DynamO Workshop 23/01/2015 24 / 32
EDPD versus time-stepping approaches Performance
◮ Force models such as the Lennard-Jones potential with a cut-off of 3.0 are
◮ Although stepped potentials can approximate continuous systems, EDPD
◮ Time-stepping should also not be used for “hard” potentials as EDPD is
◮ EDPD is particularly fast when used on “coarse-grained” potentials, such as
MNB & LL DynamO Workshop 23/01/2015 25 / 32
EDPD versus time-stepping approaches Performance
MNB & LL DynamO Workshop 23/01/2015 26 / 32
EDPD versus time-stepping approaches Overview
◮ It is clear that there are overlaps in application of time-stepping and
◮ We can then compare time-stepping and event-driven simulation:
◮ With the recent advent of standard software packages (like DynamO), and
MNB & LL DynamO Workshop 23/01/2015 27 / 32
Features of DynamO
MNB & LL DynamO Workshop 23/01/2015 28 / 32
Features of DynamO Time-warp algorithm
MNB & LL DynamO Workshop 23/01/2015 29 / 32
Features of DynamO Exact time averages
◮ In molecular dynamics, properties such as pressure, energy, stress, are
◮ In time-stepping simulation, this integral is approximated by regular sampling. ◮ Some properties are sampled every timestep (stress/pressure and energy).
◮ For discrete models many properties do not change between events, therefore
a
a is the property
MNB & LL DynamO Workshop 23/01/2015 30 / 32
Features of DynamO Exact time averages
◮ This is required to evaluate properties which are a function of the
◮ However, all properties which can be evaluated this way are, as it is
◮ This is why DynamO has an output plugin architecture, and many
MNB & LL DynamO Workshop 23/01/2015 31 / 32
Features of DynamO Stable algorithm and Magnet
◮ Although event-driven dynamics is analytic, it is extremely sensitive to
◮ For example, round-off error in event times causes 50% of hard sphere
◮ DynamO uses “stabilising” interactions to ensure the rare (10−9) but critical
event-driven particle dynamics,” Comp. Part. Mech., 1, 191-198 (2014)
MNB & LL DynamO Workshop 23/01/2015 32 / 32