Commit 8f85a319 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

LBM-MHFEM chapter - copied data and text from the appendix of the revised wind tunnel paper

parent 4c1957e0
Loading
Loading
Loading
Loading
Loading
+133 −1
Original line number Diff line number Diff line
@@ -16,6 +16,13 @@ Finally, various implementation details are described.
\inline{equations: copy Navier--Stokes here, add a general advection-diffusion equation (without physical interpretation)}
\inline{define domains $\Omega_1$ and $\Omega_2$ -- use the problem from the appendix in \cite{klinkovsky2022:WT}}

\begin{figure}[!tb]
    \centering
    \includegraphics[width=0.8\textwidth]{figures/lbm-mhfem/ADE2_domain_annotated.png}
    \caption{Schematic configuration of the computational domains $\Omega_1$ and $\Omega_2$ (2D cross-section along the plane $y = 0$).}
    \label{fig:lbm-mhfem:domain}
\end{figure}

\section{Computational algorithm and time adaptivity}
\label{sec:lbm-mhfem:algorithm}

@@ -204,3 +211,128 @@ Overall, the decomposition algorithm optimizes the computational cost and memory


\inline{Add the problem of mapping MPI ranks to GPUs -- quadratic assignment problem, plus we need to get the weights (communication cost between each pair of GPUs) somehow}


\section{Numerical analysis of the conservative vs. non-conservative formulation}
\label{sec:lbm-mhfem:numerical analysis}

In this section, we study numerically the convergence of the coupled LBM-MHFEM scheme using an artificial benchmark problem.
The aim of this section is to study the differences between the conservative and non-conservative formulations of the transport equation.

\Cref{eq:ns} governing the fluid flow is solved in a cuboidal channel $\Omega_1 = [0, 1.75] \times [0, 1] \times [0, 1]$  (dimensions are in meters) with parameters similar to the main problem discussed in the paper (kinematic viscosity $\nu = \SI{15.52e-6}{\metre\squared\per\second}$, mean inflow velocity magnitude $v_{\max} = \SI{1}{\metre\per\second}$).
Note that the channel is free of all obstacles, but we induce turbulent flow using the unsteady (time-varying) inflow boundary condition described in \cref{sec:inflow:fluctuations}.

The fluid flow is coupled with a transport equation either in the conservative form \cref{eq:transport:conservative} or non-conservative form \cref{eq:transport:non-conservative}, where $\phi$~[-] is exempt from its physical meaning and for the purpose of this section, it is interpreted as the concentration of a generic constituent transported by the fluid.
The diffusion coefficient $D = \SI{25.52e-6}{\metre\squared\per\second}$ is set the same as in the main problem discussed in the paper (see \cref{tab:physical parameters}).
The transport equation is solved in domain $\Omega_2 = [0.5, 1.5] \times [0.25, 0.75] \times [0.25, 0.75]$ (in meters) that is completely immersed in the domain $\Omega_1$ (i.e., none of the domain boundaries coincide: $\partial\Omega_1 \cap \partial\Omega_2 = \emptyset$).
See \cref{fig:lbm-mhfem:domain} for schematic configuration of the domains.

In order to study the differences between the conservative and non-conservative formulations, the initial and boundary conditions for the transport equation are posed as follows.
Initially, we set $\phi = 1$ uniformly in the whole domain $\Omega_2$.
On the inflow boundary ($x = 0.5$), we prescribe a fixed value $\phi = 1$.
On all remaining parts of $\partial \Omega_2$, we prescribe a zero gradient in the normal direction ($\frac{\partial \phi}{\partial \vec x} \cdot \vec n = 0$).
Given a divergence-free velocity field due to \cref{eq:ns:mass}, this initial-boundary-value problem has a trivial analytical solution $\phi(\vec x, t) = 1$ for all $\vec x \in \Omega_2$ and $t > 0$.

The coupled problem is solved numerically using the LBM-MHFEM scheme as described in \cref{sec:computational approach}.
Several variants of the MHFEM scheme were used, namely explicit or implicit upwind, and linear or cubic interpolation of the velocity field.
Each variant was computed in three resolutions denoted as RES-A1, RES-A2, and RES-A3, see \cref{tab:ADE2:resolutions}.
To illustrate the turbulent flow field in $\Omega_1$, \cref{fig:ADE2:vx} shows the horizontal velocity ($v_x$) field in the final time $t_{\max} = \SI{10}{\second}$.
\Cref{fig:ADE2:concentrations} shows qualitative differences between the concentration ($\phi$) fields that were computed using different variants of the MHFEM scheme.
Since the fields obtained using any variant with the non-conservative formulation were visually indistinguishable from the constant analytical solution on the scale used in \cref{fig:ADE2:concentrations}, only the conservative formulation variants are shown in the figure.
Note that for given resolution, the velocity field is the same in all variants of the MHFEM scheme.
Quantitative comparison is presented in \cref{tab:ADE2:norms} in terms of $L^p$ norms of the differences between the analytical solution $\phi = 1$ and each numerical solution $\phi_h$.

