Appl. Math. Mech. -Engl. Ed.   2018, Vol. 39 Issue (1): 83-102     PDF       
http://dx.doi.org/10.1007/s10483-018-2256-8
Shanghai University
0

Article Information

G. FAURE, G. STOLTZ
Stable and accurate schemes for smoothed dissipative particle dynamics
Applied Mathematics and Mechanics (English Edition), 2018, 39(1): 83-102.
http://dx.doi.org/10.1007/s10483-018-2256-8

Article History

Received Jul. 14, 2017
Revised Oct. 21, 2017
Stable and accurate schemes for smoothed dissipative particle dynamics
G. FAURE1 , G. STOLTZ2     
1. CEA, DAM, DIF, Arpajon F-91297, France;
2. Université Paris-Est, CERMICS(ENPC), INRIA, Marne-la-Vallée F-77455, France
Abstract: Smoothed dissipative particle dynamics (SDPD) is a mesoscopic particle method that allows to select the level of resolution at which a fluid is simulated. The numerical integration of its equations of motion still suffers from the lack of numerical schemes satisfying all the desired properties such as energy conservation and stability. Similarities between SDPD and dissipative particle dynamics with energy (DPDE) conservation, which is another coarse-grained model, enable adaptation of recent numerical schemes developed for DPDE to the SDPD setting. In this article, a Metropolis step in the integration of the fluctuation/dissipation part of SDPD is introduced to improve its stability.
Key words: smoothed dissipative particle dynamics (SDPD)     numerical integration     Metropolis algorithm    
1 Introduction

The development of the computational capacities in the last decades has allowed physicists to use numerical simulations to study physical properties at the atomic scale with the help of statistical physics. In particular, molecular dynamics (MD) consists in integrating the equation of motions for the atoms in order to sample probability measures in a high dimensional space[1-3]. However, traditional microscopic methods suffer from limitations in terms of accessible time and length scales, which drives the development of mesoscopic coarse-grained methods. These mesoscopic models aim at greatly reducing the number of degrees of freedom explicitly described, and thus the computational cost, while retaining some properties absent from more macroscopic models such as hydrodynamics. Smoothed dissipative particle dynamics (SDPD)[4] belongs to this class of the mesoscopic method. It couples a particle Lagrangian discretization of the Navier-Stokes, smoothed particle hydrodynamics (SPH)[5-6], and the thermal fluctuations from models like dissipative particle dynamics with energy (DPDE) conservation[7-8]. It is thus able to deal with hydrodynamics at nanoscale and has been shown to give results consistent with MD for a wide range of resolutions, at equilibrium and for shock waves[9], or for dynamical properties such as the diffusion coefficient of a colloid in an SDPD bath[10-11]. SDPD has in particular been used to study colloids[10-12], polymer suspensions[13], and fluid mixtures[14].

One of the main challenges for mesoscopic models incorporating fluctuations is to develop efficient, stable, and parallelizable numerical schemes for the integration of their stochastic dynamics. Most schemes are based on a splitting strategy[15-16] where the Hamiltonian part is integrated through a velocity Verlet scheme[17]. A traditional and popular algorithm first proposed for dissipative particle dynamics[18] and later extended to DPDE[19] relies on a pairwise treatment of the fluctuation/dissipation part[20]. The adaptation of this scheme to dynamics preserving various invariants has led to a class of schemes called Shardlow-like splitting algorithms (SSA)[21]. A major drawback in this strategy is the complexity of its parallelization[22]. Other schemes have been recently proposed in Ref. [23] to enhance its use in parallel simulations.

All these schemes are, however, hindered by instabilities when internal energies become negative. This especially happens at low temperatures or when small heat capacities are considered, typically for small mesoparticles. It has been proposed to use Monte Carlo principles to sample the invariant measure of DPDE, by resampling the velocities along the lines of centers according to a Maxwell-Boltzmann distribution and redistributing the energy variation into internal energies according to some prescriptions[24]. However, this approach leads to dynamics which is not consistent with DPDE. It was proposed in Ref. [25] to correct discretization schemes for DPDE by rejecting unlikely or forbidden moves through a Metropolis procedure, which prevents the appearance of negative internal energies and improves the stability of the integration schemes.

There exist relatively few references in the literature about the integration of full SDPD. Most works focus on numerical schemes in the isothermal setting[26], avoiding the need to preserve the total energy during the simulation. In a previous article[9], we introduced an adaptation of the Shardlow splitting to SDPD, allowing a good control of the energy conservation. The aim of this work is to provide more details about the possible integration of SDPD in an energy conserving framework and most importantly to increase the stability for small particle sizes by adapting the metropolization procedure described in Ref. [25].

