Dissipative Particle Dynamics and Simulation Software

advertisement
Fundamentals of Dissipative Particle Dynamics
© 2008 Adam MacDonald, Dr. David Pink, St. Francis Xavier University, OneZero Software
Introduction
The intention of this paper is to facilitate a thorough understanding of Dissipative Particle
Dynamics (DPD) and efficient simulation techniques, as implemented in the Fluidix simulation
software (onezero.ca). Aspects of DPD will be analyzed from a practical point of view.
DPD is a simulation technique which improves upon classical molecular dynamics (MD) to
allow for modeling of coarse-grained soft-matter particle systems. Particles change position with time
according to Newton’s equations of motion. Interactions between these particles are designed so that
stable and realistic physical behavior occurs at variable scales. DPD observes the Navier-Stokes
equations which correctly model hydrodynamic flow. Most applications of DPD involve systems of
either large inter-connected particle structures immersed within fluid, or fluid flow through complex
surfaces.
This paper will explain the basic particle interactions, as well as other complex interactions that
can be used to develop various models. A computationally efficient implementation of Newton’s
equations will also be presented. A method for simulating flowing liquids will be discussed, as well as
a mean field theory which (for most static-fluid applications) removes the need for water particles
altogether.
Particle Interactions and Temperature
Every particle in a three-dimensional DPD system is associated a constant mass and radius of
interaction. The simulation is performed by iterating through a series of time-steps, where each timestep is considered a small but finite period of time. At each time-step, every particle has a distinct
position, velocity, and acceleration, expressed in terms of a vector in 3D space, which is considered
constant for the duration of the time-step.
Forces are applied to particles at each time-step depending on their position and velocity at that
instant. The change in acceleration for each particle, due to its forces during that time-step, is
calculated at the end of the time-step as the sum of all forces acting on that particle divided by the
mass. Then, that acceleration vector is used to update the velocity and position of that particle using an
integration scheme representing Newton’s equations of motion.
A particle with a radius of interaction in a 3D system can be represented by a soft sphere. When
any two spheres overlap, the distance between the particles is less than the sum of their radii of
interaction. Three basic forces (conservative, dissipative, and random) are applied to each pair of
overlapped particles. These forces are always equal and opposite so that momentum is conserved both
locally and over the entire system.


FC  SC (1  r )e

  
FD  S D (1  r ) 2 (v  e )e


FR   2S D k BT / t (1  r )e
The maximum distance between two particles while interacting with each other is equal to the
sum of the radii of interaction of the two particles. Here, r represents the ratio of the distance between
the pair of particles divided by the maximum distance for an interaction. Thus, 1  r is the proportion of
overlap (0 to 1). Any weight function that relates the distance between the two particles to the
magnitude of the force can be used, but usually (as shown) a direct linear relationship is used.
Typically, particles in the system are divided into groups of particle “types” with specific
radius and mass. Relations between pairs of particle types are defined as constant values for SC and
S D , which specify the interaction parameters. In theory, each particle could have a different radius or
mass, which may not be constant, however this case is rare and computationally inefficient.
The conservative force directly repels the particles from each other, and the strength of this

force is a function of the amount they are overlapped. Here, e is a unit vector which represents one
particle’s position in relation to the other. SC represents the maximum strength of the conservative
force, and this value is usually constant and independent for each pair of particle types. The choice of
SC for a pair of particles depends on the “hardness” of the particle, and is typically between 10 and
100.
The dissipative force removes energy by decreasing the velocity of the two particles in relation
to each other. Fast moving particles will be slowed by the dissipative force, which makes the system
more controllable and predictable. For example, if two particles are interacting and moving towards or
away from each other, the dissipative force will slow them down. If the particles are overlapped but

