betaFeedback

WorksPhysics and Astronomy

Study of arbitrarily low shear rate rheology using dissipative particle dynamics

Abstract

The use of dissipative particle dynamics (DPD) simulation to study the rheology of fluids under shear has always been of great interest to the research community. Despite being a powerful tool, a limitation of DPD is the need to use high shear rates to obtain viscosity results with a sufficiently high signal-to-noise ratio (SNR). This often leads to simulations with unrealistically large deformations that do not reflect typical stress conditions on the fluid. In this work, the transient time correlation function (TTCF) technique is used for a simple Newtonian DPD fluid to achieve high SNR results even at arbitrarily low shear rates. The applicability of the TTCF on DPD systems is assessed, and the modifications required by the nature of the DPD force field are discussed. The results showed that the standard error (SE) of viscosity values obtained with TTCF is consistently lower than that of the classic averaging procedure across all tested shear rates. Moreover, the SE resulted proportional to the shear rate, leading to a constant SNR that does not decrease at lower shear rates. Additionally, the effect of trajectory mapping on DPD is studied, and a TTCF approach that does not require mappings is consolidated. Remarkably, the absence of mappings has not reduced the precision of the method compared with the more common mapped approach.

Introduction

The study of the rheology of fluids has always been a topic of interest both for industrial applications and for theoretical understanding. Almost all industrial processes involve flowing fluids, many of which have a complex rheology, which depends on multiple factors, such as temperature, shear rate, and composition. Deeper knowledge of the relationship between these variables and the viscosity of the fluid is highly beneficial for process design and optimization. At the same time, this knowledge can help the theoretical understanding behind the stress response of the fluids, which is largely dependent on phenomena occurring at smaller scales than the macroscopic one. The popularity of modeling and atomistic simulations has therefore increased over time, driven by the desire to link the microscopic picture and the macroscale rheological behavior of fluids.

Among the many microscopic methods, dissipative particle dynamics (DPD) has attracted attention due to its coarse-grained description of molecules. This approach reduces the computational resources needed to simulate a system, with respect to a full atomistic description, by simplifying only partially the chemical specificity of the model. DPD has proven to be an effective technique for simulating complex fluids such as polymer solutions,[1, 2] interfacial systems,[3, 4] and surfactant solutions in water.[5, 6] The results achieved for the equilibrium structural properties by previous works[7, 8] increased interest in the use of the technique to predict the transport properties of fluids.

Since DPD preserves hydrodynamics, its ability to predict transport properties has been a focus since its initial use in studies.[9] Over the years, the transport properties of DPD fluids have been investigated from both theoretical[10] and computational points of view. Recently, the rheology of simple DPD fluids has been studied using equilibrium and non-equilibrium methods.[11, 12, 13]

The Green-Kubo[14, 15] and Einstein-Helfand[16] relations are used to estimate the zero shear viscosity, and versions specifically modified for DPD have been proposed for the first[17, 18] and the second[19] methods. When studying the rheology of many realistic fluids, it is more interesting to analyze the shear-dependent behavior, which requires a non-equilibrium method. This is the case of complex fluids, whose rheology has been explored by different works[1, 20, 21, 22] with satisfactory results, while still exhibiting some limitations. Moreover, these works show that the viscosity at low shear rates is highly uncertain,[11, 21, 22] requiring the use of high shear rates. It is also documented that high shear rates can cause unexpected results, such as shear thickening in simple fluids,[1, 11] or the disruption of microstructures in complex fluids.[21]

Being a coarse-grained model, DPD is based on a set of reduced units of measurement and requires conversion factors to recover values in meaningful physical units. The derivation of conversion factors is well established for equilibrium simulations,[12] and depends on the characteristics of the system. However, using the same approach in non-equilibrium simulations could produce non-physical results, e.g. unrealistically high shear rates.[1] Consequently, the application of high shear rates to DPD simulations often requires the development of ad hoc conversion factors,[22] which are not always related to the characteristics of the system.

As with DPD, molecular dynamics (MD) simulations also require high shear rates to obtain a sufficiently high signal-to-noise ratio (SNR).[23, 24] Converted to real units, these shear rates are many orders of magnitude higher than those that can be applied experimentally. To tackle this issue, the transient-time correlation function (TTCF) formalism[25, 26] has been applied to MD simulations to improve the signal-to-noise ratio. TTCF is a non-linear generalization of the Green-Kubo formula, [14, 15] which is based on the evaluation of the transient response of a system after the imposition of an external field. Systems under many types of different external fields have been studied, with the common denominator of using external fields of strength that can be compared with experimental conditions. For tribological applications, the behavior of monoatomic [27, 28, 29] and molecular fluids [30] between sliding solid surfaces has been investigated. The TTCF method is not limited to simple shear, and the condition of elongational flow [31] and mixed flows [32] have been studied. Consequently, the method is suitable for the study of the rheology of monoatomic fluids, [33, 34, 35, 36] liquid metals, [37, 38] as well as molecular fluids. [39, 40]

In this work, the applicability of the TTCF formalism to a DPD system is investigated to show the adaptations required by the peculiarities of the DPD force field. The objective is to standardize the use of TTCF for studying the shear-dependent rheology of DPD fluids under the of simple shear flow. The results presented in this work refer to a simple DPD fluid to demonstrate the effectiveness of the method in a controlled Newtonian case. The main advantage of using TTCF is the possibility to simulate the fluid system at very low shear rates, while retaining a high signal-to-noise ratio. In this way, it will be possible to link the DPD conversion factors to the characteristics of the system and to obtain results that can be compared with experimental data. A successful method for simulating low shear rates is expected to yield more insightful results when applied to complex fluids. In such systems, a weaker external field is expected to produce a more realistic deformation of the microstructures.

The paper is organized as follows: the systems studied and the methods used are described in § 2, together with the modifications implemented to the TTCF approach and the computational details, while in § 3 the results obtained from the simulations are presented and discussed. Eventually, the conclusions of this work are illustrated § 4.

Methods and computational details

Studied systems

The present work focuses on the application of TTCF to Dissipative Particle Dynamics (DPD), with a Lennard-Jones (LJ) fluid used as a benchmark. Since the DPD model requires some modification to the standard TTCF approach (see § 2.3.1), the LJ fluid, which has been extensively studied, is used to test the correctness of the implementation and eliminate potential coding errors.

Lennard-Jones model

A truncated and shifted Lennard-Jones potential is used to model the fluid, resulting in a Weeks-Chandler-Anderson (WCA) potential:[41]