This article is organized as follows. We first present in Section 2 the equations of SDPD as reformulated in Ref. [9]. In Section 3, we recall the Shardlow splitting for SDPD and introduce a Metropolis step to enhance the stability of the algorithm. We evaluate the properties of the Shardlow and Metropolis schemes by means of numerical simulations in Section 4. Our conclusions are gathered in Section 5.

2 SDPD

At the hydrodynamic scale, dynamics of the fluid is governed by the Navier-Stokes equations as below, which reads in their Lagrangian form when the heat conduction is neglected (for the time t≥0 and the position x in a domain Ω⊂3),

(1)

In these equations, the material derivative used in the Lagrangian description is defined as

The unknowns are the density of the fluid ρ(t, x) ∈ +, its velocity v(t, x) ∈ 3, its internal energy u(t, x) ∈ , and the stress tensor σ(t, x) ∈ 3×3,

(2)

where P is the pressure of the fluid, η is the shear viscosity, ζ is the bulk viscosity, and I is the identity matrix.

In the following, we first present the SPH discretization of the Navier-Stokes equations in Subsection 2.1 before introducing the SDPD equations reformulated in terms of internal energies[9] in Subsection 2.2.

2.1 SPH

Hydrodynamics[5-6] is a Lagrangian discretization of the Navier-Stokes equations (1), where a finite number N of fluid particles play the role of interpolation nodes. These fluid particles are associated with a portion of the fluid of mass m. They are located at the position qi ∈ Ω and have a momentum pi3. The internal degrees of freedom are represented by an internal energy εi. In general, the energies are bounded below. Upon shifting the minimum of the internal energy, we may consider that the internal energies remain positive (εi>0).

2.1.1 Approximation of field variables and their gradients

A key ingredient in the SPH discretization is the use of a particle-based interpolation of the field variables. This leads to an approximation of the field variables by averaging over their values at the particle positions weighted by a smoothing kernel function W. The kernel is generally required to be non-negative, regular, normalized as and with finite support[27]. We introduce the smoothing length h defined such that W(r)=0 if |r| ≥ h. In the sequel, we use the notation r = |r|. In this work, we rely on a cubic spline[28], whose expressions read

(3)

The field variables are then approximated as

(4)

where fi denotes the value of the field f on the particle i.

The approximation of the gradient xf is obtained by deriving (4), which yields

In order to have more explicit expressions, we introduce the function F such that r W(r) = -F(|r|)r. In the case of the cubic spline (3), it reads

The gradient approximation can then be rewritten as

To simplify the notation, we define the following quantities for two particles i and j:

We can associate a density ρi and a volume to each particle as

(5)

The corresponding approximations of the density gradient evaluated at the particle points read

(6)
2.1.2 Thermodynamic closure

As in the Navier-Stokes equations, an equation of state is required to close the set of equations provided by the SPH discretization. This equation of state relates the entropy Si of the mesoparticle i with its density ρi(q) (as defined by (5)) and its internal energy εi through an entropy function,

(7)

The equation of the state can be computed by microscopic simulations or by an analytic expression modeling the material behavior. Using the partial derivatives ε and ρ of the entropy with respect to the energy and the density, it is possible to assign to each particle the temperature

the pressure

and the heat capacity at the constant volume

To simplify the notation, we omit in Subsection 2.2 the dependence of Ti, Pi, and Ci on the variables εi and q.

2.2 Equations of motion for SDPD

SDPD[4] is a top-down mesoscopic method relying on the SPH discretization of the Navier-Stokes equations with the addition of thermal fluctuations which are modeled by a stochastic force. In its energy reformulation[9], SDPD is a set of stochastic differential equations for the following variables: the positions qi∈Ω⊂3, the momenta pi3, and the energies εi for i=1, 2, ..., N.

The dynamics can be split into several elementary dynamics, the first one being conservative dynamics deriving from the pressure part of the stress tensor (2) (see Subsection 2.2.1) and a set of pairwise fluctuation and dissipation dynamics stemming from the viscous terms in (2) coupled with random fluctuations (see Subsection 2.2.2).

2.2.1 Conservative forces

The elementary force between particles i and j arising from the discretization of the pressure gradient in the Navier-Stokes momentum equation reads

(8)

In its original formulation[4], this conservative dynamics clearly appears as the Hamiltonian dynamics with a potential relating the energy with the positions and the particle entropy Si. The entropies are then invariants of this subdynamics. In the energy reformulation, the entropies are no longer considered as such. Instead, the focus is on the total energy,

which is preserved by the dynamics. This can be ensured by computing the variation of the particle volume as

leading to the variation of the internal energy given by

This allows us to write the conservative part of the dynamics as

(9)

This dynamics preserves by construction the total momentum and the total energy E(q, p, ε).

2.2.2 Fluctuation and dissipation

In order to give the expression of the viscous and fluctuating part of the dynamics, we define the relative velocity for a pair in particles i and j as

