# Accelerating multiscale modelling of fluids with on-the-fly Gaussian process regression

- 282 Downloads

## Abstract

We present a scheme for accelerating hybrid continuum-atomistic models in multiscale fluidic systems by using Gaussian process regression as a surrogate model for computationally expensive molecular dynamics simulations. Using Gaussian process regression, we are able to accurately predict atomic-scale information purely by consideration of the macroscopic continuum-model inputs and outputs and judge on the fly whether the uncertainty of our prediction is at an acceptable level, else a new molecular simulation is performed to continually augment the database, which is never required to be complete. This provides a substantial improvement over the current generation of hybrid methods, which often require many similar atomistic simulations to be performed, discarding information after it is used once. We apply our hybrid scheme to nano-confined unsteady flow through a high-aspect-ratio converging–diverging channel, and make comparisons between the new scheme and full molecular dynamics simulations for a range of uncertainty thresholds and initial databases. For low thresholds, our hybrid solution is highly accurate—around that of thermal noise. As the uncertainty threshold is raised, the accuracy of our scheme decreases and the computational speed-up increases (relative to a full molecular simulation), enabling the compromise between accuracy and efficiency to be tuned. The speed-up of our hybrid solution ranges from an order of magnitude, with no initial database, to cases where an extensive initial database ensures no new MD simulations are required.

## Keywords

Multiscale modelling Machine learning Hybrid methods Micro/nanofluidics Molecular dynamics## 1 Introduction

Almost all fluid engineering systems are multiscale in their nature. At the smallest scale, the fluid and surrounding environment are comprised of atoms, with interactions occurring across nanometers (\(10^{-9}\) m) and over femtoseconds (\(10^{-15}\) s), while the fluid flow is characterized by the scale of the system geometry, which is often many orders of magnitude larger. In most instances, the separation of scales is so large that the atomistic behaviour can be accurately incorporated into a continuum fluid description through empirical boundary conditions (e.g. the no-slip condition at walls) and constitutive relations (e.g. viscosity in the shear stress–strain rate relation). However, as some characteristic dimension of the system approaches the micro/nanoscale, these approximations break down, and the fluid flow becomes highly dependent on atomistic phenomena (Schoch et al. 2008; Hadjiconstantinou 1999; Brenner et al. 1994; Karniadakis et al. 2005).

A major challenge in modern computational fluid dynamics is how to capture these microscopic effects without incurring a prohibitive simulation cost. There are numerous applications where atomistic information is required to capture non-continuum/non-equilibrium phenomena, but the macroscopic flow develops over much larger length and time scales; e.g. pumping technology that exploits thermal creep in a rarefied gas (Patronis and Lockerby 2014), or high-throughput nanotube membranes for salt water desalination (Ritos et al. 2015). The multiscale nature of these systems leads to a dual requirement for capturing the local atomic-scale interactions and macro-scale fluid response. The complexity of the flow necessitates modelling with atomic resolution, but the state-of-the-art techniques (molecular dynamics (MD) for dense fluid flows (Allen and Tildesley 1987), and the direct simulation Monte-Carlo method (DSMC) for rarefied gas flows (Bird 1994) are extremely computationally expensive. This limits their application to small system sizes, typically \({\mathcal {O}}(100\hbox { nm}^3\)), and short simulation times, typically \({\mathcal {O}}(100\hbox { ns})\), rendering many important engineering problems intractable, and limiting possibilities for comparison with experiments.

Hybrid methods provide a promising framework for simulating such systems by combining continuum (macro) and atomistic (micro) solvers and exploiting scale separation where it exists to obtain a highly accurate, yet computationally tractable, solution. Hybrid approaches to fluid dynamics problems are a well-researched area (e.g. see recent reviews by Wijesinghe and Hadjiconstantinou (2004), Hadjiconstantinou (2005), Kalweit and Drikakis (2008), and Mohamed and Mohamad (2009). Broadly speaking, hybrid methods operate by identifying the regions which require a micro-resolution, then coupling the micro- and macro-domains together via the exchange of state or flux variables to ensure consistency; the information passed from one model is used as a boundary condition for the other. The majority of hybrid methods provide a concurrent approach to multiscale modelling (Delgado-Buscalioni et al. 2008; Markesteijn et al. 2017), i.e. both the micro- and macro-simulations are performed at the same time. A common criticism of concurrent hybrid methods is that they require the repetitive simulation of similar micro-configurations—i.e. information from the micro-domain is used once then wastefully discarded, before regenerating similar information in a future simulation.

An alternative, sequential, hybrid approach is to use look-up tables, whereby micro-simulations are performed ahead of time with the information stored in a table (Walter et al. 2013; Holland et al. 2015; Borg and Reese 2017). This table is then used as a surrogate model for all micro-simulations, with the macro-model interpolating between data entries whenever it requires micro-input. The drawback of such a scheme is that either a) the micro-simulations do not cover a sufficiently wide range of parameter values (or are too sparsely spread), leading to poor interpolation/extrapolation accuracy; or b) the micro-simulations cover too wide a range of parameter values (or are overly numerous) and information from many of the simulations are not used. In this paper, we propose a hybrid method which uses a surrogate model to replace costly micro-simulations, but can judge on-the-fly when the surrogate’s prediction is likely to be poor. At this point, a new micro-simulation can be automatically performed and added to a growing database which never needs to be complete. In this way, we combine the best aspects of concurrent and sequential approaches. The aim is to optimize the information efficiency of the most computationally expensive part of a hybrid method by reducing the number of superfluous micro-simulations—to do this, we use machine learning.