currently moving parallel to each other, the dissipative force will have no effect. In this equation, v
represents the difference in absolute velocity of the two particles, which is equivalent to their relative
velocity. S D , the strength of the dissipative force, is usually between 1 and 10. A large value will
produce a system which is very responsive to fluctuations in temperature and relaxes very quickly.
The third and final force that is applied is the random force. Here,  is a random variable with
unit variance, kB is Boltzmann’s constant, T is the desired equilibrium temperature of the system in
Kelvin, and t is the time-step of the simulation. This force will put energy back into the system to
counteract the dissipative force. The strength of the random force is related to the strength of the
dissipative force by the fluctuation-dissipation theorem, which ensures that this combination will bring
the system to the desired equilibrium temperature over time. If each particle is given a random force
based on a desired equilibrium temperature, then eventually the system should reach that temperature.
If there were no random forces (T = 0) then the particles would lose energy during each interaction and
the temperature of the system would approach zero.
The dissipative and random interactions cause the energy of faster moving particles to be
dissipated throughout the system. This scheme creates a highly controllable environment which is
more tolerant to wild particles and coarse approximations. The effect can be compared to bouncing
balls in a can; by filling the can with water and shaking it consistently, the balls’ movements are more
stable and predictable. It is this concept that allows a small amount of spherical particles to model
complex molecular structures with reasonable accuracy. This combination is also the reason why DPD
allows for greater t values than classical MD; the energy dissipation effectively reduces the effect of
integration error by handling jumpy particles predictably.
There must be a sufficient particle density throughout the system so that enough short-range
interactions occur to cause the temperature to be accurately controlled. If there is an abundance of free
space, particles will move freely without experiencing dissipation. For this reason, DPD is used to
model liquids, or solids immersed in liquids. Simulations include a certain density of water particles
which fill the entire system and ensure that interactions are plentiful. Water particles are often a
computational bottleneck, since many simulations involve observation of objects immersed in water –
not the water itself. A reasonable solution to this weakness of DPD will be addressed further in this
paper.
It should also be noted that the desired temperature (a parameter of the system which is not a
measured value) is used to weight the random force for every interaction, regardless of the current
velocity of particles in that physical area. For this reason, thermodynamics are difficult to model
properly in DPD. Accurate particle behavior should only be expected when it is assumed that the
temperature is uniform for the entire system. However, it is perfectly acceptable to change the desired
temperature at any time during a simulation. For example, it may make sense to start a simulation at a
low temperature and wait for things to settle, and then heat the system and observe.
Motion of Particles by Iteration
Each particle in a DPD simulation has a distinct physical position, velocity, and acceleration at
each time-step. Forces are accumulated by analyzing the instantaneous position and velocity in relation
to other particles. The net force at that instant for each particle is divided by the mass of that particle to
obtain its change in acceleration. Using an integration scheme of Newton’s equations of motion, and a
small Δt time-step value, the acceleration is used to update the velocity and position of each particle
for the next iteration.
Any implementation of Newton’s equations will produce some error, since the acceleration of
each particle is considered to be constant for each time-step. However, this error is minimized to an
acceptable level by using a small Δt in conjunction with an efficient integration algorithm. The DPD
technique itself is also highly tolerable to integration error due to the dissipative-random force
combination described in the previous section.
The most common integration scheme is the Velocity Verlet algorithm. This algorithm uses a
half-step approach for modifying the velocity of the particle. The intention is that the velocity vector
used for calculating interaction forces is calculated using half the forces from the previous time-step,
and half from the current time-step. This technique has been shown to reduce integration error. The
following iterative set of equations represent the Verlet algorithm in its general form:



1
r (t  t )  r (t )  v (t )t  a (t )t 2
2


t
1
v (t  )  v (t )  a (t )t
2
2



1
t
a (t  t )  forces( r (t  t ), v (t  ))
m
2


