@@ -7,7 +7,7 @@ An application of the developed approach to the mathematical modeling of vapor t
The chapter is organized as follows.
\todo{TODO}
Both methods are introduced and their coupling in a time-adaptive manner is explained.
Finally, various implementation details are described.
The details related to the decomposition of a regular lattice overlapped with an unstructured mesh are described in \cref{sec:lbm-mhfem:decomposition}.
\section{Problem formulation}
\label{sec:lbm-mhfem:problem formulation}
@@ -160,25 +160,8 @@ This is because the discrete velocity field computed by LBM may not satisfy \cre
Hence, the field interpolated to the unstructured mesh may be locally non-conservative, i.e., the discrete approximation of the velocity divergence $\sum\limits_{E \in\mathcal E_K}\hat{\vec v}_E \cdot\vec n_{K,E}$ on element $K \in\mathcal K_h$ may be non-zero.
The accuracy of the numerical scheme applied to the conservative form of \cref{eq:ADE:conservative} and non-conservative form of \cref{eq:ADE:non-conservative} is investigated in \cref{sec:lbm-mhfem:numerical analysis} on a benchmark problem.
\section{Implementation remarks}
\inline{This section is useless -- will be incorporated into previous sections.}
The LBM and MHFEM parts of the coupled solver were developed and tested separately in \cite{fucik2019,eichler2021a,eichler2021b} and \cite{fucik:2019NumDwarf}, respectively.
Both parts individually as well as the algorithms specific to the coupling between them utilize the open-source TNL library \cite{oberhuber:2021tnl} for parallelization and distributed computing on GPU clusters.
TNL natively supports and provides a unified high-level interface for modern parallel architectures such as CPUs, GPU accelerators (via CUDA \cite{nvidia:cuda}) and distributed systems (via MPI \cite{mpi:3.1}).
Furthermore, TNL provides common building blocks for numerical solvers, including data structures and parallel algorithms for linear algebra, structured grids and unstructured meshes.
Using the data structures and algorithms from TNL is beneficial for performance, because they allow to avoid running expensive computations on the CPU and having to transfer large datasets between the system memory and accelerators over the PCI-E bus.
Instead, all expensive parts of the computational algorithm are executed on the GPU accelerators and the CPU is responsible only for the orchestration of the work and occasional sequential steps such as handling input and output.
The coupled solver uses a regular lattice for LBM and an unstructured mesh for MHFEM.
The use of the lattice is the main limiting factor for the flexibility of the solver, because extra care must be taken when setting up a simulation to ensure proper alignment of immersed boundaries such as the synthetic plants used in this paper.
This could be improved by using interpolated boundary conditions for LBM \cite{kruger:2017lattice}, they are however not currently implemented in our solver.
On the other hand, the MHFEM part of the solver can be used on complex domain geometries with unstructured mesh discretizations.
The details related to the decomposition of a regular lattice overlapped with an unstructured mesh are described in the following section.
\section{Domain decomposition for overlapped lattice and mesh}
\label{sec:decomposition}
\label{sec:lbm-mhfem:decomposition}
The combination of a lattice overlapped with an unstructured mesh requires special attention when the solver is run in a distributed fashion, e.g. utilizing multiple GPU accelerators.
Both the lattice and the mesh have to be decomposed into subdomains and each assigned to a GPU.
\inline{popsat streamy a ideálně to nějak zobecnit v TNL -- potřeba pro LBM optimalizace}
The open-source TNL library \cite{oberhuber:2021tnl} simplifies parallelization and distributed computing on GPU clusters.
TNL natively supports and provides a unified high-level interface for modern parallel architectures such as CPUs, GPU accelerators (via CUDA \cite{nvidia:cuda}) and distributed systems (via MPI \cite{mpi:3.1}).
Furthermore, TNL provides common building blocks for numerical solvers, including data structures and parallel algorithms for linear algebra, structured grids and unstructured meshes.
Using the data structures and algorithms from TNL is beneficial for performance, because they allow to avoid running expensive computations on the CPU and having to transfer large datasets between the system memory and accelerators over the PCI-E bus.
Instead, all expensive parts of the computational algorithm are executed on the GPU accelerators and the CPU is responsible only for the orchestration of the work and occasional sequential steps such as handling input and output.
@@ -390,7 +390,11 @@ To solve the system of Eqs.~\eqref{eq:NumDwarf}, suitable initial and boundary c
A simple Dirichlet-type boundary condition is used to prescribe fixed values of the unknown function on parts of the domain boundary $\partial\Omega_2$ as described in \cref{sec:boundary conditions}.
On the remaining parts of $\partial\Omega_2$, which are either impermeable walls where the no-slip condition on velocity is imposed or free-stream boundaries of $\Omega_2$ inside $\Omega_1$, a Neumann-type condition is used to prescribe zero gradient of the unknown function in the normal direction.
In this work, we use conforming unstructured cuboidal meshes denoted as $\mathcal K_h$ for the discretization of the domain $\Omega_2$.
The coupled solver uses a regular lattice for LBM and an unstructured mesh for MHFEM.
The use of the lattice is the main limiting factor for the flexibility of the solver, because extra care must be taken when setting up a simulation to ensure proper alignment of immersed boundaries such as the synthetic plants used in this paper.
This could be improved by using interpolated boundary conditions for LBM \cite{kruger:2017lattice}, they are however not currently implemented in our solver.
On the other hand, the MHFEM part of the solver can be used on complex domain geometries with unstructured mesh discretizations.
In this chapter, we use conforming unstructured cuboidal meshes for the discretization of the domain $\Omega_2$.
We use the full-way bounce-back boundary condition~\cite{kruger:2017lattice} to prescribe the no-slip condition on impermeable walls.
The boundary condition for velocity on the downstream faces of synthetic plants (see \subsubsecref{sec:bc:plants}) is realized via the modified bounce-back condition~\cite{kruger:2017lattice} by specifying zero tangential and small non-zero normal velocity of the moving wall.