Machine learning (ML) is a popular umbrella term for a wide variety of inferential data-driven methods. In recent years, machine learning techniques have been employed to cheaply incorporate nanoscale information into more coarse-grained models, e.g. building quantum-mechanics-informed molecular force fields sequentially (Behler and Parrinello 2007; Bartók et al. 2010; Szlachta et al. 2014; Botu et al. 2017) and on the fly (Li et al. 2015; Botu and Ramprasad 2015; Caccin et al. 2015); predicting atomisation energies of organic molecules from density-functional theory (Rupp et al. 2012); and informing continuum stress calculations with molecular dynamics (Ulz and Moran 2012). Machine learning has also been used to aid hybrid methods in fluid dynamics: to quantify the uncertainty propagating from the micro- to the macro-model as a function of time-averaging window and the amount of sampled data (Salloum et al. 2012); constructing a constitutive relation for a continuum model that is applicable to nanoscale physics (Salloum and Templeton 2014); and building a surrogate model to replace MD simulations using neural networks (NNs) (Asproulis and Drikakis 2013) and Gaussian processes (GPs) (Salloum and Templeton 2014). However, all such approaches, bar that in Asproulis and Drikakis (2013) are limited by the training data used to fit the ML model; i.e. they are sequential hybrid methods, and are not transferable to situations not envisaged at the time of construction.

In Asproulis and Drikakis (2013), an NN is used for the surrogate model; here, we choose to use GP regression which has the advantages of a) directly capturing the model uncertainty by outputting probability distributions for the predicted values—this provides a simple measure for prediction accuracy; and b) being simple to design, with models described by only a few parameters which can be easily optimised. This produces a natural trade-off between fitting the data and smoothing, and this well-tuned smoothing has the added benefit of permitting micro-simulation times to be kept short.

The goal of this paper is to demonstrate the first-ever on-the-fly implementation of GP regression into a hybrid fluidic model, providing an accessible introduction to the confluence of two fields: machine learning and multiscale fluid dynamics. The paper is laid out as follows: first, we introduce the benchmark fluidic system and the relevant multiscale method, we then explain how the GP regression is performed and implemented, and finally we present results and discussion.

## 2 Methodology

### 2.1 Hybrid method

Our benchmark system has a high aspect ratio, with non-continuum effects (e.g. velocity slip and density layering) persisting over the entire cross section; as such, spatial scale separation can only be exploited in the streamwise direction. Micro-subdomain simulations cover the entire channel height and are placed at regular intervals in the streamwise *s*-direction. The channel is periodic in the *s*-direction, so the first micro-subdomain is simultaneously located at the inlet and the outlet. The number of micro-subdomains *N* is set large enough to resolve the streamwise geometrical variation; here we, like Borg et al., use \(N=5\). The channel height *h*(*s*) varies sinusoidally with streamwise position from 3.4 nm at the inlet/outlet to 2.04 nm at the centre. Each micro-simulation is considered to be in quasi-steady state because the characteristic time for the evolution of the macro-model (e.g. the period of the external force) is much larger than the characteristic time for the development of the micro-model (e.g. the start-up time from rest).