ϕ(rij)={4ε[(σrij)12−(σrij)6]+ϕc,if rij≤rc0,if rij>rc(1)\phi(r_{ij}) = \begin{cases} 4\varepsilon\left[\left(\frac{\sigma}{r_{ij}}\right)^{12}-\left(\frac{\sigma}{r_{ij}}\right)^6\right]+\phi_c, & \text{if } r_{ij}\le r_c \\ 0, & \text{if } r_{ij}>r_c \end{cases} \tag*{(1)}

where rijr_{ij} is the distance between particles ii and jj, σ\sigma is the particle diameter, ε\varepsilon is the potential well, and rcr_c is the cutoff radius. The potential is truncated at rc=21/6σr_c = 2^{1/6}\sigma, and ϕc\phi_c is the constant that shifts the potential to ensure the continuity of the function at the cutoff radius. To maintain consistency with previous works,[35, 42] the system is studied at the Lennard-Jones triple point, with a reduced density ρ∗=ρσ3=0.8442\rho^* = \rho\sigma^3 = 0.8442 and a reduced temperature T∗=kBT/ε=0.722T^* = k_B T/\varepsilon= 0.722, with kBk_B being the Boltzmann constant. Proceeding in this way, the results can be compared with those obtained by previous works, and the implementation can be tested against a well-known system.

DPD simple fluid model

Dissipative Particle Dynamics is a computational method that relies on a coarse-grained description of the molecules, which are grouped in larger particles, called beads. After its first introduction by Koelman and Hoogerbrugge, it was further developed by Groot and Warren, while Español and Warren studied its formalization from a statistical mechanics point of view. The coarse-graining (CG) approach allows mesoscopic systems to be studied, enlarges the available spatial and temporal scales, and requires fewer computational resources than all-atom molecular dynamics (MD). According to the standard DPD model, two beads ii and jj interact through three pairwise forces, the conservative force FijC\mathbf{F}_{ij}^{C}, the dissipative force FijD\mathbf{F}_{ij}^{D}, and the random force FijR\mathbf{F}_{ij}^{R}. The conservative force is a soft repulsive force that allows the beads to overlap and has the following functional form:

FijC={aij(1−rijrc)r^ij,rij≤rc0,rij>rc(2)\mathbf{F}_{ij}^{C} = \begin{cases} a_{ij}\left(1-\frac{r_{ij}}{r_c}\right)\hat{\mathbf{r}}_{ij}, & r_{ij}\le r_c \\ 0, & r_{ij}>r_c \end{cases} \tag*{(2)}

where aija_{ij} is the repulsion parameter, which depends on the type of beads, rij=∣rij∣=∣ri−rj∣r_{ij} = |\mathbf{r}_{ij}| = |\mathbf{r}_i-\mathbf{r}_j| is the distance between the beads, r^ij=rij/rij\hat{\mathbf{r}}_{ij} = \mathbf{r}_{ij}/r_{ij} is the unit vector pointing from bead jj to bead ii, and rcr_c is the cutoff radius. The dissipative and random forces are instead defined as:

FijD=−γwD(rij)(rij⋅vij)r^ij(3)\mathbf{F}_{ij}^{D}=-\gamma w^{D}(r_{ij})(\mathbf{r}_{ij}\cdot\mathbf{v}_{ij})\hat{\mathbf{r}}_{ij} \tag*{(3)}
FijR=σwR(rij)ξijΔtr^ij(4)\mathbf{F}_{ij}^{R}=\sigma w^{R}(r_{ij})\frac{\xi_{ij}}{\sqrt{\Delta t}}\hat{\mathbf{r}}_{ij} \tag*{(4)}

where wD(rij)w^{D}(r_{ij}) and wR(rij)w^{R}(r_{ij}) are their respective weight functions, vij=vi−vj\mathbf{v}_{ij}=\mathbf{v}_i-\mathbf{v}_j is the relative velocity between the two beads, and ξij\xi_{ij} is a random number drawn from a Gaussian distribution with zero mean and unit variance. The dissipative force causes a decrease of the energy in the system, which is restored by the random force. Consequently, these two forces can act as a thermostat and Español and Warren described the relative magnitude required for these forces to respect the fluctuation-dissipation theorem. The dissipative parameter γ\gamma and the random parameter σ\sigma must be related to each other using the following equation

σ2=2γkBT,(5)\sigma^2 = 2\gamma k_B T, \tag*{(5)}

where kBk_B is the Boltzmann constant and TT is the temperature of the system. In addition to this, the following relation between the weight functions must be enforced:

wD(rij)=[wR(rij)]2.(6)w^D(r_{ij}) = [w^R(r_{ij})]^2. \tag*{(6)}

Under these conditions, the energy in the system is conserved and the correct temperature is ensured, as in an NVT ensemble. In this work, as is common in the literature, the weight for the random force was chosen equal to the functional form of the conservative force, hence:

wD(rij)=[wR(rij)]2={(1−rijrc)2,rij≤rc0,rij>rc(7)w^D(r_{ij}) = [w^R(r_{ij})]^2 = \begin{cases} \left(1-\dfrac{r_{ij}}{r_c}\right)^2, & r_{ij} \leq r_c \\ 0, & r_{ij} > r_c \end{cases} \tag*{(7)}

The values of the parameters of the DPD forces used in this work are reported in Table 1, together with the number density of beads ρ\rho, the temperature TT, the Boltzmann constant kBk_B, and the mass of the beads mm. These values are consistent with those adopted in the seminal works on DPD. [9, 44]

aaγ\gammaσ\sigmarcr_cρ\rhoTTkBk_Bmm
25.04.53.01.03.01.01.01.0

Table 1. Parameters used for the DPD simple fluid model. All the parameters are expressed in reduced DPD units.

Non-equilibrium simulations

In atomistic simulations, the shear rheology of a fluid is usually evaluated through non-equilibrium simulations using Lees-Edwards boundary conditions (LEBC). [45] With this approach, a linear velocity profile is generated and maintained in the simulation box due to the periodicity of the boundary conditions. The method was developed for molecular dynamics simulations, but has been applied to DPD in previous works. [1, 11, 21] All simulations in this work were performed using the open-source software LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator), [46] where LEBC are not implemented in their original formulation. The alternative approach uses lagrangian rhomboid boundary conditions (LRBC) and is based on the actual deformation of the box in LAMMPS, applied with the fix deform command. From a theoretical point of view, LEBC and LRBC are equivalent, provided that the velocity profile is taken into account in the periodicity of the boundary conditions. [23] The use of these boundary conditions is sufficient to generate a linear velocity profile, and it is referred to as the boundary-driven approach. Nevertheless, in addition to the lagrangian rhomboid boundary conditions, the SLLOD equations of motion (EoM) are used. For a planar shear flow applied in the xyxy plane and a velocity profile in the xx direction, the SLLOD EoM reduce to the following form.[23]

r˙i=pimi+γ˙yii\dot{r}_i = \frac{p_i}{m_i} + \dot{\gamma} y_i \mathbf{i}

{#eq:8}

p˙i=∑ifi−γ˙pyii,\dot{p}_i = \sum_i f_i - \dot{\gamma} p_{y_i} \mathbf{i},

where the dot superscript indicates a time derivative, except for γ˙\dot{\gamma} that is the shear rate, i\mathbf{i} is the unit vector in the xx direction, ∑ifi\sum_i f_i is the sum of the forces acting on the bead ii, rir_i is the position vector, pip_i the momentum, and mim_i the mass of the bead ii. The use of SLLOD has important advantages with respect to the boundary-driven approach. It provides a direct link with response theory and the possibility of studying time-dependent flows.[23, 25]

In LAMMPS, the SLLOD equations of motion are implemented together with the Nosé-Hoover thermostat:[42]

r˙i=pimi+γ˙yii\dot{r}_i = \frac{p_i}{m_i} + \dot{\gamma} y_i \mathbf{i}
p˙i=∑ifi−γ˙pyii−αpi\dot{p}_i = \sum_i f_i - \dot{\gamma} p_{y_i} \mathbf{i} - \alpha p_i

{#eq:9}

α˙=1Q(∑ipi2−3NkBT),\dot{\alpha} = \frac{1}{Q}\left(\sum_i p_i^2 - 3N k_B T\right),

where α\alpha is the multiplier of the Nosé-Hoover thermostat, QQ is the damping parameter, and NN is the number of particles in the system. While the presence of a thermostat is necessary for a Lennard-Jones model in order to obtain an NVT ensemble, it is not needed for DPD simulations. As previously described, the dissipative and random forces of the DPD model act as a built-in thermostat. A potential interaction between the DPD and the Nosé-Hoover thermostat is not trivial to evaluate and could lead to incorrect results. Moreover, integrating the additional equation of motion for the thermostat multiplier increases the computational cost of the simulations. To avoid these issues, it is preferable to deactivate the Nosé-Hoover thermostat while performing DPD simulations. A quick fix for this purpose is to set the tdamp parameter in LAMMPS to a huge value, e.g. 103010^{30}. The parameter tdamp is related to the relaxation time of the temperature, so the thermostat becomes more aggressive when this value becomes smaller. By setting it to a very large value, the relaxation time is larger than the length of the simulation, effectively deactivating the thermostat.

The alternative pursued in this work is to modify the LAMMPS source code to create a new fix that applies the SLLOD equations of motion without the thermostat. The new fix is called nve/sllod and it is available at the following repository link: https://github.com/f2a-dr/sllod_nve. It is important to emphasize that, despite the name of the fix, when it is used together with a DPD model, the resulting ensemble is an NVT.

After the system setup, during a non-equilibrium simulation, it is possible to calculate the apparent viscosity μ\mu of the fluid using Newton’s law of viscosity:

μ=−⟨Pyx⟩γ˙(8)\mu= -\frac{\langle P_{yx} \rangle}{\dot{\gamma}} \tag*{(8)}

where the shear rate γ˙\dot{\gamma} is an input parameter of the simulation, proportional to streaming velocity and the deformation of the box, and PyxP_{yx} is the shear pressure. In this case, the off-diagonal term of the pressure tensor of interest is PyxP_{yx} because the gradient of the xx-component of the velocity is non-zero along the yy direction. The elements of pressure tensor are evaluated using the Virial [47] formula:

Pαβ=1V∑i=1N[mivi,αvi,β+12∑j≠iNrij,αFij,β](9)P_{\alpha\beta} = \frac{1}{V} \sum_{i=1}^{N} \left[ m_i v_{i,\alpha} v_{i,\beta} + \frac{1}{2} \sum_{j \ne i}^{N} r_{ij,\alpha} F_{ij,\beta} \right] \tag*{(9)}

where VV is the volume of the simulation box, the subscripts α\alpha and β\beta refer to the Cartesian components, and the subscripts ii and jj refer to different beads. As reported in Equation (8), we are interested in the off-diagonal component PyxP_{yx}, but, in LAMMPS (version 29Aug2024), the pressure tensor is evaluated considering it as always symmetric, hence Pyx=PxyP_{yx} = P_{xy}.

As previously mentioned, identifying appropriate conversion factors is crucial for translating the results of DPD simulations into meaningful physical units of measurement. For systems in equilibrium, these factors can be directly calculated from the characteristics of the fluid modeled. Hence, if a single DPD bead represents a water molecule, a conversion factor for the length can be calculated from the approximate volume of the molecule (i.e. ≈30 A˚3\approx30\ \text{Å}^{3}). This value can be associated with the sphere of radius equal to the cutoff radius rcr_c, resulting in a length conversion factor on the order of 10−1010^{-10} m. Analogously, the mass of a water molecule, which is approximately 3×10−263 \times10^{-26} kg can be compared to the unitary mass of a bead, yielding a mass conversion factor equal to the mass of a water molecule. Various approaches can be used to derive a conversion factor for time. A possibility is to match the value of kBTk_B T in real units with the DPD one, which is typically set to unity, to calculate the conversion factor for energy. The next step is to use the three obtained conversion factors to derive the time conversion factor. An alternative approach is based on matching the real value of the self-diffusion coefficient of water with the one from DPD simulations. [48] In both cases, the resulting conversion factor for time is typically on the order of 10−1210^{-12} s. The shear rate conversion factor is the reciprocal of the one for time and is therefore on the order of 1012 s−110^{12}\ \text{s}^{-1}. With these conversion factors, a shear rate of γ˙=0.01\dot{\gamma} = 0.01 DPD units provides an acceptable signal-to-noise ratio (SNR) but translates to approximately 1010 s−110^{10}\ \text{s}^{-1} in real units. Such shear rates are not representative of conditions in industrial equipment, nor they are accessible experimentally. In rheometry experiments, the range of shear rate is usually between 10−1−103 s−110^{-1} - 10^{3}\ \text{s}^{-1}, which corresponds to 10−13−10−910^{-13} - 10^{-9} in DPD units. Therefore, performing simulations at lower shear rates with a high SNR is essential for studying the fluid under more realistic conditions.

Transient Time Correlation Function

To calculate the apparent viscosity as in Equation (8), the value of PyxP_{yx} is averaged over many realizations, or trajectories, of the same simulations. This simple averaging procedure is the most common approach for calculating the shear viscosity in atomistic simulations, and it will be referred to as direct averaging (DAV) throughout this work. The most important drawback of DAV is linked to the inherent noise of the simulations, which can completely conceal the signal of interest, especially for small shear rates. To avoid this issue and increase the signal-to-noise ratio (SNR), high shear rates are usually applied to the system. This approach guarantees a high SNR and is suitable for Newtonian fluids, but it poses some complications when applied to non-Newtonian fluids. In many cases, the shear rate applied to achieve high SNR results is too high to be compared with experimental data or even realistic industrial applications. If the viscosity depends on the shear rate, as for non-Newtonian fluids, the results may not be representative of the real system, and extrapolation to lower shear rates may not be accurate.

An alternative approach to DAV is the transient-time correlation function (TTCF), which is a generalization of the Green-Kubo relations, [25, 26] and it states that: [25, 26]

⟨B(t)⟩=⟨B(0)⟩+∫0t⟨Ω(0)B(s)⟩ ds,(10)\langle B(t)\rangle= \langle B(0)\rangle+ \int_{0}^{t} \langle\Omega(0)B(s)\rangle\, \mathrm{d}s, \tag*{(10)}

where B(t)B(t) is a generic phase variable measured in the system and Ω(0)\Omega(0) is the dissipation function evaluated at time t=0t = 0, the instant at which the external field driving the system out of equilibrium is applied. The dissipation function is related to the external dissipative field applied to the system, and to the work done by this field. In the case of a sheared system with SLLOD dynamics, the dissipation function is equal to:

Ω=−γ˙VkBTPyx.(11)\Omega= -\frac{\dot{\gamma}V}{k_{\mathrm{B}}T}P_{yx}. \tag*{(11)}

Consequently, the equation for the evaluation of the shear pressure becomes:

⟨Pyx(t)⟩=⟨Pyx(0)⟩−γ˙VkBT∫0t⟨Pyx(0)Pyx(s)⟩ ds.(12)\langle P_{yx}(t)\rangle= \langle P_{yx}(0)\rangle- \frac{\dot{\gamma}V}{k_{\mathrm{B}}T}\int_{0}^{t} \langle P_{yx}(0)P_{yx}(s)\rangle\, \mathrm{d}s. \tag*{(12)}

As shown in Equation (10), the TTCF formalism correlates Ω(0)\Omega(0), a quantity computed at the equilibrium, with B(t)B(t), which is obtained from the non-equilibrium trajectories, B(t)B(t). In practice, the simulation procedure is based on a single equilibrium trajectory, called “mother”, which is used to spawn many non-equilibrium trajectories, called “daughters”. In this way, the initial conditions for the non-equilibrium trajectories are generated from the equilibrium probability distribution of the system. [23, 42] The mother trajectory is then sampled to be used as the daughters’ initial condition at regular intervals, which must be long enough to ensure that the starting points of different daughters are decorrelated. Moreover, decorrelation of the quantities in the non-equilibrium trajectories is a condition for the use of TTCF, which means:

⟨Ω(0)B(t)⟩→⟨Ω(0)⟩⟨B(t)⟩,for t→∞.(13)\langle\Omega(0)B(t)\rangle\to\langle\Omega(0)\rangle\langle B(t)\rangle,\quad\text{for } t \to\infty. \tag*{(13)}

Under this condition, the system is mixing and the convergence of the integral is ensured. At t=0t = 0 the system is in equilibrium, hence the dissipation function ⟨Ω(0)⟩=0\langle\Omega(0)\rangle= 0, and after the decorrelation time the integral does not contribute anymore to B(t)B(t). Nonetheless, from a computational point of view, ⟨Ω(0)⟩\langle\Omega(0)\rangle is equal to zero only in the limit of an infinite number of trajectories. With a finite number of trajectories, the integrated function will not go to zero after the decorrelation time, and the integral value will continue to grow indefinitely in time.

The most common approach to ensure that ⟨Ω(0)⟩=0\langle\Omega(0)\rangle= 0 is to generate ensemble members with the same probability but different non-equilibrium trajectories from the same point in the equilibrium trajectory. [25] To do so, the positions and momenta of the equilibrium space phase point Γi\Gamma_i are modified according to mappings that depend on the type of external field applied to the system. In the case of SLLOD with planar shear flow in the xyxy-plane, the following mappings are a potential choice:

Γi=(x,y,z,px,py,pz)Γi′=(x,y,z,−px,−py,−pz)Γi′′=(x,−y,z,px,−py,pz)Γi′′′=(x,−y,z,−px,py,−pz).(14)\begin{aligned} \boldsymbol{\Gamma}_i &= (x,y,z,p_x,p_y,p_z) \\ \boldsymbol{\Gamma}^{\prime}_i &= (x,y,z,-p_x,-p_y,-p_z) \\ \boldsymbol{\Gamma}^{\prime\prime}_i &= (x,-y,z,p_x,-p_y,p_z) \\ \boldsymbol{\Gamma}^{\prime\prime\prime}_i &= (x,-y,z,-p_x,p_y,-p_z). \tag*{(14)} \end{aligned}

Choosing the mappings in this way means that Pyx(0)=Pyx′(0)=−Pyx′′(0)=−Pyx′′′(0)P_{yx}(0) = P^{\prime}_{yx}(0) = -P^{\prime\prime}_{yx}(0) = -P^{\prime\prime\prime}_{yx}(0), hence ⟨Pyx(0)⟩=0\langle P_{yx}(0)\rangle= 0. Moreover, the mappings increase the efficiency of the simulations, as they allow the generation of multiple daughter trajectories from a single sample of the mother trajectory. For these reasons, most of the literature cited in the present work successfully employs the TTCF together with mappings.

The use of mappings with a DPD model

The main role of mappings is to ensure that the dissipation function is equal to zero at the time the external field is applied. To check whether this effect is maintained when using a DPD model, the shear pressure PyxP_{yx} is calculated using the Virial formula Equation (9). From Equation (11), the only time-dependent variable in the definition of the dissipation function for the SLLOD is PyxP_{yx}, hence Pyx(0)=0⇒Ω(0)=0P_{yx}(0) = 0 \Rightarrow\Omega(0) = 0.

The first sum in Equation (9) is the kinetic term, which depends only on the velocities of the particles. Consequently, it is not directly affected by the functional form of the force field used in the simulation. Applying the mappings will then lead to a zero contribution of the kinetic term for a DPD model, as is the case for a Lennard-Jones fluid. The second sum is the configurational term, which depends on the forces acting on the particles. It is possible to show that the contribution of the conservative force FC\mathbf{F}^{C} is equal to zero when mappings are applied, since it depends only on the position of the beads. The random force FR\mathbf{F}^{R} follows the same argument only if the random number ξij\xi_{ij} is the same for the interaction between the beads ii and jj in all the mapped trajectories. A different result is obtained for the dissipative force FD\mathbf{F}^{D}, which depends on the relative velocity between the beads. In this case, the sum across the mappings of the contribution of this force to the configurational term is equal to zero only in equilibrium simulations, i.e. when no velocity profile is imposed on the box.

When the external field is applied and the velocity profile is imposed, the following result is obtained:

∑mappingsrij,xFij,yD=−4γγ˙wD(rij)(yi−yjrij)xi(xi−xj),(15)\sum_{\mathrm{mappings}} r_{ij,x}F^{D}_{ij,y}=-4\gamma\dot{\gamma}w^{D}(r_{ij})\left(\frac{y_i-y_j}{r_{ij}}\right)x_i(x_i-x_j), \tag*{(15)}

which is equal to zero only if the two beads ii and jj have the same xx or yy coordinates. In particular, from Equation (15), it is clear that this contribution is dependent on the imposed shear rate γ˙\dot{\gamma}.

The results just described are derived in more detail in Section A, and have been tested using simulations of Lennard-Jones and DPD models. These tests are illustrated in Figure 1, where the values of ∣⟨Pyx(0)⟩∣|\langle P_{yx}(0)\rangle| are reported for different force fields. The mapping should ensure that the shear stress is zero at time t=0t=0, which is seen in the simulation results as ∣⟨Pyx(0)⟩∣∼O(10−16)|\langle P_{yx}(0)\rangle|\sim O(10^{-16}), a value of zero given the limits of the machine precision (double).

Figure 1. Values of ∣⟨Pyx(0)⟩∣|\langle P_{yx}(0)\rangle| for different models using mappings. The yellow circles refer to the LJ-WCA fluid, the purple triangles to a standard DPD model, the light blue square to a DPD model with only conservative force, the green pentagons to a DPD model without dissipative force and with a constant number ξ\xi for the random force, and the red diamonds to a DPD model with the three standard forces but a constant random number ξ\xi. ⟨Pyx(0)⟩\langle P_{yx}(0)\rangle can assume negative values, so its absolute value is plotted to use a logarithmic scale.

The results of the Lennard-Jones WCA model are used as a benchmark and confirm the expected behavior of the mappings with a value of zero to machine precision. On the contrary, for a standard DPD model (“DPD FC+FD+FRF^{C}+F^{D}+F^{R}” in the plot), the initial value of the shear stress is considerably different from zero. This is a result of the random terms, which are unique for each daughter and so do not cancel across mappings. Therefore, using different random numbers for all daughters masks the expected dependence on the shear rate reported in Equation (15). The DPD model using only the conservative force, indicated with “DPD FCF^{C}” in the figure, shows a value of zero. To further explore the influence of the random number ξ\xi, a modified DPD model was tested in this part of the work. The model “DPD FC+Fξij fixedRF^{C} + F^{R}_{\xi_{ij}\ \mathrm{fixed}}” in Figure 1 uses only the conservative and random force, but the value of ξ\xi is set equal for every random number ξij\xi_{ij}, regardless of the beads involved in the interaction. This shows the same cancellation property across mappings and zero initial shear stress. Eventually, the approach of a fixed constant random number is used with the complete DPD force field (“DPD FC+FD+Fξij fixedRF^{C} + F^{D} + F^{R}_{\xi_{ij}\ \mathrm{fixed}}” in the plot), where the initial shear stress increases together with the shear rate γ˙\dot{\gamma}. The simulations confirm the theoretical findings, including the dependence of the dissipative contribution of the configurational term on the shear rate.

As a consequence, it is not possible to use the mappings in Equation (14) together with a DPD model to ensure that ⟨Pyx(0)⟩=0\langle P_{yx}(0)\rangle= 0. In principle, different mappings could be developed to respect the condition also for the dissipative force, but forcing the values of ξij\xi_{ij} to be constant across the mapped trajectories poses a different problem. Enforcing this condition would require non-trivial management of the random numbers, since the interaction between bead ii and bead jj must use the same random number ξij\xi_{ij} for each mapped trajectory. Setting the same random seed in each mapped daughter will not be sufficient, as the order of operations would also need to be identical. A potential solution could involve defining the same list of random numbers for each bead in each mapped trajectory and deriving ξij\xi_{ij} from the numbers ξi\xi_i and ξj\xi_j in the list. Such an implementation would be complex in parallel simulations, with the added difficulty of avoiding unexpected correlations.

The alternative to the use of mappings is a modification of the TTCF formula in Equation (12), to take into account the finite number of trajectories. Hartkamp et al. developed this modification and applied it to a LJ-WCA fluid under mixed and elongational flow, also providing an intuitive explanation for the modification. Considering ⟨Ω(0)⟩≠0\langle\Omega(0)\rangle\ne0 as an error, this error can be subtracted from Ω(0)\Omega(0) in the integrand function, so it is possible to write:

⟨B(s)[Ω(0)−⟨Ω(0)⟩]⟩=⟨B(s)Ω(0)−B(s)⟨Ω(0)⟩⟩=⟨B(s)Ω(0)⟩−⟨B(s)⟩⟨Ω(0)⟩(16)\left\langle B(s)\left[\Omega(0)-\langle\Omega(0)\rangle\right]\right\rangle = \left\langle B(s)\Omega(0)-B(s)\langle\Omega(0)\rangle\right\rangle = \langle B(s)\Omega(0)\rangle-\langle B(s)\rangle\langle\Omega(0)\rangle \tag*{(16)}

which is equal to the covariance between B(s)B(s) and Ω(0)\Omega(0).

Consequently, the modified formula for the shear pressure becomes:

⟨Pyx(t)⟩=⟨Pyx(0)⟩−γ˙VkBT∫0t[⟨Pyx(0)Pyx(s)⟩−⟨Pyx(0)⟩⟨Pyx(s)⟩]ds=⟨Pyx(0)⟩−γ˙VkBT∫0t⟨Pyx(0)Pyx(s)⟩ds+γ˙VkBT⟨Pyx(0)⟩∫0t⟨Pyx(s)⟩ds.(17)\begin{aligned} \langle P_{yx}(t)\rangle &= \langle P_{yx}(0)\rangle - \frac{\dot{\gamma}V}{k_{\mathrm{B}}T} \int_0^t \left[ \langle P_{yx}(0)P_{yx}(s)\rangle - \langle P_{yx}(0)\rangle\langle P_{yx}(s)\rangle \right]\mathrm{d}s \\ &= \langle P_{yx}(0)\rangle - \frac{\dot{\gamma}V}{k_{\mathrm{B}}T} \int_0^t \langle P_{yx}(0)P_{yx}(s)\rangle\mathrm{d}s + \frac{\dot{\gamma}V}{k_{\mathrm{B}}T} \langle P_{yx}(0)\rangle \int_0^t \langle P_{yx}(s)\rangle\mathrm{d}s. \tag*{(17)} \end{aligned}

Error estimation

The main advantage of TTCF over DAV is the high signal-to-noise ratio that can be obtained from simulations even at very low shear rates. On the other hand, the DAV is a more straightforward method, easy to implement and to use, while the TTCF requires a more complex setup. In this context, error estimation becomes a crucial point in the choice of the method to calculate the shear viscosity. When using the formulation in Equation (12), the error estimation is simple and direct, since the variance of the left-hand side of the equation is equal to the sum of the variances of the two terms on the right-hand side. When using the TTCF without mappings, Equation (17) can be rearranged since the ensemble averages and integrals are linear operators:

⟨Pyx(t)⟩=⟨Pyx(0)⟩−γ˙VkBT⟨∫0tPyx(0)Pyx(s) ds⟩+γ˙VkBT⟨Pyx(0)⟩⟨∫0tPyx(s) ds⟩.(18)\langle P_{yx}(t)\rangle= \left\langle P_{yx}(0)\right\rangle- \frac{\dot{\gamma}V}{k_{\mathrm{B}}T}\left\langle\int_{0}^{t} P_{yx}(0)P_{yx}(s)\,\mathrm{d}s\right\rangle+ \frac{\dot{\gamma}V}{k_{\mathrm{B}}T}\left\langle P_{yx}(0)\right\rangle\left\langle\int_{0}^{t} P_{yx}(s)\,\mathrm{d}s\right\rangle. \tag*{(18)}

From this equation, it is clear that the variance of ⟨Pyx(t)⟩\langle P_{yx}(t)\rangle cannot be calculated as the sum of the variances of the three averaged variables. This is due to the product of the two ensemble averages ⟨Pyx(0)⟩⟨∫0tPyx(s) ds⟩\left\langle P_{yx}(0)\right\rangle\left\langle\int_{0}^{t}P_{yx}(s)\,\mathrm{d}s\right\rangle in the last term.

Since a different approach is required to estimate the precision of TTCF, the bootstrap method[49] is used in this work. This method allows the reconstruction of an approximation of the distribution of an estimator by resampling the dataset. It was described for the first time by Efron and employs resampling with replacement, which means that the same value can be sampled multiple times. In the case of TTCF, the collected data set is large enough, but the particular formulation makes the calculation of the variance impossible. In this case, it is possible to use the bootstrap method to estimate the distribution of the mean, and from this compute its 95% confidence interval.

For each time step, a number of samples equal to the number of trajectories is drawn from the ensemble of PyxP_{yx} values obtained from the simulations. The mean is then calculated from the sampled dataset and the whole resampling procedure is repeated a number of times decided by the user. A distribution of the mean is then obtained and the 95% confidence interval is calculated from this distribution. Moreover, an estimation of the standard error of the mean can be obtained from the same distribution. A higher number of trajectories or resamples will produce more accurate results, but it can also dramatically increase the computational cost of the bootstrapping procedure.

Computational details

The TTCF formalism is implemented in the open-source Python package TTCF4LAMMPS[42] built on top of LAMMPS and available at https://github.com/edwardsmith999/TTCF4LAMMPS. The original package was modified to include the possibility of using the TTCF without mappings and a module to perform bootstrapping on the generated data has been added. With respect to the original version, the approach without mappings requires the user to save the variable of interest, i.e. PyxP_{yx}, for every time step of every trajectory. As a result, both the simulation process and the bootstrapping procedure are embarrassingly parallelizable, but the disk space required to store the data can be very large. In particular, it is proportional to the number of trajectories, the number of timesteps per trajectory, and the number of variables of interest.

For all the results presented in this work, the simulations of the Lennard-Jones WCA fluid have been performed on a system of N=256N = 256 particles, with a time step of Δt=2.5×10−3\Delta t = 2.5 \times10^{-3} in reduced units. The initial mother trajectory is run for 10000 timesteps to ensure the system reaches equilibrium, then sampled every 1000 timesteps to generate a total of 40000 daughter trajectories, each running for 600 timesteps. The DPD simulations presented here were performed in a box of side L=5L = 5 DPD reduced units, corresponding to a total of N=375N = 375 particles, considering the number density ρ\rho, the conservative force coefficient aa, the dissipative force coefficient γ\gamma, the random force coefficient σ\sigma, and the cut-off radius rcr_c reported in Table 1. The timestep is set to Δt=0.01\Delta t = 0.01 DPD reduced units, the mother trajectory is initially equilibrated for 1500 timesteps and sampled every 100 timesteps to generate a total of 1×1051 \times10^{5} daughter trajectories, each running the sheared system for 420 timesteps. The criteria for the choice of simulation length and timestep value are illustrated respectively in Section B and Section C. The bootstrapping was performed only on the DPD results by resampling the original dataset 1200 timer, with a sample size equal to the number of daughter trajectories.

Results and discussion

Reproduction of LJ results with and without Mappings

Before using the TTCF non-mapped approach with a DPD system, its performances are assessed on an LJ-WCA fluid. Previous works studied the application of TTCF on a simple LJ-WCA fluid to compute the shear viscosity, providing a benchmark. In particular, the setup used by Maffioli et al. 42 is reproduced here. To better understand the plot of this section, it is useful to recall that the expected viscosity for this fluid at the simulated shear rates is μ∼2.3−2.4\mu\sim2.3 - 2.4 (–). [23, 39, 42] Consequently, the expected value of shear pressure is Pyx∼2.3⋅γ˙P_{yx} \sim2.3 \cdot\dot{\gamma} (–).

Figure 2 illustrates the typical results obtained with a direct ensemble average of the trajectories (DAV) compared to the TTCF ones. The use of mapping is necessary to ensure that ⟨Ω(0)⟩\langle\Omega(0)\rangle is equal to zero, which for a simple shear means ⟨Pyx(0)⟩=0\langle P_{yx}(0)\rangle= 0 (cf. Equation (11)). Additionally, the mappings lead to a reduction of the DAV’s standard error in the initial phase of the non-equilibrium simulation. Hence, the DAV’s error, which is zero initially due to the mappings, grows over the simulation as each daughter trajectory diverges. As t→∞t \to\infty, the DAV’s standard error will reach a maximum value, which is related to the effective accuracy of the method. In a similar manner, it is possible to observe in the plot an increase in the TTCF’s standard error, which is associated with the integration process. This means that the error will continue to grow in time without reaching a plateau, making long simulations less precise. The plot in Figure 2 clearly shows a higher standard error for DAV at the steady state, when compared to TTCF at such low shear rates.

Figure 2. Time response of PyxP_{yx} for a LJ-WCA fluid with an applied shear rate of γ˙=10−6\dot{\gamma} = 10^{-6} (–). Four mappings are used, the error bars are equal to the standard error.

When mappings are not used, as in Figure 3a, the high standard error of both DAV and TTCF is visible starting from the first timestep. A comparison of the two curves shows that the mean value of the DAV oscillates significantly more than that of the TTCF. The apparently similar standard error in Figure 3a is misleading, as the TTCF error is in practice orders of magnitude lower, but this is the result of the error at time zero introduced by the term ⟨B(0)⟩\langle B(0)\rangle in Equation (10), which dominates the plot. This term is still calculated as a direct ensemble average, and, consequently, it has a standard error of the same order of magnitude as the other DAV measurements. To eliminate this effect, the equilibrium condition of the mother trajectory is exploited. For a system in equilibrium ⟨Pyx⟩=0\langle P_{yx}\rangle= 0, and at t=0t = 0 the shear is applied on an equilibrium system, therefore ⟨Pyx(0)⟩=0\langle P_{yx}(0)\rangle= 0 is imposed in Equation (17). Such a procedure is applicable only when the value for a system at equilibrium is known from theory, as in the present case. Imposing this condition makes the TTCF signal unaffected by the DAV noise in t=0t = 0, as shown in Figure 3b. Moreover, in Figure 3b, it is possible to compare the accuracy of DAV and TTCF for low shear rates by looking at the error bars associated with the two methods. The DAV standard error is about three orders of magnitude bigger than the signal, while the TTCF error bars indicate a much lower uncertainty, making evident the higher precision of the TTCF.

Figure 3. Time response of PyxP_{yx} for a LJ-WCA fluid with an applied shear rate of γ˙=10−6\dot{\gamma} = 10^{-6} (–). Mappings are not used, and the correction in Equation (17) is adopted. a) The value of ⟨Pyx(0)⟩\langle P_{yx}(0)\rangle is calculated as an ensemble average. b) The value of ⟨Pyx(0)⟩\langle P_{yx}(0)\rangle is imposed equal to zero for the TTCF formula.

As already shown in the literature, [42] the advantage of the TTCF reduces when the shear rate is increased. At high shear rates, the precision of the DAV becomes comparable and even higher than that of the TTCF one.

The use of mappings is generally considered beneficial as the canceling of errors between daughter trajectories, starting from the same point in phase space, is used to reduce uncertainty[34]. As a result, removing these mappings, as required by the DPD, would be expected to perform worse than the mapped approach. The error was tested by applying a low shear rate of 10−610^{-6} and the comparison between the mapped and non-mapped approaches is presented in Figure 4. Surprisingly, the non-mapped approach does not exhibit a significant increase in error, and, in the tested case, even shows a small reduction. This implies the benefits of the TTCF are mainly derived from the ensemble of trajectories and not the use of mappings. Nonetheless, mappings remain useful, as they can generate multiple starting points without advancing the mother trajectory. For large systems or long correlation times, this can represent a significant computational saving since many more mappings than the four used here can be generated from a single point in time.

Figure 4. Comparison of the standard error of PyxP_{yx} obtained with and without the mappings using the TTCF on 4×1044 \times10^{4} daughter trajectories. The shear rate applied on the LJ-WCA fluid is γ˙=10−6\dot{\gamma} = 10^{-6} (–).

DPD system

Existing data for viscosity of DPD simple fluids

Many works in the literature are focused on the use of dissipative particle dynamics (DPD) to study complex fluids, whereas interest in simulating simple fluids is limited. This is most likely due to the remarkable capability of DPD to reproduce the structural properties of complex fluids and the lack of interest in simple fluids from an applicative point of view. In this work, as the methodology for applying TTCF with DPD is developed, the focus is placed on the simplest DPD fluid. Among the few works that studied the transport properties of a simple DPD fluid, there is a certain degree of disagreement about the exact value of the viscosity. Table 2 recaps some of those viscosity values, which have been obtained using both equilibrium and non-equilibrium methods. [12, 19] Given the variability obtained by previous studies, these values are intended to set and build the context, rather than as a reference for the simulations.

ReferenceMethodViscosity μ\mu (–)
Lauriello et al. [12]Green-Kubo0.860
Lauriello et al. [12]Einstein-Helfand0.847
Panoukidou et al. [19]Green-Kubo1.1
Panoukidou et al. [19]Lees-Edwards1.1
Droghetti et al. [1]Lees-Edwards0.85
Boromand et al. [11]Green-Kubo0.86
Boromand et al. [11]Lees-Edwards0.97

Table 2. Viscosity valued for a DPD simple fluid from literature.

DPD without mappings

As presented in Figure 1, due to the presence of dissipative and random forces, the use of mappings is not enough to guarantee that ⟨Ω(0)⟩=0\langle\Omega(0)\rangle= 0 for DPD systems. To consider this issue, the correction described in § 2.3.1 is applied to the TTCF formula, and the value of ⟨Pyx(0)⟩\langle P_{yx}(0)\rangle is imposed to be zero. Finally, as previously noted, the original LAMMPS implementation of SLLOD includes a Nosé-Hoover thermostat, which can interfere with the built-in thermostat of DPD. As described in § 2.2, this issue can be overcome in two ways: either by modifying the LAMMPS source code, or by using nvt/sllod with a very long thermostat relaxation time (i.e. t_damp = 103010^{30}). Both methods yield the same results, but those presented in this section were obtained using the modified version of SLLOD, nve/sllod, which does not apply the Nosé-Hoover thermostat.

The DPD system is investigated at different shear rates, ranging from 10−1210^{-12} to 10−210^{-2} (reduced DPD units). The results of the simulations are summarized in Figure 5, which shows the value of the shear pressure PyxP_{yx} divided by the shear rate γ˙\dot{\gamma}. Without this normalization, the values of PyxP_{yx} would differ by several orders of magnitude, depending on γ˙\dot{\gamma}, making the comparison impossible. Moreover, −Pyx/γ˙-P_{yx}/\dot{\gamma} is equal to the viscosity, which is expected to be constant since a simple DPD fluid exhibits Newtonian behavior. Looking at the time evolution in Figure 5, it is clear that the same viscosity value is reached after the transient for all studied shear rates. These curves are plotted with different shades of blue to highlight the absence of any visible trend with respect to the shear rate. The error bars reported in both plots of Figure 5 correspond to the 95% confidence interval for the mean value, and they are used to assess the precision of the method. As expected, the error in Figure 5a increases with time, due to the error accumulated during the numerical evaluation of the integrals. This is an inherent error of the method, which can be limited either by using a more accurate integration algorithm or by reducing the number of timesteps used in the simulation. Hence, identifying the end of the transient is crucial to obtaining the lowest possible uncertainty.

Figure 5. Results obtained with the TTCF method on a DPD simple fluid: a) time evolution of the shear pressure PyxP_{yx} divided by the shear rate γ˙\dot{\gamma} for different shear rates; b) value for different shear rates at the last timestep of the simulation. The error bars represent the 95% confidence interval for the mean value. All values are expressed in reduced DPD units.

