Commit 2c276305 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

LBM section - copy-edit (addressing comments by PE)

parent 19847365
Loading
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ The most common examples are D1Q3, D2Q5, D2Q9, D3Q7, D3Q15, D3Q19, and D3Q27.
Not all velocity sets are suitable for accurate resolution of the desired macroscopic equation \cite{kruger:2017lattice,fucik:lbman,fucik:lbmat}.
In this thesis, we aim to use LBM for the solution of the Navier--Stokes equations in $\mathbb R^3$ and thus consider the D3Q27 velocity set consisting of $Q = 27$ discrete velocities.

A velocity set for LBM is fully defined by two sets of quantities: lattice velocities $\vec \xi_q$ and the corresponding weights $w_q$ for $q = 1, \ldots, Q$.
A velocity set for LBM is fully defined by two sets of quantities: lattice velocities $\vec \xi_q$ and the corresponding weights $w_q$ for $q \in \{1, \ldots, Q\}$.
Another important quantity that can be derived from these two sets is the lattice speed of sound $c_s$.
The aforementioned velocity sets can be derived using the Gauss--Hermite quadrature~\cite[Appendix~A.4]{kruger:2017lattice}.
Another approach explained in \cite[Section~3.4.7.2]{kruger:2017lattice} is to determine the weights by solving the system of equations representing general conditions that ensure rotational isotropy of the lattice.
@@ -56,7 +56,8 @@ The discretization of \cref{eq:lbm:BTE} in velocity space (using a velocity set)
    f_q(\vec x + \Delta t \vec \xi_q, t + \Delta t) - f_q(\vec x, t) = \Delta t \left( \mathcal C_q(\vec x, t) + \mathcal S_q(\vec x, t) \right)
    %f_q(\vec x + \Delta t \vec \xi_q, t + \Delta t) - f_q(\vec x, t) = \Delta t \mathcal C_q(\vec x, t)
\end{equation}
for all $q = 1, \ldots, Q$, $\vec x \in \hat\Omega$, and $t \in \hat I$.
\todo{fix dimensions of the quantities: $\vec x$~\si{\metre}, but $\Delta t \vec \xi_q$~\si{-}}
for all $q \in \{1, \ldots, Q\}$, $\vec x \in \hat\Omega$, and $t \in \hat I$.
In \cref{eq:lbm:LBE}, $f_q = f_q(\vec x, t)$ is the discrete density distribution functions corresponding to the microscopic velocity $\vec \xi_q$, $\mathcal C_q$ is the discrete collision operator and $\mathcal S_q$ is the discrete source term.
Note that the collision operator $\mathcal C_q$ depends on the whole set of $Q$ discrete density distribution functions (i.e., the $Q$ equations written in \eqref{eq:lbm:LBE} are not independent).

@@ -67,7 +68,7 @@ The scheme for the approximation of the Navier--Stokes equations is constructed
\end{equation}
and the macroscopic momentum density $\rho \vec v$, which can be computed in lattice units as
\begin{equation}\label{eq:lbm:momentum}
    \rho(\vec x, t) \vec v(\vec x, t) = \sum\limits_{q=1}^Q f_q(\vec x, t) \vec \xi_q + \frac{1}{2} \hat{\vec F}(\vec x, t) \Delta t,
    \rho(\vec x, t) \vec v(\vec x, t) = \sum\limits_{q=1}^Q f_q(\vec x, t) \vec \xi_q + \frac{1}{2} \Delta t \hat{\vec F}(\vec x, t),
    %\rho(\vec x, t) \vec v(\vec x, t) = \sum\limits_{q=1}^Q f_q(\vec x, t) \vec \xi_q.
\end{equation}
where $\hat{\vec F}$ denotes the external force density in lattice units exerted on the fluid.
@@ -113,11 +114,13 @@ Based on \cref{eq:lbm:LBE}, the computational steps needed to evolve the state f
    \item The \emph{collision} step:
        \begin{equation} \label{eq:lbm:push-scheme:collision step}
            f_q^\ast(\vec x, t) = f_q(\vec x, t) + \Delta t \left( \mathcal C_q(\vec x, t) + \mathcal S_q(\vec x, t) \right),
            \qquad \forall q \in \{1, \ldots, Q\},
        \end{equation}
        where $f_q^\ast$ denotes the value of the distribution function \emph{after} collision in the given lattice site.
    \item The \emph{streaming} step:
        \begin{equation} \label{eq:lbm:push-scheme:streaming step}
            f_q(\vec x + \Delta t \vec \xi_q, t + \Delta t) =  f_q^\ast(\vec x, t),
            \qquad \forall q \in \{1, \ldots, Q\},
        \end{equation}
        where the post-collision distribution function $f_q$ is propagated to the neighboring lattice site in the direction of the corresponding velocity $\vec \xi_q$.
