Reese JM Pure Coupled Continuum Hydrodynamics and Molecular Dynamics Method For Multiscale Simulation Aug 2011

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Borg, Matthew Karl and Lockerby, Duncan A.

and Reese, Jason (2011)


Coupled continuum hydrodynamics and molecular dynamics method for
multiscale simulation. In: 3rd Micro and Nano Flows Conference, MNF11,
2011-08-22 - 2011-08-24. ,
This version is available at https://strathprints.strath.ac.uk/36513/
Strathprints is designed to allow users to access the research output of the University of
Strathclyde. Unless otherwise explicitly stated on the manuscript, Copyright © and Moral Rights
for the papers on this site are retained by the individual authors and/or other copyright owners.
Please check the manuscript for details of any other licences that may have been applied. You
may not engage in further distribution of the material for any profitmaking activities or any
commercial gain. You may freely distribute both the url (https://strathprints.strath.ac.uk/) and the
content of this paper for research or private study, educational, or not-for-profit purposes without
prior permission or charge.
Any correspondence concerning this service should be sent to the Strathprints administrator:
strathprints@strath.ac.uk

The Strathprints institutional repository (https://strathprints.strath.ac.uk) is a digital archive of University of Strathclyde research
outputs. It has been developed to disseminate open access research outputs, expose data about those outputs, and enable the
management and persistent access to Strathclyde's intellectual output.
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

Coupled continuum hydrodynamics and molecular dynamics


method for multiscale simulation

Matthew K. BORG1,∗ , Duncan A. LOCKERBY2 , Jason M. REESE1

* Corresponding author: Tel.: +44(0) 141 548 4386; Email: matthew.borg@strath.ac.uk


1: Department of Mechanical Engineering, University of Strathclyde, Glasgow G1 1XJ, UK
2: School of Engineering, University of Warwick, Coventry CV4 7AL, UK

Abstract We present a new hybrid methodology for carrying out multiscale simulations of flow
problems lying between continuum hydrodynamics and molecular dynamics, where macro/micro
lengthscale separation exists only in one direction. Our multiscale method consists of an iterative
technique that couples mass and momentum flux between macro and micro domains, and is tested
on a converging/diverging nanochannel case containing flow of a simple Lennard-Jones liquid.
Comparisons agree well with a full MD simulation of the same test case.

Keywords: Micro Flows, Molecular Dynamics, Multiscale, Hybrid, Continuum Hydrodynamics

1 Introduction Hybrid methods can be loosely categorised


into: (a) domain-decomposition techniques [5–
The well established and traditional approach 8] and (b) heterogeneous multiscale method-
to solving fluid dynamic problems is to use con- ologies (HMM) [9, 10], see Fig 1. Domain-
tinuum models, such as the Navier-Stokes (NS) decomposition techniques divide the compu-
equations (with no velocity slip at bounding tational domain into micro and macro sub-
surfaces). The NS equations work remarkably domains with an overlapping region at the two
well for many cases, ranging from extremely interfaces that serves for mutual coupling. The
large systems, such as flows around subma- disadvantage of this approach is that it de-
rine hulls, right down to tiny systems, such couples length-scales, but not time-scales: the
as flows through capillaries. However, when micro sub-domain still needs to be integrated
the characteristic length-scale of the problem over the same time-scale as the macro solver.
approaches an atomistic scale, the physics of Larger systems imply longer integration times
the flow requires a more accurate molecular to reach steady state, so the method is gener-
approach, such as molecular dynamics (MD). ally practical only for small systems in steady
The major problem is that MD is too compu- state. The HMM approach aims instead to de-
tationally intense to simulate reasonably large couple both length-scales and time-scales by
length and time-scales (e.g. micro-scale). De- distributing micro sub-domains on nodes of the
spite this limitation, simple Newtonian liquids macro domain (which is the whole domain),
at these scales show non-continuum phenom- and running the micro and macro solvers on
ena occur only in proximity to surfaces [1–3]. different clocks. The HMM approach is well
In the bulk, the NS equations can be safely suited to largely scale-separated systems.
applied [4]. The problem in the last decade In this paper we present a new multiscale ap-
has therefore been how to deploy a multiscale proach similar to the HMM but with the dif-
physics methodology that bridges the gap be- ferences shown in Fig 2, in this case applied
tween the micro and macro scales. to a converging/diverging nanochannel case.

1
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

Figure 1: Schematics of (a) the domain decomposition method, and (b) the HMM.

hinlet F hthroat ∆L

xi
L i

Figure 2: Illustration of our multiscale technique applied to a converging/diverging nanochannel


case. Scale-separation is exploited in the x−direction by distributing MD sub-domains with
a top and bottom wall (molecular type) and coupled in a multiscale framework by applying
hydrodynamic constraints.

2
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

The method exploits directional scale separa- d


mk vk = fk + f ext , (3)
tion (in the figure, denoted by the x−direction) dt
to simulate multiscale flows through channels where k = (1, . . . , N ) is an arbitrary molecule
of generally long aspect ratios. in the system, mk is the molecule mass, f ext is
an external force, and fk is the total force due
to interacting molecule neighbours:
2 Simulation method
N
X
The multiscale method we present here is fk = ∇U (rkj ). (4)
for tested on an axially-periodic converg- j=1(6=k)
ing/diverging channel flow, driven by a
gravity-type force. The full MD simulation of The interaction potential U (rkj ) between
the case requires a constant force f ext = F n̂x liquid-liquid and solid-liquid molecules governs
applied to all liquid molecules in the domain, the physics of the flow. In this paper we sim-
where n̂x is the direction vector in the axial x- ulate monatomic liquid argon using the 12-6
direction. Cyclic boundary conditions are ap- Lennard Jones (LJ) potential:
plied at the inlet and outlet in order to impose " 
12  6 #
an axially repeating geometry. σ σ
U12−6 (rkj ) = 4ǫ − , (5)
The multiscale setup of this case is illus- rkj rkj
trated in Fig 2. There are Π MD sub-domains
defined in the multiscale simulation, each with where ǫ = 1.6568 × 10−21 J and σ = 0.34 ×
different xi −positions, where i (1,. . . , Π) is an 10−9 m are the potential’s characeristic energy
arbitrary MD box. The length of the channel and length scales, and rkj = |rk − rj | is the
is denoted by L and the separation between separation of two arbitrary molecules within a
MD sub-domains is ∆L(x). For purposes of cut-off radius rcut = 4σ.
simplicity, we assume that the channel is sym-
metric so that Π only covers one side (converg-
ing or diverging) of the channel such that the
channel height of the ith MD simulation box is
given by:
f ext
hthroat (i − 1)
hi = hthroat + , (1)
Π−1 hi
where hthroat is the height of the throat at
which the converging and diverging parts of
the channel meet.

2.1 Molecular dynamics


The micro simulations are described by molec- n
ular dynamics [11, 12]. We use mdFoam [13–
15], a parallelised non-equilibrium MD solver ∆x
that is open-source and available to down-
load from [16]. Molecule positions rk (t) =
Figure 3: MD simulation box.
(xk , yk , zk ), and velocities vk (t) = (uk , vk , wk )
evolve according to Newton’s equation of mo-
The MD simulation boxes for the multi-
tion:
d scale method (see Fig 3) are of identical sizes
rk = vk (t), (2) (∆X = ∆Z = 20σ) except the cross-channel
dt
3
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

height, which varies according to Eqn. (1). The gradient term is removed (because we have im-
walls of thickness, 6σ are modelled as ‘frozen’ posed periodicity at inlet and outlet), and we
wall molecules that interact with the liquid us- are left with a convenient constraint on the ex-
ing the same LJ parameters. Periodic bound- ternal force, f ext :
aries are applied in the x− and z−directions
1 L ext
Z
of the simulation box, and an external force f dx = F n̂x = F, (9)
f ext = f ext n̂x applied to all liquid molecules L 0
drives the desired flow. A Berendsen thermo- where L is the length of the channel. Equation
stat [17] is imposed on the MD box that sets (9) states that the spatial mean of the compu-
the temperature at T = 87K, in order to re- tational forces in each micro simulation, must
move heat generated by the work done by ex- be kept equal to the physical gravity force,
ternal forces. F = f̄ ext .

2.2 Hybrid approach 2.2.2 Continuity

There are three macroscopic conditions that Continuity requires that the mass flow rate, ṁ,
constrain the micro MD simulations: must be the same for all the micro elements.
This can be enforced by appropriately modify-
1. periodicity, ing the axial variation of f ext (xi ) (while ensur-
ing that the mean value of the force is equal to
2. continuity, and F , in accordance with above).
Since force is roughly proportional to mass
3. momentum conservation.
flow rate, a simple proportional estimator for
the correct axial variation can be used, which
2.2.1 Momentum conservation we outline in the multiscale algorithm de-
For the steady and incompressible case we are scribed next.
considering in this paper, the conservation of
momentum equation is: 2.3 Multiscale procedure
The solution to the multiscale problem is an
ρF nx = −∇p + ∇ · σ, (6)
iterative one, which involves solving the con-
where F is the axial applied force, ρ is the num- tinuity and momentum conservation equations
ber density, p is the pressure and σ is the shear across all the detached MD sub-domains. The
stress. iterative procedure is outlined in the following
In the MD micro elements the momentum steps:
balance is: (n=0)
ρf ext = ∇ · σ. (7) 1. Assign an initial force fi = F to all Π
micro simulations. (Note the direction of
The pressure gradient term in Eqn. (6) does the force points in the x-direction: fiext =
not feature in Eqn. (7) due to the streamwise fi nx ).
periodicity of the micro MD domains. It is
highly complex to prescribe such a pressure 2. Simulate all Π simulations for τm molec-
gradient directly, and so here we impose it in- ular time-integration steps, until steady-
directly through the external forcing: state is reached.
3. Measure the mean mass flow rates ṁi over
ρf ext = ρF n̂x + ∇p. (8) S statistical number of samples:
Substituting Eqn. (8) into Eqn. (7) yields the S Ni
desired momentum Eqn. (6). If we integrate 1 XX
ṁi = mk vk (t) · nx , (10)
Eqn. (8) over the channel length, the pressure S∆X t=1 k=1

4
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

where Ni are the number of molecules in measurement planes are placed in the stream-
the ith MD simulation, mk , vk (t) are the wise channel, with same 15σ spacing as in the
molecules mass and instantaneous velocity multiscale simulation, for direct measurements
respectively and ∆X is the x−direction of mass flux. The net mass flow rate at a
size of the MD box. plane is measured by averaging the number
of molecules which cross it over a prescribed
4. Take the mass flux from the smallest chan- time period; molecules which cross in the pos-
nel height and set it as the target mass itive x−direction are counted as positive and
flux, ṁT = ṁs (hs ≤ hi ). those which cross in the opposite direction are
counted as negative. The average mass flow
5. At the new iteration step, n = n + 1, com-
rate was calculated to be (67.81 ± 1.5×)10−12
pute the new forces that satisfy mass and
kg/s.
momentum conservation:
1
(n) ṁT
fi∗ = fi , (11) (a)
ṁi 0.8

L N)
1
Z
0.6
fi∗ dx,
-12

∆F = F − (12)
L
ΔF (10

0
0.4
(n+1)
fi = fi∗ + ∆F, (13)
0.2
where L is the length of the channel and
∆F is a measure of the global force con- 0
vergence. 0 1 2 3 4 5
h1 = 8
240 h2 = 6
6. Repeat from 2, until convergence (i.e. 220
kg/s)

h3 = 4
200 FULL MD
∆F = 0, and ṁi = ṁT ). For practicality,
-12

180
convergence is assumed when ∆F varies
MASS FLUX, mi (10

160
between ±0.02 × 10−12 N over several iter- 140
120
ations. 100
80
60
40
3 Results 20 (b)
0
0 1 2 3 4 5
For the purpose of this paper we consider
ITERATION, n
a nano-scale converging/diverging channel of
length L = 60σ. The multiscale simulation
consists of 5 streamwise distributed MD sub- Figure 4: Convergence results from the mul-
domains, which are reduced to 3 because the tiscale procedure: (a) global force variations
converging/diverging channel is symmetric at and (b) mass fluxes from i MD boxes, against
the throat; only channel heights from inlet iteration number n.
to throat are taken. The channel heights of
the micro-simulations are 8σ, 6σ and 4σ re- Results from the multiscale simulation show
spectively, which are separated uniformly by a that convergence is obtained over a very short
spacing of ∆L = 15σ. number of iterative steps (n ∼ 3−4), as seen in
A full MD simulation of the same test case Fig. 4(a) for the force term, ∆F in Eqn. (12).
is also carried out in order to validate the mul- Figure 4(b) also verifies that the mass flux in
tiscale simulations, see Fig. 5. A gravitational- the three individual MD boxes converge to the
like force, f ext = 1.22 × 10−12 N is applied to value calculated in the full MD simulation.
generate flow across the full MD system. Five We plot the spatial variation of forces and

5
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

mass fluxes in the streamwise direction of the of continuity and momentum. The iterative
converging/diverging channel in Fig. 6. We scheme was tested on an axially-periodic con-
see that the mass fluxes converge to a uniform verging/diverging nanochannel, with a flow
value in all streamwise xi positions, coinciding driven by a gravity-type force. The axial mass
with the planar flux measurements from the flow rate in the multiscale simulation agreed
full MD simulation. Furthermore, Fig. 6(b) well with measurements taken from a full MD
shows the converged non-uniform axial force simulation of the same test case. Although
distribution f ext (xi ) for enforcing continuity in small computational savings were observed for
all micro elements. the small case considered in this paper, it is
To assess the computational advantage of predicted that the full potential of this tech-
our multiscale method over full MD we con- nique will be seen in larger (more realistic) sys-
sider the following criteria based on spatial tems, where substantial scale separations exist.
and temporal decoupling. Separation of spa- The application of the method on GPUs
tial scales will yield a computational advan- The multiscale method described in this pa-
tage if ∆L/L ≪ 1 (i.e. the spacing of mi- per is applicable to arbitrary-shaped nano-
cro simulations relative to the total length channels, so long that there exists spatial scale
of the channel), ∆X/∆L ≪ 1 (overlapping variation in one direction. The method may
micro simulations in the x−direction), and be used to study the fast transport of water
2∆Z(hinlet − hthroat )/L ≪ 1 (the rate of vari- in micro-scale long carbon-nanotubes of nano-
ation of channel cross sectional area). In our scale diameters [18], or to study bifurcation
test case we get the following values respec- laws for designing micro- and nano-fluidic de-
tively, 0.25, 1.33 and 0.42. vices [19].
Time-scale separations may be assessed by
evaluating the relaxation time of the flow to
reach steady-state after the external force is 5 Acknowledgments
imposed. The basic criteria should then be
τmicro n/tmacro ≪ 1. For the full MD simulation This research is financially supported by the
tmacro ∼ 1.3ns, while for the small MD boxes EPSRC Programme Grant EP/I011927/1.
τmicro ∼ 0.1ns (and another 0.1ns to achieve
the necessary statistics when computing mass
flux). The value for time-scale separation is
6 References
0.46.
Although most of the scale-separation val-
ues are below 1 (except the criteria for over-
lapping micro simulations), they are still not [1] J. Koplik and J. R. Banavar. Continuum
much less than 1, to achieve desirable speed deductions from molecular hydrodynam-
up. We expect that by increasing the chan- ics. Annual Review of Fluid Mechanics,
nel length L and keeping the height at the in- 27:257–292, 1995.
let/outlet and throat the same, we would get
much larger scale separations, and therefore [2] K. P. Travis and K. E. Gubbins. Poiseuille
much larger computational savings using our flow of Lennard-Jones fluids in narrow
multiscale approach. slit pores. Journal of Chemical Physics,
112(4):1984–1994, Jan 2000.

4 Conclusions [3] S. A. Somers and H. T. Davis. Micro-


scopic dynamics of fluids confined between
We have presented a new multiscale iter- smooth and atomically structured solid
ative algorithm for coupling hydrodynamics surfaces. Journal of Chemical Physics,
and molecular dynamics through constraints 96(7):5389–5407, 1992.

6
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

FLUX MEASUREMENT PLANES

f ext

∆L
inlet L outlet

Figure 5: Full MD simulation setup of the converging/diverging nanochannel case.

260
240 FULL MD
n=0
220
kg/s)

n=1
200 n=2
180
-12

n=3
MASS FLUX, m (10

160
140
120
100
80
60
40
20 (a)
0
-10 -5 0 5 10
3
FULL MD
n=0
2.5 n=1
n=2
N)

2 n=3
-12
FORCE, f (10

1.5

0.5
(b)
0
-10 -5 0 5 10
STREAMWISE CHANNEL DIRECTION, x (nm)

Figure 6: Streamwise results from the multiscale procedure showing convergence of: (a) uni-
form mass flux and (b) non-uniform force variations. Comparisons are made to the full MD
simulation.

7
3rd Micro and Nano Flows Conference
Thessaloniki, Greece, 22-24 August 2011

[4] H. Okumura and D. M. Heyes. Compar- tries and in parallel. Molecular Simula-
isons between molecular dynamics and hy- tion, 33(15):1199–1212, December 2007.
drodynamics treatment of nonstationary
thermal processes in a liquid. Physical Re- [14] G. B. Macpherson and J. M. Reese.
view E, 70(6):061206, 2004. Molecular dynamics in arbitrary geome-
tries: Parallel evaluation of pair forces.
[5] S. T. O’Connell and P. A. Thomp- Molecular Simulation, 34(1):97–115, Jan
son. Molecular dynamics–continuum hy- 2008.
brid computations: A tool for studying
complex fluid flows. Physical Review E, [15] M. K. Borg, G. B. Macpherson, and
52:R5792–R5795, December 1995. J. M. Reese. Controllers for imposing
continuum-to-molecular boundary condi-
[6] N. Hadjiconstantinou and A. Patera. Het- tions in arbitrary fluid flow geometries.
erogeneous atomistic-continuum methods Molecular Simulation, 36(10):745, 2010.
for dense fluid systems. International
Journal of Modern Physics C, 8(4):967– [16] OpenFOAM. www.openfoam.org.
976, 1997. [17] H. J. C. Berendsen, J. P. M. Postma,
W. F. van Gunsteren, A. Dinola, and J. R.
[7] X. B. Nie, S. Y. Chen, W.N. E, and M. O.
Haak. Molecular dynamics with coupling
Robbins. A continuum and molecular
to an external bath. Journal of Chemical
dynamics hybrid method for micro- and
Physics, 81:3684–3690, October 1984.
nano-fluid flow. Journal of Fluid Mechan-
ics, 500:55–64, 2004. [18] W. D. Nicholls, M. K. Borg, D. A.
Lockerby, and J. M. Reese. Water trans-
[8] R. Delgado-Buscalioni and P. V. Coveney.
port through (7,7) carbon nanotubes of
Continuum-particle hybrid coupling for
different lengths using molecular dynam-
mass, momentum, and energy transfers in
ics. Submitted to the Journal of Microflu-
unsteady fluid flow. Physical Review E,
idics and Nanofluidics, 2011.
67(4):1–13, 2003.
[19] R. Barber and D. Emerson. Optimal de-
[9] W. Ren and W. E. Heterogeneous multi-
sign of microfluidic networks using bio-
scale method for the modeling of complex
logically inspired principles. Microfluidics
fluids and micro- fluidics. Journal of Com-
and Nanofluidics, 4(3):179–191, March
putational Physics, 204(1):1–26, 2005.
2008.
[10] W. E, W. Ren, and E. Vanden-Eijnden.
A general strategy for designing seamless
multiscale methods. Journal of Computa-
tional Physics, 228:5437–5453, 2009.

[11] M. P. Allen and D. J. Tildesley. Computer


Simulation of Liquids. Oxford University
Press, 1987.

[12] D. C. Rapaport. The Art of Molecular Dy-


namics Simulation. Cambridge University
Press, 2nd edition, 2004.

[13] G. B. Macpherson, M. K. Borg, and J. M.


Reese. Generation of initial molecular dy-
namics configurations in arbitrary geome-

You might also like