The error bars in Figure 5b are the most important result obtained with the TTCF, as they show how the precision of the method is not affected by the value of the shear rate. For comparison, Figure 6 includes the results obtained with the DAV method, which is the standard approach to compute the shear viscosity in DPD simulations. From Figure 6b, it is possible to understand how DAV precision and accuracy are affected by the shear rate. When the shear rate is reduced, the DAV error bars grow dramatically, making it impossible to use the results obtained from the simulation for γ˙<10−2\dot{\gamma} < 10^{-2}. For the same reason, in Figure 6a the DAV results are shown only for the highest shear rate tested, γ˙=10−2\dot{\gamma} = 10^{-2}. Plotting the curves for lower shear rates would render the figure unreadable, due to the excessive noise present in DAV results. Moreover, from this plot, it is possible to notice a certain discrepancy between the DAV and TTCF time evolution. This behavior was already observed in previous works that used LAMMPS, [42], and it is most likely due to issues in the implementation of SLLOD in LAMMPS. The same discrepancy is noticeable in the simulations of the LJ-WCA fluid in Figure 2, and leads to a systematically higher value of the viscosity calculated with the DAV. Currently, this issue is being addressed by other research groups, which are working on an alternative implementation of the SLLOD algorithm in LAMMPS.[51]

Comparison between DAV and TTCF for a DPD simple fluid

