Skip to content
Raul edited this page Apr 11, 2018 · 1 revision

Dissipative Particle Dynamics[1].
DPD is a lagrangian stochastic thermostat used to model simple and complex fluids and polymers that can be interpreted as a MD simulation with a particular interaction potential. This potential is implemented in Potential/DPD.cuh according to [1].
This potential can be used with a NVE integrator to achieve a correct DPD simulation. i.e VerletNVE.

USAGE

Use as any other potential

  using NVE = VerletNVE;
  
  NVE::Parameters par;

  par.dt = std::stod(argv[3]);
  par.initVelocities = false;

  auto verlet = make_shared<NVE>(pd, pg, sys, par);


  {
    using PairForces = PairForces<Potential::DPD>;
  
    //This is the general interface for setting up a potential  
    Potential::DPD::Parameters dpd_params;
    //Set too match parameters in [1]
    dpd_params.cutOff = 1.0; 
    dpd_params.temperature = 1.0;
    dpd_params.gamma = 4.0;
    dpd_params.A = 25.0;
    dpd_params.dt = par.dt;
  
    auto pot = make_shared<Potential::DPD>(sys, dpd_params);

    PairForces::Parameters params;
    params.box = box;  //Box to work on
    auto pairforces = make_shared<PairForces>(pd, pg, sys, params, pot);

    verlet->addInteractor(pairforces);
  }

You can see an example in examples/DPD.cu that will reproduce the results of [1].

References

[1] On the numerical treatment of dissipative particle dynamics and related systems. Leimkuhler and Shang 2015. https://doi.org/10.1016/j.jcp.2014.09.008









Clone this wiki locally