<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>MOLECULAR DYNAMIC SIMULATION OF WATER VAPOR INTERACTION WITH VARIOUS TYPES OF PORES USING HYBRID COMPUTING STRUCTURES</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>V.V. Korenkov</string-name>
          <email>korenkov@jinr.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>E.G. Nikonov</string-name>
          <email>e.nikonov@jinr.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>M. Popovičová</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Joint Institute for Nuclear Research</institution>
          ,
          <addr-line>141980 Dubna, Moscow Region, Russian Federation</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Plekhanov Russian University of Economics</institution>
          ,
          <addr-line>36 Stremyanny per., Moscow, 117997</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Prešov</institution>
          ,
          <addr-line>080 01 Prešov</addr-line>
          ,
          <country country="SK">Slovakia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <volume>159</volume>
      <fpage>170</fpage>
      <lpage>174</lpage>
      <abstract>
        <p>Theoretical and experimental investigations of water vapor interaction with porous materials are very needful for various fields of science and technology. Mathematical modelling plays an important role in these investigations. Conventional approaches to solve problems of mathematical research of the processes of interaction of water vapor with individual pore are the so called micro and macro approaches. The first approach is based on the use of diffusion equation for description of interaction of water vapor with a pore. The second approach is based on various particle methods like MonteCarlo simulations, molecular dynamics (MD) etc. In MD usage of efficient calculation methods is necessary because the degree of approximation for simulating system is largely determined by the dimensionality of the system of equations being solved at every time step. Number of time steps is also quite large. In this work, a study of efficiency of various implementations algorithms for MD simulation of water vapor interaction with individual pore is carried out. It is also investigated dependence of time required for simulations on different parameters, like number of particles in the system, shape of pores, and so on. The results of parallel calculations are compared with the results obtained by serial calculations.</p>
      </abstract>
      <kwd-group>
        <kwd>porous media</kwd>
        <kwd>molecular dynamics</kwd>
        <kwd>macroscopic diffusion model</kwd>
        <kwd>parallel calculations</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>One of the most important problem in numerical simulation based on molecular dynamics or
Monte-Carlo approach of many particle systems is the need to use huge computing resources to obtain
realistic simulation results. A system of water vapor and a pore is an example of such many particle
systems. Theoretical and experimental investigations of water vapor interaction with porous materials
are very needful for various fields of science and technology. Not only studies of the interaction of
water vapor and porous material as a continuous medium, but also the study of the interaction of water
vapor with individual pore is very important in these researches. Mathematical modelling occupies an
important place in these investigations. Conventional approaches to solve problems of mathematical
research of the processes of interaction of water vapor with individual pore are the following.</p>
      <p>The first approach is based on the use of diffusion equation for description of interaction of
water vapor with a pore. It is so called macro approach. The second approach is based on various
particle methods like, for example, molecular dynamics (MD). These methods essentially consider the
micro-structure of the investigated system consisting of water vapor and a pore. This second approach
can be called a micro approach.</p>
      <p>At the macro level, the influence of the arrangement structure of individual pores on the
processes of water vapor interaction with porous material as a continuous medium is studied. At the
micro level, it is very interesting to investigate the dependence of the characteristics of the water vapor
interaction
with porous</p>
      <p>media on the geometry and dimensions of the individual pore. Both
approaches require the most efficient calculation methods as far as possible with the current level of
development of computational technologies. Usage of efficient calculation methods is necessary
because the
degree
of approximation for simulating system
is largely
determined
by the
dimensionality of the system of equations being solved at every time step. Number of time steps is
also quite large.</p>
      <p>In this work, a study of efficiency of various implementations algorithms for MD simulation
of water vapor interaction with individual pore is carried out. A great disadvantage of MD is its
requirement of a relatively large computational effort and long time in simulations. These problems
can be drastically reduced by parallel calculations. In this work we investigate dependence of time
required for simulations on different parameters, like number of particles in the system, shape of
pores, and so on. The results of parallel calculations are compared with the results obtained by serial
calculations. Two-dimensional and three-dimensional models of the pore are used for comparative
analysis of parallel and serial calculations.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Molecular dynamics model</title>
      <p>
        In classical molecular dynamics, the behavior of an individual particle is described by the
Newton equations of motion [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], which can be written in the following form
1)
2)
 ⃗ = −

( ⃗1, … ,  ⃗ )
  ⃗
+  ⃗ ,

force has the following representation
where  − a particle number, 1 ≤  ≤  , 
− the total number of particles,   − particle
mass,  ⃗ − coordinates of position,  ⃗ − the resultant of all forces acting on the particle. This resultant
where 
− the potential of particle interaction,  ⃗
− a force caused by external fields. For a
simulation of particle interaction, we use the Lennard-Jones potential [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] with 
= 3.17Å and
      </p>
      <p>= 6.74 ∙ 10−3eV. It is the most used to describe the evolution of water in liquid and saturated vapor
phase. Equations of motion (1,2) were integrated by Velocity Verlet method [3]. Berendsen thermostat
[4] is used for temperature calibration and control. The coefficient of the velocity recalculation  ( ) at
every time step  depends on the so called ''rise time'' of the thermostat 
which belongs to the
interval [0.1,2] ps.   describes strength of the coupling of the system to a hypothetical heat bath. For
increasing   , the coupling weakens, i.e. it takes longer to achieve given temperature  0 from current