Figure 6. Comparison between DAV and TTCF for a DPD simple fluid. The error bars represent the 95% confidence interval for the mean value. a) Time evolution of the shear pressure PyxP_{yx} divided by the shear rate γ˙\dot{\gamma}, DAV results are shown only for a shear rate of 10−210^{-2} (–). b) Value obtained at the last timestep of the simulation for different shear rates, the DAV error bars are not symmetrical due to the logarithmic scale of the yy-axis. All the values are in reduced DPD units.

The increment in precision obtained through the use of TTCF is assessed more in detail using two quantities. The first is the standard error (SE), the second is a measure of the relative magnitude between the signal and the noise, indicated as signal-to-error ratio (SER). The SER is calculated as:

SER=⟨Pyx⟩SEPyx,(19)\mathrm{SER} = \frac{\langle P_{yx}\rangle}{\mathrm{SE}_{P_{yx}}}, \tag*{(19)}

where the ensemble average of the shear pressure is divided by its standard error. Since the DAV presents too high uncertainty for low shear rates, the SER is calculated using the mean value from the TTCF method, leading to the following expressions:

SERDAV=⟨Pyx⟩TTCFSEPyxDAV;SERTTCF=⟨Pyx⟩TTCFSEPyxTTCF;(20)\mathrm{SER}^{\mathrm{DAV}} = \frac{\langle P_{yx}\rangle^{\mathrm{TTCF}}}{\mathrm{SE}_{P_{yx}}^{\mathrm{DAV}}}; \qquad\mathrm{SER}^{\mathrm{TTCF}} = \frac{\langle P_{yx}\rangle^{\mathrm{TTCF}}}{\mathrm{SE}_{P_{yx}}^{\mathrm{TTCF}}}; \tag*{(20)}