\end{enumerate}
@@ -130,11 +133,13 @@ The alternative, yet equivalent can be formulated as:
    \item The \emph{streaming} step:
        \begin{equation} \label{eq:lbm:pull-scheme:streaming step}
            f_q(\vec x, t) = f_q^\ast(\vec x - \Delta t \vec \xi_q, t - \Delta t),
            \qquad \forall q \in \{1, \ldots, Q\},
        \end{equation}
        where the post-collision distribution function $f_q$ is propagated from the neighboring lattice site in the direction of $- \vec \xi_q$ from the previous time level.
    \item The \emph{collision} step:
        \begin{equation} \label{eq:lbm:pull-scheme:collision step}
            f_q^\ast(\vec x, t) = f_q(\vec x, t) + \Delta t \left( \mathcal C_q(\vec x, t) + \mathcal S_q(\vec x, t) \right),
            \qquad \forall q \in \{1, \ldots, Q\},
        \end{equation}
        where $f_q^\ast$ denotes the value of the distribution function \emph{after} collision in the given lattice site.
\end{enumerate}
@@ -142,7 +147,7 @@ The alternative, yet equivalent can be formulated as:
This scheme is called the \emph{pull scheme}, since the streaming step propagates the values to the reference lattice site $\vec x \in \hat\Omega$ from its neighbors.
The visualization of the difference between the push and pull streaming schemes is illustrated in \cref{fig:lbm:AB push,fig:lbm:AB pull} for a D2Q9 velocity set.

Note that regardless of the chosen streaming scheme, the collision step is \emph{local} in terms of the lattice sites $\vec x \in \hat\Omega$ (i.e., collisions in different lattice sites are independent of each other), but collective for all $q = 1, \ldots, Q$ since collision operator $\mathcal C_q$ depends on the whole set of distribution functions in given lattice site.
Note that regardless of the chosen streaming scheme, the collision step is \emph{local} in terms of the lattice sites $\vec x \in \hat\Omega$ (i.e., collisions in different lattice sites are independent of each other), but collective for all $q \in \{1, \ldots, Q\}$ since collision operator $\mathcal C_q$ depends on the whole set of distribution functions in given lattice site.
On the other hand, the operations in the streaming step are \emph{non-local}, but trivial as they do not require any computation (the post-collision values are merely transferred from one place to another).

Both the push and pull schemes require attention during the implementation to avoid overwriting memory locations containing values that may be needed in the future.
@@ -180,16 +185,19 @@ The time-stepping procedure using the A-A pattern can be formalized as follows:
            \item \emph{Pre-collision streaming} step:
                \begin{equation} \label{eq:lbm:AA-pattern:even pre-collision step}
                    f_q(\vec x, t) = \texttt{A[}q, \vec x\texttt{]},
                    \qquad \forall q \in \{1, \ldots, Q\},
                \end{equation}
                where the values are read from the array \ic{A} and the direction $q$ is preserved.
            \item The \emph{collision} step:
                \begin{equation} \label{eq:lbm:AA-pattern:even collision step}
                    f_q^\ast(\vec x, t) = f_q(\vec x, t) + \Delta t \left( \mathcal C_q(\vec x, t) + \mathcal S_q(\vec x, t) \right),
                    \qquad \forall q \in \{1, \ldots, Q\},
                \end{equation}
                where $f_q^\ast$ denotes the value of the distribution function \emph{after} collision in the given lattice site.
            \item \emph{Post-collision streaming} step:
                \begin{equation} \label{eq:lbm:AA-pattern:even post-collision step}
                    \texttt{A[}\overline q, \vec x\texttt{]} = f_q^\ast(\vec x, t),
                    \qquad \forall q \in \{1, \ldots, Q\},
                \end{equation}
                where the post-collision values are written to the same array \ic{A} at the same lattice site $\vec x$, but the direction $q$ is inverted: $\overline q \in \{1, \ldots, Q\}$ is defined such that $\vec \xi_{\overline q} = - \vec \xi_q$.
        \end{enumerate}
@@ -199,16 +207,19 @@ The time-stepping procedure using the A-A pattern can be formalized as follows:
            \item \emph{Pre-collision streaming} step:
                \begin{equation} \label{eq:lbm:AA-pattern:odd pre-collision step}
                    f_q(\vec x, t) = \texttt{A[}\overline q, \vec x - \Delta t \vec \xi_q\texttt{]},
                    \qquad \forall q \in \{1, \ldots, Q\},
                \end{equation}
                where the values are read from the array \ic{A} from neighboring lattice sites, but the direction $q$ is inverted for consistency with \cref{eq:lbm:AA-pattern:even post-collision step}.
            \item The \emph{collision} step:
                \begin{equation} \label{eq:lbm:AA-pattern:odd collision step}
                    f_q^\ast(\vec x, t) = f_q(\vec x, t) + \Delta t \left( \mathcal C_q(\vec x, t) + \mathcal S_q(\vec x, t) \right),
                    \qquad \forall q \in \{1, \ldots, Q\},
                \end{equation}
                where $f_q^\ast$ denotes the value of the distribution function \emph{after} collision in the given lattice site.
            \item \emph{Post-collision streaming} step:
                \begin{equation} \label{eq:lbm:AA-pattern:odd post-collision step}
                    \texttt{A[}q, \vec x + \Delta t \vec \xi_q\texttt{]} = f_q^\ast(\vec x, t),
                    \qquad \forall q \in \{1, \ldots, Q\},
                \end{equation}
                where the values are written to the array \ic{A} to the neighboring lattice sites and the original direction $q$ is again preserved.
        \end{enumerate}