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

Update docs for LaTeX compilation #20

Merged
merged 1 commit into from
Nov 8, 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
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ execute:

# Define the name of the latex output file for PDF builds
latex:
latex_engine: xelatex
latex_documents:
targetname: book.tex

Expand All @@ -39,6 +40,7 @@ sphinx:
config:
html_last_updated_fmt: "%b %d, %Y"
suppress_warnings: [ "mystnb.unknown_mime_type" ]
mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

launch_buttons:
notebook_interface: "jupyterlab"
Expand Down
1 change: 0 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ When loading a problem file, OasisMove will start by looking inside the `problem
look in the current working directory. If the problem you have specified after `problem=` is not located in either locations, an error will occur.
```

## References

```{bibliography} references.bib
:filter: docname in docnames
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
[OasisMove](https://github.com/KVSlab/OasisMove) is a high-level/high-performance open-source Navier-Stokes solver
written in Python/[FEniCS](https://fenicsproject.org/), and is an extension of the computational fluid dynamics (CFD)
solver [Oasis](https://github.com/mikaem/Oasis). In OasisMove the Navier-Stokes equations are expressed in the arbitrary
Lagrangian-Eulerian formulation, which is suitable for handling moving domains. Through verification the solver has
Lagrangian-Eulerian (ALE) formulation, which is suitable for handling moving domains. Through verification the solver has
shown to follow theoretical convergence rates, begin second order accurate in time, and second and third order accurate
in space with P1/P1 and P2/P1 finite elements. Through validation the solver has showed good agreement with existing
in space with $\mathbb{P_1}/\mathbb{P_1}$ and $\mathbb{P_2}/\mathbb{P_1}$ finite elements. Through validation the solver has showed good agreement with existing
benchmark results, and demonstrates the ability of the solver to capture vortex patterns in transitional and
turbulent-like flow regimes.

Expand Down
13 changes: 2 additions & 11 deletions docs/movingcylinder.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,14 @@ frequency of the oscillations are defined as:

```{math}
:label: eq-freq
\begin{align}
f = \frac{St U_{\infty}F}{D}.
\end{align}
f = \frac{St U_{\infty}F}{D}.
```

Furthermore, the cylinder position followed a sinusoidal profile in the transverse direction to the flow:

```{math}
:label: eq-sine
\begin{align}
\mathbf x(\mathbf \chi, t) = (0, A \sin (2 \pi f t )),
\end{align}
\mathbf x( \mathbf X, t) = (0, A \sin (2 \pi f t )),
```

where $A = A_{ratio}D$ is the amplitude.
Expand Down Expand Up @@ -78,9 +74,7 @@ $C_L$) coefficient defined as:

```{math}
:label: eq-force
\begin{align}
C_D = \frac{2 F_D}{\rho U_\infty^2 D}, \qquad C_L = \frac{2F_L}{\rho U_\infty^2 D},
\end{align}
```

stored in the `forces.txt` file. In {numref}`vel-cylinder` we display the resulting velocity field, where we have added
Expand Down Expand Up @@ -127,12 +121,9 @@ Reynolds number by definition:

```{math}
:label: eq-re
\begin{align}
\text{Re } = \frac{U_{\infty} D}{\nu}
\end{align}
```

## References

```{bibliography} references.bib
:filter: docname in docnames
Expand Down
26 changes: 10 additions & 16 deletions docs/movingtg.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,30 @@ absence of body forces, $\mathbf{f} = 0$, namely:

```{math}
:label: eq-tg3d
\begin{align}
\mathbf u(\mathbf x,t = 0) &= (u(\mathbf x),v(\mathbf x),w(\mathbf x)\\
\mathbf u(\mathbf x,t = 0) &= (u(\mathbf x),v(\mathbf x),w(\mathbf x))\\
u(\mathbf x) &= + \sin(x) \cos(y) \cos(z) \\
v(\mathbf x) &= -\cos(x) \sin(y) \cos(z) \\
w(\mathbf x) &= 0 \\
p(\mathbf x,t=0) &= \frac{1}{16}(\cos(2x) + \cos(2y)) (\cos(2z) + 2).
\end{align}
```

The domain boundaries are prescribed a movement described by the following mesh motion from Fehn et al.
{cite}`fehn2021high`:

```{math}
:label: eq-tg3d-d
\begin{align}
\mathbf x(\mathbf \chi,t) &= \mathbf \chi + A_0 \sin \left(\frac{2 \pi t}{T_G}\right)
\mathbf x(\mathbf X,t) &= \mathbf X + A_0 \sin \left(\frac{2 \pi t}{T_G}\right)
\begin{pmatrix}
\sin \left(2\pi \frac{\chi_2 + L / 2}{L}\right) \sin\left(2\pi \frac{\chi_3 + L / 2}{L}\right) \\
\sin\left(2\pi \frac{\chi_1 + L / 2}{L}\right) \sin\left(2\pi \frac{\chi_3 + L / 2}{L}\right) \\
\sin\left(2\pi \frac{\chi_1 + L / 2}{L}\right) \sin\left(2\pi \frac{\chi_2 + L / 2}{L}\right)
\sin \left(2\pi \frac{X_2 + L / 2}{L}\right) \sin\left(2\pi \frac{X_3 + L / 2}{L}\right) \\
\sin\left(2\pi \frac{X_1 + L / 2}{L}\right) \sin\left(2\pi \frac{X_3 + L / 2}{L}\right) \\
\sin\left(2\pi \frac{X_1 + L / 2}{L}\right) \sin\left(2\pi \frac{X_2 + L / 2}{L}\right)
\end{pmatrix}\\
\mathbf w (\mathbf \chi, t) &= \frac{\partial \mathbf x}{\partial t}
\end{align}
\mathbf w (\mathbf X, t) &= \frac{\partial \mathbf x}{\partial t}
```

where $\mathbf \chi = (\chi_1, \chi_2)$ are the ALE coordinates, $A_0=\pi / 6$ is the amplitude, and $T_G=20$ is the
period. Further parameters include the total simulation time $T$, and $L=1$ describing the height, width, and depth of
the box mesh. By default, the Reynolds number is set to Re = $1/\nu=1600$.
where $\mathbf X = (X_1, X_2, X_3)$ are the ALE coordinates, $A_0=\pi / 6$ is the amplitude, and $T_G=20$ is the period.
Further parameters include the total simulation time $T$, and $L=1$ describing the height, width, and depth of the box
mesh. By default, the Reynolds number is set to $\text{Re} = 1/\nu = 1600$.

## (HPC) Simulation in OasisMove