The results are plotted in Figure 7, and show a quantitative comparison between the precision of the two methods. The DAV standard error in Figure 7a is constant in time, as expected, since mappings are not used. Moreover, the DAV curves collapse on a single one, indicating a standard error that does not depend on the shear rate. The limitations of the DAV are evident, as its performance is inferior to that of TTCF in modeling γ˙≤10−2\dot{\gamma} \le10^{-2}. In contrast, the TTCF standard error grows in time as a result of the numerical integration, but has the advantage of being proportional to the shear rate. This confirms the TTCF as a suitable method for arbitrarily low shear rates in DPD simulations, since it means that the SNR is constant with respect to the shear rate. The plot Figure 7b illustrates this behavior, also showing that the SNR for DAV decreases by several orders of magnitude when the shear rate is lowered.

Figure 7. Precision assessment of DAV and TTCF for a DPD simple fluid. a) Time evolution of the standard error (SE) for the shear pressure for different shear rates. The DAV curves collapse on a single one, while each TTCF curve refers to a different shear rate. b) Signal-to-noise ratio (SNR) for the shear pressure calculated on the last timestep, the mean value from TTCF is used as signal for both TTCF and DAV curves. All values are expressed in reduced DPD units.

Computational cost and accuracy

The use of TTCF requires a large number of independent simulations, since it is based on the evaluation of the transient. On the other hand, each simulation does not usually require a large number of timesteps, depending on the decorrelation time of Ω(0)\Omega(0) and B(t)B(t). As reported in § 2.4, 10510^{5} trajectories have been simulated and averaged on 420 timesteps for each value of the shear rate. The management of such a high number of simulations was possible using the Python package TTCF4LAMMPS, modified to include the non-mapped approach. The simulations were performed on a cluster, using 120 cores over approximately half an hour of wall time, equal to about 63 core hours, for each shear rate. The bootstrap method was parallelized on the same number of cores, and the time necessary to evaluate the standard error was negligible compared to the simulation time, as reported in Table 3.

γ˙\dot{\gamma} (–)Simulation time (s)Bootstrap time (s)
10−210^{-2}185048
10−410^{-4}186148
10−610^{-6}189846
10−810^{-8}189046
10−1010^{-10}185945
10−1210^{-12}188047

Table 3. Computational time to perform simulations and bootstrap for different shear rates.

The study of a DPD simple fluid has some advantages from the computational point of view, since in such systems the decorrelation time is quite short. This is due to the absence of microstructures, which, depending on the type of structure, can increase the time for the stresses in the fluid to relax. For this reason, the simulations were carried out on a small system of 375 particles, which resulted in a relatively high uncertainty for both TTCF and DAV. This is noticeable both in Figure 5b and in Figure 7b, where the confidence interval for the mean value is still quite large and the TTCF SNR is below one. The present work is focused on illustrating how to apply the TTCF method to DPD systems and to highlight the advantages with respect to the DAV. Hence, the absolute value of SNR is not the main focus, but rather the fact that it is constant with respect to the shear rate.

It is possible to increase the accuracy of the TTCF method by either ii) considering a large system or iiii) increasing the number of independent trajectories to be averaged. The first approach is often necessary for studying complex fluids, where the size of the microstructures imposes the size of the box. This must be large enough to be representative of the system. Increasing the system size is computationally more expensive, but usually increases the SNR. The second approach allows for an increase in the computational cost and precision of the method with more granularity. However, in some cases, a large number of independent trajectories is necessary to significantly improve the SNR.

Conlusions

This work presents the application of the transient time correlation function (TTCF) method to compute the shear viscosity of a simple DPD fluid with non-equilibrium simulations. It is shown that the TTCF can be successfully applied to DPD systems and illustrated how the computational method must be modified to account for the DPD force field. The presence of dissipative and random forces of DPD required a modification of the SLLOD algorithm implemented in LAMMPS, to avoid interference of the Nosé-Hoover thermostat with the DPD one. Moreover, it was demonstrated that these two forces, the core of the DPD thermostat, break the symmetry imposed by the mappings. Mappings are no longer sufficient to guarantee that the dissipation function ⟨Ω(0)⟩\langle\Omega(0)\rangle is equal to zero at the initial time, and a correction to the TTCF equation becomes necessary. The revised formulation, already proposed by previous works, allows the calculation of the apparent viscosity for a DPD simple fluid, but makes it more complex to estimate the error. To overcome this issue, the bootstrap method was used to estimate the distribution of the mean value, and recover from it the 95% confidence interval. The increase in computational cost due to the bootstrapping procedure is negligible compared to the simulation time due to the high parallelizability of the method. The results of the TTCF method were compared with the direct ensemble average (DAV), which is the standard approach for this kind of simulation. As expected, the DAV method showed an SNR that decreases with lower shear rates, making the error too high for the DAV to be useful at shear rates below 10−210^{-2} (−). On the other hand, the TTCF method was able to provide accurate results at any shear rate with a lower error than the DAV and an SNR that remains constant with respect to the shear rate. The more straightforward DAV method is only reliable for high shear rates, which usually do not correspond to replicable conditions in experiments. Finally, a key outcome of this study is that the use of mappings is not practical with DPD. Remarkably, their absence does not compromise the accuracy of TTCF results and can even lead to improved precision. The results presented open the possibility to study the rheology of structured fluids using DPD and TTCF, where the use of low shear rates to match the experimental conditions would be a crucial improvement. In this way, the conversion factors could be recovered from the system characteristics, leading to simulations that match the experimental conditions. Furthermore, the deformation of the microstructures under shear flow could be studied under realistic conditions, avoiding unphysical behavior due to extremely high shear rates. Studies on such complex systems will also be helpful in identifying the limitations of the method, which are often influenced by system-specific properties, such as the stress relaxation time.

Acknowledgement

We thank Stephen Sanderson for the insightful discussions about the SLLOD implementation in LAMMPS. We thank Daniele Dini, Billy Todd, and Peter Daivis for the fruitful discussions about TTCF and its implementation without mappings. We thank Daniele Marchisio for the general guidance and the feedback on this work. We are grateful to the UK Materials and Molecular Modelling Hub for computational resources, which is partially funded by EPSRC (EP/T022213/1, EP/W032260/1 and EP/P020194/1). We acknowledge ISCRA for awarding this project access to the LEONARDO supercomputer, owned by the EuroHPC Joint Undertaking, hosted by CINECA (Italy) .

References

Mappings with the DPD force field

As reported in § 2.3, the dissipation function at time zero, ⟨Ω(0)⟩\langle\Omega(0)\rangle, must be equal to zero to use the TTCF in non-equilibrium simulations. For a system with simple shear applied in the xyxy plane, Ω\Omega is described by Equation (11), here repeated:

Ω=−γ˙VkBTPxy.(21)\Omega= -\frac{\dot{\gamma}V}{k_{\mathrm{B}}T}P_{xy}. \tag*{(21)}

Consequently, to have ⟨Ω(0)⟩=0\langle\Omega(0)\rangle= 0, it must be true that ⟨Pxy(0)⟩=0\langle P_{xy}(0)\rangle= 0. This condition is verified for a physical system, since t=0t = 0 corresponds to an equilibrium condition, but it is practically impossible to obtain by averaging a finite number of samples. In Lennard-Jones systems, this issue can be resolved by using the following mappings:

Γi=(x,y,z,px,py,pz)ΓiI=(x,y,z,−px,−py,−pz)ΓiII=(−x,y,z,−px,py,pz)ΓiIII=(−x,y,z,px,−py,−pz),(22)\begin{aligned} \Gamma_i &= (x,y,z,p_x,p_y,p_z) \\ \Gamma_i^{\mathrm{I}} &= (x,y,z,-p_x,-p_y,-p_z) \\ \Gamma_i^{\mathrm{II}} &= (-x,y,z,-p_x,p_y,p_z) \\ \Gamma_i^{\mathrm{III}} &= (-x,y,z,p_x,-p_y,-p_z), \tag*{(22)} \end{aligned}

which generate values of Pyx(0)P_{yx}(0) equal in modulus and opposite in sign for the mapped trajectories, giving zero as a result. It is possible to show that these mappings are not suitable for DPD systems, due to the presence of the dissipative and random forces. In LAMMPS, the pressure tensor P\mathbf{P} is calculated using the Irving-Kirkwood formula and is always considered symmetric. Hence, the Pyx=PxyP_{yx}=P_{xy} element of the pressure tensor is computed as:46

Pxy=1V∑k=1Nmkvkxvky+1V∑k=1N′rkxfky,(23)P_{xy} = \frac{1}{V}\sum_{k=1}^{N}m_kv_{kx}v_{ky}+\frac{1}{V}\sum_{k=1}^{N'}r_{kx}f_{ky}, \tag*{(23)}

where the subscript kk refers to the kk-th particle, and N≠N′N \ne N' due to periodic boundary conditions and communications between processors. The first sum in Equation (23) is the kinetic contribution, while the second is the configurational contribution, or the virial term. The value of PxyP_{xy} is equal to zero at a certain time if both contributions are equal to zero. Using the mappings of Equation (14), the kinetic terms of the mapped trajectories are:

(pkx,pky,pkz)→∑k=1Nmkvkxvky(−pkx,−pky,−pkz)→∑k=1Nmk(−vkx)(−vky)=∑k=1Nmkvkxvky(−pkx,pky,pkz)→∑k=1Nmk(−vkx)vky=−∑k=1Nmkvkxvky(−pkx,−pky,−pkz)→∑k=1Nmkvkx(−vky)=−∑k=1Nmkvkxvky,(24)\begin{aligned} (p_{kx},p_{ky},p_{kz}) &\to\sum_{k=1}^{N}m_kv_{kx}v_{ky} \\ (-p_{kx},-p_{ky},-p_{kz}) &\to\sum_{k=1}^{N}m_k(-v_{kx})(-v_{ky}) = \sum_{k=1}^{N}m_kv_{kx}v_{ky} \\ (-p_{kx},p_{ky},p_{kz}) &\to\sum_{k=1}^{N}m_k(-v_{kx})v_{ky} = -\sum_{k=1}^{N}m_kv_{kx}v_{ky} \\ (-p_{kx},-p_{ky},-p_{kz}) &\to\sum_{k=1}^{N}m_kv_{kx}(-v_{ky}) = -\sum_{k=1}^{N}m_kv_{kx}v_{ky}, \tag*{(24)} \end{aligned}

leading to a zero averaged value for the kinetic contribution to PxyP_{xy}. The contribution of the configurational part can be studied by considering the forces acting on a single bead kk. Indeed, for the mappings to work, the sum of the virial terms obtained with the different mappings must be zero for every particle. To simplify the problem, the following consider the interaction of the bead kk with only one bead ll.

The conservative (Equation (2)) and random (Equation (4)) forces depend only on the relative position, hence the focus can be put on the transformation of the positions:

Γi=(x,y,z)ΓiI=(x,y,z)ΓiII=(−x,y,z)ΓiIII=(−x,y,z)(25)\begin{aligned} \boldsymbol{\Gamma}_i &= (x,y,z) \\ \boldsymbol{\Gamma}_i^{\mathrm{I}} &= (x,y,z) \\ \boldsymbol{\Gamma}_i^{\mathrm{II}} &= (-x,y,z) \\ \boldsymbol{\Gamma}_i^{\mathrm{III}} &= (-x,y,z) \tag*{(25)} \end{aligned}

Having only one type of bead, the conservative force between beads kk and ll is:

FklC=awC(rkl)r^kl.(26)\mathbf{F}_{kl}^{C}=aw_C(r_{kl})\hat{\mathbf{r}}_{kl}. \tag*{(26)}

From this equation, rklr_{kl} and r^kl\hat{\mathbf{r}}_{kl} can be expressed in an explicit form:

rk=(xk,yk,zk),rl=(xl,yl,zl),rkl=(xk−xl,yk−yl,zk−zl)=(xkl,ykl,zkl),rkl=∣rkl∣=xkl2+ykl2+zkl2,r^kl=rklrkl=(xk−xlrkl,yk−ylrkl,zk−zlrkl).(27)\begin{aligned} \mathbf{r}_k &= (x_k,y_k,z_k), \\ \mathbf{r}_l &= (x_l,y_l,z_l), \\ \mathbf{r}_{kl} &= (x_k-x_l,y_k-y_l,z_k-z_l)=(x_{kl},y_{kl},z_{kl}), \\ r_{kl} &= |\mathbf{r}_{kl}|=\sqrt{x_{kl}^{2}+y_{kl}^{2}+z_{kl}^{2}}, \\ \hat{\mathbf{r}}_{kl} &= \frac{\mathbf{r}_{kl}}{r_{kl}}=\left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right). \tag*{(27)} \end{aligned}

