1 Introduction

Electrohydrodynamics deals with the coupled motion of fluids and ions [1]. Such coupling has relevant effects in microfluidics, allowing manipulation of fluids or dispersed particles using electrical stimuli [2]. A specific range of applications in which electrohydrodynamic effects are of crucial importance are nanopore systems [3, 4]. When a fluid containing ions is located in a confined region as a nanopore, a non-uniform distribution of ions may arise in a region whose size depends on the ionic concentration in the bulk, the so-called Debye layer [1]. This inhomogeneity in the ionic distribution may be generated as a consequence of the interaction of the ions with the nanopore walls, as in the case of a charged nanopore surface [5, 6]. However, it may also be induced by ion-specific interactions with neutral walls, as has been studied in the case of hydrophobic nanopores [7]. Ionic inhomogeneity can be also achieved via an external gating voltage applied to electrodes embedded in the nanopore [8, 9] or via induced charge mechanism where the same external electric field that drives the ions through the pore, also polarizes the solid membrane inducing a surface potential that, in turn, alters ion distribution in the nanopore [10, 11]. In all these cases, the ionic distributions near the walls are generally different for positive and negative ions. As a consequence, the zone near the confining walls is electrically charged, and the fluid in that region can be put in motion by an external electric field. The resulting flow is known as electroosmotic flow, and it has been shown to take place both in synthetic [6, 12, 13] and in biological [14,15,16] nanopores. Electroosmotic flow can be the dominant effect governing the translocation of particles or molecules through a nanopore [15, 17,18,19], and can generate interesting phenomena such as current rectification [12] or complex velocity profiles [20, 21].

In all the mentioned examples, the modeling of confined systems has to combine electrohydrodynamic phenomena with thermal fluctuations, which are especially important in nanopores [22]. For this reason, an extensively used technique to simulate nanopores is all-atoms Molecular Dynamics (MD) [14, 20, 23] that naturally includes all the relevant effects. For systems out of the typical length and time scales accessible to Molecular Dynamics, mesoscale models which reduce the degrees of freedom while properly modeling the thermal fluctuations of the system are needed, for a review on computational methods to study electrohydrodynamics at the nanoscale, see, among others [4, 24].

A technique which has been widely used to simulate mesoscale systems is Dissipative Particle Dynamics (DPD) [25]. In the DPD framework, the fluid is represented by a system of pairwise interacting particles [26, 27]. The original DPD model was developed to study the rheology of colloidal suspensions [26, 28], but in the last two decades it has been expanded in many different ways in order to simulate increasingly complex systems [29,30,31,32,33,34]. Physical systems studied with DPD or derived methods include blood [35, 36], polymers [37], biomolecules [38, 39], biological membranes [40], and droplets [41]. DPD simulations including electrostatic interactions have also been performed, either considering DPD particles with fixed charge [42,43,44], charged polyelectrolytes [45, 46], or with mixed approaches combining DPD model of the fluid with a Nernst-Planck solver for the ionic dynamics [47]. A different approach considers the concentrations of ionic species as additional scalar variables associated to each DPD particle, modeling the fluxes of concentration between them [34]. The approach proposed by Deng et al. [34] is promising since it allows to rescale the system size without having to explicitly parametrize the ion-solvent interaction, and it has been shown to be in good agreement with linearized fluctuating hydrodynamics theory and Molecular Dynamics simulations [48]. The purpose of the present work is to somewhat extend this strategy by providing a link between the equation of state of the electrolyte solution and the ionic transport equations, which is crucial to build thermodynamically consistent models of real electrolyte solutions.

In particular, here, we propose a mesoscale model based on DPD which is able to simulate the electrohydrodynamic phenomena taking place in nanofluidic systems. We will refer to this method as electrohydrodynamic-DPD, or EH-DPD.Footnote 1 The dissolved ions are represented by adding two degrees of freedom for each meso-particle, and the exchange of ions depends on the difference of chemical potential. Although only two charged species are considered here, the model can be easily generalized to include electrolyte solutions with more species. In Sect. 2, the equations for the dynamics of the system are reported, and it is shown (Sect. 3) that, if appropriate fluctuation-dissipation conditions are satisfied, the proposed dynamics admits an equilibrium distribution. Since the equilibrium distribution of a system is related to its thermodynamic potential, this gives a link between the terms arising in the equations of motion and the thermodynamic properties of the meso-particles, allowing a consistent definition of pressure and chemical potential. In Sect. 4, the physical model used to derive the forces and the ionic exchange rates between meso-particles is described. The electrostatic interactions are computed considering the charge carried by each meso-particle to be distributed as a Gaussian of constant variance located on its center. The chemical potential used in the model is that of a perfect gas plus a contribution due to the electrostatic interactions. The ionic exchange rates between the meso-particles are modeled as dependent on the local ionic quantities to obtain a conductance which is linearly dependent on the ionic average concentration. It is shown that this dependence implies the necessity of considering an additional drift in order for the system to reach the desired equilibrium distribution. In Sect. 5, the model is tested against analytical results for planar electroosmotic flow, finding an excellent agreement with the theoretical prediction for both the cases of overlapping and non-overlapping electric double layers. As an example of the applicability of the presented approach to simulate a more complex fluid, a Van der Waals equation of state is also used, simulating ion-specific effects such as excluded volume. The possibility of simulating different equations of state for the electrolyte solution is promising for the study of current and mass transport in systems in which phase transitions and ion specific effects are relevant, such as hydrophobic nanopores and hydrophobic nanoporous materials [50,51,52,53].

2 Electro-hydrodynamics: DPD formulation

The fluid is constituted by N meso-particles of equal mass m. The state of the ith meso-particle is described by its position \({\varvec{x}}_i\), velocity \({\varvec{v}}_i\), quantity of cations \(n^c_i\) and quantity of anions \(n^a_i\). The vector of state of the entire systems has therefore dimension 8N, and the equations for its evolution are

$$\begin{aligned}&{\mathrm {d}}{\varvec{x}}_i= {\varvec{v}}_i{\mathrm {d}}t\;, \end{aligned}$$
(1)
$$\begin{aligned}&m{\mathrm {d}}{\varvec{v}}_i={\varvec{f}}^{{\varvec{C}}}_{i}{\mathrm {d}}t+ \sum \limits _{j\ne i}\left[ \gamma w^D_{ij}{\varvec{v}}_{ji}\cdot {\varvec{e}}_{ij}{\mathrm {d}}t+ \sigma w^R_{ij}{\mathrm {d}}W^v_{ij} \right] {\varvec{e}}_{ij}\;, \end{aligned}$$
(2)
$$\begin{aligned}&{\mathrm {d}}n^c_i= \sum \limits _{j\ne i}\left[ \gamma ^c w^D_{ij}h^{c}_{ij}{\mathrm {d}}t+ \sigma ^c w^R_{ij}{\mathrm {d}}W^c_{ij}\right] \;, \end{aligned}$$
(3)
$$\begin{aligned}&{\mathrm {d}}n^a_i= \sum \limits _{j\ne i}\left[ \gamma ^aw^D_{ij} h^{a}_{ij}{\mathrm {d}}t+ \sigma ^aw^R_{ij}{\mathrm {d}}W^a_{ij}\right] \;, \end{aligned}$$
(4)

where \({\varvec{e}}_{ij}=\left( {\varvec{x}}_i-{\varvec{x}}_j\right) \Vert {\varvec{x}}_i-{\varvec{x}}_j\Vert \) is the unit vector pointing along the particle-particle direction. The increments \({\mathrm {d}}W_{ij}\) are independent increments of the Wiener process, three for each pair of particles, satisfying

$$\begin{aligned}&{\mathrm {d}}W^{v}_{ij}={\mathrm {d}}W^{v}_{ji}\;, \end{aligned}$$
(5)
$$\begin{aligned}&{\mathrm {d}}W^{c}_{ij}=-{\mathrm {d}}W^{c}_{ji}\;, \end{aligned}$$
(6)
$$\begin{aligned}&{\mathrm {d}}W^{a}_{ij}=-{\mathrm {d}}W^{a}_{ji}\;. \end{aligned}$$
(7)

Equations (1) and (2) have the structure of the standard DPD equations [54], where \({\varvec{f}}^{{\varvec{C}}}_{i}\) is a conservative force which depends on the physical model chosen and will be specified in Sect. 4, see Eqs. (6062). The parameters \(\gamma \) and \(\sigma \) control the intensity of the respective forces, i.e., the dissipative force

$$\begin{aligned} {\varvec{f}}^{{\varvec{D}}}_{ij}=\gamma w^D_{ij}\left( {\varvec{v}}_{ji}\cdot {\varvec{e}}_{ij}\right) {\varvec{e}}_{ij}\;, \end{aligned}$$
(8)

and the random force