*A*is the cross-sectional area, and

*q*(

*s*,

*t*) is the time-averaged mass flow rate. Micro-subdomains are also perdiodic in the

*s*-direction and cannot support a pressure gradient; therefore, for the momentum flux to be hydrodynamically equivalent to that in the macro-model, the total force

*F*(

*s*,

*t*) applied to each atom is

*m*is the mass of a single atom.

### 2.2 Gaussian process regression

In this paper, we replace the majority of micro-simulations with a cheaper data-driven surrogate model to negate much of the computational cost. The challenge here is to produce a relationship between the macroscopic inputs (channel height *h*, density \(\rho\), and force *F*) and the microscopic output (predominantly mass flow rate *q*), despite no prior knowledge of the function form (other than it is smooth), and to determine, on the fly, when this relationship is likely to be inaccurate. For this, we use GP regression. Here, we provide only a brief overview of the approach; see Rasmussen and Williams (2006) for further details. In a GP, the predicted output at every point \(\mathbf{x }\) in some continuous multi-dimensional input space is modelled by a normally distributed random variable^{1}, i.e. across all of input space, our unknown relationship \(q=f(\mathbf{x })\) is described entirely by a probability distribution with a mean function \(\mu\) and a covariance function *C*. Here, our input space is 3-dimensional, so the \(i^{\mathrm {th}}\) input \(\mathbf{x }_i = (h_i,\rho _i,F_i)\).

Our surrogate model learns through gathering data via micro-simulations, but we must start from some prior belief of what our function looks like, i.e. an initial estimate of the probability distribution for mass flow rate, before data is considered. The posterior belief in the function, after the data has been taken into account, is calculated by Bayesian inference. The mean of the posterior distribution is the prediction of the surrogate model—it is the expected value of mass flow rate given the observed data and our prior belief—and the variance of the posterior distribution is a measure of the uncertainty of the prediction. The prediction will closely resemble the measured mass flow rates \(\mathbf{q }\) near the input data points *X* with a high degree of confidence—i.e. low posterior variance. However, away from the observed data the prediction will approximate the prior mean function with low confidence—i.e. high posterior variance (see Fig. 1c for an illustration). Predictions, thus, become more accurate as the database grows and covers more of input space. As each data point ‘speaks’, the GP can be considered to have a finite, but unbounded, number of parameters, which grow with the database.

*K*for the prior covariance function because it is stationary (it is only dependent on the relative position of inputs, not their absolute values) and is simple (it is only comprised of two hyperparameters):

^{2}. This noise variance is an additional hyperparameter. The prior covariance between the mass flow rate observations is then

*I*is the identity matrix. For a set of test inputs \(X_*\), Bayesian inference leads to a posterior distribution for mass flow rate predictions \(\mathbf{q }_*\), with a mean

The values of the hyperparameters are important to ensure that we do not over- or under-fit to the data. While the noise variance can be calculated directly from instantaneous mass flow rate observations in a training set of micro-simulations (\(\sigma _n = 0.05\) ng/s), the remaining two hyperparameters must be numerically optimised using maximum likelihood estimation (MLE) over the same training data. In MLE, hyperparameters are chosen such that the resulting function is most consistent with the observed mass flow rates. For the training data, we used a small sample which would later be used as an initial database for case D4 (see Table 1 in Sect. 3.1). Performing MLE yielded results of \(\sigma _f \approx 1\) ng/s and \(\ell \approx 1\), which were both rounded to unity for simplicity. We also applied MLE to covariance model selection, comparing the squared-exponential kernel,the Mateŕn 3/2 kernel, and Mateŕn 5/2 kernel, with negligible difference found between them (maximum likelihoods within 3% of each other).

### 2.3 Implementation

- 1.
Generate a range of data points for each microscale input variable \(X=(h, \varvec{\rho }, F)\) and perform the requisite micro-simulations. Calculate the time-averaged mean output variable(s) to be passed to the macro-model \({\bar{q}}\).

- 2.
If possible, measure the variance of the output variable