Then, the weight function wCw_C, for rkl≤rcr_{kl}\leq r_c, is:

wC(rkl)=(1−rklrc)=(1−(xk−xl)2+(yk−yl)2+(zk−zl)2rc).(28)w_C(r_{kl})=\left(1-\frac{r_{kl}}{r_c}\right)=\left(1-\frac{\sqrt{(x_k-x_l)^2+(y_k-y_l)^2+(z_k-z_l)^2}}{r_c}\right). \tag*{(28)}

When comparing Equation (28) with the mapping in Equation (25), it is possible to notice that the weight function wC(rkl)w_C(r_{kl}) does not depend on the mappings, since it contains only squared differences. The results from mappings I and II are identical and equal to the following:

FklC,I,II=awC(rkl)(xk−xlrkl,yk−ylrkl,zk−zlrkl).(29)\mathbf{F}_{kl}^{C,\mathrm{I,II}}=aw_C(r_{kl})\left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right). \tag*{(29)}

In the case of mappings III and IV, the conservative force on bead kk due to the interaction with bead ll is:

FklC,III,IV=awC(rkl)(−xk+xlrkl,yk−ylrkl,zk−zlrkl).(30)\mathbf{F}_{kl}^{C,\mathrm{III,IV}}=aw_C(r_{kl})\left(\frac{-x_k+x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right). \tag*{(30)}

From Equation (23), the virial term is calculated as the sum of the products of the xx component of the position vector times the yy component of the force. The latter force is the same for all the mappings:

Fkl,yC=fk,yC=awC(rkl)(yk−ylrkl)(31)F^C_{kl,y}=f^C_{k,y}=a w_C(r_{kl})\left(\frac{y_k-y_l}{r_{kl}}\right) \tag*{(31)}

and the sum is:

∑mappingsrk,xfk,yC=fk,yC∑mappingsrk,x=fk,yC(rk,xI+rk,xII+rk,xIII+rk,xIV)=fk,yC(xk+xk−xk−xk)=0.(32)\begin{aligned} \sum_{\mathrm{mappings}} r_{k,x}f^C_{k,y}=f^C_{k,y}\sum_{\mathrm{mappings}}r_{k,x}=f^C_{k,y}(r^I_{k,x}+r^{II}_{k,x}+r^{III}_{k,x}+r^{IV}_{k,x}) \\ &=f^C_{k,y}(x_k+x_k-x_k-x_k)=0. \tag*{(32)} \end{aligned}

The same argument can be applied to the random force, which has the same weight function as the conservative force, so that what was said for Equation (28) is also valid in this case.

FklR=σwR(rkl)ξklΔtr^kl(33)F^R_{kl}=\sigma w_R(r_{kl})\frac{\xi_{kl}}{\sqrt{\Delta t}}\hat{r}_{kl} \tag*{(33)}

In this case, an additional condition must be imposed on the generation of the random numbers. In order for the forces to cancel out in the sum, the value of ξkl\xi_{kl} must be the same for all the mapped trajectories. If the generated random number ξkl\xi_{kl} is correctly set in all mapped trajectories, the random force has identical values for mapping I and II:

FklR,I,II=σwR(rkl)ξklΔt(xk−xlrkl,yk−ylrkl,zk−zlrkl)(34)F^{R,I,II}_{kl}=\sigma w_R(r_{kl})\frac{\xi_{kl}}{\sqrt{\Delta t}}\left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right) \tag*{(34)}

and for mappings III and IV:

FklR,III,IV=σwR(rkl)ξklΔt(−xk+xlrkl,yk−ylrkl,zk−zlrkl)(35)F^{R,III,IV}_{kl}=\sigma w_R(r_{kl})\frac{\xi_{kl}}{\sqrt{\Delta t}}\left(\frac{-x_k+x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right) \tag*{(35)}

In addition, the calculation for the virial term is identical to the one in Equation (32), since the yy component of the force is the same for all mappings:

Fkl,yR=fk,yR=awR(rkl)(yk−ylrkl)(36)F^R_{kl,y}=f^R_{k,y}=a w_R(r_{kl})\left(\frac{y_k-y_l}{r_{kl}}\right) \tag*{(36)}
∑mappingsrk,xfk,yR=fk,yR∑mappingsrk,x=fk,yR(rk,xI+rk,xII+rk,xIII+rk,xIV)=fk,yR(xk+xk−xk−xk)=0.(37)\begin{aligned} \sum_{\mathrm{mappings}}r_{k,x}f^R_{k,y}=f^R_{k,y}\sum_{\mathrm{mappings}}r_{k,x}=f^R_{k,y}(r^I_{k,x}+r^{II}_{k,x}+r^{III}_{k,x}+r^{IV}_{k,x}) \\ &=f^R_{k,y}(x_k+x_k-x_k-x_k)=0. \tag*{(37)} \end{aligned}

Unlike the conservative and random forces, the dissipative force depends on the relative velocity between the two beads:

FklD=−γwD(rkl)(r^kl⋅vkl)r^kl.(38)F^D_{kl}=-\gamma w_D(r_{kl})(\hat{r}_{kl}\cdot v_{kl})\hat{r}_{kl}. \tag*{(38)}

For this expression, it is possible to show that the mappings work as expected for a system at equilibrium, with no velocity field imposed. When a shear is applied to the box, the velocity profile breaks the symmetry imposed by the mappings, and the elements in the sum for virial term do not cancel out. In the nonequilibrium simulation, the velocity vv of a bead will be the sum of the streaming velocity U(y)\mathbf{U}(y), the consequence of the shear imposition, and the peculiar velocity u\mathbf{u}. For a bead kk:

vk=uk+Uk(y),(39)\mathbf{v}_k = \mathbf{u}_k + \mathbf{U}_k(y), \tag*{(39)}

or, in component form:

(vk,x,vk,y,vk,z)=(uk,x,uk,y,uk,z)+(γ˙yk,0,0)=(uk,x+γ˙yk,uk,y,uk,z)(40)(v_{k,x},v_{k,y},v_{k,z})=(u_{k,x},u_{k,y},u_{k,z})+(\dot{\gamma}y_k,0,0)=(u_{k,x}+\dot{\gamma}y_k,u_{k,y},u_{k,z}) \tag*{(40)}

From this definition, the relative velocity vkl\mathbf{v}_{kl} between beads kk and ll can be calculated:

vk=(uk,x+γ˙yk,uk,y,uk,z),vl=(ul,x+γ˙yl,ul,y,ul,z),vkl=(uk,x+γ˙yk−ul,x−γ˙yl,uk,y−ul,y,uk,z−ul,z)(41)\begin{aligned} \mathbf{v}_k &= (u_{k,x}+\dot{\gamma}y_k,u_{k,y},u_{k,z}),\\ \mathbf{v}_l &= (u_{l,x}+\dot{\gamma}y_l,u_{l,y},u_{l,z}),\\ \mathbf{v}_{kl} &= (u_{k,x}+\dot{\gamma}y_k-u_{l,x}-\dot{\gamma}y_l,u_{k,y}-u_{l,y},u_{k,z}-u_{l,z}) \tag*{(41)} \end{aligned}

As for conservative and random forces, rkl\mathbf{r}_{kl} is not affected by the position transform, and the weight function wD(rkl)w_D(r_{kl}) has the same value for all mappings. The next step is the evaluation of the dot product (r^kl⋅vkl)(\hat{\mathbf{r}}_{kl}\cdot\mathbf{v}_{kl}), which must be carried out for each mapping. It should be noted that only the peculiar velocity uk\mathbf{u}_k is affected by the transformations, since the mappings are applied to the equilibrium system before imposing the shear. In the case of the original equilibrium trajectory, that is, mapping I (x,y,z,px,py,pz)(x,y,z,p_x,p_y,p_z):

r^kl⋅vkl=(xk−xlrkl,yk−ylrkl,zk−zlrkl)(uk,x+γ˙yk−ul,x−γ˙yl,uk,y−ul,y,uk,z−ul,z)=1rkl[(xk−xl)(uk,x+γ˙yk−ul,x−γ˙yl)+(yk−yl)(uk,y−ul,y)+(zk−zl)(uk,z−ul,z)]=1rkl[(xk−xl)(uk,x−ul,x)+γ˙(xk−xl)(yk−yl)+Dy+Dz]=1rkl(Dx+Dy+Dz)+γ˙(xk−xl)(yk−yl)rkl=D+γ˙(xk−xl)(yk−yl)rkl=D+A.(42)\begin{aligned} \hat{\mathbf{r}}_{kl}\cdot\mathbf{v}_{kl} &= \left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right)(u_{k,x}+\dot{\gamma}y_k-u_{l,x}-\dot{\gamma}y_l,u_{k,y}-u_{l,y},u_{k,z}-u_{l,z})\\ &= \frac{1}{r_{kl}}\left[(x_k-x_l)(u_{k,x}+\dot{\gamma}y_k-u_{l,x}-\dot{\gamma}y_l)+(y_k-y_l)(u_{k,y}-u_{l,y})+(z_k-z_l)(u_{k,z}-u_{l,z})\right]\\ &= \frac{1}{r_{kl}}\left[(x_k-x_l)(u_{k,x}-u_{l,x})+\dot{\gamma}(x_k-x_l)(y_k-y_l)+\mathcal{D}_y+\mathcal{D}_z\right]\\ &= \frac{1}{r_{kl} }(\mathcal{D}_x+\mathcal{D}_y+\mathcal{D}_z)+\frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}\\ &=\mathcal{D}+\frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}=\mathcal{D}+\mathcal{A}. \tag*{(42)} \end{aligned}

To simplify the notation, the groups Di\mathcal{D}_i, with i=x,y,z,Di=x,y,z,\mathcal{D}, and A\mathcal{A} are introduced:

Di=(ik−il)(uk−ul),D=Dx+Dy+Dzrkl,A=γ˙(xk−xl)(yk−yl)rkl.(43)\begin{aligned} \mathcal{D}_i &= (i_k-i_l)(u_k-u_l),\\ \mathcal{D} &= \frac{\mathcal{D}_x+\mathcal{D}_y+\mathcal{D}_z}{r_{kl}},\\ \mathcal{A} &= \frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}. \tag*{(43)} \end{aligned}