t
1
v (t  t )  v (t  )  a (t  t )t
2
2
The advantage of this scheme is that only one position, velocity, and acceleration vector is
required to be stored for each particle. The below pseudo-code is a direct implementation of the
Velocity Verlet scheme using the vectors ‘r’, ‘v’, and ‘a,’ which represent the currently stored data
describing a particular particle.
r  initial position
v  initial velocity
a  (1/m)forces(r, v)
for each simulation step
r  r + vΔt + (1/2)aΔt2
v  v + (1/2)aΔt
a  (1/m)forces(r, v)
v  v + (1/2)aΔt
record r to disk
This implementation assumes that only the particle positions will be recorded. The following
simplification makes it difficult to record the velocity of a particle at the end of a time-step; however,
these values can be interpolated from the position data separately. The first two lines of the iteration
can be reversed by substitution, and since the velocity is not recorded, the two velocity-update
statements can be combined to produce the following mathematically equivalent algorithm:
r  initial position
v  initial velocity
a  (1/m)forces(r, v)
for each simulation step
if (first step)
v  v + (1/2)aΔt
else
v  v + aΔt
r  r + vΔt
a  (1/m)forces(r, v)
record r to disk
For only the first time-step, the velocity is updated using the half of the current acceleration
value. In terms of physical behavior, this causes a single set of forces to have only half of the normal
effect. In reality, this affects a long simulation by a negligible amount, since the nature of DPD is such
that small abnormalities are absorbed by the temperature-controlling dissipative and random
interactions. In practice, the first few thousand time-steps are used to allow the system to settle at the
desired temperature, which helps ensure that the experiment occurs in the correct environment.
Slightly adjusting the forces of the first time-step will have no bearing on the simulation results, so it
can be omitted from the algorithm.
Finally, the force calculations can be moved to the beginning of the procedure, producing the
following final algorithm. This version is simpler, easier to implement, and more efficient.
r  initial position
v  initial velocity
for each simulation step
a  (1/m)forces(r, v)
v  v + aΔt
r  r + vΔt
record r to disk
For any integration scheme, the choice of Δt is very important. A large value may cause
particles to jump through other particles or become instable. A value too small will increase accuracy,
but require more time to perform the simulation. There have been studies into the effect of using
various values for Δt, however for most purposes a value of 0.01 or 0.005 is sufficient.
Boundary Conditions
The physical counterpart to a computer simulation exists within an infinite universe. However,
computer simulations require a finite space for computation. A DPD simulation must define the outer
boundaries of the system, or “world.” Usually, the three-dimensional world is a six-sided box with side
lengths between 10 and 1000 units (where a particle radius of interaction is approximately 1 unit).
Generally, all particles must remain within this defined volume with exceptions only in rare cases.
The “walls” of the world are the boundaries which particles are constrained within. A particle
which moves into contact with a wall may experience something in order to keep it from moving
through the wall. In the simplest case, the walls are simply the six sides of the world. However,
depending on the application, systems may be designed to additionally constrain particles within a
tube, cylinder, sphere, or other complex structure.
Boundary conditions refer to a specification of the influences particles are subjected to when
they interact with a wall. There are many types of boundary conditions which vary in physical realism.
A common attribute of each specification is that it is artificial, since particles supposedly analogous to
real-life entities must be constrained within a finite system. Thus, a challenge exists to define boundary
conditions which create an appropriate environment for simulation and observation.
If a curved wall is used, or walls exist inside the simulation, care must be taken to ensure that
boundary conditions are applied in an appropriate manner. The boundary conditions described here are
designed to be applied to the flat outer walls of a rectangular world. Application of these techniques to
other types of surfaces is possible, but is outside the scope of this paper.
There are two main forms of boundary conditions: periodic and enclosed. With periodic
boundary conditions, particles leaving one side of the simulation are instantly moved to the opposite
side. With enclosed constraints, soft or hard physical walls exist to restrain particles from leaving the
world. Depending on the application, a combination of these forms may be used within a simulation.
Periodic boundary conditions are used to model an infinitely-sized system. When a particle
moves outside of the world, it is instantly moved to the opposite side of the world. This instant
reposition of the particle is referred to as “wrap-around.” This creates an infinite system by assuming
that continuous instances of the system exist adjacent to each other. This keeps the number of particles
in the simulation constant, but also allows particles to move outside of the observed volume. A
periodic system is useful for any type of simulation which represents a continuum in motion.
Implementing periodic boundary conditions can be difficult, because the interaction radius of a
particle may extend through the simulation boundary and interact with a particle on the other side. If
interactions for these particles are not considered, a dense system of small particles will tend to layer
parallel to the boundaries. Wrap-around interactions also impose a minimum size on the system, so
that particles cannot interact with themselves. When particles are connected by springs (discussed
later), care must be taken to ensure that a spring-connected series cannot also interact with itself.
As you can see in the diagram, there are only three particle centers within the simulation
boundary, and they appear to be very far from each other. However, all of them are actually in physical
contact with at least one other “virtual” particle.
Consider a periodic system where a single very large sphere is pushed by a large force through
millions of tiny particles. The wave created in front of the sphere will propagate through the boundary
and interact with the sphere from behind. Also, the ripple effect of the flow will propagate outwards
and interfere with the opposite side. This is because we have effectively created a continuum of
adjacent systems where each contains an identical copy of not only the tiny flowing particles, but the
large moving sphere as well. The undesirable effects of the wave are caused by the flow induced
independently in adjacent systems.
To reduce these effects, the system must either be made larger, or the boundary conditions
modified to inhibit the periodic effects of the flowing particles. For example, one may specify that any
particle near to the edge of the world will experience friction – a reduction in the velocity, but only in
the direction parallel to the motion of the large particle. This type of constraint on the system is
unrealistic, but it is specifications like these which must often be implemented to cope with the
negative effects of a finite system.
Enclosed boundary conditions reduce the particles’ freedom of movement to the extents of the
world. There are many possible approaches to what may happen to a particle when it contacts a
boundary, depending on the desired application. For any solution, however, individual particles must
be restricted by external effects which violate conservation of momentum in the system. As long as the
same boundary conditions exist on opposite sides of the world, momentum may be conserved over
time, but not necessarily in a single time-step. In addition, total momentum in an enclosed system may
often be irrelevant, since the walls prevent the system from accumulating momentum and moving as a
whole.
Hard wall boundary conditions specify that a particle bounces from the boundaries via a
perfectly elastic collision. When a particle passes through the world boundary, it is placed immediately
inside the world and its velocity component perpendicular to the wall is reversed. The problem with
these conditions is that the sudden velocity modification causes particles near the wall to bounce into
neighboring particles, which can create undesired effects such as rippling or shaking. This solution
conserves energy, but reversing the velocity instantaneously is unrealistic.
Particles should instead feel a force when they encounter a boundary, to reverse their direction
over a number of time-steps. Using forces instead of instantaneously modifying the particle’s velocity
is a much more reliable approach, and more closely follows the principles of DPD. To create soft-wall
conditions, we build on the hard-wall specification by adding a layer of sufficient width inside the
world boundary. Particles within this layer receive a force related to their penetration distance. Fastmoving particles that penetrate entirely to the boundary will bounce from the wall, but this happens
rarely and it will not have a negative effect on the system. The force strength and layer thickness
should be chosen so that with a high particle density, the particles push nearly all the way through the
layer at equilibrium. This prevents the soft layers from constraining the particles too far from the
boundaries.
Linear repulsive soft-wall specifications cause large numbers of particles to unrealistically form
numerous layers parallel to the wall. We have essentially created a boundary condition where the walls
are of much lower temperature than the rest of the system, and tend to “freeze” the outside layers of
particles. To correct this, we add dissipative and random forces to the wall to keep the temperature at
the boundaries equal to the rest of the system. Particles entering the layer are slowed by the dissipative
force, and the random force maintains temperature. These forces act only perpendicular to the wall.
The equation for the interaction at the boundary presented here can be used to represent a soft
surface at the edges of the world. We have found that in order to achieve constant density and
temperature at the boundary, and prevent layers of particles from forming, is it appropriate to use d 1.5
instead of a simple linear relationship.
 