*q*directly from the simulations. This is the noise variance hyperparameter \(\sigma _n\). - 3.
Use MLE over the training data (see Rasmussen and Williams 2006 for more details) to set the remaining hyperparameters \(\sigma _f\) and \(\ell\) (and \(\sigma _n\) if it could not be set in the prior step). Compare the MLE across different kernels to ensure a sensible model has been chosen.

- 4.
- 5.
Repeat steps 2, 3, and 4 for each output variable. For our benchmark system, we used a separate 2-input GP as an equation of state to calculate pressure

*p*from density and channel height. This GP was trained over hundreds of inputs using a single simulation, for each different micro-subdomain height, at negligible computational cost. As this database was very easy to cheaply fill, it was not updated on the fly. The hyperparameters for this GP were \(\sigma _n=0.003\) MPa, and \(\sigma _f\) and \(\ell\) were again calculated to be approximately one. - 6.
Choose an initial database with which to start the hybrid simulation. This can be empty if desired.

- 7.
Set the hybrid simulation parameters and initial conditions. For our benchmark system, this is the number of micro-subdomains

*N*, the distance between micro-subdomains*S*, the height of each micro-subdomain*h*(see Fig. 1), the macroscopic runtime and time-step, the initial density distribution \(\varvec{\rho }_{1...N}^1=\left\{ 1331, 1320, 1278, 1273, 1312\right\}\) \(\hbox {kg/m}^3\), the external forcing function \(F_{\mathrm {ext}}\), and the uncertainty threshold \(\sigma _t\). - 8.
Evolve the macro-model in time.

- 9.
Calculate the pressure using GP regression. To do this, use Eq. (4) to calculate the similarity between the current macro-state \(X_* = (\mathbf{h }_{1...N},\varvec{\rho }_{1...N}^i)\) and the training inputs \(X_p\). Hence calculate the pressure across all micro-subdomains using Eq. (6).

- 10.
Calculate the pressure gradient at each micro-subdomain along the channel using a central difference approximation.

- 11.
Calculate the total force \(\mathbf{F }_{1...N}^i\) to applied to each atom, for each micro-subdomain.

- 12.
Microscale information is now required, so query the surrogate GP for each micro-subdomain in turn. Use Eq. (4) to calculate the similarity between the current macro-state \(\mathbf{x }_* = (h_j, \rho ^i_j, F^i_j)\) and the training inputs \(X_q\). Hence calculate the mass flow rate prediction \({\bar{f}}_*\) using Eq. (6) and the uncertainty of said prediction \(\sigma _{f_*}\) using Eq. (7). Note, as we are making a prediction for a single point in input space, the outputs of Eqs. (6) and (7) are both scalars, rather than a vector and a matrix, respectively.

- 13.
If \(\sigma _{f_*}> \sigma _t\), then a new micro-simulation is performed with input \(\mathbf{x }_*\); otherwise \({\bar{f}}_*\) is taken as the mass flow rate output \({\bar{q}}^i_j\) of the micro-model.

- 14.
If a new micro-simulation is performed, append the initial database with the input \(\mathbf{x }_* = (h_j, \rho ^i_j, F^i_j)\) and the time-averaged output \({\bar{q}}^i_j\). Append the covariance matrix with this new data point \(C(\left[ X\; \mathbf{x }_*\right] ,\left[ X\; \mathbf{x }_*\right] )\) using Eqs. (4) and (5).

- 15.
Once steps 12, 13, and 14 have been completed for each micro-subdomain, the density distribution across the channel can be calculated using a finite-difference form of Eq. (2).

- 16.
Repeat steps 8 onwards until the macro simulation is complete.

## 3 Results and discussion

^{3}. We initially choose a threshold of \(\sigma _t=0.1\) ng/s, twice that of \(\sigma _n\). This will be referred to as Case 1.

The transient mass flow rate results for Case 1 are displayed in Fig. 2, showing excellent agreement between the output of our hybrid scheme and the measurements from the full MD simulation. Mass conservation means that the mass flow rate profile is approximately the same at all micro-subdomain locations, so we present the data only for micro-subdomain 1. As we begin from an empty database, initially our hybrid scheme must perform micro-simulations with high frequency, because there is limited data upon which to base a prediction. Therefore, the hybrid solution (blue line) exhibits noise similar to that of the full MD simulation up until \(t=2.7\) ns, where the external forcing function peaks. As the system geometry and external forcing function are both symmetric, after this time no ‘new’ input configurations are encountered, and no further micro-simulations need to be performed. Beyond this time, our hybrid solution near-perfectly captures the sinusoidal temporal variation of mass flow rate, with smoothness resulting from our choice of covariance function.

