The Multi-Threaded Analysis of Multiscale Solver
for Viscoelastic Fluids Based on Open FOAM
Yi Liu1, XiaoWei Guo
1*
, Chao Li
1
, Cheng Kun Wu
1
, Xiang Zhang
1
and Canqun Yang
1
1
College of Computer, National University of Defense Technology, No. 109 Deya Street, Changsha, China
Keywords: Multi-threaded, Multiscale, Open FOAM.
Abstract: In this paper, we gave performanceanalysis of a multi-threaded multiscale numerical solver based on Open
FOAM. In the multiscale solver, we find that the matrix-vector multiplication is not the most compute-
intensive operations. The discretization of stochastic equation about the Brownian configuration fields
consumes nearly half the time for simulation. Our analysis result could provide valuable guidance for the
parallel performance improvement of multiscale solver based on Open FOAM.
1 INTRODUCTION
Multiscale modelling and simulations(Horstemeyer,
2009)are usually employed to capture important
features of complex fluids at multiple scales of time
or space. In the multiscale simulation of complex
fluids, the macroscopic flow behaviours are
intrinsically governed by the dynamics of
microscopic molecules.And the micro-
macromultiscale methods(Keunings, 2004)couple
the coarse-grained molecular scale kinetic theory
into the macroscopiccontinuum mechanics.A
macroscopic computational model is fast and simple.
Nevertheless, it fails to reproduce many complex
phenomena observed in experiments since the
macroscopic model ignores microscopic details of
molecular dynamics. As a microscopic approach, the
atomistic modelling could provide the most detailed
descriptionof the fluids dynamics, thus leading to
enormous calculations(Guo et al., 2016).However,
the micro-macro multiscale methods directly employ
kinetic theory models in flow simulations, avoiding
potentially inaccurate closure approximations
involved in macroscopic computational model. In
addition, these techniques consume less computing
resources than microscopic approaches.Therefore,
the micro-macro methods for multiscale simulations
have attracted great attention in recent years.
The Brownian configuration fields (BCF)(Hulsen
et al., 1997) is one of the multiscale methods to
model viscoelastic fluids, which made a
breakthrough via the use of correlated local
ensembles. The BCF method uses a uniform number
of configuration fields at fixed spatial positions to
model the dynamics of molecular chains. Not only
does this method ensure a homogeneous polymeric
density in physical space, but also avoids tracking
discrete particles. In a BCF simulation, the motion
of viscoelastic fluids is still governed by the Naiver-
Stocks equation on the macro-scale while the
viscoelastic stress is calculated through solving a
large number of stochastic equations on the micro-
scale and taking the ensemble average as the
macroscopic result. We implemented a multiscale
numerical solver using the BCF methods to
exploring the molecular distributions based on Open
FOAM(Open Source Field Operation and
Manipulation)(Liu et al., 2018).
Open FOAM is an open source toolbox for
solving particle differential equations through the
Finite Volume Method (FVM)(Christopher and
Greenshields, 2015).It is written in C++ and offers a
flexible framework for users to customize and
extend its existing functionality freely. The users
could focus on the mathematical models without
considering the underlying implementation in detail
because of the sufficient abstraction provided by
Open FOAM. Therefore, Open FOAM is widely
accepted in both academic and industrial CFD
(Computational Fluid Dynamics) communities.
Open FOAM is parallelized with general parallel
protocol MPI (Message Passing Interface). To
increase the parallel performance of the Open
FOAM solvers on the high-performance
systems(Yang et al., 2017;Wang et al., 2017), a