The viscous term in the Navier-Stokes equations (1) is discretized by a pairwise dissipative force, while the thermal fluctuations are modeled by a pairwise stochastic force. In the spirit of DPDE, the pairwise fluctuation and dissipation dynamics for i < j can be chosen as follows:

(10)

where Bij is a three-dimensional vector of standard Brownian motion, and Γij and Γij are 3×3 symmetric matrices. By construction, (10) preserves the total momentum in the system since dpi = -dpj. Furthermore, as in DPDE, the equations for the energy variables are determined to ensure the conservation of the total energy E(q, p, ε). As , Itȏ calculus yields the resulting equations in (10).

We consider friction and fluctuation matrices of the form,

(11)

with the projection matrices and given by

Introducing the coefficients

which are defined from the fluid viscosities η and ζ appearing in the stress tensor (2), we can choose the friction and fluctuations coefficients as

(12)

As shown in Ref. [9], this ensures that measures of the form (with g a given smooth function)

(13)

are left invariant by the elementary dynamics (10). Alternative fluctuation/dissipation relations are possible (such as constant parameters σ), but the relations (12) allow us to retrieve the original SPDP[4].

2.2.3 Complete equations of motion

By gathering all the terms, the SDPD equations of motion reformulated in the position, momentum, and internal energy variables read

(14)

with Σij and Γij given by (11) and (12). The dynamics (14) preserves the total momentum and the total energy E(q, p, ε) since all the elementary subdynamics can ensure these conservations.

2.3 Reduced units for SDPD

In SDPD, the mass m of the fluid particles allows us to change the resolution of the method. We introduce the particle size , where m0 is the mass of one microscopic particle (e.g., a molecule). Since we deal with different particle sizes in the following, it is convenient to introduce reduced units for each size K as follows:

(15)

where is the mass unit, is the length unit, is the energy unit, and ρ is the average density of the fluid. With such a set of reduced units, the time unit is

In the following, we select time steps before expressing them in terms of , where K is the particle size used in the simulations. This explains the use of non-round time steps in Section 4.

The smoothing length hK defining the cut-off radius in (3) also needs to be adapted to the size of the SDPD particles so that the approximations (4) continue to make sense. In order to keep the average number of neighbors roughly constant in the smoothing sum, hK should be rescaled as

In this work, we take h=2.5, which corresponds to a typical number of from 60 neighbors to 70 neighbors, a commonly accepted number[28].

3 Integration schemes

In the following, we describe several numerical schemes for the integration of SDPD. They all rely on a splitting strategy[15-16], where the full dynamics can be divided in simpler elementary dynamics that can be consecutively integrated. Since the conservative part of the dynamics (9) can be viewed as Hamiltonian dynamics, it is natural to resort to a symplectic scheme such as the widely used velocity-Verlet scheme[17] which ensures a good energy conservation in the long term[29-30]. This algorithm is briefly described in Subsection 3.1.

There is, however, no definite way to deal with the fluctuation/dissipation part described in Subsection 2.2.2. Due to its close similarities with DPDE, we propose in the following to adapt some schemes devoted to the integration of DPDE to the SDPD setting. One approach to integrate SDPD, described in Ref. [9], is based on the algorithm proposed by Shardlow[20] for dissipative particle dynamics and its subsequent adaptations to DPDE[19]. The dynamics can be split into a Hamiltonian part, discretized through a velocity-Verlet algorithm (16), and elementary pairwise fluctuation/dissipation dynamics that can be successively integrated. We first recall in Subsection 3.2 the SSA used in Ref. [9]. While this provides a way to integrate SDPD preserving its invariants (approximately for the energy), it suffers from stability issues especially for small particle sizes, when the internal and kinetic energies are of the same scale. We thus explore methods to improve the stability of these integration algorithms in Subsection 3.3, relying on the ideas developed in Ref. [25] where a Metropolis acceptance-rejection step is included to correct the biases of the numerical discretization of the fluctuation/dissipation part.

3.1 Integrating Hamiltonian part of dynamics

It is convenient to consider the conservative part of the dynamics (9) in its original formulation in the position, momentum, and entropy variables[4] in order to take advantage of the conservation of the entropy Si. The internal energies are related to the positions and entropies by an energy function , which allows us to write the Hamiltonian as

The dynamics of (9) can thus be recast in a Hamiltonian form as

The velocity-Verlet scheme[17] allows us to integrate such dynamics while preserving on average the Hamiltonian H. This corresponds to the following integration scheme:

(16)
3.2 SSA

We present here a first possibility for the integration of the fluctuation/dissipation dynamics introduced in Ref. [9] based on existing schemes for DPD[20] and DPDE[19]. If we neglect the dependence of Γ and Σ on εi, the elementary dynamics (10) on the momenta can be viewed as a standard Ornstein-Uhlenbeck process and solved analytically. We provided in Ref. [9] the corresponding expression for the updated momenta after a time step Δt as