Figure 2b shows a close-up of the second mass flow rate peak and highlights that the uncertainty of our hybrid solution (grey region, representing 95% confidence bounds) is smaller than the noise in the full MD simulation. This is to be expected because our micro-simulations are performed in the steady state; in the full MD simulation, properties are transient while mass flow rate are time-averaged. The uncertainty of our surrogate model’s mass flow rate prediction is larger at the extremes because these configurations exhibit the most extreme force and density inputs, and thus the model is extrapolating beyond its existing database.

### 3.1 Uncertainty threshold and initial database size

^{4}. For the force, this ranges from zero to the magnitude of the external force; for the density, this ranges from \(1120, \hbox {kg/m}^3\) to \(1480\, \hbox {kg/m}^3\).

Initial databases for Cases D1–D4. See Fig. 1 for channel height references

Case | Channel heights | Initial database size |
---|---|---|

D1 | \(h_1\) | 15 |

D2 | \(h_3\) | 16 |

D3 | \(h_1, h_3\) | 31 |

D4 | \(h_1, h_2, h_3\) | 47 |

^{5}Fig. 3 shows that the error remains in the region of the measurement noise up to \(\sigma _t=0.3\) ng/s, after which it increases dramatically up to three times the measurement noise when \(\sigma _t=0.9\) ng/s. Varying the initial database has a negligible effect on the mass flow rate error; this is expected because the larger uncertainty encountered by having to extrapolate more often from a small database is countered by learning more frequently on-the-fly.

The total number of micro-simulations decreases when the initial database is not empty, because more predictions are made through interpolation and ‘new’ configurations are not encountered so frequently at the start of the time series. However, the total number of micro-simulations performed does not continue to fall as the initial database grows. For larger initial databases, redundant information is sometimes gathered and never encountered in the dynamical simulation. For example, consider the discrepancy between the results of Cases D1 and D2, despite the model learning only one extra configuration for the latter case. This is due to the geometry of the case: a much larger force is required near the throat of the channel (micro-subdomains with \(h_3\)) than at the inlet/outlet (micro-subdomains with \(h_1\)) to generate equal mass flow rates.^{6} As such, the local pressure gradient always acts in the opposite direction to the external force at the inlet/outlet of the channel and the peak force applied to micro-simulations is relatively small; thus learning the mass flow rate response for large forces in a channel of height \(h_1\) provides little information. Conversely, all of the information is used when the initial database is formed using channel heights of \(h_3\). Fewer micro-simulations corresponds to an increase in computational efficiency—Case D2 is \(30.5\times\) faster than the full MD simulation while maintaining a high level of accuracy (error of 0.042 ng/s). Another example is the difference between the results for Cases D3 and D4, where including micro-simulations with channel height \(h_2\) only negligibly reduces the number of ‘on-the-fly’ simulations performed because much of this information can be inferred from simulations of other channel heights.

### 3.2 Building on an existing database

Another example of building on an existing database is evaluating the response to different external forcing functions in the same geometry. Without the aid of a surrogate model, this would require performing an entirely new hybrid or full MD simulation. Using the database generated at the end of Case 1 as our initial database, we perform one new case: Case 2, with a variable-frequency external force whose oscillation period starts from 0.22 ns and gradually increases to 10.8 ns; the amplitude is 0.487 pN as in Case 1. Figure 6a shows the transient mass flow rate results for our hybrid solution and the full MD solution (Case D in Borg et al. 2015). Once again, our solution exhibits strong agreement with the full MD simulation, and the computational speed-up is effectively infinite^{7} as no new micro-simulations are performed.

### 3.3 Generalisation and limitations

The on-the-fly GP regression approach presented here is applicable to a wide range of hybrid methods, with the capacity for more complex macro- and micro-models to be incorporated. Broadly speaking, this can present three challenges: 1) the micro-model passes more variables to the macro-model, e.g. some form of constitutive relation like viscosity or slip length; 2) the macro-model passes more variables to the micro-model, e.g. the flow rate is temperature dependent; or 3) the micro- and macro-models are more tightly coupled, such that the quasi-steady assumption is no longer true for the micro-simulations.

