Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#27: Add references to projection note #28

Merged
merged 3 commits into from
Jan 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 66 additions & 35 deletions projection.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
% (C) 2022 Yung-Yu Chen. All rights reserved.
% chktex-file 7

\RequirePackage[2020-02-02]{latexrelease}
\documentclass[11pt,dvips]{article}
Expand Down Expand Up @@ -76,8 +77,10 @@

\section{Governing equations for 2D incompressible flow}\label{s:projection}

For simplicity, suppose $\rho=1$.
Momentum equation in $x_1$-direction:
Flow characteristics of viscous incompressible flow is depicted via the law of
conservation of momentum, for fluid it is the Navier-Stokes equation, and the
law of conservation of mass, or the continuity. Suppose $\rho=1$ for simplicity,
momentum equation in $x_1$-direction:
%
\begin{align}
\frac{\partial v_1}{\partial t}+v_1 \frac{\partial v_1}{\partial x_1}+v_2 \frac{\partial v_1}
Expand All @@ -100,7 +103,8 @@ \section{Governing equations for 2D incompressible flow}\label{s:projection}
\end{align}
%
\subsection{Vector form}
Momentum equation:
Governing equations can be written in vector form, where the momentum equations
in vector form is:
%
\begin{align}
\mathbf{v}_t+\mathbf{v}(\nabla \cdot \mathbf{v})=-\nabla p+\nu \nabla^2 \mathbf{v}
Expand All @@ -113,7 +117,7 @@ \subsection{Vector form}
\nabla \cdot \mathbf{v}=0 \label{e:continuity_vec}
\end{align}
%
\section{Projection algorithm}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

References should be added in paragraphs instead of section headers.

\section{Projection method}
Velocity at $n^{th}$ time-step is denoted as $\mathbf{v}^n$. Convection term is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write something about the numerical method you are employing in this note. Conventionally we (scientists and engineers) call them numerical methods, not algorithms. The term algorithm is mostly used by programmers.

denoted as $\mathbf{C}$, and diffusion term is denoted $\mathbf{D}$.
%
Expand All @@ -122,73 +126,83 @@ \section{Projection algorithm}
-\nabla p+\mathbf{D}(\mathbf{v}^{{n}}) \label{e:momentum_pj}
\end{align}
%
Solve for $\mathbf{v}^{n+1}$, we need to decide $\mathbf{P}$ beforehand. Projection
algorithm is implemented with intermediate term $\mathbf{v}^{*}$, the momentum
equation is split into 2 parts:
Projection method\cite{ferziger_cfd_2019} split eq (\ref{e:momentum_pj}) into
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conventionally we add citation at the end of a sentence. But at the time being it is OK to leave it here. We can come back here to change later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I wonder if you can pin-point to the original paper for the Projection Method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can change it later; yes, this sounds more reasonable to me. Should they be included in a new issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a plan. Could you file an issue for yourself?