(17)

where Gijn is a standard three-dimensional Gaussian variable and for

The integration of the momenta with (17) induces a variation of the kinetic energy which is then redistributed symmetrically in the internal energies as suggested in Refs. [19] and [31]. This guarantees the exact conservation of the energy during this elementary step. The new internal energies are finally given by

Thermodynamic variables like the temperatures Ti, Tj and heat capacities Ci, Cj are updated with the equation of state using the new internal energies, before turning to another pair of particles.

Let us, however, remark that the pairwise Shardlow-like algorithm is sequential by nature, and its parallelization requires a convoluted method[22]. Moreover, and maybe more importantly, there is no mechanism preventing the apparition of negative energies during the simulation. This situation happens when the fluctuations are large with respect to the internal energies, typically at low temperatures or when the particle sizes are small (so that their heat capacities are small as well). This leads to stability issues unless very small time steps are used.

3.3 Metropolized integration scheme

To avoid instabilities related to negative internal energies while keeping reasonable time steps, it has been proposed to include a Metropolis step to reject impossible or unlikely moves[25]. In the following, we show how this procedure can be used for SDPD. First, we reformulate the pairwise dynamics (10) as overdamped Langevin dynamics in the relative velocity vij variable only (see Subsection 3.3.1). We then construct proposed moves for the metropolized scheme and compute the corresponding acceptance ratio in Subsection 3.3.2. A simplified version of the metropolized scheme is introduced in Subsection 3.3.3, where the computation of the Metropolis ratio is avoided, and the rejection occurs only to avoid negative internal energies.

3.3.1 Reformulation of fluctuation and dissipation dynamics as overdamped Langevin dynamics

In order to simplify the metropolization of the integration scheme, we show that the elementary fluctuation/dissipation dynamics (10) can be described only in terms of the relative velocity vij and formulated as overdamped Langevin dynamics.

Since the dynamics (10) preserves the momentum pi+pj, the momenta pi and pj can be rewritten as a function of vij,

This has already shown how to express the momenta pi and pj in terms of vij. In addition, the kinetic energy formulated in the relative velocity reads

The conservation of the energy and the fact that dεi = dεj provide the expression of the internal energies as a function of the relative velocity,

(18)

Using this relation, the dynamics (10) can in fact be rewritten as effective dynamics on the relative velocity only,

(19)

where Γij and Σij are functions of the relative velocity through (18). We claim that the dynamics (19) can be written more explicitly as overdamped Langevin dynamics under the form of

(20)

with the diffusion matrix

and the potential

where

Let us emphasize that the reformulation (20) is the key element for the Metropolis stabilization. We now check that (20) holds. By definition,

It therefore suffices to check that

We first compute the gradient of the potential ,

Upon application of the matrix M,

The divergence of M with respect to the relative velocity reads

The desired result follows from

In view of (20), it can be immediately deduced that the following measure on the relative velocity, at fixed momenta pi, pj and fixed internal energies εi, εj, is left invariant by the overdamped Langevin dynamics (19):

(21)
3.3.2 Metropolis ratio

We consider (17) as the proposed move. In terms of the relative velocity, it reads

(22)

with

and

The momenta and internal energies can then be updated as

(23)

The internal energies Ti, Tj and heat capacities Ci, Cj are updated accordingly.

In order to decide whether we update the configuration with the proposed move or keep the current one, we first check whether εin+1 and εjn+1 are negative, in which case the proposal is rejected. Otherwise, we compute a Metropolis ratio that is an acceptance probability. The probability to accept the proposed move from v to v' is min(1, AΔt(v, v')) with

where TΔt is the transition kernel associated with the proposal. In the following, we omit all the dependence on the position qn, which remains constant in this subdynamics, to simplify the notation.

The probability that (22) proposes v' starting from v is given by

with the inverse matrix and the determinant . For the direct move, the transition probability simply reads

while for the reverse move,

Use (21) with the reference taken at the iteration n,

Finally, the acceptance ratio is given by

(24)

with

Starting from a configuration (pin, pjn, εin, εjn), the overall algorithm (exact Metropolis scheme (EMS)) to integrate the fluctuation/dissipation for a pair of particles (i, j) is organized as follows:

(ⅰ) Compute a proposed move for vijn+1 with (22).

(ⅱ) If the following energy bound does not hold:

(25)

the move will be rejected, that is, (pin+1, pjn+1, εin+1, εjn+1)=(pin, pjn, εin, εjn).

If the bound is satisfied, the algorithm continues.

(ⅲ) Compute the acceptance ratio with (24).