temperature  ( ). The Berendsen algorithm is simple to implement and it is very efficient for reaching
the desired temperature from far-from-equilibrium configurations. Initial concentrations were obtained
from the density of water vapor at the appropriate pressure and density at a given temperature using
known tabulated data. The pressure in the pore was controlled using the formula based on virial
equation [5].</p>
      <p>1
3

=
( 〈2 〉 − ⟨∑   ∙  (  )⟩ ) .</p>
      <p>&lt;</p>
      <p>Here  is the pore volume, 〈2 〉 is the doubled kinetic energy averaged over the ensemble,
 (  ) is the force between particles  and  at a distance   .</p>
    </sec>
    <sec id="sec-3">
      <title>3. Computational algorithm for molecular dynamic simulation</title>
      <p>For molecular dynamic simulation we used the code written in CUDA C. The program does
not require a lot of memory. We only keep co-ordinates, speeds and forces for each particle. One of
the main problems of molecular dynamic simulation is a large number of particles and time steps.
Therefore, it is necessary to use parallel calculations. The code for our simulations was implemented
on heterogeneous computing cluster HybriLIT.</p>
      <p>The code contains four functions that are paralleled, and which are performed on the GPU.
This is a function for calculating the forces (i.e., acceleration) for individual particles, which calculates
the interactions between all particles (F1). There are two functions to calculate new coordinates and
speeds for each particle. We need two functions to calculate them because we need forces acting on
particles at two different time moments (F2 and F3). Finally, we use the Berendsen thermostat in the
program that runs parallel at the GPU too (F4). Other calculations are performed on the host. General
scheme of the calculation algorithm for two- and three-dimensional molecular dynamic simulation is
shown in Figure 1.</p>
      <p>In this paper we compare the temporal realization of these four functions F1-F4 on the GPU
and the CPU. The total time of parallel computing consists of two parts, that is the time needed
directly to calculate on the GPU (pure GPU time) and the time needed to complete these calculations
on the CPU because some algorithms performed on the GPU must be completed by the CPU. In this
work, total GPU time will indicate the sum of these two times.</p>
    </sec>
    <sec id="sec-4">
      <title>4. 2D molecular dynamic simulation</title>
      <p>For two-dimensional (2D) molecular dynamic simulation we consider 2D model of the pore in
the shape of a rectangle with dimensions   = 1
,  
= 1
. The outer space in this micro-model
reflects is a rectangle right to the pore with  ∙   and (2 + 1) ∙   dimensions. All sides of the outer
space satisfy to the periodic boundary conditions. The left pore side reflects the inner molecules due to
the boundary condition [6] but also provides the periodic boundary conditions for a part of outer
space.</p>
      <p>There are 420 molecules of water vapor inside the pore which form saturated water vapor at
temperature 35℃ and pressure 5.62 kPa at the time t=0. The value of parameter k = 3 means that the
outer space volume for calculations is 21 times larger than the pore volume. There are 1764 molecules
of water vapor in outer space corresponding to 20% saturated water vapor. The integration step is
0.016 ps and evolution time is 65.3 ns.</p>
    </sec>
    <sec id="sec-5">
      <title>5. 3D molecular dynamic simulation</title>
      <p>In three-dimensional (3D) case [7] we made simulation for 3D model of the pore in the shape
of a prism of dimensions   = 500 ,   = 50 ,   = 50 . Five walls are isolated and so there is
no exchange of particles with outer space. The sixth wall is open and connected with the external
environment. The external environment is modelled by a prism which is 9 times bigger than the pore.
The big prism satisfies periodic boundary conditions. This means that the particles which pass through
one wall return to the system through the opposite wall. The integration time step is 0.016 ps and
evolution time is 65.3 ns.</p>
      <p>Consequently, we have considered the following input data for the drying process. There are
1000 molecules of water vapor inside the pore which forms saturated water vapor at temperature 25℃
and pressure 3.17 kPa. There are 1800 molecules of water vapor in the outer area space corresponding
to 20% saturated water vapor.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>For both simulations, in 2D and 3D cases, the average time  1 required to calculate one step
was calculated. To compare the two simulations, we have converted this time to one particle   . The
results are shown in Table 1. The time required to calculate one step for one particle for 2D and 3D
simulation on GPU in both cases (pure GPU time and total GPU time) especially pure GPU time is
2:3. CPU time does not keep this ratio.
112.732</p>
      <p>As our investigations showed for both cases of 2D and 3D simulation, when paralleling the
computations, there are some optimal value of number of threads in blocks 2
7 such that the
computation time becomes minimal then for other values of this number of threads. Parallelized
algorithm runs about 24 times faster than the sequential one in the 2D case and about 21 times faster in
the 3D case for one time step  1 and for average time step per particle   . In addition, it should be
noted that, when parallelizing, the cost ratio of the computation time per particle for 2D and 3D
modeling is equal 2/3 with high precision.
1984. V. 81. P. 3684.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Gould</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tobochnik</surname>
            <given-names>J.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Christian</surname>
            <given-names>W. An</given-names>
          </string-name>
          <article-title>Introduction to Computer Simulation Methods. 3rd edition</article-title>
          . // Addison-Wesley,
          <year>2006</year>
          . - 796 pp.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Lennard-Jones J</surname>
          </string-name>
          .
          <source>E. On the Determination of Molecular Fields. // Proc. Roy. Soc</source>
          .
          <year>1924</year>
          . V.
          <year>A106</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>