$$\begin{aligned} {\varvec{f}}^{{\varvec{R}}}_{ij}=\sigma w^R_{ij}\xi ^{v}_{ij}{\varvec{e}}_{ij}\;, \end{aligned}$$
(9)

where \({\varvec{v}}_{ji}={\varvec{v}}_j-{\varvec{v}}_i\) is the velocity difference between two interacting meso-particles and \(\xi ^{v}_{ij}\) is a white noise stochastic process such that \({\mathrm {d}}W^{v}_{ij}=\xi ^{v}_{ij}{\mathrm {d}}t\). The functions \(w^D\) and \(w^R\) are weight functions which depend only on the interparticle distance \(r_{ij}=\Vert {\varvec{x}}_i-{\varvec{x}}_j\Vert \). Such weight functions are maximum for \(r_{ij}=0\), and vanish if the interparticle distance is larger than a cutoff radius \(r_c\). There is no prescribed functional form for \(w^D\) and \(w^R\), here the Lucy function [29] is used for \(w^D\),

$$\begin{aligned} w^D_{ij}=w^D(r_{ij})= \left( 1+3\frac{r_{ij}}{r_c}\right) \left( 1-\frac{r_{ij}}{r_c}\right) ^3\;, \end{aligned}$$
(10)

for \(r_{ij}<r_c\), while the other weight function is such that \(w^R_{ij}=\left( w^D_{ij}\right) ^{1/2}\).

Equations (3) and (4) represent the main novelty of the present paper and describe the rate at which the quantity of cations (and anions) carried by the meso-particle change, \({\dot{n}}_i^c\) (and \({\dot{n}}_i^a\)), respectively. This rate is the sum of the contributions from all the pairs and can be divided in two terms, the dissipative rates

$$\begin{aligned} J^D_{ij}=\gamma ^cw^D_{ij}h^c_{ij}\;, \end{aligned}$$
(11)

and the random rates

$$\begin{aligned} J^R_{ij}=\sigma ^cw^R_{ij}\xi ^c_{ij}\;, \end{aligned}$$
(12)

where analogous expressions hold for the anions. The same weight functions employed in Eq. (2), \(w^D\) and \(w^R\) are used. The quantities \(\gamma ^c\), \(\sigma ^c\) (\(\gamma ^a\), \(\sigma ^a\)) determine the magnitude of the dissipative and random rate at which two meso-particles exchange cations (anions). The random rates depend on the white noise processes \(\xi ^c_{ij}\) and \(\xi ^a_{ij}\), corresponding to the Wiener increments \({\mathrm {d}}W^c_{ij}=\xi ^c_{ij}{\mathrm {d}}t\) and \({\mathrm {d}}W^a_{ij}=\xi ^a_{ij}{\mathrm {d}}t\). The quantities \(h^c_{ij}\) and \(h^a_{ij}\) determine the dissipative rates for the cations and anions, as a function of the state of the system. As the conservative force \({\varvec{f}}^{{\varvec{C}}}_{i}\), also the quantities \(h^c_{ij}\) and \(h^a_{ij}\) are specified in Sect. 4, where the relevant theoretical aspects are illustrated. It will be shown there that \(h^c_{ij}\) and \(h^a_{ij}\) have two components, see Eq. (43), one related to the chemical potentials of the meso-particle for the cations and the anions, \(\mu ^c\) and \(\mu ^a\), respectively, and one appearing if \(\gamma ^a\) and \(\gamma ^c\) are chosen to be dependent on the quantity of ions in the meso-particles. The chemical potentials \(\mu ^c\) and \(\mu ^a\) may then be modeled to contain one part related to electrostatic energy, from which the ionic current arises, and one part dependent on the internal energy, thus governing ionic diffusion, see Eq. (59). The conditions of Eqs. (6) and (7) imply that \(J^R_{ij}=-J^R_{ji}\) for both ionic species. Assuming that the additional conditions

$$\begin{aligned}&h^c_{ij}=-h^c_{ji} \end{aligned}$$
(13)
$$\begin{aligned}&h^a_{ij}=-h^a_{ji} \end{aligned}$$
(14)

are satisfied, we have also \(J^D_{ij}=-J^D_{ji}\). If such conditions hold, an important consequence is that the total quantity of both species, and hence the total charge of the system, is strictly conserved during the dynamics. The dynamics of ionic fluxes between particles is sketched in Fig. 1.

Fig. 1
figure 1

Sketch of the exchange of positive ions \(n^c\) between two meso-particles. The two particles, labeled 1 and 2, have different chemical potentials \(\mu ^c\), due to different ion concentration and electrostatic potentials. The relation between the chemical potential of the meso-particles and the quantities \(h^c_{ij}\) are given in Sect. 3. Two different types of fluxes arise, one dissipative flux proportional to the difference of chemical potential, and one random flux proportional to a white noise process. The same applies to negative ions \(n^a\)

3 Equilibrium distribution and fluctuation dissipation relations (FDR)

The system of Eqs (14) can be written in the compact form of a Langevin equation:

$$\begin{aligned} \varvec{{\dot{y}}}={\varvec{u}}({\varvec{y}})+{\varvec{G}}({\varvec{y}})\varvec{\xi }\;, \end{aligned}$$
(15)

where

$$\begin{aligned} {\varvec{y}}= \begin{pmatrix} x_1\,, \ldots \,, x_{3N}\;, v_1\,, \ldots \,, v_{3N}\;, n^c_1\,, \ldots \,, n^c_N\;, n^a_1\,, \ldots \,, n^a_N \end{pmatrix}^T \end{aligned}$$
(16)

is the state vector which has dimension 8N. The standard hydrodynamics setting, with no ion transport, is recovered by reducing the state vector to its x- and v-components. In the following, vectors such as \({\varvec{u}}\) are identified by lowercase bold letters, while matrices as \({\varvec{G}}\) are identified by uppercase bold letters.

The drift vector \({\varvec{u}}({\varvec{y}})=\left( {\varvec{u}}^x_1,\ldots ,{\varvec{u}}^x_N,{\varvec{u}}^v_1\ldots ,{\varvec{u}}^v_N,u^c_1,\ldots ,u^c_N,u^a_1,\ldots ,u^a_N\right) ^T\), also of dimension 8N, includes all the deterministic terms in Eqs  (14), i.e.,

$$\begin{aligned} \begin{aligned} {\varvec{u}}^x_i=\;&{\varvec{v}}_i^T\;,\\ {\varvec{u}}^v_i=\;&m^{-1}\left[ {\varvec{f}}^C_{i}+\sum \limits _{j\ne i} \gamma w^D_{ij}\left( {\varvec{v}}_{ji}\cdot {\varvec{e}}_{ij}\right) {\varvec{e}}_{ij}\right] ^T\;\\ u^c_i=&\sum \limits _{j\ne i} \gamma ^cw^D_{ij}h_{ij}^c\;,\\ u^a_i=&\sum \limits _{j\ne i}\gamma ^aw^D_{ij}h_{ij}^a\;. \;.\end{aligned} \end{aligned}$$
(17)

The stochastic vector

$$\begin{aligned} \varvec{\xi }= \begin{pmatrix} \xi ^v_{12}\,, \ldots \,, \xi ^v_{(N-1)N}\,, \xi ^c_{12}\,, \ldots \,, \xi ^c_{(N-1)N}\,, \xi ^a_{12}\,, \ldots \,, \xi ^a_{(N-1)N} \end{pmatrix}^T \end{aligned}$$
(18)

is composed of independent white noise processes and has dimension \(3N(N-1)/2\), i.e., three times the total number of particle pairs. The matrix \({\varvec{G}}\) has therefore dimension \(8N\times 3N(N-1)/2\), and is composed by the following blocks

$$\begin{aligned} {\varvec{G}}({\varvec{y}})= \begin{pmatrix} {\varvec{0}} &{} {\varvec{0}} &{} {\varvec{0}} \\ \varvec{G^v} &{} {\varvec{0}} &{} {\varvec{0}} \\ {\varvec{0}} &{} \varvec{G^c} &{} {\varvec{0}} \\ {\varvec{0}} &{} {\varvec{0}} &{} \varvec{G^a} \end{pmatrix}\;. \end{aligned}$$
(19)

The matrix \(\varvec{G^v}\) has dimension \(3N\times N(N-1)/2\) and can be written in a compact form considering it to be composed of \(N\times N(N-1)/2\) vectors of dimension 3, \({\varvec{g}}^v_{i\alpha }\), each one containing the stochastic force acting on particle i due to the process \(\xi ^v_\alpha \), where \(\alpha \) is an index which spans all the particle pairs, i.e., \(\alpha =\alpha (p,q)\) with \(p\in [1,N-1]\) and \(q\in [p+1,N]\). Hence, \(r_\alpha =r_{pq}\), \(w^R_\alpha =w^R_{pq}\), \({\varvec{e}}_\alpha ={\varvec{e}}_{pq}\), and, using this compact notation, \({\varvec{g}}^v_{i\alpha }=m^{-1}f_{i\alpha }\sigma w^R_\alpha {\varvec{e}}_\alpha \), where