(ⅳ) Draw Uijn ~ [0, 1] and compare it with AΔt(vijn, vijn+1). If Uijn > AΔt(vijn, vijn+1), the move will be rejected, and (pin+1, pjn+1, εin+1, εjn+1)=(pin, pjn, εin, εjn).

Otherwise, it is accepted, and the momenta and internal energies are updated with (23), along with the internal temperatures Ti, Tj and heat capacities Ci, Cj.

3.3.3 Approximate metropolized scheme (AMS)

Since the computation of the Metropolis ratio may be cumbersome in practical simulations, we propose a simplified and approximate scheme where we only reject moves that cause internal energies to become negative. It avoids the need to actually compute the Metropolis acceptance ratio.

As for the complete metropolized scheme, we use the expression (22) as the proposed evolution for the relative velocities. We then check whether the updated internal energies remain positive and reject the moves that do not satisfy this property. The current configuration at the time is then used as the new configuration and counted as usual in the averages. Otherwise the move is accepted, and the velocities and internal energies, along with the internal temperatures and heat capacities, are updated accordingly. When no stability issues, i.e., negative internal energies, appear, the AMS is equivalent to SSA.

4 Numerical results

In the following, we test the accuracy of our schemes for the ideal gas equation of state given by

(26)

The interest of this model is that the marginal distribution for the internal energies εi has an analytic expression,

(27)

where is the heat capacity in the equation of state (26), and Γ is the gamma function. This distribution is plotted in Fig. 1 for various particle sizes. As the size K decreases, very small internal energies become more likely, and stability issues arise.

Fig. 1 Distribution of internal energies (in units of KkBT) with ideal gas equation of state

Our simulations have been carried out on a three-dimensional system of 1 000 particles initialized on a simple cubic lattice with an initial temperature T =1 000 K. The internal energies are chosen so that Ti(εi, ρi(q)) = T with the density ρi(q) evaluated from the initial distribution of the positions; while the velocities are distributed along the Boltzmann distribution. We let the system equilibrate during the time τtherm = 50 to obtain an equilibrated initial configuration. The shear viscosity is set to η=2×10-3 Pa·s, and the bulk viscosity ζ is neglected.

4.1 Integrating fluctuation/dissipation dynamics

We first investigate the properties of the integration schemes for the fluctuation/dissipation part only and do not couple the SSA and the metropolized schemes with velocity Verlet. While the SSA is quite stable for large particles (K>10), for which time steps as large as Δt = 5 can be used with no occurrence of a negative internal energy during the simulation time τsim, stability issues arise for smaller particles. At K=5, we need a time step Δt < 0.025 to avoid the appearance of negative internal energies with the SSA. As a comparison, the stability limit for the Verlet scheme at K=5 is Δt = 0.8. As the particle size decreases further, it becomes impossible to run simulations, and no admissible time step has been found for K=2. With the rejection of moves provoking negative energies, the metropolized schemes are stable at any time step for every particle sizes.

When they are not coupled to the velocity Verlet scheme, the SSA and metropolized schemes preserve exactly the energy by construction. We can, however, compare the bias in the distributions of internal energies for the different schemes. Figure 2 shows the distributions of internal energy for the exact and approximate metropolized approaches using the ideal gas equation of state (26) with K=5 obtained with the simulation time τsim=20 000. The results are compared with the analytic distribution (27). In practice, the distribution νΔt obtained from the numerical simulations is approximated using histograms computed on 50 configurations extracted at regular time intervals from the simulations. This ensures a constant number of sampling points for all time steps. The histograms consist in Nbins=150 bins uniformly distributed between εmin = 0.1kBT and εmax = 20kBT. A more quantitative measurement of the bias is to evaluate the quadratic error with respect to the theoretical distribution,

Fig. 2 Comparisons of internal energy distributions with ideal gas equation of state for EMS and AMS for Δt =1 in (a) and with error (28) with respect to time step in (b)
(28)

Due to the Metropolis procedure, the only source of error for the exact metropolized scheme (EMS) is of statistical nature. This is not guaranteed for the AMS but no systematic bias is apparent up to Δt = 5. The agreement with the theoretical distribution is a bit deteriorated when the full acceptance ratio is not computed, and the AMS displays a 30% larger error compared with the EMS.

We also observe the scaling of the rejection rate with the time step in Fig. 3. The metropolized scheme displays rejection rates between 0.1% and 0.2% for time steps between Δt = 1 and Δt = 5. For our system size (1 000 particles), it means that, on average, several fluctuation/dissipation interactions are rejected each time step. Most of these rejections are due to the Metropolis ratio and not to the appearance of negative internal energies which accounts for approximately one rejection every thousand. When we only reject forbidden moves that would cause negative energies, the rejection rate of the AMS is between 0.005% and 0.01%, which is about 20 times smaller than the overall rejection rate of the EMS. This is however two orders of magnitude larger than the occurrence of negative internal energies with the EMS. By rejecting authorized but unlikely moves (leading to small energies for instance), the EMS is less prompt to the appearance of negative internal energies. A linear fit in log scale shows that the total rejection rates for both the EMS and AMS are Δt0.42. The rejection of negative energies with the EMS roughly follows the same scaling with Δt0.5.