Both qualitative and quantitative results in \cref{fig:ADE2:concentrations,tab:ADE2:norms} indicate that for the conservative formulation, changing linear interpolation to cubic, as well as changing the explicit upwind discretization to implicit upwind, leads to smoother and more accurate results.
Furthermore, all these variants converge to the analytical solution as the lattice and grid are refined.
However, even the most accurate numerical solution obtained using the conservative formulation exhibits an error that is larger by orders of magnitude compared to the non-conservative formulation, even in the coarsest resolution.
The only difference between the discretizations of the non-conservative and conservative formulations is in \cref{eq:mhfem:advection terms discrete} where the former contains a term corresponding to the discrete divergence of velocity.
The results indicate that this extra term can be understood as a compensation for the non-zero divergence of the discrete velocity field interpolated on the mesh.
Furthermore, it can be noticed in \cref{tab:ADE2:norms} that changing the interpolation or upwind scheme does not have a significant effect on the error when the non-conservative formulation is used.
In the finest resolution RES-A3, using the linear interpolation and explicit upwind is not only advantageous for the performance of the solver, but also leads to a smaller error.

\begin{table}[!tb]
    \centering
    \begin{tabular}{lrrr}
        \toprule
        & RES-A1 & RES-A2 & RES-A3 \\
        \midrule
        Lattice space step & \SI{8.06}{\mm} & \SI{3.97}{\mm} & \SI{1.97}{\mm} \\
        Lattice dimensions & $217 \times 128 \times 128$ & $441 \times 256 \times 256$ & $889 \times 512 \times 512$ \\
        MHFEM grid dimensions & $128 \times 64 \times 64$ & $256 \times 128 \times 128$ & $512 \times 256 \times 256$ \\
        No. of lattice sites & approx. $3.5 \cdot 10^6$ & approx. $29 \cdot 10^6$ & approx. $233 \cdot 10^6$ \\
        No. of grid cells & approx. $0.5 \cdot 10^6$ & approx. $4 \cdot 10^6$ & approx. $33 \cdot 10^6$ \\
        Base time step $\Delta t$ & \SI{1.39e-3}{\second} & \SI{3.38e-4}{\second} & \SI{8.32e-5}{\second} \\
        \multicolumn{1}{p{13em}}{Average no. of LBM iters per MHFEM step ($\floor{C_{\max} / C}$)} & 2 & 4 & 9 \\
        \bottomrule
    \end{tabular}
    \caption{Characteristics of lattice and grid resolutions used for the numerical analysis.}
    \label{tab:ADE2:resolutions}
\end{table}

\begin{table}[!tb]
    \centering
    \input{data/lbm-mhfem/norms_concentration.tex}
    \caption{Results of the numerical analysis for different formulations and variants of the MHFEM scheme.}
    \label{tab:ADE2:norms}
\end{table}

\begin{figure}[!tb]
    \centering
    \includegraphics[width=0.8\textwidth]{data/lbm-mhfem/vx/lbmres=8_ictype=turb_interp=linear_ML=enabled_advection=explicit-upwind_transport=conservative.png}
    \\\vspace{1ex}
    \includegraphics[width=\textwidth]{data/lbm-mhfem/cbar_vx.png}
    \caption{Horizontal velocity field ($v_x$) along the plane $y = 0$ in $\Omega_1$, computed in resolution RES-A2.}
    \label{fig:ADE2:vx}
\end{figure}

\begin{figure}[!tb]
    \centering
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Linear interpolation, explicit upwind, RES-A1}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=linear_ML=enabled_advection=explicit-upwind_transport=conservative_lbmres=4_mesh=grid-0.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Cubic interpolation, explicit upwind, RES-A1}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=cubic_ML=enabled_advection=explicit-upwind_transport=conservative_lbmres=4_mesh=grid-0.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Linear interpolation, implicit upwind, RES-A1}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=linear_ML=enabled_advection=implicit-upwind_transport=conservative_lbmres=4_mesh=grid-0.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Cubic interpolation, implicit upwind, RES-A1}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=cubic_ML=enabled_advection=implicit-upwind_transport=conservative_lbmres=4_mesh=grid-0.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Linear interpolation, explicit upwind, RES-A2}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=linear_ML=enabled_advection=explicit-upwind_transport=conservative_lbmres=8_mesh=grid-1.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Cubic interpolation, explicit upwind, RES-A2}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=cubic_ML=enabled_advection=explicit-upwind_transport=conservative_lbmres=8_mesh=grid-1.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Linear interpolation, implicit upwind, RES-A2}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=linear_ML=enabled_advection=implicit-upwind_transport=conservative_lbmres=8_mesh=grid-1.png}
    \end{subfigure}
    \begin{subfigure}[b]{0.495\textwidth}
        \centering
        \caption{Cubic interpolation, implicit upwind, RES-A2}
        \includegraphics[width=\textwidth]{data/lbm-mhfem/concentration/ictype=turb_interp=cubic_ML=enabled_advection=implicit-upwind_transport=conservative_lbmres=8_mesh=grid-1.png}
    \end{subfigure}
    \\\vspace{1ex}
    \includegraphics[width=\textwidth]{data/lbm-mhfem/cbar_concentration.png}
    \caption{
        Simulated concentration field ($\phi$) along the plane $y = 0$ in $\Omega_2$ in the benchmark problem using the \emph{conservative formulation} of the transport equation \eqref{eq:transport:conservative}.
        Several configurations of the numerical scheme are compared: linear and cubic interpolation of the velocity from LBM to MHFEM, and discretization of the advection term in the MHFEM scheme based on explicit and implicit upwind.
        Only the first two resolutions RES-A1 and RES-A2 are shown here.
    }
    \label{fig:ADE2:concentrations}
\end{figure}
+52.8 KiB
Loading image diff...
+41.2 KiB
Loading image diff...
+67.5 KiB
Loading image diff...
+105 KiB
Loading image diff...
Loading