$$\begin{aligned} f_{i\alpha }={\left\{ \begin{array}{ll} \quad 0 &{}\quad {\mathrm {if}}\,i\ne p\,{\mathrm {and}}\,i\ne q\;,\\ \quad 1 &{}\quad {\mathrm {if}}\,i=p\;,\\ \quad -1 &{}\quad {\mathrm {if}}\,i=q\;. \end{array}\right. }\end{aligned}$$
(20)

The matrices \(\varvec{G^c}\) and \(\varvec{G^a}\) have dimension \(N\times N(N-1)/2\) and their expressions are, respectively, \(g^c_{i\alpha }=f_{i\alpha }\sigma ^c w^R_\alpha \) and \(g^a_{i\alpha }=f_{i\alpha }\sigma ^a w^R_\alpha \). The trajectories obtained from the integration of the Langevin Eq. (15) can be equivalently described as the evolution of a probability distribution for the state variables \({\varvec{y}}\) obeying a Fokker–Planck equation [55, 56]. With the definitions (16)–(19) the Fokker–Planck equation associated with Eq. (15) reads

$$\begin{aligned} \frac{\partial P({\varvec{y}},t)}{\partial t}=\varvec{\nabla }_y\cdot \left[ \left( -{\varvec{u}}+\frac{1}{2}\varvec{\nabla }_y \cdot \varvec{GG}^T+\frac{1}{2}\varvec{GG}^T \cdot \varvec{\nabla }_y \right) P({\varvec{y}})\right] \;, \end{aligned}$$
(21)

where \(\varvec{\nabla }_y = \left( \varvec{\nabla }_x, \varvec{\nabla }_v, \varvec{\nabla }_{c}, \varvec{\nabla }_{a} \right) ^T\) is the 8N-dimensional gradient built with the derivatives with respect to the components of \({\varvec{y}}\), Eq. (16).

It is convenient to introduce the matrix \({\varvec{D}}=\varvec{GG}^T/2\), which has dimension \(8N\times 8N\) and can be decomposed in blocks

$$\begin{aligned} {\varvec{D}}=\begin{pmatrix} {\varvec{0}} &{}\quad {\varvec{0}} &{}\quad {\varvec{0}} &{}\quad {\varvec{0}} \\ {\varvec{0}} &{}\quad \varvec{D^v} &{}\quad {\varvec{0}} &{}\quad {\varvec{0}} \\ {\varvec{0}} &{}\quad {\varvec{0}} &{}\quad \varvec{D^c} &{}\quad {\varvec{0}} \\ {\varvec{0}} &{}\quad {\varvec{0}} &{}\quad {\varvec{0}} &{}\quad \varvec{D^a} \end{pmatrix}\;, \end{aligned}$$
(22)

where \({\varvec{D}}^{{\varvec{v}}}\) is a \(3N\times 3N\) submatrix, and both \(\varvec{D^c}\) and \(\varvec{D^a}\) are \(N\times N\) submatrices. The matrix \({\varvec{D}}^{{\varvec{v}}}\) can be further decomposed in \(N\times N\) blocks of \(3\times 3\) submatrices \({\varvec{D}}_{ij}^v\). Their expressions are as follows:

$$\begin{aligned} \begin{aligned} {\varvec{D}}_{ij}^v=&\frac{1}{2} \sum \limits _{\alpha } {\varvec{g}}^v_{i\alpha }\otimes {\varvec{g}}^v_{j\alpha }=\frac{1}{2m^2}\sum \limits _{\alpha } f_{i\alpha }f_{j\alpha }\left( \sigma w^R_\alpha \right) ^2{\varvec{e}}_\alpha \otimes {\varvec{e}}_\alpha \;,\\ D^c_{ij}=&\frac{1}{2} \sum \limits _{\alpha } g^c_{i\alpha }g^c_{j\alpha }=\frac{1}{2} \sum \limits _{\alpha } f_{i\alpha }f_{j\alpha }\left( \sigma ^c w^R_\alpha \right) ^2\;,\\ D^a_{ij}=&\frac{1}{2} \sum \limits _{\alpha } g^a_{i\alpha }g^a_{j\alpha }=\frac{1}{2} \sum \limits _{\alpha } f_{i\alpha }f_{j\alpha }\left( \sigma ^a w^R_\alpha \right) ^2\;, \end{aligned} \end{aligned}$$
(23)

where the summation over \(\alpha \) between particle pairs is explicitly indicated. These expressions can be simplified accounting for the properties of product \(f_{i\alpha }f_{j\alpha }\), i.e., \(f_{i\alpha }f_{j\alpha } = 0\) except two special cases: i) \(f_{i\alpha }f_{j\alpha } = 1\) for \(i = j\) and \(\alpha = \alpha (i,q)\) or \(\alpha = \alpha (p,i)\) for any p and q; ii) \(f_{i\alpha }f_{j\alpha } = -1\) for \(i \ne j\) and \(\alpha = \alpha (i,j)\) or \(\alpha = \alpha (j,i)\).

With this in mind, Eq. (23) is rewritten as:

$$\begin{aligned} {\varvec{D}}^v_{ij}=&\frac{1}{2m^2}\delta _{ij}\sum \limits _{k\ne i}\left( \sigma w^R_{ik}\right) ^2{\varvec{e}}_{ik}\otimes {\varvec{e}}_{ik}+\frac{1}{2m^2}\left( \delta _{ij}-1\right) \left( \sigma w^R_{ij}\right) ^2{\varvec{e}}_{ij}\otimes {\varvec{e}}_{ij}\;, \end{aligned}$$
(24)
$$\begin{aligned} D^c_{ij}=&\frac{1}{2}\delta _{ij}\sum \limits _{k\ne i}\left( \sigma ^c w^R_{ik}\right) ^2+\frac{1}{2}\left( \delta _{ij}-1\right) \left( \sigma ^c w^R_{ij}\right) ^2\;, \end{aligned}$$
(25)
$$\begin{aligned} D^a_{ij}=&\frac{1}{2}\delta _{ij}\sum \limits _{k\ne i}\left( \sigma ^a w^R_{ik}\right) ^2+\frac{1}{2}\left( \delta _{ij}-1\right) \left( \sigma ^a w^R_{ij}\right) ^2\; . \end{aligned}$$
(26)

In the following it is assumed that the dynamics generated by Eq. (15) admits an equilibrium distribution

$$\begin{aligned} P_{eq}({\varvec{y}}) = C \exp \left[ S({\varvec{y}})/k_B\right] \; , \end{aligned}$$
(27)

where \(S({\varvec{y}}) = k_B (\ln \left[ P_{eq}({\varvec{y}}) \right] + \ln C)\) is an appropriate thermodynamic potential depending on the coarse-grained variables \({\varvec{y}}\) and \(k_B\) is Boltzmann constant. In the present context, dealing with an isolated system, S can be understood as the (coarse-grained) entropy of the system. The equilibrium distribution must be the solution of the Fokker–Planck Eq. (21), i.e.,

$$\begin{aligned} 0=\varvec{\nabla }_y \cdot \left[ \left( -{\varvec{u}}+\varvec{\nabla }_y \cdot {\varvec{D}}+{\varvec{D}} \cdot \varvec{\nabla }_y S\right) P_{eq}({\varvec{y}})\right] \; . \end{aligned}$$
(28)

For the following calculations is convenient to split the drift term \({\varvec{u}}\) into two parts, the conservative drift and the dissipative drift, \({\varvec{u}}={\varvec{u}}^C+{\varvec{u}}^D\). Using the same notation as in Eq. (17),

$$\begin{aligned} \begin{aligned} {\varvec{u}}^{C,x}_i=&{\varvec{v}}_i^T\;,\\ {\varvec{u}}^{C,v}_i=&m^{-1}\left( {\varvec{f}}^C_i\right) ^T\;,\\ u^{C,c}_i=&0\;,\\ u^{C,a}_i=&0\;,\\ \end{aligned} \end{aligned}$$
(29)

while for the dissipative drift,

$$\begin{aligned} \begin{aligned} {\varvec{u}}^{D,x}_i=\;&{\varvec{0}}\;,\\ {\varvec{u}}^{D,v}_i=&m^{-1}\left[ \sum \limits _{j\ne i} \gamma w^D_{1j}\left( {\varvec{v}}_{ji}\cdot {\varvec{e}}_{ij}\right) {\varvec{e}}_{ij}\right] ^T\;,\\ u^{D,c}_i=&\sum \limits _{j\ne i} \gamma ^cw^D_{ij}h_{ij}^c\;,\\ u^{D,a}_i=&\sum \limits _{j\ne i} \gamma ^aw^D_{ij}h_{ij}^a\;. \end{aligned}\;. \end{aligned}$$
(30)

