1 Introduction

Fluid mixing is ubiquitous in nature but an important physical phenomenon encountered in many industrial applications. It is associated with various physics like chemical reaction, synthesis, substance generation, separation, etc. In chemical engineering field, predicting and controlling fluid mixing process in reactors is one of the intensive research subjects. That is because many types of chemical productions involve liquid blending process to initiate chemical reactions, and moreover, properties of the resulting products can significantly be associated with involved mixing procedure. For example, mixing process in the nanoparticle precipitation is known to influence the particle size distribution of the output [50, 54]. In this context, the numerical simulation of fluid mixing attracts continuous attention from industry and academia as a powerful tool to analyze and optimize the chemical production process.

On the background of recent considerable progress in microfabrication technology, mechanical devices involving microfluidic system, such as MEMS (micro-electro mechanical system) [14, 16] and lab-on-a-chip device [17, 48, 51], have been prevalent as a promising technology for chemical, biological, and pharmaceutical industries [15, 24, 45]. In those devices, microscale mixing, mixing in characteristic length scale from millimeter to submicrometer order, is often an essential and crucial unit and has an important role to play in [8]. That is because, in such small dimensions, viscous force dominates, in other words Reynolds number is small, and the flow tends to be strongly stratified; mixing in such laminar regime most likely becomes inefficient and requires long residence time to make mixture sufficiently homogeneous. In pursuit of efficient rapid mixing in microsystems, a variety of geometrical designs is developed as a passive micromixer [19]. For instance, herringbone micromixer [52], three-dimensional serpentine micromixer [34], and T-shaped micromixer [4, 21, 58] with modifications [2, 39] are the passive micromixers that achieve effective mixing enhancement by incorporating so-called chaotic advection [43] at low Reynolds number.

A number of numerical simulations have been carried out for analysis of fluid mixing behavior in micromixer and assessment of its mixing performance [1, 3, 6, 9, 12, 22, 35], wherein the motion of incompressible Newtonian fluids and the molar concentration of chemical species are solved based on the continuity and Navier–Stokes equations and the advection–diffusion equation, respectively. Most of those simulations are performed using the finite volume method (FVM) [56]. FVM has several strong points such as conservativeness of physical quantity, geometric adaptability of computational mesh, and high numerical stability, while at the same time, the numerical diffusion takes place, like many other numerical methods based on the Eulerian description. The numerical diffusion leads to excessive diffusion rate and can be a crucial limiting factor for accurate solution. Influence of the numerical diffusion is known to be more significant at higher Péclet number for the solution of concentration (or Reynolds number for velocity), and in general, it demands considerably high spatial resolution to make numerical diffusion negligible at very high Péclet number. In many cases of the fluid mixing problems in micromixer, although the Reynolds number is moderate, e.g. only in the order of \(10^2\) at most [42], since the characteristic length scale is small, the Péclet number can be very high because the Schmidt number is in the order of \(10^3\) if working fluid is liquid [3]. Therefore, the fluid flow can accurately be calculated with no difficulty, but solution of the chemical species concentration field requires considerable computational expense for satisfactory accuracy due to the unavoidable numerical diffusion in FVM [5, 7].

A numerical method based on the Eulerian description, such as FVM, is called grid method, and in contrast, a method based on the Lagrangian description is called particle method. Particle methods for the computational fluid dynamics, such as SPH [40] and MPS [28], have been attracting a great deal of attention for their capability to treat complex geometry and physics, and applied to various kinds of problems [31, 33] including ones that are difficult to be solved using the grid method. Another important property of the particle method is that the numerical diffusion is much less significant than in the grid method. In grid method, the numerical diffusion occurs due to the discretization error of the convective term; on the other hand, in particle method no convective term appears in the governing equations, and in this respect, occurrence of the numerical diffusion can be avoided.

Under these circumstances, this research has been done aiming at developing a hybrid of grid and particle methods that provides substantial accuracy for simulating a fluid mixing problem even at high Péclet number, e.g. higher than \(10^5\). The current main target is a liquid–liquid mixing problem in microsystem that is solved under following assumptions; the dynamics of the fluid is described as continuum, incompressible, and Newtonian; the fluid flow is under laminar state; all fluids to be mixed have identical and homogeneous physical properties, by which the chemical species concentration can be treated as a passive scalar; no chemical reaction takes place.

2 Hybrid grid-particle method

2.1 Overview

The calculation procedure of fluid mixing simulation can be divided into two large parts: solution of fluid flow and solution of chemical species concentration. As depicted in Fig. 1, the present hybrid method combines grid-based approach and particle-based approach in such a way that a grid method is used for the solution of fluid flow and a particle method is used for the solution of concentration field. With this framework, the fluid mixing problem of interest can efficiently be solved utilizing the characteristics of each approach.

Fig. 1
figure 1

Concept of the hybrid grid-particle method

In general, the numerical instability frequently arises as severe practical difficulties in computational fluid dynamics, and ensuring stability can be considered as primary importance. The grid method is more reliable to conduct the numerical simulation stably than the particle method. In the particle method, there exists a strict limitation of the time step size for stable computation, whereas the grid method allows much longer time step. Associated with this fact, the grid method is suitable to find steady solution. This feature can also be an important advantage in the current problem because a majority of the fluid mixing processes in passive micromixer deals with the steady flow in low Reynolds number range [42]. Furthermore, at such a low Reynolds number the numerical diffusion can substantially be vanished with affordable spatial resolution and hardly causes significant error. For these reasons, the grid method is appropriate for the solution of fluid flow. In the present hybrid method, the fluid flow is solved by means of the widely-used FVM, by which the simulation can be conducted quite stably even with a long time step.