Fig. 3 Rejection rates for (a) EMS, (b) EMS due to negative internal energies, and (c) AMS
4.2 Integrating full SDPD

We now turn to the numerical integration of the full dynamics and study the behavior of the full schemes coupling the velocity Verlet scheme for the integration of the conservative part of the dynamics and either SSA or its metropolized versions for the fluctuation/dissipation dynamics.

To evaluate the energy conservation and the scheme stability, we run nsim=10 independent simulation with K=5 during the time τsim=1 000 for each time step Δt and average the results. The schemes obtained by superimposing (16) and either SSA or the metropolized scheme lead to linear energy drifts which have already been observed in DPDE[21, 23] and in SDPD[9]. This is illustrated in Fig. 4 where the total energy with respect to the time is displayed for different time steps in the case of the metropolized scheme. We characterize the energy drift by fitting the time evolution of the energy on a linear function and plot the resulting slope in Fig. 5 for the SSA, Metropolis and its approximate version. We observe a similar energy drift for all methods. As in the integration of the fluctuation/dissipation only, the SSA is limited to small time steps to prevent stability issues to arise while the metropolized schemes greatly increase the admissible time steps. However, the time steps for which the dynamics is stable are much smaller with the full dynamics than those reported in Subsection 4.1. Although the conservative interactions are bounded in SDPD unlike the DPDE simulations in Ref. [25], they still induce a stringent stability limit on the time steps. This observation leads us to consider the multiple time step (MTS) implementations where the fluctuation/dissipation is integrated with a larger time step. We introduce the time step ΔtVV used to integrate the conservative part with the velocity Verlet scheme and ΔtFD = θΔtVV used for the discretization of the fluctuation/dissipation with a metropolized scheme (EMS or AMS). We test this approach with θ= 5 and θ= 10. The algorithm then reads as follows:

Fig. 4 Time evolution of total energy with metropolized algorithm for different time steps, where linear drift in energy is observed as usual in such methods
Fig. 5 Slope of energy drift with respect to time step for two metropolized schemes (EMS and AMS)

(ⅰ) θ consecutive steps of velocity Verlet with ΔttVV.

(ⅱ) One step of EMS or AMS with Δt = θΔtVV.

We plot in Fig. 6 the slope of the energy drift compared with their single time step (STS) version (with the time step Δt = ΔtVV). For both EMS and AMS, the energy drift rate is smaller for the MTS approach when the time step is large enough. Moreover, the reduction of the energy drift is enhanced for larger θ with a division by 6 of the rate for θ= 10 and Δt = 0.392 when it is only halved for θ= 5.

Fig. 6 Ratio between slope of energy drift for MTS (EMS and AMS) and their STS versions (with Δt = ΔtVV)

We measure the time per iteration and per particle for the different Metropolis schemes with Δt=2.24×10-2 or ΔtVV=2.24×10-2 and gather them in Table 1. For the MTS algorithms, the number of iteration is the number of Verlet steps (which is thus the same with that in the STS case). The integration of the fluctuation/dissipation dynamics with the SSA represents a quarter of the total computational time. The integration of the fluctuation/dissipation part with the EMS is about twice as long since we need to compute the reverse move and estimate the Metropolis ratio. This results in an overall increase by 30% of the total simulation time. However, much larger time steps can be chosen with the EMS while the SSA suffers from stringent stability limitations. There is almost no overhead when resorting to the AMS which also greatly improves the stability and is as good as the EMS in terms of energy conservation. With the MTS strategy, the time needed for the fluctuation/dissipation is greatly reduced, as expected, by a factor θ.

Table 1 Comparison of computation time per iteration per particle for Shardlow-like algorithm and Metropolis schemes. For MTS implementations, θ= 5, and time for velocity Verlet algorithm only is given as reference
4.3 Simulation of nonequilibrium systems

While all the previous simulations were carried out in an equilibrium situation, the metro-polization procedure we propose is also suited for nonequilibrium settings. In particular, SDPD has been applied to model shock waves[9]. Stability is a crucial issue for these phenomena since they involve dramatic changes in the thermodynamic states of the material. We thus illustrate the enhanced stability of the metropolized schemes in nonequilibrium situations by simulating a shock wave. The system is initialized as previously mentioned but with N=23 400 particles organized on 10 ×10 ×234 lattices with periodic boundary conditions in the x-and y-directions. In the z-direction, two walls are located at each end of the system and formed of "virtual" SDPD particles as described in Refs. [9] and [12]. These virtual particles interact with the real SDPD particles through the conservative forces (8) and a repulsive Lennard-Jones potential that ensures the impermeability of the walls. After the system equilibration during τtherm = 50, the lower wall is given a constant velocity vP = 1 661 m/s in the z-direction.