3.1 FDR for hydrodynamics

The Fluctuation Dissipation Relation (FDR) for pure hydrodynamics is discussed there to recover within the present framework the classical DPD expression. The requirement that the conservative interactions alone should leave the equilibrium distribution unchanged implies that

$$\begin{aligned} \varvec{\nabla }_y\cdot \left( \varvec{u^C}P_{eq}\right) = \varvec{u^C}\cdot \varvec{\nabla }_yP_{eq}= \left[ \varvec{u^C}\cdot \varvec{\nabla }_y\left( \frac{S}{k_B}\right) \right] P_{eq}=0\;, \end{aligned}$$
(31)

where \(\varvec{\nabla }_y \cdot \varvec{u^C} = 0\) and \(\varvec{\nabla }_y P_{eq} = P_{eq} \varvec{\nabla }_y S/k_B\). This condition is satisfied if

$$\begin{aligned}&\frac{\partial S}{\partial {\varvec{x}}_i}\propto {\varvec{f}}^{{\varvec{C}}}_i\;, \end{aligned}$$
(32)
$$\begin{aligned}&\frac{\partial S}{\partial {\varvec{v}}_i}\propto - m{\varvec{v}}_i\;. \end{aligned}$$
(33)

As will be clear from the following, the proportionality constant is assumed to be 1/T, with T the temperature, taken to be uniform throughout the system. Based on Eqs. (31) and (28), the expression

$$\begin{aligned} \varvec{u^D}=\varvec{\nabla }_y\cdot {\varvec{D}}+{\varvec{D}} \cdot \varvec{\nabla }_yS\; \end{aligned}$$
(34)

gives a condition for the Fokker–Planck Eq. (21) to have the equilibrium solution of Eq. (27) with S satisfying Eqs. (32) and (33). The Fokker–Planck equation can then be rewritten as follows:

$$\begin{aligned} {\dot{P}}=-\varvec{\nabla }\cdot \left[ \left( {\varvec{u}}^C+{\varvec{D}}\cdot \varvec{\nabla }S-{\varvec{D}}\cdot \varvec{\nabla }\right) P\right] \;. \end{aligned}$$
(35)

Using Eq (30), as well as the definition of dissipative drift Eq. (34), gives for the velocity component of meso-particle i,

$$\begin{aligned} m^{-1}\sum \limits _{j\ne i} \gamma w^D_{ij}\left( {\varvec{v}}_{ji}\cdot {\varvec{e}}_{ij}\right) {\varvec{e}}_{ij}= \sum \limits _{j\ne i} \frac{1}{2m^2}\left( \sigma w^R_{ij}\right) ^2{\varvec{e}}_{ij}\otimes {\varvec{e}}_{ij}\frac{1}{k_B}\left( \frac{\partial S}{\partial {\varvec{v}}_i}-\frac{\partial S}{\partial {\varvec{v}}_j}\right) \;, \end{aligned}$$
(36)

where we used the fact that the matrix \({\varvec{D}}\) doesn’t depend on the velocity, and hence \(\varvec{\nabla }_v\cdot {\varvec{D}}=0\). Considering Eqs. (33), (36) is identically satisfied if the following two conditions are met

$$\begin{aligned} \begin{aligned} \gamma&=\frac{\beta \sigma ^2}{2},\\ w^D_{ij}&=\left( w^R_{ij}\right) ^2, \end{aligned} \end{aligned}$$
(37)

with \(\beta ^{-1}= k_B T\). These are the same FDRs found by Español and Warren [27] for hydrodynamics.

3.2 FDR for ionic transport

The Fluctuation Dissipation Relations (FDRs) discussed in the previous sections for pure hydrodynamics are here extended to include ionic transport. Clearly all the results previously established still hold in presence of transported charges.

It is instrumental to introduce the problem by considering the simplest case of constant noise intensities \(\sigma ^c\) and \(\sigma ^a\) which imply \(\varvec{\nabla }_c\cdot {\varvec{D}}^c=0\) and \(\varvec{\nabla }_a\cdot {\varvec{D}}^a=0\). Using Eqs. (30) and (34), and using the expressions for \({\varvec{D}}^c\) and \({\varvec{D}}^a\) from Eqs. (25) and (26), we obtain

$$\begin{aligned} \begin{aligned}&\sum \limits _{j\ne i} \gamma ^cw^D_{ij}h_{ij}^c= \frac{1}{2}\left( \sigma ^c w^R_{ij}\right) ^2\frac{1}{k_B}\left( \frac{\partial S}{\partial n^c_i}-\frac{\partial S}{\partial n^c_j}\right) \;,\\&\sum \limits _{j\ne i} \gamma ^aw^D_{ij}h_{ij}^a= \frac{1}{2}\left( \sigma ^a w^R_{ij}\right) ^2\frac{1}{k_B}\left( \frac{\partial S}{\partial n^a_i}-\frac{\partial S}{\partial n^a_j}\right) \;.\end{aligned} \end{aligned}$$
(38)

Exploiting the second condition in (37) for the weight functions, we obtain

$$\begin{aligned} \begin{aligned}&\gamma ^c=\frac{\beta }{2} \sigma _c^2\;,\\&\gamma ^a=\frac{\beta }{2} \sigma _a^2 \; \end{aligned} \end{aligned}$$
(39)

and

$$\begin{aligned} \begin{aligned} h^c_{ij}=&T\left( \frac{\partial S}{\partial n^c_i}-\frac{\partial S}{\partial n^c_j}\right) =\mu ^c_j-\mu ^c_i\;,\\ h^a_{ij}=&T\left( \frac{\partial S}{\partial n^a_i}-\frac{\partial S}{\partial n^a_j}\right) =\mu ^a_j-\mu ^a_i \;,\end{aligned} \end{aligned}$$
(40)

where the chemical potentials of the meso-particle are defined as:

$$\begin{aligned} \begin{aligned} \mu ^c_i=&-T\frac{\partial S}{\partial n^c_i}\;,\\ \mu ^a_i=&-T\frac{\partial S}{\partial n^a_i}\;. \end{aligned} \end{aligned}$$
(41)

Removing the assumption of constant noise intensity, \(\sigma ^c\) and \(\sigma ^a\) can now depend on cations and anions carried by the interacting particles, i.e., \(\sigma ^c=\sigma ^c(n^c_i,n^c_j)=\sigma ^c_{ij}\) and \(\sigma ^a=\sigma ^a(n^a_i,n^a_j)=\sigma ^a_{ij}\) with \(\sigma ^c_{ij}=\sigma ^c_{ji}\) and \(\sigma ^a_{ij}=\sigma ^a_{ji}\). Hence \(\varvec{\nabla }_c\cdot {\varvec{D}}^c\) and \(\varvec{\nabla }_a\cdot {\varvec{D}}^a\) do not vanish, in general, and must be considered in the drift term, Eq. (34). From the expressions for \({\varvec{D}}^c\) and \({\varvec{D}}^a\), Eqs. (25) and (26), the dissipative drifts now read

$$\begin{aligned} \begin{aligned}&\sum \limits _{j\ne i} \gamma ^cw^D_{ij}h_{ij}^c= \frac{1}{2}\sum \limits _{j\ne i}\left( \sigma ^c_{ij} w^R_{ij}\right) ^2\left[ \frac{1}{\left( \sigma ^c_{ij}\right) ^2}\left( \frac{\partial \left( \sigma ^c_{ij}\right) ^2}{\partial n^c_i}-\frac{\partial \left( \sigma ^c_{ij}\right) ^2}{\partial n^c_j}\right) + \frac{1}{k_B}\left( \frac{\partial S}{\partial n^c_i}-\frac{\partial S}{\partial n^c_j}\right) \right] \;,\\&\sum \limits _{j\ne i} \gamma ^aw^D_{ij}h_{ij}^a= \frac{1}{2}\sum \limits _{j\ne i}\left( \sigma ^a_{ij} w^R_{ij}\right) ^2\left[ \frac{1}{\left( \sigma ^a_{ij}\right) ^2}\left( \frac{\partial \left( \sigma ^a_{ij}\right) ^2}{\partial n^a_i}-\frac{\partial \left( \sigma ^a_{ij}\right) ^2}{\partial n^a_j}\right) + \frac{1}{k_B}\left( \frac{\partial S}{\partial n^a_i}-\frac{\partial S}{\partial n^a_j}\right) \right] \;,\\ \;\end{aligned} \end{aligned}$$
(42)

which, using Eq. (37) for the weight functions together with Eq. (39) and the definitions (41), gives the explicit expression for \(h^c_{ij}\) and \(h^a_{ij}\) in the general case

