Mathematical modeling of fluid dynamics has many ecological, medical and industrial applications and it is one of the central research topics investigated at the Department of Mathematics, FNSPE CTU in Prague in collaboration with prominent domestic as well as foreign institutions.
In order to accurately model complex natural processes governing the behavior of fluids, it is often necessary to employ advanced numerical methods and to run high-resolution simulations on large computational clusters or supercomputers.
However, using the facilities for highperformance computing efficiently is non-trivial, as it requires careful management of data in the computer memory and appropriate division of the computations between all available processing units.
However, using the facilities for high-performance computing efficiently is non-trivial, as it requires careful management of data in the computer memory and appropriate division of the computations between all available processing units.
Especially when designing algorithms for systems with GPU accelerators, which provide significantly more processing units as well as memory levels compared to traditional computational systems, specifics of the hardware architectures have to be considered.
Since the field of computational fluid dynamics includes many substantially different applications, the most important requirements imposed on the building blocks of numerical solvers are configurability and composability.
@@ -10,7 +10,7 @@ Similarly, it is desirable to facilitate coupling even high-level tools and meth
The purpose of this thesis is the development of efficient data structures and parallel algorithms that can be used as fundamental ingredients in solvers based on, e.g., the lattice Boltzmann method or the mixed-hybrid finite element method.
Development of data structures for organizing structured as well as unstructured data in numerical simulations is necessary in order to match the requirements for efficient utilization of modern supercomputers.
Similarly, highperformance parallel algorithms have to be designed specifically for the hardware architectures used by modern GPU accelerators.
Similarly, high-performance parallel algorithms have to be designed specifically for the hardware architectures used by modern GPU accelerators.
Due to the diversity of parallel computing platforms, it is desirable for scientists to use established high-level libraries that provide a portable and easy to use interface for common operations.
However, it may be difficult to combine different packages and libraries, or even to gain sufficient overview of the available options.
@@ -27,12 +27,12 @@ Practically all numerical solvers in computational fluid dynamics utilize method
Many data structures and algorithms for GPU accelerators are available in common libraries such as cuBLAS \cite{nvidia:cuda} or cuSPARSE \cite{nvidia:cuda}.
An important problem in linear algebra is the solution of sparse linear systems, which is covered later in this thesis in \cref{chapter:linear systems}.
Unlike linear algebra, other fields such as mesh computations are not as established and may not even have a fixed universal system of notation.
Unlike linear algebra, other fields such as stencil computations on grids are not as established and may not even have a fixed universal system of notation.
Hence, there is no obvious way to formulate problems and the development of reusable software components is inherently difficult.
Overall, there is a lack of software libraries providing robust and multi-platform data structures for the representation of unstructured meshes.
Moreover, multiple types of meshes are used in practice, e.g., tetrahedral, hexahedral, and polyhedral.
While tetrahedral meshes are the easiest to use in numerical methods such as finite elements, hexahedral and especially polyhedral meshes are advantageous in complex cases with high amount of data per cell.
Compared to other types, polyhedral meshes need smaller number of cells to cover a given domain and numerical methods such as finite volumes can be designed carefully with the same level of accuracy that can be achieved on tetrahedral meshes.
Compared to other types, polyhedral meshes need smaller number of cells to cover a given domain and numerical methods such as finite volumes can be designed carefully with the same level of accuracy that can be achieved on tetrahedral meshes\cite{Wang2021}.
Numerous computational tools based on numerical methods such as finite volumes or finite elements are available for solving partial differential equations originating from mathematical modeling of various biological, environmental, or industrial problems.
In particular, software projects such as deal.II~\cite{bangerth:2007deal.II}, DUNE~\cite{bastian:2006DUNE}, OpenFOAM~\cite{jasak:2007openfoam}, TOUGH2~\cite{pruess:1999TOUGH2}, MFiX~\cite{syamlal:1993}, ANSYS Fluent~\cite{ansys-fluent:2009} or COMSOL Multiphysics~\cite{COMSOLMultiphysics1998} are suitable for simulations in the field of computational fluid dynamics.
@@ -50,7 +50,7 @@ To the best of our knowledge, they represent unique ideas that push forward the
\begin{enumerate}
\item
To develop the Template Numerical Library (TNL) \cite{oberhuber:2021tnl}, an open-source software library of highperformance algorithms and efficient data structures that follows modern software design patterns and simplifies the development of CFD solvers.
To develop the Template Numerical Library (TNL) \cite{oberhuber:2021tnl}, an open-source software library of high-performance algorithms and efficient data structures that follows modern software design patterns and simplifies the development of CFD solvers.
@@ -2,7 +2,7 @@ A general multi-purpose data structure for an efficient representation of \emph{
The data structure is provided as open-source software as part of the TNL library (\url{https://tnl-project.org/}).
The abstract representation supports almost any cell shape and common 2D quadrilateral, 3D hexahedron and arbitrarily dimensional simplex shapes are currently built into the library.
The implementation is highly configurable via templates of the \C++ language, which allows to avoid the storage of unnecessary dynamic data.
The internal memory layout is based on state--of--the--art sparse matrix storage formats, which are optimized for different hardware architectures in order to provide highperformance computations.
The internal memory layout is based on state--of--the--art sparse matrix storage formats, which are optimized for different hardware architectures in order to provide high-performance computations.
The proposed data structure is also suitable for meshes decomposed into several subdomains and distributed computing using the Message Passing Interface (MPI).
The efficiency of the implemented data structure on CPU and GPU hardware architectures is demonstrated on several benchmark problems and a comparison with another library.
Its applicability to advanced numerical methods is demonstrated with an example problem of two-phase flow in porous media using a numerical scheme based on the mixed-hybrid finite element method (MHFEM).
The individual parameters of the function are described in the comments in the code block.
Note that raw \C++ pointers are used as forward random access iterators and the transformation function is implemented in terms of a \emph{lambda expression} that captures the \ic{alpha} variable and operates on a pair of elements from the two input iterators.
Note that raw pointers are used as forward random access iterators and the transformation function is implemented in terms of a \emph{lambda expression} that captures the \ic{alpha} variable and operates on a pair of elements from the two input iterators.
The \ic{transform} function writes the result of the lambda expression to the output iterator.
To execute the \emph{axpy} operation on GPU using the device backend, the input data must be first transferred to the device memory and the result must be copied back to the host memory after the \ic{thrust::transform} function is executed.
author={Wang, Wei and Cao, Yong and Okaze, Tsubasa},
journal={Building and Environment},
title={Comparison of hexahedral, tetrahedral and polyhedral cells for reproducing the wind field around an isolated building by {LES}},
year={2021},
issn={0360-1323},
pages={107717},
volume={195},
abstract={The wind field around a 1:1:2 isolated building was predicted by large-eddy simulation for evaluating the pedestrian-level wind environment. This study focused on the effects of cell types (hexahedral, tetrahedral and polyhedral cells) and boundary layer mesh on the time-averaged and fluctuating wind characteristics. The minimum cell size and stretching ratio were set to be the same among all cases. The case composed of hexahedral cells was found to have the best agreement with the experiment among the three cell types. The accuracies of the polyhedral cases are close to that of the hexahedral case, and better than those of the tetrahedral cases. However, the polyhedral mesh is most economical for the computational resources since the cell numbers of the polyhedral cases are less than half of that of the hexahedral case and about a quarter of those of the tetrahedral cases. It was also found that the boundary layer mesh does not improve the numerical accuracy under any circumstances. For both tetrahedral and polyhedral meshes, the boundary layer mesh can improve the numerical accuracy in the region above the flat ground by reducing the mesh non-orthogonality and skewness. However, the boundary layer mesh was found to worsen the mesh quality in the local region around the sharp corners of the building for both tetrahedral and polyhedral meshes. As a result, the boundary layer mesh did not lead to the expected improvement of numerical accuracy of wind velocity in the sensitive region of the separated flow from the sharp corners.},