To obtain the profiles of physical properties at the given time, the simulation box is divided into nsl=100 slices regularly distributed along the z-axis in which the physical properties are averaged. Since a shock wave is a stationary process in the reference frame of the shock front, we can average profiles over the time after shifting the position of the shock front to z=0. We plot in Fig. 7 the density profile for the metropolized schemes (EMS and AMS) with Δt = 0.045. This choice is governed by the piston velocity vP and ensures that the piston does not move by more than 20% of the characteristic distance between two particles. This avoids instabilities in the conservative part of the dynamics. The Rankine-Hugoniot (RH) relations make use of the conservation of mass, momentum, and energy to predict the thermodynamic properties in the shocked state from the initial thermodynamic conditions and the velocity of the particles in the shocked region. The properties estimated from the SDPD simulations, namely, the velocity of the shock wave vS, the density ρS, the pressure PS, and the temperature TS in the shocked state, all agree very well with the theoretical predictions as seen in Table 2. Let us point out that this simulation would not have been possible with the SSA since negative internal energies appear very early in the simulation even for time steps as small as Δt = 10-4. The metropolization procedure can thus be particularly useful in nonequilibrium simulations where stability issues are aggravated.

Fig. 7 Density profile in reference frame of shock front for EMS and AMS
Table 2 Average observables in shocked state, SDPD compared with RH predictions
5 Conclusions

In this work, we have introduced a Metropolis procedure for the integration of the fluctuation/dissipation part in SDPD. This adaptation of the metropolized schemes for DPDE has led to a significant increase in the stability of the dynamics for small particle sizes. This allows us to carry out simulations that traditional schemes could not achieve due to the very stringent limitation on the time step they must respect. It appears that an approximate version of the Metropolis step where only the negative internal energies are rejected is actually enough to ensure the stability of the algorithm and does not display a larger bias or energy drift than its exact version.

With the addition of the Metropolis step, the integration of the fluctuation/dissipation is stable for very large time steps, and the limit on the admissible time steps emerges from the conservative part. An MTS approach has been tested where a smaller time step was used for velocity Verlet and a larger one for the metropolized SSA scheme. This resulted in a similar energy drift at a reduced computational cost.

The relevance of the metropolization in nonequilibrium situations has been illustrated by the simulation of a shock wave. While traditional schemes such as the SSA fail to perform the simulation for small particles, due to the aggravated stability issues, both EMS and AMS have allowed us to recover the correct physical properties of the shock wave.

Our Metropolis schemes still suffer from the difficult parallelization of the SSA on which they are based. It would be most beneficial to adapt a stabilization procedure based on rejecting moves leading to negative energies to parallel schemes[22-23] in order to deal with larger systems.

