### Niamh Chaparro

#### NSERC Award holder

SFU undergraduate student, Applied Mathematics Major

SFU undergraduate student, Applied Mathematics Major

**A Simple Dissipative Particle Dynamics Model in Python**

Scientists are interested in movement at a particulate (molecules, atoms and even smaller!) level, mathematicians like to model stuff and last summer I had the good fortune to write a Molecular Dynamics model in Python under the direction of Dr. Paul Tupper.

**Dissipative Partical Dynamics**

Dissipative Particle Dynamics is a method suitable for modelling complex hydrodynamic behaviour. It simulates an off latice stochastic system of particles moving in a contiuum domain of ï¬xed area /volume. The particles represent groups of molecules that softly repell and are capable of moving through each other.

**The Model**

The model comprised of two principal steps:

• calculate Inter-particle Forces

• update Particle Positions and Velocities

The pairwise force is made up of a conservative (repulstive), an opposing dissipative (dependent on velocity dfference) and a random force. The positions and velocities are updated using a modiï¬ed version of the Verlet Algorithm to integrate Newtons equations of motion.

**An Application - Spinodal Decomposition**

Spinodal Decomposition is the uniform separation of a solution into distinct regions of dffering composition and properties and can be modeled by assigning different repulsion parameters to ”same” and ”dffering” particle pairs. For example, in my model there were 100 particles, 50 of each type, in a 3x10 ”box”. Same pairs had a repulsion parameter of 25 while diï¬€ering pairs had one of 75. Initially, the system looked like this:

and at t = 100 s it looked like this:

So clearly separation has occurred.

**Next Steps and Final Words**

Programming in Python is relatively easy, but there are limitations, for example the number of operations vs speed. Possible ways around this, such that a larger system could be simulated, might be to wrap fortran code within the Python routine or use spatial hashing. Ways to validate the model might include comparing the particle velocity distribution to that of Maxwell Boltzman and testing temperature control.

Doing a summer research project was an excellent way to get a taste of academic research while being protected from the harsher aspects of that world - - those aspects can be saved for grad school, post doctoral research and tenure. A good start to learning about Dissipative Particle Dynamics is to check out the Wikipedia page.