$$\begin{aligned} \begin{aligned}&h^c_{ij}=\frac{1}{\beta \gamma ^c_{ij}}\left( \frac{\partial \gamma ^c_{ij}}{\partial n^c_i}-\frac{\partial \gamma ^c_{ij}}{\partial n^c_j}\right) +\mu ^c_{ji}\;,\\&h^a_{ij}=\frac{1}{\beta \gamma ^a_{ij}}\left( \frac{\partial \gamma ^a_{ij}}{\partial n^a_i}-\frac{\partial \gamma ^a_{ij}}{\partial n^a_j}\right) +\mu ^a_{ji}\;. \end{aligned} \end{aligned}$$
(43)

It is worth noting that the antisymmetry conditions (13) are satisfied, implying conservation of the total quantity of each ionic species. As typical, when the noise intensity depends on the state variables, additional drift terms appear in the Langevin equation, see also [55, 56].

4 Physical model

In the previous section, it was shown that if the conditions (39), (37), (32) and (33) are met, system (14) admits a stationary equilibrium solution given by (27). The conservative force \({\varvec{f}}^C_i\), the particle velocity \({\varvec{v}}_i\) and the chemical potentials \(\mu ^c_i\) and \(\mu ^a_i\) are related to the entropy of the system S through Eqs. (32), (33) and (41). The system (total) energy \(E_{TOT}\) may be expressed as:

$$\begin{aligned} E_{TOT}=U_E+\sum \limits _{i=1}^N\left( \frac{m}{2}{\varvec{v}}_i^2+U_i\right) \;, \end{aligned}$$
(44)

where \(U_E\) is the electrostatic energy of the system. The sum includes the portion of kinetic energy and internal energy associated with particle i, \(m{\varvec{v}}^2_i/2\) and \(U_i\), respectively. Under the assumption of local equilibrium, the particle entropy can be expressed in terms of Helmholtz free energy \(A_i\) and internal energy,

$$\begin{aligned} S_i=\frac{1}{T}\left( U_i-A_i\right) \;. \end{aligned}$$
(45)

Hence, the total entropy reads

$$\begin{aligned} S=\sum \limits _{i=1}^NS_i=\sum \limits _{i=1}^N\frac{1}{T}\left( U_i-A_i\right) =\frac{1}{T}\left[ E_{TOT}-U_{E}-\sum \limits _{i=0}^N \left( A_i+\frac{m}{2}{\varvec{v}}^2_i\right) \right] \; . \end{aligned}$$
(46)

For an isolated system \(E_{TOT} = const\) and the entropy S is fully specified once free energy \(A_i\) and electrostatic energy \(U_E\) are given in terms of the coarse-grained variables. In general terms, the Helmholtz free energy density (per unit mass) is a function of specific volume, temperature and number densities. As a consequence, the free energy of the meso-particle depends on particle volume \(V_i\), (uniform) temperature, and composition given in terms of number of atoms (in the sense of indivisible particles) belonging to the meso-particle. In the following, the composition is specified in terms of \(n^s_i\), \(n^c_i\), \(n^a_i\), the number of solvent, cationic and anionic atoms, respectively. Hence, \(A_i = A_i(V_i,T,n_i^s, n_i^c, n_i^a)\).

Before specifying the free energy in detail, it is worth defining first the meso-particle volume,

$$\begin{aligned} V_i^{-1}=\sum \limits _{j=1}^Nw(r_{ij})\;, \end{aligned}$$
(47)

where w(r) is a differentiable compactly supported, positive function with (single) maximum at \(r=0\), with integral normalized to 1, that vanishes identically for r larger than a cutoff \(r_c\). Hereafter, w(r) is specified as the Lucy’s function commonly used in the context of Smoothed Dissipative Particle Dynamics [29],