Acknowledgements We thank J. B. MAILLET for helpful discussion.
References
[1] Frenkel, D. and Smit, B. Understanding Molecular Simulation:From Algorithms to Applications, Academic Press, New York (2001)
[2] Tuckerman, M. Statistical Mechanics:Theory and Molecular Simulation, Oxford University Press, Oxford (2010)
[3] Leimkuhler, B. and Matthews, C. Molecular Dynamics:With Deterministic and Stochastic Numerical Methods, Springer, New York (2015)
[4] Español, P. and Revenga, M. Smoothed dissipative particle dynamics. Physical Review E, 67, 026705 (2003) doi:10.1103/PhysRevE.67.026705
[5] Lucy, L. B. A numerical approach to the testing of the fission hypothesis. Astronomical Journal, 82, 1013-1024 (1977) doi:10.1086/112164
[6] Gingold, R. A. and Monaghan, J. J. Smoothed particle hydrodynamics-theory and application to non-spherical stars. Monthly Notices of the Royal Astronomical Society, 181, 375-389 (1977) doi:10.1093/mnras/181.3.375
[7] Avalos, J. B. and Mackie, A. D. Dissipative particle dynamics with energy conservation. Europhysics Letters, 40, 141-146 (1997) doi:10.1209/epl/i1997-00436-6
[8] Español, P. Dissipative particle dynamics with energy conservation. Europhysics Letters, 40, 631-636 (1997) doi:10.1209/epl/i1997-00515-8
[9] Faure, G., Maillet, J. B., Roussel, J., and Stoltz, G. Size consistency in smoothed dissipative particle dynamics. Physical Review E, 94, 043305 (2016) doi:10.1103/PhysRevE.94.043305
[10] Vázquez-Quesada, A., Ellero, M., and Español, P. Consistent scaling of thermal fluctuations in smoothed dissipative particle dynamics. Journal of Chemical Physics, 130, 034901 (2009) doi:10.1063/1.3050100
[11] Litvinov, S., Ellero, M., Hu, X., and Adams, N. A. Self-diffusion coefficient in smoothed dissipative particle dynamics. Journal of Chemical Physics, 130, 021101 (2009) doi:10.1063/1.3058437
[12] Bian, X., Litvinov, S., Qian, R., Ellero, M., and Adams, N. A. Multiscale modeling of particle in suspension with smoothed dissipative particle dynamics. Physics of Fluids, 24, 012002 (2012) doi:10.1063/1.3676244
[13] Litvinov, S., Ellero, M., Hu, X., and Adams, N. A. Smoothed dissipative particle dynamics model for polymer molecules in suspension. Physical Review E, 77, 066703 (2008) doi:10.1103/PhysRevE.77.066703
[14] Petsev, N. D., Leal, L. G., and Shell, M. S. Multiscale simulation of ideal mixtures using smoothed dissipative particle dynamics. Journal of Chemical Physics, 144, 084115 (2016) doi:10.1063/1.4942499
[15] Trotter, H. F. On the product of semi-groups of operators. Proceedings of the American Mathematical Society, 10, 545-551 (1959) doi:10.1090/S0002-9939-1959-0108732-6
[16] Strang, G. On the construction and comparison of difference schemes. SIAM Journal on Numerical Analysis, 5, 506-517 (1968) doi:10.1137/0705041
[17] Verlet, L. Computer "experiments" on classical fluids I:thermodynamical properties of LennardJones molecules. Physical Review, 159, 98-103 (1967) doi:10.1103/PhysRev.159.98
[18] Hoogerbrugge, P. J. and Koelman, J. M. V. A. Simulating microscopic hydrodynamic phenomena with dissipative particle dynamics. Europhysics Letters, 19, 155-160 (1992) doi:10.1209/0295-5075/19/3/001
[19] Stoltz, G. A reduced model for shock and detonation waves Ⅰ:the inert case. Europhysics Letters, 76, 849-855 (2006) doi:10.1209/epl/i2006-10350-y
[20] Shardlow, T. Splitting for dissipative particle dynamics. SIAM Journal on Scientific Computing, 24, 1267-1282 (2003) doi:10.1137/S1064827501392879
[21] Lísal, M., Brennan, J. K., and Avalos, J. B. Dissipative particle dynamics at isothermal, isobaric, isoenergetic, and isoenthalpic conditions using Shardlow-like splitting algorithms. Journal of Chemical Physics, 135, 204105 (2011) doi:10.1063/1.3660209
[22] Larentzos, J. P., Brennan, J. K., Moore, J. D., Lísal, M., and Mattson, W. D. Parallel implementation of isothermal and isoenergetic dissipative particle dynamics using Shardlow-like splitting algorithms. Computer Physics Communications, 185, 1987-1998 (2014) doi:10.1016/j.cpc.2014.03.029
[23] Homman, A. A., Maillet, J. B., Roussel, J., and Stoltz, G. New parallelizable schemes for integrating the dissipative particle dynamics with energy conservation. Journal of Chemical Physics, 144, 024112 (2016) doi:10.1063/1.4937797
[24] Langenberg, M. and Müller, M. eMC:a Monte Carlo scheme with energy conservation. Europhysics Letters, 114, 20001 (2016) doi:10.1209/0295-5075/114/20001
[25] Stoltz, G. Stable schemes for dissipative particle dynamics with conserved energy. Journal of Computational Physics, 340, 451-469 (2017) doi:10.1016/j.jcp.2017.03.059
[26] Litvinov, S., Ellero, M., Hu, X., and Adams, N. A splitting scheme for highly dissipative smoothed particle dynamics. Journal of Computational Physics, 229, 5457-5464 (2010) doi:10.1016/j.jcp.2010.03.040
[27] Liu, G. R. and Liu, M. B. Smoothed Particle Hydrodynamics, a Meshfree Particle Method, World Scientific Publishing, Singapore (2003)
[28] Liu, M., Liu, G., and Lam, K. Constructing smoothing functions in smoothed particle hydrodynamics with applications. Journal of Computational and Applied Mathematics, 155, 263-284 (2003) doi:10.1016/S0377-0427(02)00869-5
[29] Hairer, E., Lubich, C., and Wanner, G. Geometric numerical integration illustrated by the StörmerVerlet method. Acta Numerica, 12, 399-450 (2003) doi:10.1017/S0962492902000144
[30] Hairer, E., Lubich, C., and Wanner, G. Geometric Numerical Integration:Structure-Preserving Algorithms for Ordinary Differential Equations, Springer, New York (2002)
[31] Marsh, C. Theoretical Aspects of Dissipative Particle Dynamics, Ph. D. dissertation, University of Oxford, Oxford (1998)