For mapping II (x,y,z,−px,−py,−pz)(x,y,z,-p_x,-p_y,-p_z):

r^kl⋅vkl=(xk−xlrkl,yk−ylrkl,zk−zlrkl)(−uk,x+γ˙yk+ul,x−γ˙yl,−uk,y+ul,y,−uk,z+ul,z)=1rkl(−Dx−Dy−Dz)+γ˙(xk−xl)(yk−yl)rkl=−D+A(44)\begin{aligned} \hat{r}_{kl}\cdot v_{kl} &= \left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right)(-u_{k,x}+\dot{\gamma}y_k+u_{l,x}-\dot{\gamma}y_l,-u_{k,y}+u_{l,y},-u_{k,z}+u_{l,z})\\ &= \frac{1}{r_{kl}}(-\mathcal{D}_x-\mathcal{D}_y-\mathcal{D}_z)+\frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}=-\mathcal{D}+\mathcal{A} \tag*{(44)} \end{aligned}

Appling mapping III (−x,y,z,−px,py,pz)(-x,y,z,-p_x,p_y,p_z):

r^kl⋅vkl=(−xk+xlrkl,yk−ylrkl,zk−zlrkl)(−uk,x+γ˙yk+ul,x−γ˙yl,uk,y−ul,y,uk,z−ul,z)=1rkl(Dx+Dy+Dz)−γ˙(xk−xl)(yk−yl)rkl=D−A(45)\begin{aligned} \hat{r}_{kl}\cdot v_{kl} &= \left(\frac{-x_k+x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right)(-u_{k,x}+\dot{\gamma}y_k+u_{l,x}-\dot{\gamma}y_l,u_{k,y}-u_{l,y},u_{k,z}-u_{l,z})\\ &= \frac{1}{r_{kl}}(\mathcal{D}_x+\mathcal{D}_y+\mathcal{D}_z)-\frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}=\mathcal{D}-\mathcal{A} \tag*{(45)} \end{aligned}

With mapping IV (−x,y,z,px,−py,−pz)(-x,y,z,p_x,-p_y,-p_z):

r^kl⋅vkl=(−xk+xlrkl,yk−ylrkl,zk−zlrkl)(uk,x+γ˙yk−ul,x−γ˙yl,−uk,y+ul,y,−uk,z+ul,z)=1rkl(−Dx−Dy−Dz)−γ˙(xk−xl)(yk−yl)rkl=−D−A(46)\begin{aligned} \hat{r}_{kl}\cdot v_{kl} &= \left(\frac{-x_k+x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right)(u_{k,x}+\dot{\gamma}y_k-u_{l,x}-\dot{\gamma}y_l,-u_{k,y}+u_{l,y},-u_{k,z}+u_{l,z})\\ &= \frac{1}{r_{kl}}(-\mathcal{D}_x-\mathcal{D}_y-\mathcal{D}_z)-\frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}=-\mathcal{D}-\mathcal{A} \tag*{(46)} \end{aligned}

Writing explicitly the dissipative force for every mapping:

FjkD,I=−γwD(rkl)(D+A)(xk−xlrkl,yk−ylrkl,zk−zlrkl)(47)F_{jk}^{\mathrm{D,I}}=-\gamma w_{\mathrm{D}}(r_{kl})(\mathcal{D}+\mathcal{A})\left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right) \tag*{(47)}
FjkD,II=−γwD(rkl)(−D+A)(xk−xlrkl,yk−ylrkl,zk−zlrkl)(48)F_{jk}^{\mathrm{D,II}}=-\gamma w_{\mathrm{D}}(r_{kl})(-\mathcal{D}+\mathcal{A})\left(\frac{x_k-x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right) \tag*{(48)}
FjkD,III=−γwD(rkl)(D−A)(−xk+xlrkl,yk−ylrkl,zk−zlrkl)(49)F_{jk}^{\mathrm{D,III}}=-\gamma w_{\mathrm{D}}(r_{kl})(\mathcal{D}-\mathcal{A})\left(\frac{-x_k+x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right) \tag*{(49)}
FjkD,IV=−γwD(rkl)(−D−A)(−xk+xlrkl,yk−ylrkl,zk−zlrkl)(50)F_{jk}^{\mathrm{D,IV}}=-\gamma w_{\mathrm{D}}(r_{kl})(-\mathcal{D}-\mathcal{A})\left(\frac{-x_k+x_l}{r_{kl}},\frac{y_k-y_l}{r_{kl}},\frac{z_k-z_l}{r_{kl}}\right) \tag*{(50)}

The calculation of the virial term requires the yy component of the force, which is not equal for all mappings, and assumes this form:

Fkl,yD=fk,yD=−γwD(rkl)(±D±A)(yk−ylrkl).(51)F_{kl,y}^{\mathrm{D}}=f_{k,y}^{\mathrm{D}}=-\gamma w_{\mathrm{D}}(r_{kl})(\pm\mathcal{D}\pm\mathcal{A})\left(\frac{y_k-y_l}{r_{kl}}\right). \tag*{(51)}

To easily identify the terms that cancel out and write the sum in a more compact form, the group A\mathcal{A} is refactored and B\mathcal{B} is introduced:

A=γ˙(xk−xl)(yk−yl)rkl=γ˙(xk−xl)(yk−yl)rkl=B(yk−yl)rkl,(52)\mathcal{A}=\frac{\dot{\gamma}(x_k-x_l)(y_k-y_l)}{r_{kl}}=\dot{\gamma}(x_k-x_l)\frac{(y_k-y_l)}{r_{kl}}=\mathcal{B}\frac{(y_k-y_l)}{r_{kl}}, \tag*{(52)}

The result of the sum for the virial term is:

∑mappingsrk,xlDfk,yD,I=rk,xlD,Ifk,yD,I+rk,xlD,IIfk,yD,II+rk,xlD,IIIfk,yD,III+rk,xlD,IVfk,yD,IV=xk[−γwD(rkl)(D+A)(yk−ylrkl)]+xk[−γwD(rkl)(−D+A)(yk−ylrkl)]−xk[−γwD(rkl)(D−A)(yk−ylrkl)]−xk[−γwD(rkl)(−D−A)(yk−ylrkl)]=−γwD(rkl)(yk−ylrkl)2[xk(D+B)+(−D+B)−(D−B)−(−D−B)]=−γwD(rkl)(yk−ylrkl)2xk[B+B+B+B]=−γwD(rkl)(yk−ylrkl)2xk4γ˙(xk−xl)=−4γγ˙wD(rkl)(yk−ylrkl)2xk(xk−xl)≠0(53)\begin{aligned} \sum_{\mathrm{mappings}} r_{k,x_l}^{D}f_{k,y}^{D,I}={}&r_{k,x_l}^{D,I}f_{k,y}^{D,I}+r_{k,x_l}^{D,II}f_{k,y}^{D,II}+r_{k,x_l}^{D,III}f_{k,y}^{D,III}+r_{k,x_l}^{D,IV}f_{k,y}^{D,IV}\\ ={}&x_k\left[-\gamma w^D(r_{kl})(\mathcal{D}+\mathcal{A})\left(\frac{y_k-y_l}{r_{kl}}\right)\right]+x_k\left[-\gamma w^D(r_{kl})(-\mathcal{D}+\mathcal{A})\left(\frac{y_k-y_l}{r_{kl}}\right)\right]\\ &-x_k\left[-\gamma w^D(r_{kl})(\mathcal{D}-\mathcal{A})\left(\frac{y_k-y_l}{r_{kl}}\right)\right]-x_k\left[-\gamma w^D(r_{kl})(-\mathcal{D}-\mathcal{A})\left(\frac{y_k-y_l}{r_{kl}}\right)\right]\\ ={}&-\gamma w^D(r_{kl})\left(\frac{y_k-y_l}{r_{kl}}\right)^2\left[x_k(\mathcal{D}+\mathcal{B})+(-\mathcal{D}+\mathcal{B})-(\mathcal{D}-\mathcal{B})-(-\mathcal{D}-\mathcal{B})\right]\\ ={}&-\gamma w^D(r_{kl})\left(\frac{y_k-y_l}{r_{kl}}\right)^2x_k[\mathcal{B}+\mathcal{B}+\mathcal{B}+\mathcal{B}]\\ ={}&-\gamma w^D(r_{kl})\left(\frac{y_k-y_l}{r_{kl}}\right)^2x_k4\dot{\gamma}(x_k-x_l)\\ ={}&-4\gamma\dot{\gamma}w^D(r_{kl})\left(\frac{y_k-y_l}{r_{kl}}\right)^2x_k(x_k-x_l)\ne0 \tag*{(53)} \end{aligned}

The contribution to the configurational term of the dissipative force is different than zero, therefore the mappings are not sufficient to enforce the condition of ⟨Pxy(0)⟩=0\langle P_{xy}(0)\rangle=0. Moreover, it is clear that the sum in Equation (53) is proportional to the value of the shear rate γ˙\dot{\gamma}, supporting the results reported in Figure 1.

Identifying simulation length

As shown in Figure 7a, the standard error of the TTCF method increases in time, so a longer simulation result in lower precision. Under these conditions, the optimal approach would be to set a simulation time exactly equal to the decorrelation time of the stresses in the system studied. Oftentimes, it is not possible to identify an exact value for the decorrelation time, and increasing the simulation length seem the safest option. Once the stress are decorrelated, the integral in Equation (12) will give a null contribution, and the value of PyxP_{yx} will remain constant in time. In practice, the value of ⟨Pyx(0)Pyx(t)⟩\langle P_{yx}(0)P_{yx}(t)\rangle oscillates around zero after the decorrelation, resulting in small variations of the shear pressure. This behavior, together with the increase in the TTCF’s standard error and computational costs, make undesiderable to use simulations time much longer than the stress decorrelation time.

An optimal choice of the simulation length probably requires some test in non-equilibrium conditions, to evaluate the best approximation of the stress decorrelation time. Such work-flow could increase dramatically the computational cost, due to the high number of daughter trajectories required. An alternative approach, used in the present work, consist in evaluating the stress auto-correlation function from an equilibrium simulation to get an initial guess. The results of this procedure for a simple DPD fluid are reported in Figure 8, which showed a fast decorrelation and allowed the choice of an appropriate simulation time. This time value is shown as a vertical red line in Figure 8 and avoided a counterproductively long simulation, even though it cannot be considered an optimal value.

Figure 8. Auto-correlation function for the PyxP_{yx} element of the pressure tensor, calculated from an equilibrium DPD simulation. The horizontal black line indicates the value of zero, while the vertical red line identifies the time length of the non-equilibrium simulations performed in this work.

Influence of timestep on DPD simulations

The value of the timestep Δt\Delta t heavily affect the results of a DPD simulation. The random force FijRF_{ij}^{R} depends explicitly on Δt\Delta t, as reported in Equation (4), differently from many other force fields. In atomistic simulations, usually a smaller Δt\Delta t allow ot reach a higher accuracy and to capture better the dynamnics of the system. As explained by Groot and Warren [9], decreasing the timestep increases the variance of the random force, and, consequently, the noise in the simulation. An example of this phenomena is reported in figure Figure 9, where more noisy and oscillating Pyx(t)P_{yx}(t) curves are the result of lower timesteps.

Figure 9. Time evolution of the shear pressure PyxP_{yx} for different values of the timestep Δt\Delta t in DPD simulations. All values are obtained using the TTCF method, with a shear rate of γ˙=10−6\dot{\gamma}=10^{-6} and 2×1052 \times10^{5} daughter trajectories.

The results in Figure 9 helped in the choice of the timestep used in this work, which is equal to 0.01. This is a common value in DPD simulations involving simple fluids and is it the lowest still exhibiting a limited noise, according to the data in the plot.

References

  1. [1]Droghetti, H.; Pagonabarraga, I.; Carbone, P.; Asinari, P.; Marchisio, D. Dissipative Particle Dynamics Simulations of Tri-Block Co-Polymer and Water: Phase Diagram Validation and Microstructure Identification. The Journal of Chemical Physics 2018, 149, 184903.DOI
  2. [2]Lauriello, N.; Ponnana, D. N.; Ma, Z.; Šindelka, K.; Buffo, A.; Boccardo, G.; Marchisio, D.; Pan, W. Interpretable Machine-Learning Enhanced Parametrization Method- ology for Pluronics–Water Mixtures in DPD Simulations. Soft Matter 2025, 21, 5833–5851.
  3. [3]Ferrari, M.; Handgraaf, J.-W.; Boccardo, G.; Buffo, A.; Vanni, M.; Marchisio, D. L. Molecular Modeling of the Interface of an Egg Yolk Protein-Based Emulsion. Physics of Fluids 2022, 34, 021903.DOI
  4. [4]Ferrari, M.; Boccardo, G.; Marchisio, D. L.; Buffo, A. Application of Dissipative Particle Dynamics to Interfacial Systems: Parameterization and Scaling. AIP Advances 2023, 13, 035324.DOI
  5. [5]Anderson, R. L.; Bray, D. J.; Del Regno, A.; Seaton, M. A.; Ferrante, A. S.; Warren, P. B. Micelle Formation in Alkyl Sulfate Surfactants Using Dissipative Particle Dynamics. Journal of Chemical Theory and Computation 2018, 14, 2633–2643.DOI
  6. [6]Panoukidou, M.; Wand, C. R.; Del Regno, A.; Anderson, R. L.; Carbone, P. Constructing the Phase Diagram of Sodium Laurylethoxysulfate Using Dissipative Particle Dynamics. Journal of Colloid and Interface Science 2019, 557, 34–44.DOI
  7. [7]Wand, C. R.; Panoukidou, M.; Del Regno, A.; Anderson, R. L.; Carbone, P. The Relationship between Wormlike Micelle Scission Free Energy and Micellar Composition: The Case of Sodium Lauryl Ether Sulfate and Cocamidopropyl Betaine. Langmuir 2020, 36, 12288–12298.DOI
  8. [8]Del Regno, A.; Warren, P. B.; Bray, D. J.; Anderson, R. L. Critical Micelle Concentrations in Surfactant Mixtures and Blends by Simulation. The Journal of Physical Chemistry B 2021, 125, 5983–5990.DOI
  9. [9]Groot, R. D.; Warren, P. B. Dissipative Particle Dynamics: Bridging the Gap between Atomistic and Mesoscopic Simulation. The Journal of Chemical Physics 1997, 107, 4423–4435.DOI
  10. [10]Marsh, C. A.; Backx, G.; Ernst, M. H. Static and Dynamic Properties of Dissipative Particle Dynamics. Physical Review E 1997, 56, 1676–1691.DOI
  11. [11]Boromand, A.; Jamali, S.; Maia, J. M. Viscosity Measurement Techniques in Dissipative Particle Dynamics. Computer Physics Communications 2015, 196, 149–160.DOI
  12. [12]Laur iello, N.; Kondracki, J.; Buffo, A.; Boccardo, G.; Bouaifi, M.; Lisal, M.; Marchisio, D. Simulation of High Schmidt Number Fluids with Dissipative Particle Dynamics: Parameter Identification and Robust Viscosity Evaluation. Physics of Fluids 2021, 33, 073106.DOI
  13. [13]Laur iello, N.; Boccardo, G.; Marchisio, D.; Líšal, M.; Buffo, A. Development of an Automated Reliable Method to Compute Transport Properties from DPD Equilibrium Simulations: Application to Simple Fluids. Computer Physics Communications 2023, 291, 108843.DOI
  14. [14]Green, M. S. Markoff Random Processes and the Statistical Mechanics of Time-Dependent Phenomena. II. Irreversible Processes in Fluids. The Journal of Chemical Physics 1954, 22, 398–413.DOI
  15. [15]Kubo, R. Statistical-mechanical theory of irreversible processes. I. General theory and simple applications to magnetic and conduction problems. Journal of the physical society of Japan 1957, 12, 570–586.DOI
  16. [16]Helfand, E. Transport Coefficients from Dissipation in a Canonical Ensemble. Physical Review 1960, 119, 1–9.DOI
  17. [17]Ernst, M. H.; Brito, R. Generalized Green-Kubo Formulas for Fluids with Impulsive, Dissipative, Stochastic, and Conservative Interactions. Physical Review E 2005, 72, 061102.pubmed.ncbi.nlm.nih.gov/16485926
  18. [18]Jung, G.; Schmid, F. Computing Bulk and Shear Viscosities from Simulations of Fluids with Dissipative and Stochastic Interactions. The Journal of Chemical Physics 2016, 144, 204104.DOI
  19. [19]Panoukidou, M.; R. Wand, C.; Carbone, P. Comparison of Equilibrium Techniques for the Viscosity Calculation from DPD Simulations. Soft Matter 2021, 17, 8343–8353.DOI
  20. [20]Nafar Sefiddashti, M. H.; Boudaghi-Khajehnobar, M.; Edwards, B. J.; Khomami, B. High-Fidelity Scaling Relationships for Determining Dissipative Particle Dynamics Parameters from Atomistic Molecular Dynamics Simulations of Polymeric Liquids. Scientific Reports 2020, 10, 4458.DOI
  21. [21]Hendrikse, R.; Bayly, A.; Jimack, P. Anionic Surfactant Solutions under Shear Using Dissipative Particle Dynamics. Journal of Chemical Physics 2023,DOI
  22. [22]De Roma, F.; Marchisio, D.; Boccardo, G.; Bouaifi, M.; Buffo, A. Application of a Multiscale Approach for Modeling the Rheology of Complex Fluids in Industrial Mixing Equipment. Physics of Fluids 2024, 36, 023119.DOI
  23. [23]Todd, B. D.; Davis, P. J. Nonequilibrium Molecular Dynamics: Theory, Algorithms and Applications; Cambridge University Press: Cambridge, 2017.
  24. [24]Ewen, J. P.; Heyes, D. M.; Dini, D. Advances in Nonequilibrium Molecular Dynamics Simulations of Lubricants and Additives. Friction 2018, 6, 349–386.DOI
  25. [25]Evans, D.; Morriss, G. Statistical Mechanics of Nonequilibrium Liquids; Academic Press: London, 1990.
  26. [26]Evans, D. J.; Searles, D. J.; Williams, S. R. Fundamentals of Classical Statistical Thermodynamics: Dissipation, Relaxation, and Fluctuation Theorems; John Wiley & Sons, 2016.
  27. [27]Delhomme, J.; Cummings, P. T. Simulation of Friction in Nanoconfined Fluids for an Arbitrarily Low Shear Rate. Physical Review B 2005, 72, 172201.
  28. [28]Bernardi, S.; Brookes, S. J.; Searles, D. J.; Evans, D. J. Response Theory for Confined Systems. The Journal of Chemical Physics 2012, 137, 074114.DOI
  29. [29]Maffioli, L.; Smith, E. R.; Ewen, J. P.; Daivis, P. J.; Dini, D.; Todd, B. D. Slip and Stress from Low Shear Rate Nonequilibrium Molecular Dynamics: The Transient-Time Correlation Function Technique. The Journal of Chemical Physics 2022, 156, 184111.DOI
  30. [30]Bernardi, S.; Searles, D. J. Local Response in Nanopores. Molecular Simulation 2016, 42, 463–473.DOI
  31. [31]Todd, B. D. Application of Transient-Time Correlation Functions to Nonequilibrium Molecular-Dynamics Simulations of Elongational Flow. Physical Review E 1997, 56, 6723–6728.DOI
  32. [32]Hartkamp, R.; Bernardi, S.; Todd, B. D. Transient-Time Correlation Function Applied to Mixed Shear and Elongational Flows. The Journal of Chemical Physics 2012, 136, 064105.DOI
  33. [33]Morriss, G. P.; Evans, D. J. Application of Transient Correlation Functions to Shear Flow Far from Equilibrium. Physical Review A 1987, 35, 792–797.pubmed.ncbi.nlm.nih.gov/9898204
  34. [34]Evans, D. J.; Morriss, G. P. Transient-Time-Correlation Functions and the Rheology of Fluids. Physical Review A 1988, 38, 4142–4148.pubmed.ncbi.nlm.nih.gov/9900865
  35. [35]Borzsák, István.; Cummings, P. T.; Evans, D. J. Shear Viscosity of a Simple Fluid over a Wide Range of Strain Rates. Molecular Physics 2002, 100, 2735–2738.
  36. [36]Desgranges, C.; Delhommele, J. Accurate Determination of Normal Stress Differences via Transient-Time Correlation Function – Non-Equilibrium Molecular Dynamics (TTCF–NEMD) Simulations. Molecular Simulation 2009, 35, 405–408.DOI
  37. [37]Desgranges, C.; Delhommele, J. Shear Viscosity of Liquid Copper at Experimentally Accessible Shear Rates: Application of the Transient-Time Correlation Function Formalism. The Journal of Chemical Physics 2008, 128, 084506.DOI
  38. [38]Desgranges, C.; Delhommele, J. Molecular Simulation of Transport in Nanopores: Application of the Transient-Time Correlation Function Formalism. Physical Review E 2008, 77, 027701.pubmed.ncbi.nlm.nih.gov/18352161
  39. [39]Pan, G.; McCabe, C. Prediction of Viscosity for Molecular Fluids at Experimentally Accessible Shear Rates Using the Transient Time Correlation Function Formalism. The Journal of Chemical Physics 2006, 125, 194527.pubmed.ncbi.nlm.nih.gov/17129143
  40. [40]Mazyar, O. A.; Pan, G.; McCabe, C. Transient Time Correlation Function Calculation of the Viscosity of a Molecular Fluid at Low Shear Rates: A Comparison of Stress Tensors. Molecular Physics 2009, 107, 1423–1429.DOI
  41. [41]Weeks, J. D.; Chandler, D.; Andersen, H. C. Role of Repulsive Forces in Determining the Equilibrium Structure of Simple Liquids. The Journal of Chemical Physics 1971, 54, 5237–5247.DOI
  42. [42]Maffioli, L.; Ewen, J.; Smith, E.; Varghese, S.; Dai̇vis, P.; Dini, D.; Todd, B. Ttcf4lammps: A Toolkit for Simulation of the Non-Equilibrium Behaviour of Molecular Fluids at Experimentally Accessible Shear Rates. 2024.
  43. [44]Español, P.; Warren, P. Statistical Mechanics of Dissipative Particle Dynamics. Europhysics Letters (EPL) 1995, 30, 191–196.DOI
  44. [45]Lees, A. W.; Edwards, S. F. The Computer Study of Transport Processes under Extreme Conditions. Journal of Physics C: Solid State Physics 1972, 5, 1921–1928.DOI
  45. [46]Thompson, A. P.; Aktulga, H. M.; Berger, R.; Bolintineanu, D. S.; Brown, W. M.; Crozier, P. S.; in ’t Veld, P. J.; Kohlmeyer, A.; Moore, S. G.; Nguyen, T. D.; Shan, R.; Stevens, M. J.; Tranchida, J.; Trott, C.; Plimpton, S. J. LAMMPS - a Flexible Simulation Tool for Particle-Based Materials Modeling at the Atomic, Meso, and Continuum Scales. Computer Physics Communications 2022, 271, 108171.DOI
  46. [47]Parker, E. N. Tensor Virial Equations. Physical Review 1954, 96, 1686–1689.DOI
  47. [48]Groot, R. D.; Rabone, K. L. Mesoscopic Simulation of Cell Membrane Damage, Morphology Change and Rupture by Nonionic Surfactants. Biophysical Journal 2001, 81, 725–736.pubmed.ncbi.nlm.nih.gov/11463621
  48. [49]Good, P. I. Resampling Methods: A Practical Guide to Data Analysis; Birkhäuser, 1999.
  49. [51]GitHub repository: ssande7/lammps@0a58018. https://github.com/ssande7/lammps/commit/0a580187681f71f32260905ff8c67bf6ba896364.

Paper details

vlnc:W_n7awvqdb
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents