# Multiscale simulation of nanofluidic networks of arbitrary complexity

- 1.6k Downloads
- 5 Citations

## Abstract

We present a hybrid molecular-continuum method for the simulation of general nanofluidic networks of long and narrow channels. This builds on the multiscale method of Borg et al. (Microfluid Nanofluid 15(4):541–557, 2013; J Comput Phys 233:400–413, 2013) for systems with a high aspect ratio in three main ways: (a) the method has been generalised to accurately model any nanofluidic network of connected channels, regardless of size or complexity; (b) a versatile density correction procedure enables the modelling of compressible fluids; (c) the method can be utilised as a design tool by applying mass-flow-rate boundary conditions (and then inlet/outlet pressures are the output of the simulation). The method decomposes the network into smaller components that are simulated individually using, in the cases in this paper, molecular dynamics micro-elements that are linked together by simple mass conservation and pressure continuity relations. Computational savings are primarily achieved by exploiting length-scale separation, i.e. modelling long channels as hydrodynamically equivalent shorter channel sections. In addition, these small micro-elements reach steady state much quicker than a full simulation of the network does. We test our multiscale method on several steady, isothermal network flow cases and show that it converges quickly (within three iterations) to good agreement with full molecular simulations of the same cases.

## Keywords

Multiscale simulations Hybrid methods Molecular dynamics Coupled solvers Scale separation Nanofluidics## 1 Introduction

There are a number of engineering applications of fluid dynamics that require modelling with nanoscale or microscale resolution, for example, lab-on-a-chip devices (Jiang et al. 2011), nanotube membranes for seawater desalination (Mattia and Gogotsi 2008) or air purification (Mantzalis et al. 2011), and miniaturised heat exchangers for cooling electronic circuits (Yarin et al. 2009). In any simulation, the smallest dimension of a problem will determine the resolution required, and these applications are all multiscale: the length scale in one direction (usually the streamwise direction) is orders of magnitude greater than in the others. For example, the length of a nanotube in a desalination membrane (\(\sim\)2 mm) can be far larger than its diameter (\(\sim\)2 nm). This makes most micro solvers, such as molecular dynamics (MD), very computationally inefficient because the computation time grows dramatically with the size of the domain. The use of continuum fluid hydrodynamics, such as the Navier–Stokes–Fourier (NSF) equations, is also inadequate for these types of problems. While the NSF equations have been shown to still be legitimate for Newtonian flows at the nanoscale, they break down for non-Newtonian flows (with unknown constitutive relations), flows dominated by surface effects (e.g. molecular layering or large slip), or flows that exhibit thermodynamic non-equilibrium due to high gradient processes in the bulk fluid. A number of so-called hybrid multiscale methods have therefore been developed that aim to combine the best features of both micro and macroscale solvers: these strike a compromise between the accuracy of MD (in places where NSF is invalid) and the computational speed of NSF (where MD would be too computationally expensive).

In the heterogeneous multiscale method (HMM), the macro solver spans the entire domain, with micro solvers spatially dispersed to provide the micro resolution (see Fig. 1c). The macro solver is updated with local fluid information from the micro solvers. For example, at surfaces, slip velocity and shear stress information is passed to the macro solver, which negates the need for slip boundary conditions; in the bulk fluid, shear stress information is provided, removing the need for presumed constitutive relations or transport coefficients (Ren and E 2005). In return, the micro solvers are constrained by the local strain rate (and the temperature for non-isothermal flows) measured from the macro solver. The main drawback of HMM is that for narrow flow channels, the micro solver regions would likely overlap, rendering the computational speed-up small and the accuracy lower than that of a pure micro solver. Problems with NPBCs remain and, for a fluid with unknown constitutive relations, the number of micro solvers to accurately represent the varying stress field would further reduce any computational speed-up.

The internal-flow multiscale method (IMM) (Borg et al. 2013b; Patronis et al. 2013) is a recent development to tackle the specific problem of simulating flow in long and narrow channels, for which (as outlined above) other hybrid techniques are less computationally efficient. The IMM hybridisation exploits length-scale separation between the gradually varying hydrodynamic processes occurring on scales of similar magnitude to the length of the channel, and the molecular processes occurring on scales of similar magnitude to the channel height or width. In IMM, a simple continuum description applies throughout the flow domain, but a number of short micro-solver elements are distributed along the length of the channel, each covering the entire channel height or width (see Fig. 1d). The number and position of micro-elements are chosen to be sufficient to resolve the geometrical features of the channel, but contain, in total, far fewer molecules or particles than a simulation of the entire domain. There is no direct communication between the micro and macro solvers. Instead, coupling is performed iteratively via simple mass conservation and pressure continuity over the entire channel: the micro solver provides a local mass flow rate and the macro-solver provides either a local pressure difference or a pressure gradient. This approach removes any need to pass surface information (such as slip) or constitutive information (such as viscosity) to the macro solver, as these are inherently modelled within the micro-element simulations; the mass flow rate is the only information that is needed by the macro formulation from the micro elements. Another benefit is that IMM enables periodic boundary conditions (PBCs) to be used in the micro-element simulations, and these are far more efficient and convenient. One current limitation of this method, though, is that it is only applicable to isothermal and steady-state flows, because the simulations require long averaging periods to obtain low-noise measurements prior to coupling.

*components*, of which there are two types:

*channel components*(which have a high aspect ratio, and can thus be represented by a shorter, computationally cheaper, series of micro elements as illustrated in Fig. 1d) and

*junction components*(of arbitrary geometry, such as a reservoir or channel defect, for which no scale separation can be exploited, and thus must be simulated in their entirety). The term

*serial*refers to the fact that in Borg et al. (2013a), every component in the network could only have one inflow and one outflow, and so, the mass flow rate was constant in each micro element. A general network solver would require far greater practical applicability (e.g. for mixing channels and lab-on-a-chip devices) and is not trivial to implement. An example of a general network is shown in Fig. 2 and includes a bifurcating flow. Another limitation of the method proposed in Borg et al. (2013a) is that it is only appropriate for effectively incompressible fluid conditions. However, flows at the nanoscale display compressibility even at very low Mach numbers (Gad-El-Hak 2006).

In this paper, we therefore extend the previous SeN-IMM technique to encompass general network geometries (where each component can have any number of inlets and outlets) and incorporate an equation of state to account for fluid compressibility. We refer to this new method as the General Networks Internal-flow Multiscale Method (GeN-IMM). The other assumptions in Borg et al. (2013a) are maintained, i.e. isothermal and steady-state flows. Our new method can potentially be used in conjunction with any micro solver, but for this paper, we have chosen MD.

Another novel aspect of our method is that it has the capability to act as a design tool, rather than just a simulation tool. It enables mass flow rates (rather than just inlet/outlet pressures) to be specified as boundary conditions. This is important in applications where the mass flow rate must be controlled, but the required inlet or outlet pressure to generate it is not known, for example, in drug delivery.

The GeN-IMM provides computational savings in three ways: (1) long channels are replaced by hydrodynamically equivalent shorter channel micro elements; (2) these micro-elements reach steady state much faster than a simulation of the full network, due to their small size; and (3) the trial-and-error process necessary to determine pressure boundary conditions to achieve a desired mass flow rate is removed. Furthermore, as the micro elements are small and can be simulated independently of each other during each iteration, this new method is less dependent on access to supercomputer resources: micro-elements can be run on single graphics processing units (GPUs) instead of a large number of central processing units (CPUs). There is often a limit to the number of molecules able to be processed on a GPU, and so, large MD simulations cannot benefit from them.

## 2 The hybrid method for networks: GeN-IMM

*components*, with each being defined as either a

*junction*component or a

*channel*component (see Fig. 3 for an illustrative example of such a decomposition). Our main purpose is to enable the channel components to be simulated separately using short, periodic, and computationally cheaper MD simulations (this is the IMM approach). Each component has a number of ‘inlet/outlet’

*boundaries*; these are either

*external boundaries*to the network or

*internal boundaries*which connect neighbouring components (see Fig. 3).

*i*th boundary of the

*q*th component. Note, by convention, the mass flow rate is treated as positive flowing out of the component, hence the minus sign in Eq. (1).

*q*th component. This

*local*mass conservation (5) is automatically guaranteed by any individual component simulation, but it is only in combination with (1) that

*global*mass conservation is satisfied over the whole network.

*q*th component, \(a_{b,q}\) are constants, \(\beta\) is the order of the polynomial equation, and

*i*th of \(W_q\) boundaries. The coefficients \(a_{b,q}\) are determined from a presimulation of a periodic cube of fluid molecules. Pressure measurements for different densities are obtained using a standard Irving-Kirkwood calculation, and a \(\beta\)-order polynomial is then fitted to the data, which provides the coefficients. The values of \(a_{b,q}\) for liquid argon can be found in Appendix 2; the same values are used in all the multiscale solutions of this paper. Equations (7) and (8) enable us to estimate the number of molecules that need to be added or removed (using the FADE algorithm of Borg et al. (2014), the USHER algorithm of Delgado-Buscalioni and Coveney (2003b), or the AdResS scheme of Praprotnik et al. (2005)) for the next iteration of each component simulation.

### 2.1 Simulating channel components

Solving Eqs. (1)–(6) provides the pressure values that satisfy external boundary conditions, that are consistent at internal boundaries, and that create a mass-flow response that is closer to being globally conservative than that of the previous iteration. We now discuss how these boundary conditions can be applied to the individual component simulations.

### 2.2 Simulating junction components

Junction components, unlike channels, cannot be represented using smaller MD simulations; there is no obvious scale separation that can be exploited, so the full component must be simulated.

However, what is not straightforward in MD is how to deal with the non-periodicity of most junction components (e.g. the Y-junction in Fig. 3). There are no available MD ensembles to solve non-periodicity, even though a significant amount of progress has been made on developing artificial NPBCs (see Mohamed and Mohamad (2010) and references therein).

### 2.3 Algorithm

- 1.
Approximate the flow-conductance coefficients \(K_{ij,q}\), \(L_{ij,q}\) for each component. The terms in angular brackets in Eqs. (6) and (10) are assumed to be zero.

- 2.
Solve the set of linear Eqs. (1)–(6) and (10), using matrix inversion, for the predicted mass flow rates \(\dot{m}_{i,q}\), pressures \(P_{i,q}\) and junction pressure jumps \(\varPhi _{i,q}\).

- 3.
Solve Eqs. (7)– (9) for the mass densities \(\rho _q\) and channel component body forces \(F_q\), using the predicted values of pressure \(P_{i,q}\) previously calculated.

- 4.
Run all micro-element MD simulations with the new body forces and updated average densities until steady state. At steady state, measure time-averaged mass flow rates \(\langle \dot{m}_{i,q}\rangle\) and pressures \(\langle P_{i,q}\rangle\) at every boundary (for junctions), and the mean pressure \(\langle \bar{P}_{q}\rangle\) (for channels). These measured properties are used in Eqs. (6) and (10) for the next iteration. Note, for channel components, the term \((P_{i,q}-P_{j,q})\) is obtained directly from Eq. (9).

- 5.
Update the flow-conductance coefficients \(K_{ij,q}\) and \(L_{ij,q}\).

- 6.Repeat from step 2 until a convergence criterion is met for the mass flow rate at a given boundary:or for the pressure:$$\begin{aligned} \zeta _{i,q} < \zeta ^{\mathrm {tol}}, \;\;\;\;\mathrm {with}\;\;\;\; \zeta _{i,q} = \Bigg \vert \frac{\left[ \dot{m}_{i,q}\right] _{l} - \left[ \dot{m}_{i,q}\right] _{l-1}}{\left[ \dot{m}_{i,q}\right] _{l}}\Bigg \vert , \end{aligned}$$(11)depending on what the boundary constraints are. Here \(\zeta ^{\mathrm {tol}}\) is a predetermined convergence tolerance and the superscripts \(l\) and \(l-1\) denote values calculated at the current and the previous iteration, respectively.$$\begin{aligned} \zeta _{i,q} < \zeta ^{\mathrm {tol}}, \;\;\;\;\mathrm {with}\;\;\;\; \zeta _{i,q} = \Bigg \vert \frac{\left[ P_{i,q}\right] _{l} - \left[ P_{i,q}\right] _{l-1}}{\left[ P_{i,q}\right] _{l}} \Bigg \vert , \end{aligned}$$(12)

### 2.4 Molecular dynamics

In order to validate our hybrid technique, we solve full networks with non-equilibrium MD simulations (Rapaport 2004; Allen and Tildesley 1987) using the mdFoam solver (Macpherson and Reese 2008; Borg et al. 2010) developed in OpenFOAM, an open-source set of C++ libraries for solving sets of differential equations in parallel (www.openfoam.org). We use the same MD solver in the iterative scheme outlined above, applying body force and density constraints to the micro-element simulations.

All our MD simulations are three-dimensional, with PBCs applied in every direction. The cases are all set up so that there are no gradients of properties in one direction perpendicular to the flow; so, the depth is chosen as a compromise between computational efficiency and the ability to generate sufficient data for averaging.

The external forcing \(\mathbf f ^{(ext)}\) in Eq. (14) is used both to generate pressure jumps (in the artificial regions of the junction components) and to represent linear pressure gradients (for channel components), as described previously. The heat generated indirectly by this forcing is removed to ensure a thermally homogeneous system; we utilise a Berendsen thermostat (Berendsen et al. 1984) to rescale the velocities of molecules. This thermostat operates on the thermal velocities, minimising the impact on the streamwise velocity. The thermostat is implemented via localised bins over the entire MD domain in the streamwise and transverse flow directions, with bin sizes of \(0.68\) nm. Each bin has a target temperature of \(T = 292.8\) K, using a time-constant \(\tau _{T} = 21.61\) fs.

## 3 Results and discussion

The GeN-IMM method is tested on compressible pressure-driven flows through some simple network configurations. Due to the statistical noise created by thermal fluctuations, large pressure gradients are required in MD simulations of Poiseuille flows (Koplik et al. 1988; Travis et al. 1997) in order to achieve sufficiently low-variance data within a reasonable time frame.

Our results are validated via comparison to a full MD simulation of the entire network. In this way, any approximations made within the MD model are negated as they are the same in both the full and the hybrid cases. The pressure drops over the full MD networks are generated in the same manner as for junction micro-elements (i.e. the application of body forces in an artificial region). The networks are restricted to a relatively small size in order that these full MD simulations are not too computationally expensive. The full MD simulations are run in parallel on 48 CPUs, while the MD micro-elements for the hybrid solution are run on single GPUs.

The first network we analyse is a straight channel connecting two reservoirs i.e. a serial network, which is similar to a test case in Borg et al. (2013a); the second network is a bifurcating channel i.e. a general network, which demonstrates the novel capabilities of GeN-IMM.

### 3.1 A straight channel geometry

The length of the channel component is \(L = 102\) nm, which is represented in the multiscale model by a micro-element of length \(L^{\prime } = 4.08\) nm, producing a length ratio of \(L/L^{\prime } = 25\). The height of the channel section is \(3.4\) nm, which is sufficiently small that there is non-continuum flow behaviour in the LJ liquid argon (e.g. molecular layering and velocity slip at the liquid–solid interface) that would not be effectively captured by a standard Navier–Stokes fluid dynamics solution. The reservoir height (in the *y*-direction) is \(6.8\) nm, and the depth (in the *z*-direction) is a uniform \(6.8\) nm along the entire network and in each micro-element. A large pressure drop of \(\approx 350\) MPa is imposed over the network for the reason described above.

Straight channel iteration 5: steady-state mass flow rate data for the multiscale method and the full MD solution. Relative error calculated as \(|\dot{m}_{F} - \dot{m}_{i}| / |\dot{m}_{R}| \times 100\)

Boundary # | Full MD \(\dot{m}_{F}\) (ng/s) | Multiscale \(\dot{m}_{i}\) (ng/s) | Relative error \(e_{i}\) (%) | ||
---|---|---|---|---|---|

Case 1 | Case 2 | Case 1 | Case 2 | ||

1 | 1.5389 | 1.5227 | 1.5457 | 1.04 | 0.45 |

2 | 1.5387 | 1.5226 | 1.5456 | 1.04 | 0.45 |

3 | 1.5389 | 1.5310 | 1.5517 | 0.51 | 0.83 |

4 | 1.5389 | 1.5310 | 1.5517 | 0.51 | 0.83 |

5 | 1.5389 | 1.5461 | 1.5342 | 0.46 | 0.30 |

6 | 1.5387 | 1.5461 | 1.5342 | 0.48 | 0.29 |

Straight channel iteration 5: steady-state pressure data for the multiscale method and the full MD solution. Relative error calculated as \(|P_{F} - P_{i}| / |P_{R}| \times 100\)

Boundary # | Full MD \(P_{F}\) (MPa) | Multiscale \(P_{i}\) (MPa) | Relative error \(e_{i}\) (%) | ||
---|---|---|---|---|---|

Case 1 | Case 2 | Case 1 | Case 2 | ||

1 | 648.01 | 647.99 | 647.60 | 0.00 | 0.06 |

2 | 606.07 | 604.81 | 604.53 | 0.20 | 0.25 |

3 | 606.07 | 605.70 | 604.90 | 0.06 | 0.19 |

4 | 318.77 | 318.63 | 315.96 | 0.04 | 0.88 |

5 | 318.77 | 317.68 | 316.04 | 0.33 | 0.86 |

6 | 295.06 | 295.28 | 293.70 | 0.07 | 0.46 |

The iterative algorithm previously outlined is performed for 5 iterations (although convergence occurs in fewer) to illustrate the numerical stability of the method. Figure 7 shows an example of how the measured mass flow rate and pressure develops with iteration number at boundary #1 for case 1. There is quick and accurate convergence of our GeN-IMM solution to the full MD result, and good numerical stability. The error bars for both the full and multiscale solutions are \(1.96\) standard deviations either side of the mean to represent the 95% confidence interval and take into account the amount of correlation that occurs within each micro-element or full network.