Challenge #1 is the most simple: you can just use a separate GP for each output variable. This will not particularly increase the computational cost of the surrogate model as each GP will be independent, so regression can be solved in parallel. In challenge #2, the dimensionality of input space for the surrogate model increases with each new variable. This means that exponentially more data points are required to map a sufficient quantity of input space for our surrogate to make accurate predictions. The main computational cost of regression is inverting the covariance matrix—used in Eqs. (6) and (7)—which is of a size \(N_{\mathrm {sim}}\times N_{\mathrm {sim}}\), where we recall that \(N_{\mathrm {sim}}\) is the number of micro-simulations performed (i.e. number of data points). However, this task does likely not become prohibitive until the number of data points is \({\mathcal {O}}(10000)\), and even then there are methods to perform regression using a subset of the covariance matrix \(M_{\mathrm {sim}}\) (see Rasmussen and Williams 2006 Chapter 8 for details), reducing the cost from \({\mathcal {O}}(N_{\mathrm {sim}}^3)\) to \({\mathcal {O}}(N_{\mathrm {sim}}M_{\mathrm {sim}}^2)\).

Challenge #3 is the more conceptually difficult, but it eventually becomes another form of challenge #2. If we cannot perform steady-state micro-simulations because the macro- and micro-models are no longer scale-separated in time, then each micro-simulation requires more input variables to define its progress. For example, in our benchmark system perhaps the initial velocity profile over the channel may be required, along with the simulated time. The velocity profile would be binned over the channel height and so require several inputs. This does have the potential to make input space incredibly large, but if a shape could be assumed for the velocity profile then this is less of a problem. These challenges aside, the main problem GPs have is that they struggle to represent discontinuities, as Gaussians are smooth functions. However, as long as it is smooth, a GP is capable of modelling any function.

## 4 Conclusion

We have presented an enhancement to conventional hybrid methods in fluid dynamics, using Gaussian process regression on the fly to predict microscopic detail based purely on macroscopic information, thereby avoiding costly repeated simulations of similar atomistic configurations. This procedure enables micro-information to be reused multiple times, drastically increasing the computational efficiency without adversely affecting the accuracy.

We compare our new scheme to full molecular dynamics (MD) simulations and find strong agreement, with errors within the range of thermal noise when a tight uncertainty threshold is set (up to 0.3 ng/s). As this threshold is raised, the error increases to over three\(\times\) thermal noise (0.05 ng/s); however, the computational speed-up over a full MD simulation also increases. When starting from an empty database, raising the threshold from 0.1 to 0.9 ng/s increases speed-up from \(12.3\times\) to \(69.3\times\) with a resulting decrease in accuracy from 0.035 to 0.169 ng/s. Thus, the choice of threshold is a trade-off between the required accuracy and computational efficiency.

We demonstrate the computational benefit of creating an initial database to train our predictive model, by estimating the expected range of input values. This enables more predictions to be made via interpolation between known data, which provides less uncertainty than extrapolation and means fewer micro-simulations are performed ‘on-the-fly’. While maintaining approximately the same level of accuracy, starting with a modest initial database covering just 16 data points resulted in a speed-up of \(30\times\) the full MD simulation for an incurred error of 0.042 ng/s.

Finally, we show how existing databases can be built upon (while never needing to be fully complete) to rapidly obtain high-resolution hybrid solutions—i.e. cheaply add more micro-subdomains at locations of interest—or to model different flow fields effectively instantly—i.e. no new micro-simulations are required.

## Footnotes

- 1.
Here, we use the notation that a lower case symbol is a scalar, a bold symbol is a vector, and a capitalised symbol is a matrix.

- 2.
The magnitude of this variance is assumed to be independent of the input values—i.e. the function is homoscedastic. This is a reasonable assumption for isothermal flow of a dense fluid.

- 3.
If there are multiple data points within close proximity of the test input, then the uncertainty can be lower than the measurement noise.

- 4.
In micro-simulations with a channel height of \(h_1\), the combination of the largest force (0.487 pN) and the lowest density (\(1120\, \hbox {kg/m}^3\)) produced a shear rate beyond the critical limit (Thompson and Troian 1997), so the mass flow rate does not converge. Therefore, one data entry is removed from all relevant databases.