%
\begin{gather}
\frac{\mathbf{v}^{*}-\mathbf{v}^{n}}{\Delta t}+\mathbf{C}(\mathbf{v}^{n})=
\mathbf{D}(\mathbf{v}^{{n}}) \label{e:momentum_pj_a} \\
\frac{\mathbf{v}^{n+1}-\mathbf{v}^{*}}{\Delta t}=-\nabla p \label{e:momentum_pj_b}
\frac{\mathbf{v}^{*}-\mathbf{v}^{n}}{\Delta t}+\mathbf{C}(\mathbf{v}^{n})=-\nabla
p^{n}+\mathbf{D}(\mathbf{v}^{{n}}) \label{e:projection1}\ \\
\frac{\mathbf{v}^{**}-\mathbf{v}^{*}}{\Delta t}=\nabla p^n \label{e:projection2}\\
\frac{\mathbf{v}^{n+1}-\mathbf{v}^{**}}{\Delta t}=-\nabla p^{n+1} \label{e:projection3}\
\end{gather}
%
having~(\ref{e:momentum_pj_b}) taken divergence, the equation becomes
having~eq (\ref{e:projection3}) taken divergence, the equation becomes
%
\begin{align}
\frac{\nabla \cdot(\mathbf{v}^{n+1}-\mathbf{v}^{*})}{\Delta t}=-\nabla ^2 p
\frac{\nabla \cdot(\mathbf{v}^{n+1}-\mathbf{v}^{**})}{\Delta t}=-\nabla ^2 p
\label{e:div_momentum_pj_b}
\end{align}
%
A distinguishing feature of the projection method is that the velocity field is
A distinguishing feature of projection method is that the velocity field is
forced to satisfy the continuity as a part of the algorithm, where
%
\begin{align}
\nabla \cdot(\mathbf{v}^{n+1})=0 \label{e:continuity_pj}
\end{align}
%
and therefore the equation becomes,
and therefore the equation becomes,
%
\begin{align}
\frac{\nabla \cdot(\mathbf{v}^{*})}{\Delta t}=\nabla ^2 p \label{e:momentum_pj_c}
\frac{\nabla \cdot \mathbf{v}^{**}}{\Delta t}=\nabla ^2 p \label{e:projection4}
\end{align}
%
\subsection{The three steps of projection algorithm}
Step 1- Solve $\mathbf{v}^{*}$ with eq (\ref{e:momentum_pj_a})
\subsection{The four steps of projection algorithm}
Step 1- Solve $\mathbf{v}^{*}$ with eq (\ref{e:projection1})
%
\begin{align}
\frac{\mathbf{v}^{*}-\mathbf{v}^{n}}{\Delta t}+\mathbf{C}(\mathbf{v}^{n})=
\mathbf{D}(\mathbf{v}^{{n}}) \nonumber
\end{align}
%
Step 2- Solve $p$ with eq (\ref{e:momentum_pj_c})
Step 2- Solve $\mathbf{v}^{**}$ with eq (\ref{e:projection2})
%
\begin{align}
\frac{\nabla \cdot(\mathbf{v}^{*})}{\Delta t}=\nabla ^2 p \nonumber
\frac{\mathbf{v}^{**}-\mathbf{v}^{*}}{\Delta t}=\nabla p^n \nonumber
\end{align}
%
Step 3- Solve $\mathbf{v}^{n+1}$ with eq (\ref{e:momentum_pj_b})
Step 3- Solve $p$ with eq (\ref{e:projection4})
%
\begin{align}
\frac{\mathbf{v}^{n+1}-\mathbf{v}^{*}}{\Delta t}=-\nabla p \nonumber
\frac{\nabla \cdot \mathbf{v}^{**}}{\Delta t}=\nabla ^2 p \nonumber
\end{align}
%
Step 4- Solve $\mathbf{v}^{n+1}$ with eq (\ref{e:projection3})
%
\begin{align}
\frac{\mathbf{v}^{n+1}-\mathbf{v}^{**}}{\Delta t}=-\nabla p^{n+1} \nonumber
\end{align}
%
\section{Discretization}
\subsection{Taylor expansion}
\subsection{Taylor-Series Expansion}
Discretized equations consists of approximating derivatives with truncated Taylor
-Series Expansion\cite{patankar_numerical_1980}, where Talor-series expansion
about position $x$ are
%
\begin{gather}
f(x+h)=f(x)+f'(x)\frac{h}{1!}+f''(x)\frac{h^2}{2!}+f^{(3)}(x)\frac{h^3}{3!}+ \ldots \label{e:FD} \\
f(x-h)=f(x)-f'(x)\frac{h}{1!}+f''(x)\frac{h^2}{2!}-f^{(3)}(x)\frac{h^3}{3!}+ \ldots \label{e:BD}
\end{gather}
%
First derivatives via eq (\ref{e:FD})-eq (\ref{e:BD})
First derivatives is obtained via eq (\ref{e:FD})-eq (\ref{e:BD}) truncating the
third term in the series, where
%
\begin{gather}
f(x+h)-f(x-h)=2\times f'(x)\frac{h}{1!}+2 \times f^{(3)}(x)\frac{h^3}{3!}+ \ldots \nonumber \\
f(x+h)-f(x-h)=2\times f'(x)\frac{h}{1!}+O(h^3) \nonumber \\
f'(x)=\frac{f(x+h)-f(x-h)}{2h} \label{e:f_1d}
\end{gather}
%
Second derivative via eq (\ref{e:FD})+eq (\ref{e:BD})
Second derivative via eq (\ref{e:FD})+eq (\ref{e:BD}) truncating the fourth term
in the series, where
%
\begin{gather}
f(x+h)+f(x-h)=2\times f(x)+2 \times f''(x)\frac{h^2}{2!}+4 \times f^{(4)}(x)
Expand All @@ -198,7 +212,7 @@ \subsection{Taylor expansion}
\end{gather}
%
\subsection{The discretized three steps of projection algorithm}
Step 1- Solve $\mathbf{v}^{*}$ with eq (\ref{e:momentum_pj_a})
Step 1- Solve $\mathbf{v}^{*}$ with eq (\ref{e:projection1})
%
\begin{align}
\frac{\mathbf{v}^{*}-\mathbf{v}^{n}}{\Delta t}+\mathbf{C}(\mathbf{v}^{n})=
Expand All @@ -210,35 +224,52 @@ \subsection{The discretized three steps of projection algorithm}
\begin{gather}
\mathbf{C}({v_1}^n_{i,j})={v_1}^n_{i,j} \cdot \frac{{v_1}^n_{e}-{v_1}^n_{w}}{\Delta x_1}+{v_2}^n_{p}
\cdot \frac{{v_1}^n_{n}-{v_1}^n_{s}}{\Delta x_2} \\
\mathbf{D}({v_1}^n_{i,j})=\nu (\frac{{v_1}^n_{e}+ {v_1}^n_{w}-2{v_1}^n_{i,j}}{{\Delta x_1/2}^2}
+\frac{{v_1}^n_{n}+ {v_1}^n_{s}-2{v_1}^n_{i,j}}{{\Delta x_2/2}^2})
\mathbf{D}({v_1}^n_{i,j})=\nu (\frac{{v_1}^n_{e}+ {v_1}^n_{w}-2{v_1}^n_{i,j}}{{(\Delta x_1/2)}^2}
+\frac{{v_1}^n_{n}+ {v_1}^n_{s}-2{v_1}^n_{i,j}}{{(\Delta x_2/2)}^2})
\end{gather}
%
Step 2- Solve $p$ with eq (\ref{e:momentum_pj_c})
Step 2- Solve $\mathbf{v}^{**}$ with eq (\ref{e:projection2})
%
\begin{align}
\frac{\nabla \cdot(\mathbf{v}^{*})}{\Delta t}=\nabla ^2 p \nonumber
\frac{\mathbf{v}^{**}-\mathbf{v}^{*}}{\Delta t}=\nabla p^n \nonumber
\end{align}
%
where
%
\begin{gather}
\nabla \cdot(\mathbf{v}^{*})=\frac{{v_1}^{*}_{e}-{v_1}^{*}_{w}}{\Delta x_1}
\nabla \cdot \mathbf{v}^{**}=\frac{{v_1}^{**}_{e}-{v_1}^{**}_{w}}{\Delta x_1}
+\frac{{v_2}^{**}_{n}-{v_2}^{**}_{s}}{\Delta x_2} \\
\nabla \cdot \mathbf{v}^{*}=\frac{{v_1}^{*}_{e}-{v_1}^{*}_{w}}{\Delta x_1}
+\frac{{v_2}^{*}_{n}-{v_2}^{*}_{s}}{\Delta x_2} \\
\nabla ^2 p=\frac{p_{i+1,j}+p_{i-1,j}-2p_{i,j}}{\Delta x_1^2}+\frac{p_{i,j+1}
+p_{i,j-1}-2p_{i,j}}{\Delta x_2^2}
\nabla p^n=\frac{p^n_{i+1,j}-p^n_{i-1,j}}{2\Delta x_1} \cdot \hat{i}+\frac{p^n_{i,j+1}
-p^n_{i,j-1}}{2\Delta x_2} \cdot \hat{j}
\end{gather}
%
Step 3- Solve $p^{n+1}$ with eq (\ref{e:projection4})
%
\begin{align}
\frac{\nabla \cdot \mathbf{v}^{**}}{\Delta t}=\nabla ^2 p^{n+1} \nonumber
\end{align}
%
where
%
\begin{gather}
\nabla ^2 p^{n+1}=\frac{p^{n+1}_{i+1,j}+p^{n+1}_{i-1,j}-2p^{n+1}_{i,j}}{\Delta x_1^2}
+\frac{p^{n+1}_{i,j+1}+p^{n+1}_{i,j-1}-2p^{n+1}_{i,j}}{\Delta x_2^2}
\end{gather}
%
Step 3- Solve $\mathbf{v}^{n+1}$ with eq (\ref{e:momentum_pj_b})
Step 4- Solve $\mathbf{v}^{n+1}$ with eq (\ref{e:projection3})
%
\begin{align}
\frac{\mathbf{v}^{n+1}_{i,j}-\mathbf{v}^{*}_{i,j}}{\Delta t}=-\nabla p \nonumber
\frac{\mathbf{v}^{n+1}_{i,j}-\mathbf{v}^{**}_{i,j}}{\Delta t}=-\nabla p \nonumber
\end{align}
%
where
%
\begin{align}
\nabla p=\frac{p_{i+1,j}-p_{i,j}}{\Delta x_1}
\nabla p^{n+1}=\frac{p^{n+1}_{i+1,j}-p^{n+1}_{i-1,j}}{2\Delta x_1} \cdot
\hat{i}+\frac{p^{n+1}_{i,j+1}
-p_{i,j-1}}{2\Delta x_2} \cdot \hat{j}
\end{align}

\clearpage
Expand Down
28 changes: 28 additions & 0 deletions turgon_main.bib
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,31 @@ @book{anderson_modern_2003
year = {2003},
keywords = {Fluid dynamics, Gas dynamics},
}

@book{ferziger_numerical_1981,
edition = {1st ed},
title = {Numerical Methods for Engineering Application},
isbn = {0471063363},
publisher = {Wiley},
author = {Joel H. Ferziger},
year = {1981},
}

@book{ferziger_cfd_2019,
edition = {4th ed},
title = {Computational Methods for Fluid Dynamics},
isbn = {978-3-319-99691-2},
publisher = {Springer Cham},
author = {Joel H. Ferziger, Milovan Perić, Robert L. Street},
year = {2019},
}

@book{patankar_numerical_1980,
edition = {1st ed},
title = {Numerical Heat Transfer and Fluid Flow},
isbn = {0-07-048740-5},
publisher = {Hemisphere Publishing Corporation},
author = {Suhas Patankar},
year = {1980},
}