Complete results demonstrating convergence speed and precision for both cases are detailed in Fig. 8, and Tables 1 and 2, respectively. In the tables, the reference mass flow rate \(\dot{m}_{R}\) and reference pressure \(P_{R}\) are taken to be the largest mass flow rate and pressure measured in the multiscale simulations, respectively, as it is these values which most strongly govern the flow characteristics. In both cases the final error in the multiscale solution is \(\approx 1\) % at each boundary for both mass flux and pressure. This can be compared to relative errors of 73 and 50 % for the initial mass flow rate/pressure predictions in case 1 and 2, respectively. The fluctuation of the mass flow rate between iterations 2 and 5 in Fig. 7a is of similar magnitude to the error bars and so can be accounted for by the noise inherent in the MD simulations.

Figure 10 presents streamwise velocity and density profiles transverse to the flow for case 1 at iteration 5, superimposed onto the profiles for the full MD simulation. These profiles are measured at the half way point along the network, at the plane A–A (see Fig. 10a). Once again, excellent agreement between the simulations is found, including the accurate capturing of non-equilibrium and non-continuum effects, namely velocity slip and molecular layering in the velocity and density profiles, respectively.

While accuracy is important, hybrid methods also need to show improved computational efficiency over a full simulation. We measure computational speed-up by comparing the product of the total number of time-steps and the average simulation time for one time-step, for both the full and the hybrid solutions, \(\tau _{F}\) and \(\tau _{M}\), respectively. The total number of time-steps was considered to be the number of time-steps taken for the hybrid solution to exhibit the same level of error as the full network solution, and the time taken to reach steady state is included within the measurement time. For a fair comparison, the average simulation time for one time-step was calculated by running each micro element or full network on one central processing unit (CPU). The full MD simulation was run for approximately 1,400,000 time-steps, costing 9.4 s in computational time per time-step. The micro elements for the hybrid solution were run for between 800,000 and 1,200,000 time-steps per iteration, costing between 0.2 and 0.65 s per time-step. Assuming three iterations to convergence, the speed-up \(\tau _{F}/\tau _{M}\) is calculated to be 3.9. This is smaller than the value of \(7.6\) calculated by Borg et al. (2013a) for a similar network because this latter paper combined the two reservoir micro-elements into one, to avoid having to use artificial regions. While this is a useful technique, it is highly specific to the geometry of the network, requiring a serial network with junction components at both the inlet and the outlet. Here, we have relaxed this requirement in order to construct a more general technique. In Borg et al. (2013a), the channel height is also slightly greater, so more is gained through the length-scale separation in component #2 than in the present study.

Although the speed-up is fairly modest it should be noted that this test case is developed in order to determine the accuracy of the method. A very large network would have rendered a full MD simulation computationally intractable. So, the computational speed-up is expected to increase dramatically as the scale separation and size of the network increases.

### 3.2 A bifurcating channel geometry

*z*-direction of 5.44 nm. This is smaller than in the straight channel network of Sect. 3.1 so that the full MD simulation for validation is not too time-consuming, as the network is now much larger.

Case 3 (bifurcating configuration) iteration 5: steady-state mass flow rate data for the multiscale method and the full MD solution. Relative error calculated as \(|\dot{m}_{F} - \dot{m}_{i}| / |\dot{m}_{R}| \times 100\)

Boundary # | Full MD \(\dot{m}_{F}\) (ng/s) | Multiscale \(\dot{m}_{i}\) (ng/s) | Relative error \(e_{i}\) (%) |
---|---|---|---|

1 | 2.3942 | 2.3627 | 1.32 |

2 | 2.3942 | 2.3627 | 1.32 |

3 | 2.3942 | 2.3535 | 1.70 |

4 | 0.9258 | 0.9115 | 1.55 |

5 | 1.4691 | 1.4416 | 1.88 |

6 | 0.9258 | 0.9133 | 1.36 |

7 | 0.9258 | 0.9133 | 1.35 |

8 | 1.4691 | 1.4465 | 1.54 |

9 | 1.4691 | 1.4464 | 1.54 |

Case 3 (bifurcating configuration) iteration 5: steady-state pressure data for the multiscale method and the full MD solution. Relative error calculated as \(|P_{F} - P_{i}| / |P_{R}| \times 100\)

Boundary # | Full MD \(P_{F}\) (MPa) | Multiscale \(P_{i}\) (MPa) | Relative error \(e_{i}\) (%) |
---|---|---|---|

1 | 564.84 | 564.46 | 0.07 |

2 | 332.28 | 334.01 | 0.31 |

3 | 332.28 | 333.86 | 0.28 |

4 | 262.71 | 267.86 | 0.91 |

5 | 257.16 | 262.01 | 0.86 |

6 | 262.71 | 268.57 | 1.04 |

7 | 135.38 | 135.75 | 0.07 |

8 | 257.16 | 261.89 | 0.84 |

9 | 139.64 | 139.53 | 0.02 |

Using this network, we modelled two further cases: case 3, which has an inlet at boundary #1 \(565\) MPa, and outlets at boundaries #7 \(135\) MPa and #9 \(140\) MPa; and case 4, which has inlets at boundaries #1 \(427\) MPa and #7 \(699\) MPa, and an outlet at boundary #9 \(46\) MPa. In this way, we simulate two different case variants: a bifurcating case (case 3), with one branch splitting into two; and a mixing case (case 4), with two branches joining into one, see Fig. 11a. For both cases, pressure boundaries are employed at all inlets/outlets.

Case 4 (mixing configuration) iteration 5: steady-state mass flow rate data for the multiscale method and the full MD solution. Relative error calculated as \(|\dot{m}_{F} - \dot{m}_{i}| / |\dot{m}_{R}| \times 100\)

Boundary # | Full MD \(\dot{m}_{F}\) (ng/s) | Multiscale \(\dot{m}_{i}\) (ng/s) | Relative error \(e_{i}\) (%) |
---|---|---|---|

1 | 1.3179 | 1.4165 | 3.85 |

2 | 1.3179 | 1.4165 | 3.85 |

3 | 1.3179 | 1.4166 | 3.86 |

4 | −1.2381 | −1.2437 | 0.22 |

5 | 2.5565 | 2.6606 | 4.07 |

6 | −1.2381 | −1.2412 | 0.12 |

7 | −1.2381 | −1.2412 | 0.12 |

8 | 2.5565 | 2.6486 | 3.60 |

9 | 2.5565 | 2.6486 | 3.60 |

Case 4 (mixing configuration) iteration 5: steady-state pressure data for the multiscale method and the full MD solution. Relative error calculated as \(|P_{F} - P_{i}| / |P_{R}| \times 100\)

Boundary # | Full MD \(P_{F}\) (MPa) | Multiscale \(P_{i}\) (MPa) | Relative error \(e_{i}\) (%) |
---|---|---|---|

1 | 427.02 | 427.40 | 0.05 |

2 | 313.43 | 306.56 | 0.98 |

3 | 313.43 | 306.02 | 1.06 |

4 | 351.41 | 341.09 | 1.49 |

5 | 218.86 | 211.13 | 1.10 |

6 | 351.41 | 340.09 | 1.62 |

7 | 699.15 | 699.08 | 0.01 |

8 | 218.86 | 211.22 | 1.09 |

9 | 45.78 | 45.89 | 0.02 |

The speed-ups for cases 3 and 4 are relatively low. The full MD simulation was run for approximately \(1{,}400{,}000\) time-steps, costing 14.3 and 13.4 s per time-step for cases 3 and 4, respectively. The micro-elements for the hybrid solution were run for 800,000–1,200,000 time-steps per iteration, costing 0.2–3.0 s per time-step. Therefore, \(\tau _{F}/\tau _{M} = 2.1\) for case 3 and \(\tau _{F}/\tau _{M} = 2.0\) for case 4. The complex geometry shows the disadvantage of using PBCs in MD. Although physically simple, the necessity for a mirroring boundary leads to a large artificial region that is costly to simulate, especially across multiple iterations. The exploitation of length-scale separation had to be minimised in these test cases in order that we would also be able to simulate the full network (for validation purposes) within a reasonable time.

It should be noted that, although the method is demonstrated here using MD as the micro solver, it is potentially compatible with any other micro solver, such as the direct simulation Monte Carlo (DSMC) method for gas flows, where NPBCs are better developed. Using a different micro solver may therefore remove the need for an artificial region and dramatically increase the speed-up in networks such as this.

## 4 Conclusion

We have presented a Generalised-Networks IMM (GeN-IMM) that enables the flow of compressible fluids within complex, non-serial nanoscale geometries to be accurately and efficiently modelled. Molecular dynamics (MD) has been used as the micro solver, while the conservation of mass and the continuity of pressure between components provides the macro solution. The advantage of this approach is that nanoscale effects such as slip and molecular layering can be accurately captured within the multiscale solution, whereas a conventional Navier-Stokes-Fourier solution of the network would not be able to predict these important effects. The solver coupling is through the exchange of mass flow rate and pressure information from micro to macro, and body force and density controls from macro to micro.

In our network test cases, we found this multiscale method converged after 3 iterations to mass flow rate and pressure errors of \(<4\,\%\) and usually better than \(2\,\%\), respectively (when compared to full MD simulations of the same network). The multiscale approach provided a computational speed-up over full MD of between 2 and 4 times.

The new method has some clear advantages over full molecular simulations: (1) it is more efficient than a full MD simulation, and the computational speed-up will be even greater for larger networks (the longer the channels represented by shorter periodic channels, the greater the savings); (2) it can be used as a design tool, due to the ability to set mass-flow-rate conditions as constraints to the solution; (3) it is ideally suited to be run on a small cluster of CPUs/GPUs (either simultaneously or sequentially, if resources are limited) since the micro-elements are relatively small simulations that can be run independently at each iteration.

The drawbacks are that the method is currently limited to isothermal and steady flows, and that the speed-up in complicated networks is reduced due to the necessary presence of artificial regions in junction micro-elements so that periodic boundary conditions can be employed. However, it should be noted that as the size and complexity of the network increases, the relative size of the artificial regions decreases, and so greater savings are made. We conservatively suggest, as a rule of thumb, that artificial regions should be the same size as the real regions in junction micro-elements, and that each region should have a development length of at least four times that predicted by laminar macroscopic flow theory in order to ensure that no disturbance propagates into the flow field and the flow in channel components is fully developed.

Future work should extend the method to quasi-steady problems with large time-scale separation, and to non-isothermal problems. In addition, extending the method to accommodate multispecies flows could lead to interesting mixing cases for which there is currently no multiscale technique. The application of the method in conjunction with other molecular solvers (e.g. DSMC) should also be investigated and, finally, the use of non-periodic boundary conditions could provide additional speed-up for more complex networks as costly artificial regions would not then be required.

## Notes

### Acknowledgments

This work is financially supported in the UK by EPSRC Programme Grant EP/I011927/1, and EPSRC Grants EP/K038664/1 and EP/K038621/1. Our full MD calculations were performed on the high performance computer ARCHIE at the University of Strathclyde, funded by EPSRC Grants EP/K000586/1 and EP/K000195/1.

## References

- Alexiadis A, Lockerby DA, Borg MK, Reese JM (2013) A Laplacian-based algorithm for non-isothermal atomistic-continuum hybrid simulation of micro and nano-flows. Comput Methods Appl Mech Eng 264:81–94CrossRefzbMATHMathSciNetGoogle Scholar
- Allen MP, Tildesley DJ (1987) Computer simulation of liquids. Clarendon Press, OxfordzbMATHGoogle Scholar
- Asproulis N, Kalweit M, Drikakis D (2012) A hybrid molecular continuum method using point wise coupling. Adv Eng Softw 46(1):85–92CrossRefGoogle Scholar
- Berendsen HJC, Postma JPM, Gunsteren WF, Dinola A, Haak JR (1984) Molecular dynamics with coupling to an external bath. J Chem Phys 81(8):3684–3690CrossRefGoogle Scholar
- Borg MK, Macpherson GB, Reese JM (2010) Controllers for imposing continuum-to-molecular boundary conditions in arbitrary fluid flow geometries. Mol Simul 36(10):745–757CrossRefGoogle Scholar
- Borg MK, Lockerby DA, Reese JM (2013a) A hybrid molecular-continuum simulation method for incompressible flows in micro/nanofluidic networks. Microfluid Nanofluid 15(4):541–557CrossRefGoogle Scholar
- Borg MK, Lockerby DA, Reese JM (2013b) A multiscale method for micro/nano flows of high aspect ratio. J Comput Phys 233:400–413CrossRefGoogle Scholar
- Borg MK, Lockerby DA, Reese JM (2014) The FADE mass-stat: a technique for inserting or deleting particles in molecular dynamics simulations. J Chem Phys 140Google Scholar
- Delgado-Buscalioni R, Coveney PV (2003a) Continuum-particle hybrid coupling for mass, momentum, and energy transfers in unsteady fluid flow. Phys Rev E 67(4):1–13CrossRefGoogle Scholar
- Delgado-Buscalioni R, Coveney PV (2003b) USHER: an algorithm for particle insertion in dense fluids. J Chem Phys 140(2):978–987CrossRefGoogle Scholar
- Docherty SY, Nicholls WD, Borg MK, Lockerby DA, Reese JM (2014) Boundary conditions for molecular dynamics simulations of water transport through nanotubes. Proc Inst Mech Eng Part C J Mech Eng Sci 228(3):186–195CrossRefGoogle Scholar
- E W, Ren W, Vanden-Eijinden E (2009) A general strategy for designing seamless multi-scale methods. J Comput Phys 228(15):5437–5453CrossRefzbMATHMathSciNetGoogle Scholar
- Fan X, Phan-Thien N, Yong NT, Diao X (2002) Molecular dynamics simulation of a liquid in a complex nano channel flow. Phys Fluids 14(3):1146–1153CrossRefGoogle Scholar
- Gad-El-Hak M (2006) MEMS: introduction and fundamentals. CRC Taylor and FrancisGoogle Scholar
- Hadjiconstantinou N, Patera A (1997) Heterogeneous atomistic-continuum methods for dense fluid systems. Int J Mod Phys C 8(4):967–976CrossRefGoogle Scholar
- Huang C, Gregory JW, Sullivan JP (2007) Microchannel pressure measurements using molecular sensors. J Microelectromech Syst 16(4):777–785CrossRefGoogle Scholar
- Jiang H, Weng X, Li D (2011) Microfluidic whole-blood immunoassays. Microfluid Nanofluid 10(5):941–964CrossRefGoogle Scholar
- Koplik J, Banavar JR, Willemsen JF (1988) Molecular dynamics of poiseuille flow and moving contact lines. Phys Rev Lett 60(13):1282–1285CrossRefGoogle Scholar
- Macpherson GB, Reese JM (2008) Molecular dynamics in arbitrary geometries: parallel evaluation of pair forces. Mol Simul 34(1):97–115CrossRefGoogle Scholar
- Mantzalis D, Asproulis N, Drikakis N (2011) Filtering carbon dioxide through carbon nanotubes. Chem Phys Lett 1(3):81–85CrossRefGoogle Scholar
- Mattia D, Gogotsi Y (2008) Review: static and dynamic behavior of liquids inside carbon nanotubes. Microfluid Nanofluid 5(3):289–305CrossRefGoogle Scholar
- Mohamed KM, Mohamad AA (2010) A review of the development of hybrid atomistic-continuum methods for dense fluids. Microfluid Nanofluid 8(3):283–302CrossRefGoogle Scholar
- Nie XB, Chen SY, E W, Robbins MO (2004) A continuum and molecular dynamics hybrid method for micro- and nano-fluid flow. J Fluid Mech 500:55–64CrossRefzbMATHGoogle Scholar
- O’Connell ST, Thompson PA (1995) Molecular dynamics-continuum hybrid computations: a tool for studying complex fluid flows. Phys Rev E 52(6):R5792–R5795CrossRefGoogle Scholar
- Patronis A, Borg MK, Lockerby DA, Reese JM (2013) Hybrid continuum-molecular modelling of multiscale internal gas flows. J Comput Phys 255:558–571CrossRefGoogle Scholar
- Praprotnik M, Site LD, Kremer K (2005) Adaptive resolution molecular-dynamics simulation: changing the degrees of freedom on the fly. J Chem Phys 123(224):106Google Scholar
- Rapaport DC (2004) The art of molecular dynamics simulation. Cambridge University Press, CambridgeCrossRefzbMATHGoogle Scholar
- Ren W, E W (2005) Heterogeneous multi-scale method for the modeling of complex fluids and micro-fluidics. J Comput Phys 204(1):1–26CrossRefzbMATHMathSciNetGoogle Scholar
- Thompson PA, Troian SM (1997) A general boundary condition for liquid flow at solid surfaces. Nature 389(6649):360–362CrossRefGoogle Scholar
- Travis KP, Gubbins KE (2000) Poiseuille flow of lennard-jones fluids in narrow slit pores. J Chem Phys 112(4):1984–1994CrossRefGoogle Scholar
- Travis KP, Todd BD, Evans DJ (1997) Poiseuille flow of molecular fluids. Phys A Stat Theor Phys 240(1–2):315–327CrossRefGoogle Scholar
- Wagner G, Flekkøy E, Feder J, Jøssang T (2002) Coupling molecular dynamics and continuum dynamics. J Comput Phys Commun 147(1–2):670–673CrossRefzbMATHGoogle Scholar
- Yarin LP, Mosyak A, Hetsroni G (2009) Fluid flow, heat transfer and boiling in micro-channels. Springer, BerlinCrossRefzbMATHGoogle Scholar
- Yasuda S, Yamamoto R (2008) A model for hybrid simulations of molecular dynamics and computational fluid dynamics. Phys Fluids 20(11):101–113CrossRefGoogle Scholar
- Zhu F, Tajkhorshid E, Schulten K (2002) Pressure-induced water transport in membrane channels studied by molecular dynamics. Biophys J 83(1):154–160CrossRefGoogle Scholar
- Zhu F, Tajkhorshid E, Schulten K (2004) Theory and simulation of water permeation in aquaporin-1. Biophys J 86(1):50–57CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.