Expand Down Expand Up @@ -87,7 +83,7 @@ resolution parameters $N_x=32$, $N_y=32$, and $N_z=32$. In contrast to the 2D [m
the number of tetrahedral cells are now computed using the following formula:

```{math}
\text{Number of tetrahedral cells } = 6\times N_x \times N_y \times N_z,
\text{Number of tetrahedral cells } = 6\times N_x \times N_y \times N_z,
```

resulting in a total of 196 608 cells using the default parameters. To increase the mesh resolution, we can supply these
Expand All @@ -98,8 +94,6 @@ we can run the following command:
$ oasismove NSfracStepMove problem=MovingTaylorGreen3D Nx=50 Ny=50 Nz=50
```

## References

```{bibliography} references.bib
:filter: docname in docnames
```
17 changes: 5 additions & 12 deletions docs/movingvortex.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,20 @@ body forces, $\mathbf{f} = 0$, namely:

```{math}
:label: eq-vortex
\begin{align}
\mathbf u(\mathbf x,t) &= (-\sin (2\pi x_2), \sin(2\pi x_1))e^{-4\nu \pi^2 t}\\
p(\mathbf x,t) &= -\cos(2\pi x_1)\cos(2\pi x_2)e^{-8\nu \pi^2 t}
\end{align}
```

where $\mathbf x = (x_1, x_2)$ are the Euclidean coordinates, and $\nu = 0.025$ $\text{m}^2$/s. Furthermore, the mesh
velocity $\mathbf w$ is determined by the following displacement field:

```{math}
:label: eq-vortex-d
\begin{align}
\mathbf x(\mathbf \chi,t) &= \mathbf \chi + A_0 \sin \left(\frac{2 \pi t}{T_G}\right) \left(\sin\left(2\pi \frac{\chi_2 + L / 2}{L}\right),\sin\left(2\pi \frac{\chi_1 + L / 2}{L}\right)\right)\\
\mathbf w (\mathbf \chi, t) &= \frac{\partial \mathbf x}{\partial t}
\end{align}
\mathbf x(\mathbf X , t) &= \chi + A_0 \sin \left(\frac{2 \pi t}{T_G}\right) \left(\sin\left(2\pi \frac{\chi_2 + L / 2}{L}\right),\sin\left(2\pi \frac{\chi_1 + L / 2}{L}\right)\right)\\
\mathbf w(\mathbf X , t) &= \frac{\partial \mathbf x}{\partial t}
```

where $\mathbf \chi = (\chi_1, \chi_2)$ are the ALE coordinates, $A_0=0.08$ is the amplitude, $T_G=4T$ is the period
where $\mathbf X= (X_1, X_2)$ are the ALE coordinates, $A_0=0.08$ is the amplitude, $T_G=4T$ is the period
length of the mesh motion, $T$ is the length of one cycle, and $L=1$.

## Simulation in OasisMove
Expand Down Expand Up @@ -84,15 +80,12 @@ $ oasismove NSfracStepMove problem=MovingVortex T=1 dt=0.001
When adjusting spatial and temporal resolution is important to know relationship between the cell size and the time-step size, which are closely related through the Courant number ($C$) given by the Courant-Friedrichs-Lewy (CFL) condition:

$$
\begin{align}
C ={\frac {u\,\Delta t}{\Delta x}} < C_{\max },
\end{align}
$$
C ={\frac {u\,\Delta t}{\Delta x}} < C_{\max },
$$ (eq:cfl-vortex)
where $u$ is the velocity magnitude, $\Delta t$ is the time step size, and $\Delta x$ is the length interval. The general consensus is that $C_{\max} = 1$.

```

## References

```{bibliography} references.bib
:filter: docname in docnames
Expand Down
3 changes: 0 additions & 3 deletions docs/movingwall.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ which remains parallel to the x-axis, defined as:

```{math}
:label: eq-wall-height
\begin{equation}
h(t) = h_0 (1 + \epsilon e^{-i\omega t}),
\end{equation}
```

where $\omega$ is the pulsation of the movement, $h_0$ is the mean distance between the symmetry axis $(y = 0)$ and the
Expand Down Expand Up @@ -56,7 +54,6 @@ name: vel-wall
On top, the grid displacement, and on the bottom, the velocity field for the wall-driven channel flow, where the vector arrows have been scaled by the velocity magnitude.
```

## References

```{bibliography} references.bib
:filter: docname in docnames
Expand Down
9 changes: 3 additions & 6 deletions docs/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,12 @@ Ny = 50
By adjusting `Nx` and `Ny` we adjust the resolution of the computational domain, which for the `DrivenCavity` problem is
a 2D unit square mesh consisting of triangular elements. The parameters `Nx` and `Ny` determine the number of uniform
cell intervals in the $x$ and $y$ direction, respectively. These parameters can also be used to compute the totan number
of triangular cells (in 2D) or tetrehedral cells (in 3D) the computational domain consists of:
of triangular cells in 2D: or tetrehedral cells (in 3D) the computational domain consists of:

```{math}
\begin{align}
\text{Number of cells (2D) } &= 2 \times N_x \times N_y \\[0.5em]
\text{Number of cells (3D) } &= 6 \times N_x \times N_y \times N_z
\end{align}
\text{Number of cells (2D) } &= 2 \times N_x \times N_y \\
\text{Number of cells (3D) } &= 6 \times N_x \times N_y \times N_z
```

### `Fluid` parameters

Fluid parameters are related to the fluid properties. In regard to the `DrivenCavity`
Expand Down
2 changes: 1 addition & 1 deletion docs/restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ the `Checkpoint` folder:
$ oasismove NSfracStep solver=IPCS_ABCN problem=DrivenCavity restart_folder=results_driven_cavity/data/1/Checkpoint
```

The simulation should now restart at the latest checkpoint, and continue as normal until $T=10.
The simulation should now restart at the latest checkpoint, and continue as normal until $T=10$.

### Restarting a finished simulation

Expand Down
10 changes: 4 additions & 6 deletions docs/stenosis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ implementation of backflow stabilization is general, and works for both rigid an
name: stenosis-fig
---
A schematic of the two-dimensional stenosis model with a slight eccentricity of the stenosis, borrowed from
Varghese et al. {cite}`varghese2007direct`.
Varghese et al.
```

## Problem description
Expand Down Expand Up @@ -46,22 +46,22 @@ rather common in cardiovascular flows, particularly in blood flow in large vesse
left atrium. Because backflow is a naturally occurring physiologic phenomenon, careful treatment is necessary to
realistically model backflow without artificially altering the local flow dynamics. To achieve this we consider the
first backflow stabilization method first proposed by Bazilevs et al. {cite}`bazilevs2009patient` and rigorously tested
by Moghadam et al. {cite}`esmaily2011comparison`. In short, the method modifies the weak formulation of the
by Moghadam et al. In short, the method modifies the weak formulation of the
Navier-Stokes equations by adding a backflow stabilization term for the Neumann boundaries, in this case the outlet.
Specifically, the following convective traction term is added to the weak form on each Neumann boundary to be
stabilized:

```{math}
:label: eq-weak
-\beta \int_{\partial \Omega} (\mathbf u \cdot \mathbf n)\_\mathbf u \cdot \mathbf v \, \text{d}s,
-\beta \int_{\partial \Omega} (\mathbf u \cdot \mathbf n)\_\mathbf u \cdot \mathbf v \, \text{d}s,
```

where $\beta$ is a positive coefficient between 0.0 and 1.0, $\mathbf u$ is the velocity vector, $\mathbf v$ is the
velocity test function, $\partial \Omega$ denotes the boundary, and $(\mathbf u \cdot \mathbf n)\_$ is defined as:

```{math}
:label: eq-weak2
(\mathbf u \cdot \mathbf n)\_ \,=\, \frac{\mathbf u\cdot \mathbf n - \| \mathbf u \cdot \mathbf n\|} {2}.
(\mathbf u \cdot \mathbf n)\_ \,=\, \frac{\mathbf u\cdot \mathbf n - \| \mathbf u \cdot \mathbf n\|}{2}.
```

In OasisMove, the backflow stabilization method is applied by supplying the
Expand Down Expand Up @@ -120,8 +120,6 @@ The velocity field for the stenosis problem without (top) and with (bottom) back
arrows that have been scaled by the velocity magnitude.
```

## References

```{bibliography} references.bib
:filter: docname in docnames
```
Loading