On the other hand, the solution of chemical species concentration requires a greater emphasis on the accuracy rather than the computational stability. For the accurate analysis of the mixing process, it is of importance to simulate faithfully behavior of the contact surface between distinct fluids and development of the boundary layer generated around the contact surface. As stated in Sect. 1, the Péclet number can take very high value in the fluid mixing problem with liquids. The nature of high Péclet number makes the boundary layer thickness very thin and produces sharp discontinuities at the contact surface in the concentration field. Such a moving sharp discontinuity is difficult to be dealt with in the grid method and requires sophisticated treatment as non-diffusive interface; otherwise, the thin boundary layer is most probably destroyed by the numerical diffusion. The multi-phase flow is a representative application of the non-diffusive moving interface calculation. A number of numerical techniques has been developed to address this problem; examples are the volume of fluid (VOF) method [20], piecewise linear interface calculation (PLIC) method [47, 60], coupled level set and volume-of-fluid (CLSVOF) method [53], etc [49]. However, those interface calculation techniques assume absence of diffusion and are basically inapplicable to the current fluid mixing problem unless the Péclet number is infinite. In contract to the grid method, the particle method is able to conserve the sharp discontinuity with faithful calculation of the diffusion. Moreover, the numerical stability in calculation of the diffusion equation is guaranteed by employing the implicit time integration, and even with an explicit scheme the stability condition is rarely violated when the Péclet number is very high. For these reasons, the particle method is appropriate for the solution of concentration.

The present hybrid method, which combines grid and particle methods, use both computational grid and particles. The grid is fixed in space and the particle moves according to the flow field calculated in the grid system. The variables needed for the solution of fluid flow, i.e. velocity and pressure, are defined on the grid system, and each particle has only the concentration variable. The flow field is discretized and calculated in the grid system, and the concentration field is in the particle system; in this respect, the present hybrid method differs from the existing hybrid methods, such as marker-and-cell (MAC) method [18], particle-in-cell (PIC) method [13], Liu’s hybrid method [32] and particle finite element method (P-FEM) [23]. To solve the fluid mixing problem with the hybrid grid-particle system, transfer of the velocity field from the grid system to the particle system is needed. The proposed method achieves this with interpolation by means of the moving least square approach. Transfer of the concentration field from the particle system to the grid system is needed only if the chemical species concentration is an active scalar, while this process can be skipped in the present study since passive scalar is assumed. There are numerical methods developed for the accurate simulation of fluid mixing problem. The backward random-walk Monte Carlo method [57] is a numerical diffusion-free computational method for the advection–diffusion problem, and it has provided a rigorous solution to the mixing process even for large values of the Péclet number [36, 37]. A semi-Lagrangian method developed by Matsunaga and Nishino [38], which utilizes fluid particle trajectory for discretization of the advection–diffusion equation, achieves an accuracy equivalent to that of the backward random-walk Monte Carlo method with lesser computational cost. However, those computational methods are computationally quite expensive and practically restricted to the time-independent analysis of the passive scalar transport.

2.2 Solution of fluid flow (grid phase)

With the continuum assumption of flow, the dynamics of the incompressible Newtonian fluid is described by the continuity and the Navier–Stokes equations:

$$\begin{aligned}&\!\!\!\nabla \cdot \mathbf{u} = 0 , \end{aligned}$$
(1)
$$\begin{aligned}&\!\!\!\frac{\partial \mathbf{u}}{\partial t} +\nabla \cdot (\mathbf{u} \mathbf{u}) = -\nabla p +\frac{1}{\mathrm{Re}} \nabla ^2 \mathbf{u} , \end{aligned}$$
(2)

where velocity \(\mathbf{u}\), pressure \(p\), and time \(t\) are nondimensionalized by characteristic velocity \(U,\, \rho U^2\) (\(\rho \) is fluid density), and \(L/U\) (\(L\) is characteristic length), respectively. The Reynolds number (\(\mathrm{Re}\)) is defined as

$$\begin{aligned} \mathrm{Re} = \frac{LU}{\nu } , \end{aligned}$$
(3)

where \(\nu \) denotes kinematic viscosity. For simplicity of the problem, fluids to be mixed are assumed to have identical and homogeneous physical properties. By this assumption, the motion of fluid is independent from the concentration field; in other words, the concentration can be treated as passive scalar.

The governing equations of fluid motion is discretized based on FVM. The variables velocity \(\mathbf{u}\) and pressure \(p\) are located at the cell center, i.e. collocated grid system [26, 46] is used. As the velocity-pressure coupling method, the PISO algorithm [25] and the SIMPLE algorithm [44] are used respectively for unsteady and steady conditions.

2.3 Solution of concentration (particle phase)

2.3.1 Governing equations

The molar concentration of chemical species is governed by the advection–diffusion equation (so-called species equation):

$$\begin{aligned} \frac{\mathrm{D} c}{\mathrm{D} t} = \frac{1}{\mathrm{Pe}} \nabla ^2 c , \end{aligned}$$
(4)

where concentration \(c\) is scaled to take on a value from \(0\) to \(1\). The Péclet number (\(\mathrm{Pe}\)) is defined as

$$\begin{aligned} \mathrm{Pe} = \frac{LU}{D} , \end{aligned}$$
(5)

where \(D\) denotes diffusion coefficient. To solve it with Lagrangian particle system, the advection–diffusion equation (Eq. 4) is split into the advection equation (Eq. 6) and the diffusion equation (Eq. 7):

$$\begin{aligned} \frac{\mathrm{d} \mathbf{r}}{\mathrm{d} t}= & {} \mathbf{u} , \end{aligned}$$
(6)
$$\begin{aligned} \frac{\partial c}{\partial t}= & {} \frac{1}{\mathrm{Pe}} \nabla ^2 c , \end{aligned}$$
(7)