- 5.
\(K(t_i,t_j) = \sigma _f^2\mathrm {exp}(-2\sin ^2(\pi \vert t_i-t_j\vert /T/\ell ^2)) + \delta _{ij}\sigma _n^2\), where \(T=10.8\) ns is the oscillation period, \(\sigma _f= 1\) ng/s, \(\ell = 1\) s, and \(\sigma _n = 0.1\) ng/s.

- 6.
It is difficult to provide similar analysis for the density ranges, because at the nanoscale, viscosity varies rapidly with density, so greater density does not necessarily produce a larger mass flow rate.

- 7.
Of course, the speed-up is not actually infinite, but the computational effort to run the macro-model is negligible compared to an micro-simulation.

## Notes

### Acknowledgements

We would like to thank Matthew Borg for providing the data for the full MD simulations and Jason Reese for helpful comments. This work is financially supported in the UK by EPSRC Programme Grant EP/N016602/1 and EPSRC grant EP/K038664/1. The computing facilities were provided by the Centre for Scientific Computing of the University of Warwick with support from the Science Research Investment Fund.

## References

- Allen MP, Tildesley DJ (1987) Computer simulation of liquids. Clarendon Press, OxfordzbMATHGoogle Scholar
- Asproulis N, Drikakis D (2013) An artificial neural network-based multiscale method for hybrid atomistic-continuum simulations. Microfluid Nanofluid 15(4):559–574CrossRefGoogle Scholar
- Bartók AP, Payne MC, Kondor R, Csányi G (2010) Gaussian approximation potentials: the accuracy of quantum mechanics, without the electrons. Phys Rev Lett 104(13):136403CrossRefGoogle Scholar
- Behler J, Parrinello M (2007) Generalized neural-network representation of high-dimensional potential-energy surfaces. Phys Rev Lett 98(14):146401CrossRefGoogle Scholar
- Bird GA (1994) Molecular gas dynamics and the direct simulation of gas flows. Oxford Engineering Science Series 42. Clarendon Press, OxfordGoogle Scholar
- Borg MK, Lockerby DA, Reese JM (2015) A hybrid molecular-continuum method for unsteady compressible multiscale flows. J Fluid Mech 768:388–414CrossRefGoogle 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, Reese JM (2017) Multiscale simulation of enhanced water flow in nanotubes. MRS Bull 42(4):294–299CrossRefGoogle Scholar
- Botu V, Batra R, Chapman J, Ramprasad R (2017) Machine learning force fields: construction, validation, and outlook. J Phys Chem 121(1):511–522Google Scholar
- Botu V, Ramprasad R (2015) Adaptive machine learning framework to accelerate ab initio molecular dynamics. Int J Quantum Chem 115(16):1074–1083CrossRefGoogle Scholar
- Brenner M, Shi X, Nagel S (1994) Iterated instabilities during droplet fission. Phys Rev Lett 73(25):3391–3394CrossRefGoogle Scholar
- Caccin M, Li Z, Kermode JR, De Vita A (2015) A framework for machine-learning-augmented multiscale atomistic simulations on parallel supercomputers. Int J Quantum Chem 115(16):1129–1139CrossRefGoogle Scholar
- Delgado-Buscalioni R, Kremer K, Praprotnik M (2008) Concurrent triple-scale simulation of molecular liquids. J Chem Phys 128(11):114110CrossRefGoogle Scholar
- Hadjiconstantinou NG (1999) Hybrid atomistic-continuum formulations and the moving contact-line problem. J Comput Phys 154(2):245–265MathSciNetzbMATHCrossRefGoogle Scholar
- Hadjiconstantinou NG (2005) Discussion of recent developments in hybrid atomistic-continuum methods for multiscale hydrodynamics. Bull Pol Acad Sci Tech Sci 53(4):335–342zbMATHGoogle Scholar
- Holland DM, Lockerby DA, Borg MK, Nicholls WD, Reese JM (2015) Molecular dynamics pre-simulations for nanoscale computational fluid dynamics. Micro Nano 18(3):461–474CrossRefGoogle Scholar
- Kalweit M, Drikakis D (2008) Multiscale methods for micro/nano flows and materials. J Comput Theor Nanosci 5(9):1923–1938CrossRefGoogle Scholar
- Karniadakis G, Beskok A, Aluru N (2005) Microflows and nanoflows: fundamentals and simulation. Springer, BerlinzbMATHGoogle Scholar
- Li Z, Kermode JR, De Vita A (2015) Molecular dynamics with on-the-fly machine learning of quantum-mechanical forces. Phys Rev Lett 114:096405CrossRefGoogle Scholar
- Macpherson GB, Reese JM (2008) Molecular dynamics in arbitrary geometries: parallel evaluation of pair forces. Mol Simul 34(1):97–115zbMATHCrossRefGoogle Scholar
- Markesteijn A, Karabasov S, Scukins A, Nerukh D, Glotov V, Goloviznin V (2017) Concurrent multiscale modelling of atomistic and hydrodynamic processes in liquids. Philos Trans A Math Phys Eng Sci 372(2021):20130379MathSciNetzbMATHCrossRefGoogle Scholar
- Mohamed KM, Mohamad AA (2009) A review of the development of hybrid atomistic-continuum methods for dense fluids. Microfluid Nanofluid 8(3):283–302CrossRefGoogle Scholar
- Patronis A, Lockerby DA (2014) Multiscale simulation of non-isothermal microchannel gas flows. J Comput Phys 270:532–543MathSciNetzbMATHCrossRefGoogle Scholar
- Rasmussen CE, Williams CKI (2006) Gaussian processes for machine learning. MIT Press, CambridgezbMATHGoogle Scholar
- Ritos K, Borg MK, Lockerby DA, Emerson DR, Reese JM (2015) Hybrid molecularcontinuum simulations of water flow through carbon nanotube membranes of realistic thickness. Microfluid Nanofluid 19:997–1010CrossRefGoogle Scholar
- Rupp M, Tkatchenko A, Muller K, von Lilienfield AO (2012) Fast and accurate modeling of molecular atomization energies with machine learning. Phys Rev Lett 108(5):058301CrossRefGoogle Scholar
- Salloum M, Sargsyan K, Jones R, Debusschere B, Najm HN, Adalsteinsson H (2012) A stochastic multiscale coupling scheme to account for sampling noise in atomistic-to-continuum simulations. Multiscale Model Simul 10(2):550–584MathSciNetzbMATHCrossRefGoogle Scholar
- Salloum M, Templeton J (2014) Inference and uncertainty propagation of atomistically-informed continuum constitutive laws, part 1: Bayesian inference of fixed model forms. Int J Uncertain Quantif 4(2):150–171MathSciNetGoogle Scholar
- Salloum M, Templeton J (2014) Inference and uncertainty propagation of atomistically-informed continuum constitutive laws, part 1: generalized continuum models based on gaussian processes. Int J Uncertain Quantif 4(2):171–184MathSciNetCrossRefGoogle Scholar
- Schoch R, Han J, Renaud P (2008) Transport phenomena in nanofluidics. Rev Mod Phys 80(3):839–883CrossRefGoogle Scholar
- Swope WC, Anderson HC, Berens PH, Wilson KR (1982) A computer simulation method for the calculation of equilibrium constants for the formation of physical clusters of molecules: application to small water clusters. J Chem Phys 76(1):637–649CrossRefGoogle Scholar
- Szlachta WJ, Bartók AP, Csányi G (2014) Accuracy and transferability of gaussian approximation potential models for tungsten. Phys Rev B Condens Matter 90(10):104108CrossRefGoogle Scholar
- Thompson PA, Troian SM (1997) A general boundary condition for liquid flow at solid surfaces. Nature 389(6649):360–362CrossRefGoogle Scholar
- Ulz MH, Moran SJ (2012) A gaussian mixture modelling approach to the data-driven estimation of atomistic support for continuum stress. Model Simul Mater Sci Eng 20:065009CrossRefGoogle Scholar
- Walter JH, Ritos K, CruzChu ER, Megaridis CM, Koumoutsakos P (2013) Barriers to superfast water transport in carbon nanotube membranes. Nano Lett 13(5):1910–1914CrossRefGoogle Scholar
- Wijesinghe HS, Hadjiconstantinou NG (2004) Discussion of hybrid atomistic-continuum methods for multiscale hydrodynamics. Int J Multiscale Comput Eng 2(2):189–202CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.