Colloidal suspension by SRD–MD simulation on GPU
Introduction
During the last few decades, numerous computer simulations have been developed to study soft matter (including complex fluids, polymers in suspension, colloidal suspensions, etc.). In this field, “large” particles are studied taking into account thermal fluctuations, which need specific simulations. Brownian dynamics simulations (BD) [1], dissipative particles dynamics simulations (DPD) [2] or Lattice-Boltzmann simulations (LB) [[3], [4]] are among the common methods used for these studies. In BD, the fluid is modeled as a continuum medium although in the two other methods, it is described by a coarse-grained model. In this paper, we focus on another kind of simulation using a coarse-grained model for the fluid particles, namely stochastic rotation dynamics (SRD) also known as multi-particle collision dynamics (MPCD), which was first introduced by Malevanets and Kapral in 1999 [[5], [6]]. Many applications and variants of this method have been extensively reviewed in Refs. [7] and [8]. In this method, the fluid is represented by point particles with continuous positions and velocities distributed in small cells. The dynamics of the fluid proceeds in two steps: a streaming step and a collision step. During the streaming step, the fluid particles move ballistically according to their velocity and during the collision step, a stochastic rotation of the relative velocity of each particle in each cell is applied. The dynamics of fluid particles is thus described without calculating any explicit interactions between them. When embedded colloids are introduced in the system, their dynamics is described by a traditional molecular dynamics scheme (MD) and simulations are called hybrid SRD–MD simulations. In order for the fluid and the colloids to interact, the SRD simulation of the fluid has to be coupled with the MD simulation of the colloids. Different coupling methods exist in the literature. The most common and the simplest one is to introduce the colloids in the collision step of the fluid. In this manner, only the colloid–colloid interactions are explicitly calculated. The exchange of momentum between fluid particles and colloids takes place in the collision steps of SRD. This coupling was largely applied and give good results when the colloids concentration is moderate [9]. It is also very suitable for parallelization and a GPU version has recently been developed by Westphal et al. [10]. However because of its simplicity, it fails to model precisely the hydrodynamics. The fluid can penetrate inside the colloids, therefore this method cannot describe the lubrication effects. In this paper, another coupling is considered. It consists in introducing explicit repulsive interactions between the colloids and the fluid particles, which are chosen to avoid depletion and to mimic the lubrication [11]. In this method called in the following ‘SRD–MD with force coupling’, the fluid particles are not allowed to penetrate deeply into the colloids and thus, they are not homogeneously distributed in the simulation box. The main disadvantage is that, as more interactions must be computed for each MD step, this method becomes computationally expensive for large systems. To improve the performance of such kind of simulations, we propose here a code suitable for graphical processing units (GPU) calculations.
This paper is organized as follows. First, in Section 2, the hybrid SRD–MD simulations are described. Then, the GPU implementation details are presented in Section 3. Finally, Section 4 summarizes our results.
Section snippets
Simulations of the fluid: stochastic rotation dynamics
In the SRD method, the fluid is represented by point particles of mass . Their dynamics is described by two steps: a streaming step and a collision step. During the streaming step, the fluid particles move according to their velocity , and their position is updated as follows: where is the time duration of the streaming step. For the collision step, the space is divided into regular cubic cells of linear size , called SRD cells. Collision consists
GPU implementation
In the remainder of this paper we rely on the terminology related to GPUs (see also Reference [21]). GPUs contain multiple streaming multiprocessors running small routines called kernels on a large number of parallel threads. Threads are divided into groups known as warps, typically containing 32 threads on current architectures. A block is a logical group of threads of larger dimension (64, 128, etc.), defined by the programmer independently from the exact size of a warp: the task of mapping
Results
Our algorithms were tested with several NVIDIA GPUs:
-
GTX 690 with 3 072 CUDA cores and 4 GB of memory (2012)
-
Tesla K20m with 2 496 cores and 5 GB (2012)
-
Tesla K40m with 2 888 cores and 12 GB (2013)
-
GTX TITAN-X with 3 072 cores and 12 GB (2015)
Conclusion
In this paper, we have presented a complete algorithm for SRD–MD simulations with force-coupling on GPU. This algorithm combines the previous studies on the SRD on GPU and the MD on GPU. The main problem with this force-coupling is the MD part of the SRD–MD algorithm, where the standard strategy is inefficient to compute the interactions between colloids and fluid particles. To solve this problem, we proposed to use a new block decomposition scheme. This approach associates a colloid to a block
Acknowledgments
This work is supported by institutional grants from the LabEX SigmaLim (ANR-10-LABX-0074-01). The authors thank CALI and its team for computing facility (CALI has been financed by the region Limousin, the institutes XLIM, IPAM, GEIST and the University of Limoges). The authors also wish to thank Giulia Rossi from the Department of Physics of the University of Genoa for her help to test our code on recent GPU cards. Fig. 6 has been obtained by VMD, a molecular graphics program originally
References (39)
- et al.
Comput. Phys. Comm.
(2014) - et al.
Comput. Phys. Comm.
(2017) - et al.
Comput. Phys. Comm.
(2007) - et al.
Comput. Phys. Comm.
(2008) - et al.
J. Comput. Phys.
(2008) - et al.
SoftwareX
(2015) - et al.
J. Mol. Graph.
(1996) - et al.
J. Chem. Phys.
(1978) - et al.
J. Chem. Phys.
(1997) J. Fluid Mech.
(1994)
J. Fluid Mech.
J. Chem. Phys.
J. Chem. Phys.
Advances in Chemical Physics
Soft Matter
Phys. Rev. E
Phys. Rev. E
Europhys. Lett.
Cited by (1)
Evaluation of the influence of aggregation morphology on thermal conductivity of nanofluid by a new MPCD-MD hybrid method
2021, International Communications in Heat and Mass TransferCitation Excerpt :The interactions (i.e. momentum and energy transfer) between nanoparticles and coarse-grained fluids can be realized by a stochastic rotation transformation in a cell. This allow us to couple MPCD with MD [35,36]. The hybrid method of MPCD-MD can be employed in structure and dynamics of macromolecule [37], aggregation process of nanoparticles [38,39], shear thickening and thinning of nanofluids [40,41].