where \(\mathbf{r}\) denotes the particle position. The variable of concentration \(c\) is defined on each particle and spatially moves according to the flow field solved in the grid system. Equations (6) and (7) are solved separately.

2.3.2 Advection

The advection equation (Eq. 6) governs time evolution of particle position. To calculate the particle movement, velocity information is required at particle position, but velocity is defined only on grid. Thus, the velocity field calculated on the grid system is mapped onto to each particle by means of the moving least square [30] with the weight function defined as

$$\begin{aligned} w(\mathbf{x}) = \left\{ \begin{array}{lcl} \displaystyle \frac{1}{|\mathbf{x}|/r_e + \epsilon } - \frac{1}{1 + \epsilon } &{}&{} 0 \le |\mathbf{x}| < r_e \\ 0 &{}&{} r_e \le |\mathbf{x}| \\ \end{array} \right. , \end{aligned}$$
(8)

where \(r_e\) is the effective radius, \(\epsilon \) is a small value to avoid the singularity encountered at \(|\mathbf{x}| = 0\). The effective radius \(r_e\) is set as \(1.8 \Delta x\) (\(\Delta x\) is grid spacing), and \(\epsilon \) is \(10^{-6}\). The particle position \(\mathbf{r}\) is updated based on a two-stage algorithm (so-called Heun’s method, illustrated in Fig. 2) as

$$\begin{aligned} \mathbf{r}(t+\Delta t) = \mathbf{r}(t) +\frac{\Delta t}{2} \left\{ \overline{\mathbf{u}}(t , \mathbf{r} (t)) +\overline{\mathbf{u}}(t+\Delta t,\tilde{\mathbf{r}}(t)) \right\} , \end{aligned}$$
(9)

where \(\tilde{\mathbf{r}}(t)\) is an intermediate position

$$\begin{aligned} \tilde{\mathbf{r}}(t) = \mathbf{r}(t) +\Delta t \overline{\mathbf{u}}(t,\mathbf{r}(t)) , \end{aligned}$$
(10)

and \(\overline{\mathbf{u}}(t,\mathbf{x})\) is a velocity vector approximated by the moving least square.

To preserve the accuracy of the particle advection calculation, subdivision of the time advancement is recommended so that the local Courant number

$$\begin{aligned} \mathrm{Co}(t,\mathbf{x}) = \frac{|\overline{\mathbf{u}}(t,\mathbf{r}(t))| \Delta t }{ \Delta x } \end{aligned}$$
(11)

does not exceed some specified limit, e.g. \(\mathrm{Co}_{\mathrm{max}} = 0.5\).

Fig. 2
figure 2

Calculation of particle advection using Heun’s method

2.3.3 Diffusion

The Laplacian operator in the diffusion equation (Eq. 7) is discretized by means of the standard LSMPS scheme type-A [55], which is based on the Taylor series expansion and the weighted least squares method. The formulation of the discretization scheme is briefly explained below. The Taylor series expansion of scalar function \(\phi \) around \(\mathbf{r}_i\) with nearby point \(\mathbf{r}_j\) yields

$$\begin{aligned}&\phi (\mathbf{r}_j) = \phi (\mathbf{r}_i) \nonumber \\&\qquad +\sum _{m=1}^{n} \left[ \frac{1}{m!} \left( \mathbf{r}_{ij} \cdot \nabla \right) ^m \phi (\mathbf{r}) \right] _{\mathbf{r}=\mathbf{r}_i} +\mathcal {O}(|\mathbf{r}_{ij}|^{n+1}) \end{aligned}$$
(12)
$$\begin{aligned}&\quad \Leftrightarrow \sum _{m=1}^{n} \left[ \frac{r_s^m}{m!} \left( \mathbf{r}^*_{ij} \cdot \nabla \right) ^m \phi (\mathbf{r}) \right] _{\mathbf{r}=\mathbf{r}_i} = \phi (\mathbf{r}_j)-\phi (\mathbf{r}_i) \nonumber \\&\qquad +\,\mathcal {O}(|\mathbf{r}_{ij}|^{n+1}) \end{aligned}$$
(13)

where \(\mathbf{r}_{ij} = \mathbf{r}_j-\mathbf{r}_i,\, \mathbf{r}^*_{ij} = \mathbf{r}_{ij}/r_s,\, r_s\) is scaling parameter. Equation (13) can be written in the form:

$$\begin{aligned} \mathbf{p}^{\mathrm{T}}(\mathbf{r}^*_{ij}) \cdot H_{r_s}^{-1} \varvec{\delta } = \phi (\mathbf{r}_j)-\phi (\mathbf{r}_i) +\mathcal {O}(|\mathbf{r}_{ij}|^{n+1}) , \end{aligned}$$
(14)

where namely in two-dimensional space

$$\begin{aligned} \mathbf{r}^*_{ij}= & {} \frac{\mathbf{r}_j-\mathbf{r}_i}{r_s} = \left( \frac{x_j-x_i}{r_s}, \frac{y_j-y_i}{r_s} \right) ^{\mathrm{T}} , \end{aligned}$$
(15)
$$\begin{aligned} \mathbf{p}(\mathbf{r})= & {} \left( x, y, x^2, xy, y^2, \ldots , x^n, x^{n-1}y, \ldots , y^n \right) ^{\mathrm{T}} , \end{aligned}$$
(16)
$$\begin{aligned} H_{r_s}= & {} \mathrm{diag} \bigg ( \frac{1!}{r_s^1}, \frac{1!}{r_s^1}, \frac{2!}{r_s^2}, \frac{1!1!}{r_s^2}, \frac{2!}{r_s^2}, \nonumber \\& \ldots , \frac{n!}{r_s^n}, \frac{(n-1)!1!}{r_s^n}, \ldots , \frac{n!}{r_s^n} \bigg ) , \end{aligned}$$
(17)
$$\begin{aligned} \varvec{\delta }= & {} \bigg ( \frac{\partial \phi }{\partial x}, \frac{\partial \phi }{\partial y}, \frac{\partial ^2 \phi }{\partial x^2}, \frac{\partial ^2 \phi }{\partial x \partial y}, \frac{\partial ^2 \phi }{\partial y^2}, \nonumber \\& \ldots , \frac{\partial ^n \phi }{\partial x^n}, \frac{\partial ^n \phi }{\partial x^{n-1} \partial y}, \ldots , \frac{\partial ^n \phi }{\partial y^n} \bigg )^{\mathrm{T}} . \end{aligned}$$
(18)

One minimizes the functional

$$\begin{aligned}&J \left( H_{r_s}^{-1} \varvec{\delta } \right) \nonumber \\&\quad = \sum _{j \ne i} w(\mathbf{r}_{ij}) \left[ \mathbf{p}^{\mathrm{T}}(\mathbf{r}^*_{ij}) \cdot H_{r_s}^{-1} \varvec{\delta } - \left\{ \phi (\mathbf{r}_j)-\phi (\mathbf{r}_i) \right\} \right] ^{2},\nonumber \\ \end{aligned}$$
(19)

which leads to the normal equations

$$\begin{aligned}&\left\{ \sum _{j \ne i} w(\mathbf{r}_{ij}) \mathbf{p}(\mathbf{r}^*_{ij}) \mathbf{p}^{\mathrm{T}}(\mathbf{r}^*_{ij}) \right\} \cdot \left( H_{r_s}^{-1} \varvec{\delta } \right) \nonumber \\&\quad = \sum _{j \ne i} w(\mathbf{r}_{ij}) \mathbf{p}(\mathbf{r}^*_{ij}) \left\{ \phi (\mathbf{r}_j)-\phi (\mathbf{r}_i) \right\} . \end{aligned}$$
(20)

Equation (20) is expressed in matrix notation as

$$\begin{aligned} \mathbf {M}_i \left( H_{r_s}^{-1} \varvec{\delta } \right) = \mathbf{b}_i \end{aligned}$$
(21)

with

$$\begin{aligned} \mathbf {M}_i= & {} \sum _{j \ne i} w(\mathbf{r}_{ij}) \mathbf{p}(\mathbf{r}^*_{ij}) \mathbf{p}^{\mathrm{T}}(\mathbf{r}^*_{ij}) , \end{aligned}$$
(22)
$$\begin{aligned} \mathbf{b}_i= & {} \sum _{j \ne i} w(\mathbf{r}_{ij}) \mathbf{p}(\mathbf{r}^*_{ij}) \left\{ \phi (\mathbf{r}_j)-\phi (\mathbf{r}_i) \right\} . \end{aligned}$$
(23)

If the moment matrix \(\mathbf {M}_i\) is not singular, solutions \(\varvec{\delta }\) are uniquely determined by solving the normal equations,

$$\begin{aligned} \varvec{\delta } = H_{r_s} \left( \mathbf {M}_i^{-1} \mathbf{b}_i \right) , \end{aligned}$$
(24)

and the Laplacian \(\nabla ^2 \phi \) can, in two-dimensional case, be calculated as

$$\begin{aligned} \nabla ^2 \phi = \frac{\partial ^2 \phi }{\partial x^2} +\frac{\partial ^2 \phi }{\partial y^2} = (0,0,1,0,1,0,\ldots ,0)^{\mathrm{T}} \cdot \varvec{\delta } . \end{aligned}$$
(25)

In this study, the effective radius is set as \(r_e = 2.5 \ell _0\) (\(\ell _0\) is the particle spacing) for the weight function \(w(\mathbf{r}_{ij})\), and \(n = 3\) is chosen, which gives 2nd order accuracy for the Laplacian operator.

One has two options for the time discretization scheme of the diffusion equation (Eq. 7), namely the explicit Euler scheme

$$\begin{aligned} \frac{c(t+\Delta t)-c(t)}{\Delta t} = \frac{1}{\mathrm{Pe}} \nabla ^2 c \bigg |_{t} \end{aligned}$$
(26)

and the implicit Euler scheme

$$\begin{aligned} \frac{c(t+\Delta t)-c(t)}{\Delta t} = \frac{1}{\mathrm{Pe}} \nabla ^2 c \bigg |_{t+\Delta t} . \end{aligned}$$
(27)

Note that the Laplacian operator is evaluated at the old position \(\mathbf{r}(t)\) in the explicit Euler scheme (Eq. 26), while it is evaluated at the new position \(\mathbf{r}(t+\Delta t)\) in the implicit Euler scheme (Eq. 27). Therefore, when the explicit Euler scheme is applied, the time advancement of the particle position (Eq. 9) is calculated after the diffusion equation; on the other hand, for the implicit Euler scheme the calculation order is the other way around.

2.3.4 Solid boundary

In contrast to the grid method, in which the implementation of boundary condition is relatively straightforward, the particle method has no entrenched rigorous boundary treatment. One commonly-used technique to implement the solid boundary is to fill the solid domain with fixed dummy particles as illustrated in Fig. 3a. This dummy particle technique is generally successful to prevent interior fluid particles from unphysical penetration through the boundary, while it suffers from several drawbacks. In general, the technique requires a large number of dummy particles to create solid boundaries. That is because the solid phase represented by the dummy particles needs sufficient thickness (at least thicker than the effective radius) to prevent the unphysical effect caused by insufficient particle density for the interior particle near the boundary. This fact leads to increase of the problem size and thus the computational cost more than is necessary. Moreover, the requirement for the solid domain thickness results in the limitation of the computational geometry; for example, the zero thickness obstacle (baffle) can not be implemented. In the present hybrid method, the solid boundary condition in the particle system is implemented by means of the virtual mirror particle technique [10, 29, 41] depicted in Fig. 3b. The virtual mirror particle is the reflection of interior particle with respect to the boundary plane, where the physical quantity of the mirror particle is obtained by the corresponding interior particle and the boundary condition.

Fig. 3
figure 3

Solid boundary implemented by dummy particle (a) and virtual mirror particle (b)

In order to solve the diffusion equation (Eq. 7) with the particle system, one needs to impose appropriate boundary conditions for calculation of the Laplacian operator. In this study, only the zero-flux boundary condition (Eq. 28) is taken into account for the concentration field,

$$\begin{aligned} \frac{\partial c}{\partial \mathbf{n}} \bigg |_{\Gamma } = 0 , \end{aligned}$$
(28)

where \(\mathbf{n}\) denotes normal unit vector with respect to the boundary plane. The zero-flux condition is a widely-accepted mathematical model of the impermeable boundary for chemical species in fluid mixing problem. The zero-flux condition is imposed by considering the virtual mirror particles. The virtual mirror particles are included as nearby particles for the discretization of the Laplacian operator, wherein the concentration of the mirror particle is the same value as the corresponding interior particle.

2.3.5 Inlet and outlet boundaries

The inlet boundary for the particle system is implemented using the particle injectors as drawn in Fig. 4. Those injectors are uniformly distributed with spacing \(\ell _0\) and fixed on the inlet boundary plane to inject new fluid particles at a frequency given by the inlet flow rate

$$\begin{aligned} \dot{V}^{\mathrm{inj}}(t) = \ell _0^2 \mathbf{n} \cdot \overline{\mathbf{u}}(t,\mathbf{r}^{\mathrm{inj}}) . \end{aligned}$$
(29)

If the inlet velocity is time-independent, the injection frequency is simply given by

$$\begin{aligned} \frac{\dot{V}^{\mathrm{inj}}(t)}{V_0} , \end{aligned}$$
(30)

where \(V_0 = \ell _0^3\), but that is not always the case. Therefore, determination of the injection timing makes use of the total flow rate

$$\begin{aligned} V^{\mathrm{inj}}(t) = \frac{V_0}{2} +\int ^{t}_{0} \dot{V}^{\mathrm{inj}}(t) \mathrm{d} t , \end{aligned}$$
(31)

the time advancement of which is calculated as

$$\begin{aligned} V^{\mathrm{inj}}(t+\Delta t)= & {} V^{\mathrm{inj}}(t) \nonumber \\&+\frac{\Delta t}{2} \left\{ \dot{V}^{\mathrm{inj}}(t)+\dot{V}^{\mathrm{inj}}(t+\Delta t) \right\} . \end{aligned}$$
(32)

Injection of particle is executed (repeatedly if needed) as long as a condition

$$\begin{aligned} V^{\mathrm{inj}}(t) -V_0 N^{\mathrm{inj}} \ge V_0 \end{aligned}$$
(33)

satisfies, where \(N^{\mathrm{inj}}\) denotes the total count of the injected particles which is incremented each after the injection. Position of the injected particle is determined as

$$\begin{aligned}&\mathbf{r}^{\mathrm{inj}} +\frac{V^{\mathrm{inj}}(t) -V_0 (N^{\mathrm{inj}}+1)}{\dot{V}^{\mathrm{inj}}(t)+\dot{V}^{\mathrm{inj}}(t+\Delta t)} \nonumber \\& \times \left\{ \overline{\mathbf{u}}(t,\mathbf{r}^{\mathrm{inj}}) +\overline{\mathbf{u}}(t+\Delta t,\mathbf{r}^{\mathrm{inj}}) \right\} . \end{aligned}$$
(34)

Implementation of the outlet boundary is more simple. Through the outlet boundary, particles are moving out from the computational domain. Thus, those particles are detected to be deleted or marked as a ghost particle.

Fig. 4
figure 4

Inlet boundary implemented by particle injectors

2.3.6 Particle redistribution

As the particle positions evolve in time, the particle distribution is becoming more distorted. The highly anisotropic particle spacing eventually causes the numerical instability [27]. To remedy this issue, we employ the particle redistribution based on the particle shifting approach [59] which improves particle spacing uniformity by slightly shifting each particle position according to

$$\begin{aligned} \mathbf{r}'_i= & {} \mathbf{r}_i +\delta \mathbf{r}_i , \end{aligned}$$
(35)
$$\begin{aligned} \delta \mathbf{r}_i= & {} -\alpha U_{\mathrm{max}} \Delta t \sum _{j \in \varLambda _i} \frac{R^2_i}{|\mathbf{r}_{ij}|^2} \mathbf{n}_{ij} , \end{aligned}$$
(36)
$$\begin{aligned} R_i= & {} \frac{1}{|\varLambda _i|} \sum _{j \in \varLambda _i} |\mathbf{r}_{ij}| , \end{aligned}$$
(37)
$$\begin{aligned} \mathbf{n}_{ij}= & {} \frac{\mathbf{r}_{ij}}{|\mathbf{r}_{ij}|} , \end{aligned}$$
(38)
$$\begin{aligned} \varLambda _i= & {} \left\{ j | 0 \le |\mathbf{r}_{ij}| < r_e \right\} , \end{aligned}$$
(39)

where \(\mathbf{r}'_i\) is particle position after the redistribution, \(\alpha \) is relaxation parameter, \(U_{\mathrm{max}}\) is maximum velocity magnitude, and \(\Delta t\) is time step size. The relaxation parameter is set as \(\alpha = 0.01\), and the effective radius is \(r_e = 2.5 \ell _0\). This particle redistribution is operated once in each time step after the particle advection. Calculation of the particle shifting also requires appropriate boundary treatment. For the particle near the solid boundary, the virtual mirror particle technique is applied and the mirror particles are included to calculate Eq. (36). In the vicinity of inlet or outlet boundary, the particle redistribution with the virtual mirror technique may cause numerical instability. Thus, if the shortest distance to inlet/outlet boundary is smaller than the effective radius of the particle shifting (here \(2.5 \ell _0\)), the particle redistribution is switched off or set \(\alpha = 0\).

2.4 Calculation procedure

The present hybrid method performs the fluid mixing simulation in the following procedure as described in Fig. 5. After the initial setup, the velocity field of the next time step is firstly solved with the grid method and the concentration field is then solved in the particle system. In the particle phase, solution of the concentration field is proceed in three steps: (a) particle advection including injection (inlet) and ejection (outlet), (b) solution of the diffusion equation, (c) particle redistribution, where the order of the calculation steps changes depending on the adopted time discretization scheme of the diffusion equation, namely the explicit Euler scheme (Eq. 26) or the implicit Euler scheme (Eq. 27), as stated previously. The particle phase is proceed as (b) \(\rightarrow \) (a) \(\rightarrow \) (c) in the explicit case, or (a) \(\rightarrow \) (c) \(\rightarrow \) (b) in the implicit case.

Fig. 5
figure 5

Flow chart of the calculation procedure in the hybrid grid-particle method

3 Numerical simulations

3.1 Unsteady one-dimensional diffusion problem

In the stationary one-dimensional domain \(x = [0,1]\), the unsteady diffusion problem governed by

$$\begin{aligned} \frac{\partial c}{\partial t} = \frac{\partial ^2 c}{\partial x^2} \end{aligned}$$
(40)

is considered under the initial condition

$$\begin{aligned} c_0(x) = \left\{ \begin{array}{l@{\quad }l} 0 &{} x < 0.5 \\ 0.5 &{} x = 0.5 \\ 1 &{} x > 0.5 \\ \end{array} \right. \end{aligned}$$
(41)

and the boundary conditions

$$\begin{aligned} \frac{\partial c}{\partial x} \bigg |_{x=0} = \frac{\partial c}{\partial x} \bigg |_{x=1} = 0 . \end{aligned}$$
(42)

The analytical solution for the time evolution of the concentration field is given by

$$\begin{aligned}&\!\!\!c_{\mathrm{ext}}(t,x) = 2 \sum _{n=0}^{\infty } A_n \cos \left( n \pi x \right) \exp \left( -n^2 \pi ^2 t \right) , \end{aligned}$$
(43)
$$\begin{aligned}&\!\!\!A_n = \int _{0}^{1} c_0(x) \cos \left( n \pi x \right) \mathrm{d} x . \end{aligned}$$
(44)

For this test case, we examine two kinds of the particle distribution, the regular arrangement and the irregular arrangement. In the regular arrangement, the particles are distributed uniformly

$$\begin{aligned} x_i^{\mathrm{reg}} = \left( i +\frac{1}{2} \right) \ell _0, \end{aligned}$$
(45)

where the particle spacing is \(\ell _0 = 1/N_p\) (\(N_p\) denotes the particle number). In the irregular arrangement, the particle position is determined using the uniform pseudorandom number \(\delta x \in [-0.3 \ell _0, 0.3 \ell _0 ]\) as

$$\begin{aligned} x_i^{\mathrm{irr}} = x_i^{\mathrm{reg}} +\delta x . \end{aligned}$$
(46)

The explicit Euler scheme is chosen for the time discretization of the diffusion equation, and the time step size \(\Delta t\) is determined based on the condition

$$\begin{aligned} \mathrm{Di} = \frac{\mathrm{Pe} \cdot \Delta t}{\ell _0^2} \le 0.1 , \end{aligned}$$
(47)

where \(\mathrm{Di}\) is the diffusion number, and \(\mathrm{Pe} = 1\). As the current problem assumes absence of fluid flow, the particle redistribution is not employed.

For the comparison with the present hybrid method which utilizes the LSMPS Laplacian discretization scheme, we have also tested the MPS Laplacian model[28]

$$\begin{aligned} \left\langle \nabla ^2 \phi \right\rangle _i = \frac{2d}{n^0 \lambda ^0} \sum _{j \ne i} w'({\mathbf{r}_\mathbf{ij}}) \left( \phi _j -\phi _i \right) , \end{aligned}$$
(48)

where \(d\) is the number of space dimensions, \(n^0\) and \(\lambda ^0\) are constant parameters calculated with uniformly arranged particles as

$$\begin{aligned} n^0= & {} \sum _{j \ne i} w'({\mathbf{r}_\mathbf{ij}}) , \end{aligned}$$
(49)
$$\begin{aligned} \lambda ^0= & {} \frac{\displaystyle \sum _{j \ne i} w'({\mathbf{r}_\mathbf{ij}}) |{\mathbf{r}_\mathbf{ij}}|^2 }{\displaystyle \sum _{j \ne i} w'({\mathbf{r}_\mathbf{ij}}) } \end{aligned}$$
(50)

with the MPS weight function

$$\begin{aligned} w'(\mathbf{x}) = \left\{ \begin{array}{lll} \displaystyle \frac{r_e}{|\mathbf{x}|} - 1 &{}\quad 0 \le |\mathbf{x}| < r_e \\ 0 &{}\quad r_e \le |\mathbf{x}| \\ \end{array} \right. . \end{aligned}$$
(51)

Figure 6 shows the concentration distributions simulated using the present hybrid method employing the LSMPS Laplacian scheme. The results show good agreement with the analytical solutions for both regular (Fig. 6a) and irregular particle arrangements (Fig. 6b). Figure 7 shows convergence of the nodal supreme error defined as

$$\begin{aligned} e_{\mathrm{max}}(t) = \max _{x_i} \left| c(t,x_i) - c_{\mathrm{ext}}(t,x_i) \right| \end{aligned}$$
(52)

for the spatial resolution range from \(N_p = 16\) to \(256\) at \(t = 0.025\). In the irregular arrangement case, we plot the mean value of \(20\) samples, where the error bar size is equal to the standard deviation. For the regular arrangement, both MPS and LSMPS schemes show the 2nd order convergence and almost the same nodal supreme error. Quality of the MPS scheme is degraded for the irregular arrangement, whereas the LSMPS scheme shows the same calculation accuracy as the regular arrangement case and the consistency is confirmed.

Fig. 6
figure 6

Comparison of concentration profile of the one-dimensional diffusion problem between calculated (symbols) and analytic (lines) solutions; a regular arrangement, b irregular arrangement

Fig. 7
figure 7

Convergence of the nodal supreme error for the unsteady one-dimensional diffusion problem at \(t = 0.025\)

3.2 Mixing in a lid-driven cavity

We have calculated the fluid mixing problem in a two-dimensional square lid-driven cavity illustrated in Fig. 8, where the upper wall moves rightward at a constant velocity and other walls are fixed. For the boundary condition of the concentration field, the zero-flux condition applies at all walls. The time evolution of the flow field and the concentration field are solved under the initial conditions

$$\begin{aligned} \mathbf{u}_0(x,y)= & {} \mathbf{0} , \end{aligned}$$
(53)
$$\begin{aligned} c_0(x,y)= & {} \left\{ \begin{array}{ll} 0 &{} \quad x < 0.5 \\ 0.5 &{} \quad x = 0.5 \\ 1 &{} \quad x > 0.5 \\ \end{array} \right. . \end{aligned}$$
(54)

The uniform grid system is used for solution of the fluid flow, and the particles are also uniformly distributed at the initial time. The implicit Euler scheme is adopted for the time discretization of the diffusion equation, by which the diffusion number limit of the time step size for stability condition is avoided and the computational cost can fairly be reduced by using relatively large time step at high spatial resolutions. The time step size \(\Delta t\) is set as \(\Delta t = \ell _0\), and subdivision of the particle advection is employed based on the local Courant number limit \(\mathrm{Co}_{\mathrm{max}} = 0.5\). The Reynolds number based on the upper wall velocity and the edge length is set as \(\mathrm{Re} = 1\), and the Péclet number is \(\mathrm{Pe} = 10^{4}\). As a reference, we also carried out the simulation using FVM, where the convective term is discretized by the 2nd order upwind scheme with the gradient limiter.

Fig. 8
figure 8

Simulation condition of the lid-driven cavity flow

As a preliminary test, we have investigated effect of the particle redistribution to the particle distribution. Figure 9 shows the particle distributions at \(t = 0.25\) compared solutions without and with particle redistribution utilizing the particle shifting technique, where diffusion of chemical species concentration is neglected. Without the particle redistribution, calculation of the concentration field was diverged for \(\mathrm{Pe} = 10^{4}\). This is due to the highly anisotropic particle spacing. In the LSMPS scheme, evaluation of the Laplacian operator makes use of the weighted least square approach, and the approximation quality is sensitive to the distribution of neighboring particles; for example, the calculation accuracy can be deteriorated in scarce region and particles too close to each other cause strong numerical instabilities. Appropriate particle redistribution technique can remedy those issues by preserving the particle uniformity and numerical simulation was stably carried out in the present study.

Fig. 9
figure 9

Particle distributions at \(t = 0.25\); a without particle redistribution, b with particle distribution

Figure 10 is the calculated concentration distributions at \(t = 10\), where the spatial resolution is set as \(64 \times 64\) for both grid and particle systems. It is shown that solution of the present hybrid method qualitatively agrees with that of FVM. In Fig. 11, the concentration profile at the middle plane \(x = 0.5\) for varying spatial resolution from \(32 \times 32\) to \(256 \times 256\). The results show that both computational methods converges to the same solution. It is noteworthy that insufficient spatial resolution in FVM leads to overestimation of the diffusion rate, i.e. numerical diffusion, whereas in the hybrid method the perturbation appears instead of the numerical diffusion. This perturbative error is resulted by the particle redistribution; the particle shifting generates dissipative particle movement to improve uniformity, and as a consequence, particles are scattered in a random manner. It is also important to be noted that the error due to the particle redistribution fairly vanishes as the spatial resolution increases, and the hybrid method achieves the convergence with lower spatial resolution than FVM.

Fig. 10
figure 10

Simulated concentration distribution in the lid-driven cavity at \(\mathrm{Re} = 1,\, \mathrm{Pe} = 10^4\), and \(t = 10\) by FVM (a) and the present hybrid method (b)

Fig. 11
figure 11

Comparison of resultant concentration profiles between FVM and the present hybrid method in lid-driven cavity at \(t = 10\) and \(x = 0.5\)

The hybrid method requires some additional computational cost for utilizing the particle system with respect to FVM which uses only the grid system since the particle system generally entails more expensive cost than the grid system. However, in the current numerical experiment, the calculation time of the present hybrid method is only about \(15\,\%\) longer than that of FVM in case that one uses the same number of particles as that of cells. This is because the dominant cost of the fluid mixing simulation is the part of solution of the fluid flow, accounting for more than \(80\,\%\) of the overall calculation. Therefore, the additional computational expense for using particle system in solution of the concentration field should not be a severe penalty.

3.3 Mixing in a zig-zag channel

The continuous mixing process in a two-dimensional zig-zag channel is illustrated in Fig. 12a. Segregated fluids are entered from the inlet boundary and mixed in the channel bended in a zig-zag manner. Fully developed laminar velocity profile

$$\begin{aligned} u_{\mathrm{in}}(y) = 6y(1-y) \end{aligned}$$
(55)

is applied at the inlet boundary, and a reference constant pressure is prescribed at the outlet. Figure 12b shows steady solution of the velocity field solved at \(\mathrm{Re} = 1\), where the Reynolds number is based on the mean inlet velocity and the channel height. In this problem, we have calculated the steady solution for the concentration field using three different computational approaches: FVM, backward random-walk Monte Carlo (Monte Carlo) method [57], and the present hybrid method. In the hybrid method, the explicit Euler scheme is used for the time discretization of the diffusion equation, and the time step size is determined in the same manner as the lid-driven cavity case. For all approaches, the computational node or particle spacing is fixed at \(1/40\) and uniform.

Fig. 12
figure 12

Fluid mixing problem in a zig-zag channel; a geometry and boundary conditions, b flow field at \(\mathrm{Re} = 1\)

Figure 13 shows the concentration distributions calculated for \(\mathrm{Pe} = 10^3,\, 10^4,\, 10^5\), and \(\infty \). The concentration field calculated by FVM agrees well with that of the Monte Carlo method at \(\mathrm{Pe} = 10^3\); however, for \(\mathrm{Pe} \ge 10^4\) the numerical diffusion causes overestimation of diffusion rate and appreciable discrepancies with respect to the Monte Carlo method emerge. On the other hand, the calculation results of the present hybrid method shows good agreement with the Monte Carlo method for all Péclet numbers tested.

Fig. 13
figure 13

Concentration distributions in a zig-zag channel calculated by FVM (upper), backward random-walk Monte Carlo method (middle), and the present hybrid method (lower); a \(\mathrm{Pe} = 10^3\), b \(\mathrm{Pe} = 10^4\), c \(\mathrm{Pe} = 10^5\), d \(\mathrm{Pe} = \infty \)

In order to compare state of mixing quantitatively, we have evaluated the mixing quality based on the Danckwerts’ intensity of segregation [11], so-called intensity of mixing [6] or mixing index [22],

$$\begin{aligned} \mathrm{MI} = 1-\frac{\sigma }{\sigma _{\mathrm{max}}} , \end{aligned}$$
(56)

where \(\sigma \) indicates the standard deviation of concentration in the measurement plane (or volume), and \(\sigma _{\mathrm{max}}\) is the standard deviation at the inlet (here \(\sigma _{\mathrm{max}} = 0.5\)). The mixing index (\(\mathrm{MI}\)) is defined to be \(0\) for a completely segregated state and \(1\) for the completely mixed state (homogeneous concentration distribution). In Fig. 14, the mixing index measured at cross-section \(x = 6\) is plotted for the range \(10^2 \le \mathrm{Pe} \le 10^6\). In case of FVM, the numerical diffusion dominates and mixing state is not correctly evaluated for \(\mathrm{Pe} \ge 10^4\). In contrast, the present hybrid method faithfully evaluates the diffusion effect even for high values of \(\mathrm{Pe}\), and discrepancy with the Monte Carlo method is kept small.

Fig. 14
figure 14

Mixing index measured in a zig-zag channel at \(x = 6\)

4 Conclusion

We propose a hybrid grid-particle method for the numerical simulation of fluid mixing problem. The current main target is a liquid–liquid mixing problem in microsystem, in which the non-dimensional parameters are typically \(\mathrm{Re} \sim 10^2\) and \(\mathrm{Pe} \sim 10^5 \,(\mathrm{Sc} \sim 10^3\)). For such high \(\mathrm{Pe}\), conventional grid-based approaches suffer from severe numerical diffusion. The proposed method combines the grid-based approach and the particle-based approach in such a way that the incompressible Navier–Stokes equations are solved using FVM, and the advection–diffusion equation of chemical species concentration is solved using a particle method. With this calculation principle, the fluid mixing problem of interest can efficiently be solved utilizing the characteristics of each approach; the flow field is stably solved even with long time step, and the concentration field is accurately solved with minimal numerical diffusion.

The hybrid grid-particle method is examined through three test cases. In the unsteady one-dimensional diffusion problem, convergence of the resulting nodal error norm is checked, and consistency of the Laplacian discretization scheme employed in the particle phase is verified. As a second test, the hybrid method is applied to the fluid mixing problem in a lid-driven cavity flow. Converged result of the concentration field agrees well with that obtained by FVM, and it is also found that the hybrid method achieves the convergence with lower spatial resolution than FVM. The continuous mixing process in a two-dimensional zig-zag channel is calculated using three different approaches: present hybrid method, FVM, and a reliable Monte Carlo method. In this test, the computational node or particle spacing is fixed at \(1/40\) for all approaches. The resulting concentration field obtained by FVM shows considerable discrepancies with respect to the Monte Carlo method for \(\mathrm{Pe} \ge 10^4\) due to the numerical diffusion; on the other hand, the hybrid method shows good agreement for \(\mathrm{Pe} = 10^3,\, 10^4,\, 10^5\), and \(\infty \) in qualitative assessment, and for \(10^2 \le \mathrm{Pe} \le 10^5\) in quantitative assessment.