Sw  d 
1.5
; 0 d  a
F   C S w  D S w v    2 D k B T t
2
S w represents the relation between penetration distance of a particle ( d  ) into the boundary
and the repulsion. The boundary layer thickness (a) is a constant such as 1.5 units. The force applied to
a particle contains two constants: C, which parameterizes the hardness of the surface, and D, which
represents the dissipative/random strength (3.0, for example). v  is the velocity of the particle
perpendicular to the surface, t is the time-step of the simulation, K BT is the temperature of the
simulation, and  is a Gaussian random variable with unit variance and mean 0.5.
The hardness of the surface can be chosen arbitrarily, but there is a specific value for C in a
uniform system which achieves constant density throughout the boundary layer. In practice, this value
can be determined by iteratively measuring the density of particles within the boundary layer.
Short Range Attractions
Short range attractions can be simply implemented by adding a linear attractive force to the
basic particle interactions. When two particles collide, they are pulled together to an equilibrium
distance less than the interaction cutoff distance due to the combination of repulsive and attractive
forces. This effect simulates bonds being formed spontaneously, which may break if the particles are
pulled apart. When used with a large number of particles, surface tension can be achieved.
Implementing a global short range attraction between all interacting particles requires only
slightly modifying the conservative force calculation. However, it may be necessary to define a limit to
the number of possible connections that any single particle may have at one time. For example, using a
limit of 2, long chains can form during a simulation, for which lengths can be measured as a function
of particle density or time. Implementing this is more difficult, since all existing connections must be
tracked for each particle to ensure that an existing connection is not broken in order to form a new
connection with another particle.
Long Range Attractions
Almost all DPD simulations involve permanently connecting two or more particles by long
range linear forces (springs). This technique is used to create chains of particles or other complicated
structures which maintain their unity for the entire simulation. Implementation simply involves
defining a list of pairs of particles which are to be connected by a spring, the spring constant (K), and
the natural spring length (L). At every time-step, equal and opposite forces are applied to each particle
of a spring-pair as a function of the distance (r) and the direction vector (e) between them:


F  K ( r  L )e
Usually springs are used to permanently create a chain by attaching particles in sequential
series. Particles should be slightly overlapped, to prevent other objects in the simulation from traveling
through the space between particles in the chain. When using short-length springs such as these, it is
important to ensure that the particles are initially placed at the correct equilibrium distance from each
other – when the conservative repulsive force equals the attractive spring force:
K (r  L)  SC (1  r )
When simulated, temperature affects each particle of a chain individually, which causes the
structure to shake. A chain tends to remain stable when higher spring constants are used. It is best to
use an appropriate spring length with a high spring constant (between 200 and 400) to keep the bonds
strong and the particles only slightly overlapped. Ultimately, however, structure design depends on the
environment in which it will exist. Also, when K  m 2t 2 , where m is the mass of each particle, the
spring will be unstable.
A free chain of particles may tend to wrap and twist around itself due to the environment’s
temperature. What may be required is a method to keep the chain in a fairly smooth curve, or prevent
significant bending of an internal group of particles. To do this, we apply forces to straighten each
triplet of particles on the chain. Using weak localized angle constraint forces, a chain’s appearance will
approach a straight line, but will usually appear curved and have a reasonable freedom of motion.
A triplet of particles on which to apply angle constraints is defined by two pairs of springs that
share a common particle. This common particle is the center of the triplet. The force applied to the
center particle is the sum of the two relative position vectors from this particle to the other two. Half of
this force is then applied to each of the other two particles, but in the opposite direction. This keeps the
local net force and moment about the center of the triplet zero. When these forces are combined with
adjacent triplets, the chain will straighten over time, but not translate or rotate as a result of this force.
r1+r2
r1
(r1+r2)/2
r2
(r1+r2)/2
By modifying the straightening force equation to reach a minimum when r1+r2 is non-zero, an
equilibrium angle that is nonzero can be achieved. The strength of the angle constraint forces must also
be fairly low, or the chain can become unstable. Any particular particle in a chain will be included in
three triplets. If the chain begins to take on a strong zigzag shape, the angle forces on each particle will
quickly accumulate. If the spring constants and dissipative forces are too low, the triplets may oscillate
and eventually destroy the chain. This effect can be prevented by using large spring constants or
modifying the spring equation itself. For example, this model more accurately represents the behavior
of chemical bonds, and allows stronger angle constraints to be used:




F  K ( r  L)  ( r  L) 3 e
Springs may be modified to only take effect when particles are within a certain cutoff distance,
allowing medium-range breakable bonds to be formed between groups of particles. Using a dynamic
list of springs, bonds may be spontaneously formed or destroyed without difficulty. For example,
multiple polymers can form a gelatin-like structure by randomly creating and destroying connections
between them according to range and probability parameters.
Electrostatics
DPD simulations occur within a dense medium of water, which is modeled as an uncharged set
of particles. Water contains charged ions which affect the Coulomb interaction between two charged
particles. These ions can be explicitly represented in a simulation; however the placement of these
charges characterizes a continuum and can therefore be represented mathematically. Absorbing the
effects of charged ions in water into the Coulomb interaction is called Debye screening. This screened
interaction decreases rapidly and converges, which allows us to declare that all interactions at a longer
range than a specified finite cutoff (the Debye screening length) can be absorbed into the error of the
system, which provides a computationally reasonable model for electrostatics.
Debye screening requires a parameter (  ) which represents the density of charged ions in the
system. The interaction cutoff which provides acceptable accuracy is typically 3 /  . A value of  =
0.1 A-1 corresponds to a monovalent salt concentration of ~100 mM and in the discussion that follows,
this number is taken to illustrate the argument. This permits a cutoff distance of 30 units. When
periodic boundary conditions are used, a charged particle must be prevented from interacting with
another particle more than once. Thus, the world extents should be at least four times the cutoff
distance in each dimension (120 units in this case).
The screened interaction potential is given by:
u (k , r ) 
q1q2 e r
40 1 r
Because u(k,r) is spherically symmetric, the corresponding force is radial and its magnitude is:
F 
q q e r
u
 1 2
(1  r )
r 40 1 r 2
Computing this expression for a pair of particles involves evaluating an exponential, which is
very computationally expensive. However, it can be approximated using a relatively simple Taylor
polynomial since the cutoff range is finite. The Taylor polynomial presented here is accurate when the
cutoff range is 3 /  .
1  2  3 r 2   4 r 3  5 r 4  6 r 5  7 r 6  8 r 7 57 9 r 8
  10 r 9
F  q1q2 w ( 2 








)
2
3
8
30
144
840 5760 2800000 225000
r
For very close particles (r  1) , the linear function F  q1q2 w r is used instead to prevent
instability due to very large forces. Efficient methods of organizing the particles are very important to
limit unnecessary computation, since electrostatics may account for a large portion of the simulation
time.
The electrostatic force and the kBT value may be scaled by the same factor, which effectively
increases the time scale and causes the simulation to approach equilibrium much more quickly. This
relationship has been shown to preserve correct equilibrium arrangement with charged point particles,
but it must be ensured that the high temperature does not adversely affect the simulation due to the size
and local interactions of the particles. This technique can be used to partially counter the dissipative
effects of water if motion is highly restricted.
Hydrodynamic Flow
The DPD technique generally produces valid results only when the observed objects in the
system are completely surrounded by an incompressible fluid. To model water accurately in DPD, we
must include three particles of unit radius and mass for every unit of volume in the system. These
water particles must interact with each other via a conservative force of approximate strength 40, and a
dissipative force of approximate strength 3. If these particles are initially placed randomly in the
system, the fluid will fluctuate correctly after relaxing for 100-200 time-steps (∆t = 0.01).
Water particles interact with all other particles in the system by only the dissipative and random
forces. The dissipative strength S D is related to the viscosity of the fluid, and a value of 1 should
correctly represent water.
It may be necessary for water particles to flow controllably through the system. For example,
one may define a dynamic surface that can erode over time, observe the behavior of polymers as water
flows between them, or even observe the water itself as it flows through any type of complicated
obstacle course. Since the DPD technique obeys the Navier-Stokes equations, it can be used to model
any type of hydrodynamic flow, with or without moving boundary conditions. In order to force the
water to flow, we need to create a mechanism for pumping the water.
The simplest form of water pump is one which causes all the water particles to flow from one
end of a rectangular system to the other. To create the pump, we define one or more “inlets” and
“outlets” as thin three-dimensional volumes at opposite ends of a system. When water particles enter
an outlet, they are instantly moved to an inlet. This creates a vacuum at each outlet and a high
concentration of particles at each inlet. If there are an appropriate amount of water particles in the
system so that the water is incompressible, this scheme will produce uniform flow.
The velocity of the flow can be controlled by randomly choosing whether or not to move each
particle from the outlet to the inlet according to a specific probability. This will cause the flow velocity
to approach a constant value at equilibrium given some resistance within the pump. To increase flow
velocity above this limit, particles may be assigned a force at the inlet in a particular direction. For
practical uses, a pump should be designed so that the appropriate constant flow velocity is achieved at
equilibrium.
Water as a Continuum
Water particles normally constitute over 90% of a simulation’s particles, and account for
almost all of the computation time of any particular simulation. However, since water is
incompressible, it represents a fluctuating lattice that can be predicted mathematically. DPD is a
proven technique for representing a continuous liquid medium using locally-interacting particles. By
analyzing these interactions, an equation for the continuum which these interactions reproduce can be
evaluated and used instead. Presented in the following is an equation for modeling water as a
continuum, derived from the DPD equations, which allows water particles to be omitted from any
practical simulation where hydrodynamic flow is not the focus (a water pump is not used).
Water particles are uniformly distributed throughout the entire system, but appear randomly
positioned from the point of view of an immersed object particle. We know this because: a) there are
no conservative forces preventing object particles and water particles from becoming very close, b) the
high density of water particles (typically 3 per unit volume) creates a very continuous environment, c)
the incompressibility of the water causes the density to be fairly constant throughout the system, and d)
the temperature of the system causes water particles to move randomly. Therefore, the number of
water particles interacting with any object at any particular time-step can be reasonably predicted.
In order for a water particle of unit radius to interact with an object of radius r, its center must
be within a sphere of radius r + 1. The number of interactions for each object is the average number of
water particles within this sphere: the sphere’s volume multiplied by the water density ( 4 (r  1) 3 ).
The object will experience dissipative forces from water that will always cause its velocity to
become closer to that of the water particles in its vicinity. Typically, the water particles will slow down
all objects with respect to the world, because the water particles are not experiencing collective motion
in any specific direction. This is because no object will move enough water particles so that another
nearby object can be significantly affected. To elaborate on this, consider the following:
a) An individual (or small number of) object(s) moves very quickly through still water. Each
water particle is held in place by the conservative interactions between themselves, which are
approximately 10 times higher then the dissipative force that a moving object exerts on the water. The
dissipative force is not nearly strong enough to allow the water particle to push through its neighbors
and move along with the object. The water will always slow down the object well before the water
itself moves a significant amount, especially since the water particle has no conservative interaction
with the object at all. In terms of energy, the energy of the moving object is very quickly and
efficiently distributed through all of the incompressible water, and each individual water particle feels
nothing but a slight and short-lived bump – which will have almost no effect on other objects nearby.
b) Many objects move together within the water. For simulations where water flow is either
expected or a primary factor of the system, this continuum model should not be used. For any other
type of simulation, large-scale movements of objects will not occur unexpectedly to the extent that the
water begins to flow and consequently affect other objects significantly. Since water is incompressible
and momentum must be conserved within the system, significant and persistent flow patterns occurring
within the water require a tremendous amount of energy to create. Accumulating such energy through
internal random fluctuations is statistically impossible. Also, any massive push by a large number of
objects must be opposed in some other area of the system, which will then stop the water from flowing.
Any significant amount of flow within the water must be paralleled by movement in another direction
in order to conserve momentum, which requires so much energy that it will not occur in a simulation
where the fluid is expected to be static.
Velocities of the water in different areas of the simulation can be accurately modeled by
iterating a velocity field using the finite-difference algorithm. However, for typical simulations, a
velocity field has very little effect for the reasons explained above. For simulations where flow is
integral to the system, using DPD particles is as effective and usually more computationally efficient.
The dissipative force on an object from each water particle, according to the fundamental DPD
equations, is given by:

   
F   (1  r ) 2 ((vo  vw )  e )e
 represents the dissipative force strength, which is a constant related but not equal to the
viscosity of the fluid. This value is 1 for water, but may be a parameter of the continuum for alternate

types of fluids. v w represents the velocities of the water particles surrounding the object. This is zero
for our continuum, but a non-zero vector may be used to create simple flowing water. If a velocity field

is used, v w would be replaced with the velocity vector at the position of the object.
This expression can be simplified in the following manner using the previous assumption that
water particles are uniformly distributed throughout the interaction sphere of our objects. First we
determine the following averages (in three dimensions), considering that 0  r  1 and  1  ei  1 for
i  x, y, z  .
(1  r ) 2 
1
10
 
v
1
2
2
(e  v )ei  ex v x ei  e y v y ei  ez v z ei  ei vi  i , since ei  0 and ei 
3
3
 v i
 Fi 
30
The random force which an object will experience from each water particle is given by:


F   2 K bT / t (1  r )e
The average random force on an object for each of its interactions in our continuum is
represented by a single random variable: the linear combination of the random forces from each water
particle. The mean of this variable is zero since the mean of each random force is also zero. The
variance can be calculated in the following manner:
V ( Fi ) 
2 K bT
k T
2
(1  r ) 2  ei  B
t
15t
 Fi  
K bT
15t
We now have a formula for the continuum water model, expressed as a force to apply in each direction
to each object particle in the simulation:
 4 (r  1) 3  vi
4 (r  1) 3  k BT
Fi 

30
15t

m

It should ensured that 4 (r  1) 3
, where m is the mass of an object particle, or the system
30 4t
may be unstable. This relationship sets a limiting upper bound on the value of ∆t, especially when
large particles are used.
Appendix A: Physical Units
When building a model to represent the physics of the real world, a system of scaling units
should be defined to help relate the simulation to reality. The following scheme is an appropriate
starting point for modeling common biological and physical systems. Depending on the scale of
system, some aspects of the real world may not apply to the model because their effects are negligible.
Nanometers
Millimeters
Length: 10-9 m = 1 nm
Mass: 10-24 kg
Time: 3.16 x 10-7 s
Energy: 10-20 J
Force: 10-11 N
Pressure: 107 Pa
Temperature: 103 K
k BT300 K  0.414 (room temperature)
Charge: 1.602 x 10-19 C = e
1
 0.285
40 1
Length: 10-3 m = 1 nm
Mass: 10-6 kg
Time: 10-2 s
Energy: 10-8 J
Force: 10-5 N
Pressure: 101 Pa
Gravity = 0.98
The mass density of water in both of these unit systems is 1, so water should be modeled using
3 particles per unit of simulation volume of radius 1 and mass 1/3.
Download