$$\begin{aligned} w\left( {r}/{r_c}\right) ={\left\{ \begin{array}{ll} \frac{\displaystyle 105}{\displaystyle 16 \pi \, r_c^3}\left( 1+3r/r_c\right) \left( 1-r/r_c\right) ^3\quad {\mathrm {if}}\quad r/r_c<1\;, \\ 0\quad {\mathrm {if}}\quad r/r_c>1\; . \end{array}\right. } \end{aligned}$$
(48)

4.1 Free energy

As partially anticipated, the meso-particle is considered to be constituted by M atoms of three different kinds and equal mass, namely \(n^c_i\) cations, \(n^a_i\) anions and \(n^s_i\) solvent atoms. Number of cations, anions and solvent atoms may change during the dynamics under the constraint of constant total mass,

$$\begin{aligned} n^c_i+n^a_i+n^s_i=M={\mathrm {const}}\;. \end{aligned}$$
(49)

A simple model for the particle free energy \(A_i\) follows by considering a system comprising three non-interacting species (perfect gas model) [57]

$$\begin{aligned} A_i= \frac{n^c_i}{\beta }\left[ \log \left( \frac{n^c_i\lambda ^3}{V_i}\right) -1\right] +\frac{n^a_i}{\beta }\left[ \log \left( \frac{n^a_i\lambda ^3}{V_i}\right) -1\right] +\frac{n^s_i}{\beta }\left[ \log \left( \frac{n^s_i\lambda ^3}{V_i}\right) -1\right] \;, \end{aligned}$$
(50)

where \(\lambda \), depending on temperature and atoms masses, is the De Broglie’s thermal wavelength. In Eq. (50), the dependence on \(n^s_i\) may eliminated in favor of the total number of atoms forming the meso-particle, Eq. (49), while the temperature, and hence \(\lambda \), is assumed to be the same in all the meso-particles.

Using the constraint of Eq. (49) to eliminate the number of solvent atoms \(n_s\), Eq. (50) reads

$$\begin{aligned} \begin{aligned} A_i(V_i,n^c_i,n^a_i)&=\frac{n^c_i}{\beta }\left[ \log \left( \frac{n^c_i}{M-n^c_i-n^a_i}\right) -1\right] +\\&\quad +\frac{n^a_i}{\beta }\left[ \log \left( \frac{n^a_i}{M-n^c_i-n^a_i}\right) -1\right] +\frac{M}{\beta }\log \left( \frac{M-n^a_i-n^c_i}{V_i}\right) \;, \end{aligned} \end{aligned}$$
(51)

where inessential constant terms have been omitted. Notice that the particle pressure, related to the derivative of the free energy with respect to volume, turns out to depend on the total number of atoms M, see § 4.3 below.

4.2 Electrostatics of EH-DPD particles

The expression (46) for the entropy requires an explicit form for the electrostatic energy. The coarse-grained variables \(n^c_i\) and \(n^a_i\) provide the number of cations and anions carried by the meso-particle. Its charge is then

$$\begin{aligned} q_i=q_cn^c_i-q_an^a_i\;, \end{aligned}$$
(52)

with \(q_c\) and \(q_a\) the (absolute value of the) charge of a single cation/anion. The charge distribution associated with each meso-particle is given by as a Gaussian function centered in \({\varvec{x}}_i\) with constant variance \(s^2\), i.e.,

$$\begin{aligned} \rho _i({\varvec{r}})=\rho ({\varvec{r}},{\varvec{x}}_i,q_i)=\frac{q_i}{\left( 2\pi s^2\right) ^{3/2}}\exp {\frac{-\Vert {\varvec{r}}-{\varvec{x}}_i\Vert ^2}{2s^2}}\; . \end{aligned}$$
(53)

The energy ascribed to the interaction between meso-particles, \(i\ne j\), is then [58]

$$\begin{aligned} U^E_{ij} = U^E_{ji} = \frac{1}{2} \int \int \frac{\rho _i({\varvec{r}})\rho _j(\varvec{r'})}{\Vert {\varvec{r}}-\varvec{r'}\Vert }{\mathrm {d}}{\varvec{r}}{\mathrm {d}}\varvec{r'} =\frac{q_iq_j}{r_{ij}}{{\,\mathrm{erf}\,}}\left( \frac{r_{ij}}{2s}\right) \;, \end{aligned}$$
(54)

where the interaction energy of the couple is \(U^E_{ij} + U^E_{ji}\). Introducing the self-energy, \(i=j\),

$$\begin{aligned} U^E_{ii}= \frac{1}{2}\int \int \frac{\rho _i({\varvec{r}})\rho _i(\varvec{r'})}{\Vert {\varvec{r}}-\varvec{r'}\Vert }{\mathrm {d}}{\varvec{r}}{\mathrm {d}}\varvec{r'} =\frac{q^2_i}{2s\sqrt{\pi }}\;. \end{aligned}$$
(55)

The self-energy does not contribute to the electrostatic force, since it is independent of the relative positions of the meso-particles. However, it does contribute to the total electrostatic potential of the meso-particle, which can be defined as:

$$\begin{aligned} \Phi _i=\frac{\partial U^E}{\partial q_i}=\frac{q_i}{s\sqrt{\pi }}+\sum \limits _{i\ne j}^N \frac{q_j}{r_{ij}}{{\,\mathrm{erf}\,}}\left( \frac{r_{ij}}{2s}\right) \;. \end{aligned}$$
(56)

Since \(\lim \limits _{r\rightarrow 0}{{\,\mathrm{erf}\,}}(r/(2s))/r=1/(s\sqrt{\pi })\), the above expression can be rewritten in compact form as:

$$\begin{aligned} \Phi _i=\sum \limits _{j=1}^N \frac{q_j}{r_{ij}}{{\,\mathrm{erf}\,}}\left( \frac{r_{ij}}{2s}\right) \;, \end{aligned}$$
(57)

where now the summation also includes the term \(j=i\) (\(r_{ii}=0\)). Finally, the total electrostatic energy of the system can be expressed as:

$$\begin{aligned} U_E=\frac{1}{2}\sum \limits _{i=1}^Nq_i\Phi _i \; . \end{aligned}$$
(58)

4.3 Chemical potential and conservative force

Specifying the electrostatic energy completes the expression of the entropy, Eq. (46), providing the chemical potential, Eq. (41). Its explicit expression for cations and anions is

$$\begin{aligned} \begin{aligned}&\mu ^c_i=-T\frac{\partial S}{\partial n^c_i}=\frac{\partial \left( A_i+U_E\right) }{\partial n^c_i}=\frac{1}{\beta }\log \left( \frac{n^c}{M-n^c-n^a}\right) +q_c\Phi _i\;,\\&\mu ^a_i=-T\frac{\partial S}{\partial n^a_i}=\frac{\partial \left( A_i+U_E\right) }{\partial n^a_i}=\frac{1}{\beta }\log \left( \frac{n^a}{M-n^c-n^a}\right) -q_a\Phi _i\;,\\ \end{aligned} \end{aligned}$$
(59)

respectively, where constant terms have been omitted, since the dynamics depends only on the chemical potential differences. The effect of electrostatic interactions, proportional to the particle electrostatic potential, adds to the familiar contribution coming from the (perfect gas) equation of state.

The conservative component of the force acting on the particle is obtained by differentiating the entropy S with respect to particle position, Eq. (32),

$$\begin{aligned} {\varvec{f}}^{{\varvec{C}}}_i=T\frac{\partial S}{\partial {\varvec{x}}_i}=-\frac{\partial \left( U_E+A\right) }{\partial {\varvec{x}}_i}={\varvec{f}}^{{\varvec{E}}}_i+{\varvec{f}}^{{\varvec{P}}}_i\;, \end{aligned}$$
(60)

where \(A=\sum \limits _{j=1}^NA_j\) is the system free energy. As for the chemical potential, the conservative force comes from two contributions. The origin of the electrostatic force \({\varvec{f}}^{{\varvec{E}}}_i\) is immediately clear. It can be computed using Eqs. (58) and (56), giving

$$\begin{aligned} {\varvec{f}}^{{\varvec{E}}}_i=-\sum \limits _{j\ne i}q_i\frac{\partial \Phi _i}{\partial r_{ij}}{\varvec{e}}_{ij}=\sum \limits _{j\ne i}q_iq_j\frac{\sqrt{\pi }s{{\,\mathrm{erf}\,}}\left( r_{ij}/(2s)\right) -r_{ij}\exp \left( -r_{ij}^2/(4s^2)\right) }{s\sqrt{\pi }r^2_{ij}}{\varvec{e}}_{ij}\;. \end{aligned}$$
(61)

The second contribution follows from the equation for the free energy A, (50), giving

$$\begin{aligned} {\varvec{f}}^{{\varvec{P}}}_i=-\sum \limits _{j\ne i}\frac{\partial A_j}{\partial {V_j}}\frac{\partial V_j}{\partial {\varvec{x}}_i}=\sum \limits _{j\ne i}\frac{M}{\beta }\left( V_j+V_i\right) w'_{ij}{\varvec{e}}_{ij}\;, \end{aligned}$$
(62)

where Eq. (47) has been used and \(w'_{ij}\) is the derivative of the weight function \(w(r_{ij})\). It could be noted that \(- \partial A_i/\partial V_i = M/\beta V_i\) is the meso-particle pressure \(p_i\), providing the standard interpretation of \({\varvec{f}}^{{\varvec{P}}}_i\) as the pressure force.

Fig. 2
figure 2

Ionic current density J as defined in Appendix 1 resulting after the application of an electric field \(E=10\) (simulation units, see Sect. 5.1 for details), in the direction parallel to the application of the field. The current density was computed for different values of the dissipative parameters \(\gamma ^a_0=\gamma ^c_0=\gamma _0\) and of average concentration \(c_0\). The electric current density (and hence the conductivity) shows a linear dependence on the ion concentration \({c_0}\) for the range of concentrations simulated. For these simulations a value of \(q^c=q^a=q=0.6\) has been used

4.4 Ionic exchange between particles

The coefficients \(\gamma ^{c/a}\) control the ionic exchange between particles and don’t affect the equilibrium distribution. Instead, they control the cationic and anionic conductivity of the solution, see Appendix 1. The following expression was chosen for the coefficients \(\gamma ^{c/a}\)

$$\begin{aligned} \begin{aligned}&\gamma _c(n^c_i,n^c_j)=\gamma ^c_0\sqrt{n^c_in^c_j}\\&\gamma _a(n^a_i,n^a_j)=\gamma ^a_0\sqrt{n^a_in^a_j}\;, \end{aligned}\end{aligned}$$
(63)

where \(\gamma ^{c/a}_0\) are parameters which control the ionic current between particles at a given concentration. The resulting ionic conductivity shows a linear dependence on the ionic concentration \({c_0}\) and on the parameters \(\gamma ^{c/a}_0\), at least in the explored range of parameters, see Fig. 2. As previously shown, Eq. (43), the use of parameters \(\gamma ^{c/a}\) which depend on concentration gives rise to an additional exchange of ions between the particles independent on the chemical potential

$$\begin{aligned} \begin{aligned}&h^c_{ij}=\frac{1}{\beta }\left( \frac{1}{n^c_i}-\frac{1}{n^c_j}\right) +\mu ^c_{ji}\\&h^a_{ij}=\frac{1}{\beta }\left( \frac{1}{n^a_i}-\frac{1}{n^a_j}\right) +\mu ^a_{ji} \; . \end{aligned} \end{aligned}$$
(64)

5 Validation

As a classical case of study to validate electrohydrodynamic DPD models, a system consisting of a planar channel of height h with given surface charge at the two walls is simulated [34]. Starting from ideal solutions, the results will be extended to a more general Van der Waals equation of state. Before describing the actual set-up, it is instrumental to review classical solutions for electroosmotic flows based on the Debye approximation \(\beta \zeta q \ll 1\) where \(\zeta \) is the wall electric potential and \(q=q_c=q_a\) is the ionic charge of the ions, where the electrolyte has been assumed symmetric. In this case, the 1-D version of the Poisson–Boltzmann equation reads [1]

$$\begin{aligned} \frac{{\mathrm {d}}^2\phi }{{\mathrm {d}}z^2}= \frac{2qc_0}{\varepsilon }\sinh (\beta q\phi (z)) \simeq \frac{\phi (z)}{\lambda _D^2} \;, \end{aligned}$$
(65)

where z is the coordinate orthogonal to the channel walls, \(\phi \) is the electrostatic potential, \(c_0\) the concentration at zero potential and \( \varepsilon \) the dielectric constant. In the linearized form on the right-hand side of the equation, \(\lambda _D=\left( 2 \beta q^2c_0/\varepsilon \right) ^{-1/2}\) is the Debye length. The boundary conditions for this equation relate the derivative of the potential at the walls to the wall charge, i.e., assuming a vanishing electric field outside the channel

$$\begin{aligned} \frac{{\mathrm {d}}\phi }{{\mathrm {d}}z}\biggr |_{z=h/2}=-\frac{\sigma _{up}}{\varepsilon }\;, \qquad \qquad \qquad \qquad \frac{{\mathrm {d}}\phi }{{\mathrm {d}}z}\biggr |_{z=-h/2}=\frac{\sigma _{low}}{\varepsilon }\;, \end{aligned}$$
(66)

where \(\sigma _{up}\) and \(\sigma _{low}\) are, respectively, the surface charges of the upper and lower walls.

We consider two different scenarios: (i) the symmetric case (suffix S) with both walls with same surface charge, \(\sigma _{up}=\sigma _{low}=\sigma \) and (ii) the antisymmetric case (suffix A) where the two walls are oppositely charged, \(\sigma _{up}=-\sigma _{low}=\sigma \). In the two cases, the analytical solutions of Eq. (65) read [59]

$$\begin{aligned} \phi ^S=\zeta ^S\frac{\cosh (z/\lambda _D)}{\cosh (h/(2\lambda _D))}\;, \qquad \qquad \qquad \qquad \phi ^A=\zeta ^A\frac{\sinh (z/\lambda _D)}{\sinh (h/(2\lambda _D))}\;, \end{aligned}$$
(67)

and the wall potentials (\(\zeta \)-potentials) in the symmetric and antisymmetric case are, respectively,

$$\begin{aligned} \zeta ^S=\frac{\lambda _D\sigma }{\varepsilon \tanh (h/2\lambda _D)}\;, \qquad \qquad \qquad \qquad \zeta ^A=\frac{\lambda _D\sigma \tanh (h/2\lambda _D)}{\varepsilon }\;. \end{aligned}$$
(68)

The resulting cationic and anionic concentrations are \(c^c(z)=c_0\exp \left( -q\phi \right) \) and \(c^a(z)=c_0\exp \left( q\phi \right) \), respectively. The electroosmotic velocity profile which arises after the application of an electric field E parallel to the walls follows from the Stokes equation endowed with no slip conditions at the walls,

$$\begin{aligned} \mu \frac{d^2u}{dz^2} + qE (c^c - c^a) = 0\, , \end{aligned}$$
(69)

as

$$\begin{aligned} u^S&=v_{eo}^S\left( 1-\frac{\phi ^S}{\zeta ^S}\right) \;,\end{aligned}$$
(70)
$$\begin{aligned} u^A&=v_{eo}^A\left( \frac{2z}{L}-\frac{\phi ^A}{\zeta ^A}\right) \;, \end{aligned}$$
(71)

where \(v_{eo}=\varepsilon \zeta E/\mu \) is the electroosmotic velocity and \(\mu \) is the dynamic viscosity.

5.1 Simulation set up

For all the simulations reported here, we set \(m=1\), \(r_c=2\) and \(\beta =3.23~\cdot ~10^{-3}\), respectively, the mass of the meso-particle, the cutoff radius and the inverse thermal energy. The remaining free parameters of the EH-DPD system are the number of atoms in the meso-particle (\(M=50\) in all simulations), the ion charges, which are set to be equal, \(q_a=q_c=q\), the parameter \(s=0.67\) related to the Gaussian used to model electrostatic interactions, the dissipative coefficient \(\gamma \) and the corresponding coefficients for the ionic transport \(\gamma ^c_0\) and \(\gamma ^a_0\) appearing in Eq. (63). When not specified, we set \(\gamma =3000\), leading to a viscosity of \(\mu =61.22\) as computed by imposing a Poiseuille flow and measuring the resulting velocity profile [60].

The parameters \(\gamma ^c_0\) and \(\gamma ^a_0\) can be calibrated to obtain a given conductivity, see Fig. 2, estimated by applying a constant electric field to a triply-periodic EH-DPD system and measuring the resulting electric current density as defined in Appendix A. We did so for different values of \(\gamma ^c_0\) and \(\gamma ^a_0\) and for different ionic concentrations \(c_0\). We also estimated the conductivity of the fluid by an independent approach based on linear response theory, see Appendix B, finding a good agreement with the nonequilibrium simulations. When not specified, the values used in the following subsection are \(\gamma ^c_0 = \gamma ^a_0 = 1\).

To simulate an electroosmotic flow, a model for the wall is needed. We simulated a planar channel with a height of 20, modeled using fixed meso-particles of constant charge with a random uniform distribution in two layers of width 2 for each side with a particle number density of \(\rho _{wall}=1.125\). In a previous work [56], we showed that in the DPD context, walls constituted by fixed random particles are suitable to guarantee impermeability and a low slip. A similar model was employed here the main differences being that now the wall has a constant particle density. The one exposed towards the liquid mainly controls the slippage, while the external one guarantees wall impermeability. The wall particles interact with the fluid particles via the multi-body potential which defines the pressure force, see Eq. (62), where for the wall particle volume a constant value of \(V_{wall}=0.2\) has been used for the inner layer and \(V_{wall}=20\) for the external one. In case the wall is charged, also the electrostatic forces are included by charging the layer exposed to the fluid. The dissipative interaction between the wall and the fluid was set to \(\gamma _{wall/fluid}=100\). We measured the slip length of the resulting fluid-wall system by imposing a Poiseuille flow, observing an acceptably low slip length \(<2\%\) of the channel height.

In the set of Eq. (1), there is no guarantee that the quantities \(n^c\) and \(n^a\) are positive. In fact, due to the stochastic nature of the equations, unfrequent, strong events can lead to a negative number of ions in the particle. The chemical potential of Eq. (59) and the functions \(\gamma ^a\) and \(\gamma ^c\) are not defined for negative \(n^a_i\) and \(n^c_i\), thus a limiting value of \(n_{limit}=4.5~\cdot ~10^{-5}\) was used. We verified that changing this parameter doesn’t affect the results reported here. The electrostatic interactions are dealt with the Ewald summation algorithm [58] and the model was implemented using the DPD package of LAMMPS [61]. The Euler–Maruyama algorithm [62] was used to integrate Eq. (1) in the Itô formalism using a time step of \(\Delta t=10^{-4}\).

5.2 Electroosmotic flow

Fig. 3
figure 3

Ionic density profile for the cations (blue) and the anions (red) compared with the analytical solutions (black lines). Figures a and c are cases with symmetric wall charges, while figures b and d are cases with antisymmetric wall charges. In the two top plots, two different values of the Debye length are considered and \(\zeta =258\), while in the bottom plots the zeta potential is changed and \(\lambda _D=3\)

We used the planar wall simulation setting as described in Sec. 5.1, both in the symmetric charge setting (positive charges at both walls) and in the antisymmetric charge setting (positive charges in the upper wall, negative charges in the lower wall). The ionic charge q, equal for both species, has been tuned to adjust the Debye screening length, using \(c_0=3.75\) as ionic density. The concentrations of the two ionic species are set to guarantee the global electroneutrality of the system, with the additional condition \(\sqrt{c^cc^a}=c_0\). An external electric field E parallel to the walls forces the electroosmotic flow in the channel. The intensity of the electric field has been tuned to control the electroosmotic velocity. Finally, the wall charge \(\sigma \) is tuned to control the \(\zeta \)-potential. After equilibration, a Debye layer sets in at the walls. Ten systems were simulated five each for the symmetric and antisymmetric setting, corresponding to different values of Debye length and surface charge. The cationic and anionic density profiles are plotted in Fig. 3 together with the particle electrostatic potential for several symmetric and antisymmetric systems in comparison with the predictions of the linearized Poisson–Boltzmann model. The simulated ionic density is in good agreement with the analytical predictions for all simulations, except for slight differences for the largest \(\zeta \)-potentials (see Fig. 3c–d). This is not unexpected, since the Debye approximation is bound to fail at large \(\beta q\zeta \).

The electroosmotic flow generated by the external electric field through the charge imbalance near the walls is plotted in Fig. 4 for different Debye lengths and electroosmotic velocities in comparison with the analytical predictions.

Fig. 4
figure 4

Velocity profile of the electroosmotic flow generated by a constant electric field parallel to the walls compared with the analytical solutions (black lines). Figures a and c correspond to cases with both walls positively charged, while figures b and d are cases with a positive charge in the lower wall, \(z=-5\), and a negative charge in the upper wall, \(z=5\). In the two top plots, two different values of the Debye length are considered using an electroosmotic velocity of \(v_{eo}=1\), while in the bottom plots the electroosmotic velocity is changed by changing the electric field and \(\lambda _D=3\). In all the plots, \(\zeta =258\)

5.3 Mapping to dimensional units

After the previous discussion on the general features of the proposed approach, in this section we consider the specific case of a channel with height \(h = 10 \, \mathrm{nm}\), Debye length \(\lambda _D = 4.28 \, \mathrm{nm}\), mass density \(10^3 \, \mathrm{Kg/m^3}\), electric conductivity \(\kappa = 70 \, \mathrm{mS/m}\) and viscosity \(\mu = 6.5\cdot 10^{-4}\,\mathrm{Pa\cdot s}\). The reference dimensional quantities are: length \(L_{ref}=0.5\,\mathrm{nm}\), energy \(E_{ref}=1.38\cdot 10^{-23}\,\mathrm{J}\), and mass \(M_{ref}=3.33\cdot 10^{-25}\,\mathrm{Kg}\) which corresponds to the mass of a single EH-DPD particle. The reference charge is set to \(Q_{ref}=7.6\cdot 10^{-21}\,\mathrm{C}\), leading to a relative dielectric constant \(\epsilon _r = 75\). The assigned Debye length is obtained by using the (dimensionless) concentration of ions (dimensionless charge \(q = 0.3\)) \(c_0 = 1.875\). The particle interaction cutoff is set to \(r_c=1\, \mathrm{nm}\). The dimensionless meso-particle density \(\rho =0.375\) provides the target mass density of the solution.

The remaining physical parameters to be mapped are the solution viscosity and conductivity. This requires preliminary calibration simulations to determine their dependence on the model parameters \(\gamma \), \(\gamma ^c_0\) and \(\gamma ^a_0\). In principle, \(\gamma ^c_0\) and \(\gamma ^a_0\) can be used to independently reproduce anion and cation conductivities. Limiting, for simplicity, the analysis to symmetric solutions, we assume \(\gamma ^c_0 = \gamma ^a_0\). Fig. 5a provides the solution viscosity as a function of \(\gamma \) for fixed \(\gamma ^c_0 = \gamma ^a_0\). We computed the viscosity by imposing a Poiseuille flow [60] and measuring the average velocity obtained at a given pressure difference. In the investigated range of parameters, the viscosity is found to be almost independent of \(\gamma ^c_0\) and \(\gamma ^a_0\), which control the conductivity. From the \(\mu -\gamma \) curve, we find that \(\gamma =6500\) provides the target viscosity. Analogously, Fig. 5b provides the solution conductivity as a function of the common value of \(\gamma ^c_0 = \gamma ^a_0 = \gamma _0\). From the figure, \(\gamma _0=0.015\) yields the assigned electrical conductivity. We estimated the electric conductivity by applying a constant electric field to a bulk system and measuring the resulting current. The resulting electroosmotic flow in a \(10\, \mathrm{nm}\) planar channel is shown in Fig. 5c, while the ionic density is shown in Fig. 5d. The zeta potential is such that \(\zeta =-0.5 (q\beta )^{-1}\). It is apparent that in the middle of the channel, the concentration of anions and cation is different, as expected when the electric double layers overlap.

Fig. 5
figure 5

Electroosmotic flow for a \(10, \mathrm{nm}\) planar channel. a Viscosity of the fluid as a function of the parameter \(\gamma \), with \(\mu _{ref} = M_{ref}^{1/2}E_{ref}^{1/2}L_{ref}^{-2}=8.57\cdot 10^{-6} \mathrm{Pa\cdot s}\). The value highlighted with a circle was used for the electroosmotic flow simulation. b Conductivity of the fluid as a function of the parameters \(\gamma ^a=\gamma ^c=\gamma _0\), with \(\kappa _{ref}=Q_{ref}^2L_{ref}^{-2}E_{ref}^{-1/2}M_{ref}^{-1/2}=107.8\, \mathrm{S/m}\). The value highlighted with a circle was used for the electroosmotic flow simulation. c Velocity and d density profiles of cations (blue) and anions (red). The Debye length was set to \(4.28\, \mathrm{nm}\)

5.4 Excluded volume effects

Fig. 6
figure 6

Simulation results for a fluid with perfect gas and Van der Waals equation of state. In all the panels, the dashed lines refer to the perfect gas model, while the continuous lines refer to the Van der Waals model of Eq. (73), with \(a=10\), \(b^s=0.01\), \(b^c=0.02\) and \(b^a=0.04\). All the remaining parameters are set as described in Sect. 5.3, with the only difference of \(\gamma =4500\) in the perfect gas case to match the viscosity of the corresponding Van der Waals model which has \(\gamma =6500\). The Debye length was set to 2.15 in all the cases by tuning the charge of the ions. a-b Cation (blue) and anion (red) concentration profiles and concentration difference (black) for the perfect gas case (continuous lines) and the Van der Waals model (dashed lines), for a planar channel with symmetric a and antisymmetric b charges in the walls. c-d Velocity profiles corresponding panel a, symmetric case c, and b, antisymmetric case d

To test the capability of EH-DPD to simulate fluids with different equations of state, we performed planar electroosmosis simulations similar to the above described using a Van der Waals equation of state, i.e.,

$$\begin{aligned} P=\frac{k_BT}{v-b}-\frac{a}{v^2}\;, \end{aligned}$$
(72)

where v is the volume divided by the total number of particles, a is a parameter modeling the attraction between fluid particles and b is the excluded volume of the single particle. For a multicomponent fluid, the parameters a and b are usually expressed as combinations of the respective single components parameters according to mixing rules [63]. In the case of a fluid with three components (i.e., \(n_c\) cations, \(n_a\) anions and \(n_s\) solvent), for the meso-particle i, \(b_i=n^c_i b^c+n^c_a b^a+ n^s_i b^s\) and \(a_i=n^c_in^c_i a^{cc}+n^a_in^a_i a^{aa}+2n^s_in^s_i a^{ss}+2n^c_in^a_i a^{ca}+2n^c_in^s_i a^{cs}+2n^s_in^a_i a^{sa}\), where \(b^c\), \(b^a\) and \(b^s\) are the excluded volume of each species and \(a^{aa}\), \(a^{cc}\), \(a^{ss}\), \(a^{ca}\), \(a^{cs}\) and \(a^{sa}\) are parameters controlling the attractive force between the species. As in the case of perfect gas, we assumed \(n^c+n^a+n^s=M\) to hold for each particle, leaving only the \(n^c\) and \(n^a\) as independent variables. The free energy is hence

$$\begin{aligned} \begin{aligned} A_i(V_i,n^c_i,n^a_i)&=\frac{n^c_i}{\beta }\left[ \log \left( \frac{n^c_i}{M-n^c_i-n^a_i}\right) -1\right] +\frac{n^a_i}{\beta }\left[ \log \left( \frac{n^a_i}{M-n^c_i-n^a_i}\right) -1\right] +\\&\quad +\frac{M}{\beta }\log \left( \frac{M-n^a_i-n^c_i}{V_i-b_i}\right) +\frac{a_i}{V_i^2}\;, \end{aligned} \end{aligned}$$
(73)

We chose to focus on the effect of the corresponding excluded volume parameters \(b^s\), \(b^c\) and \(b^a\), letting the parameter \(a=10\) constant and independent on the local fluid composition, such that the fluid is single phase. In this framework, the chemical potential for cations in particle i reads

$$\begin{aligned} \mu ^c_i=\frac{1}{\beta }\left[ \log \left( \frac{n^c_i}{M-n^c_i-n^a_i}\right) +\frac{M b^c}{V_i-b_i}\right] +q_c\Phi _i\;, \end{aligned}$$
(74)

and similarly for the anions.

The results of the simulations are displayed in Fig. 6. In Fig. 6a and b, the ionic concentration profiles are shown for two cases each corresponding to the symmetric (panel a) and antisymmetric (panel b) setting. As reference cases, the perfect gas model above reported is considered (dashed lines), with the same parameters reported in Sect. 5.3 with the only difference that \(\gamma =4500\), which was adopted to obtain a viscosity equal to the simulated Van der Waals fluid. The applied electric field was such that \(v_{eo}=2\). The continuous lines refer to a Van der Waals model with \(b^s=0.01\), \(b^c=0.02\) and \(b^a=0.04\). The effect of the excluded volume is to decrease the ion concentration near the walls, generating a larger charge density near negatively charged surfaces and a smaller charge density near positively charged surfaces, due to the larger excluded volume of anions with respect to cations. The difference in charge distribution (in particular close to the walls) leads to a more pronounced electroosmotic flow in the symmetric case reported in Fig. 6c, while a net flow is observed in the case of antisymmetrically charged walls due to the different ion accumulation in the two walls, as reported in Fig. 6d.

6 Conclusions

The EH-DPD (ElectroHydrodynamic Dissipative Particle Dynamics) model we have illustrated in the present paper is an extension of the DPD model which can be used to simulate the dynamics of electrolyte solutions at mesoscopic scales. The meso-particles carry and exchange among them two ionic species under the collective motion induced by their mutual interactions. The forces acting between the meso-particles and the ionic exchange rates are determined by the specific fluid model which, in the EH-DPD, amount to define the free-energy of the meso-particle system. The model has been validated simulating the electroosmotic flow in a planar nanochannel with charged walls, and a good agreement is obtained both in the case of Debye length comparable with channel height and in the case of small Debye length. This approach can be used to study fluid systems where thermal fluctuations are crucial on scales larger than affordable with Molecular Dynamics like nanoparticle and biomolecule sensing, systems with membranes for desalination or energy harvesting. We validated our methods against analytical results for electroosmotic flows in a planar channel obtained from the commonly adopted linearized Poisson–Boltzmann solution of the Poisson–Nernst–Planck–Navier–Stokes equation. This was accomplished using the free energy of a perfect gas to model the interparticle interactions. It has also been shown that different free energies representing more complex fluids can be used. As an example, we employed the Van der Waals equation of state, which introduces ion specific effects such as the excluded volume. As a final remark, although in this work we focused on a single phase fluid, the same equation of state allows phase transitions and introduces an energetic cost for the creation of interfaces between different phases allowing to deal with multiphase systems. In general, the possibility of providing the equation of state as an input of the simulation is promising for the study of systems with ion specific effects driven by electric field or concentration gradients also in presence of phase transitions like, e.g., for hydrophobic channels and hydrophobic nanoporous materials.