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

Adds some general info in docs + minor enhancements #37

Merged
merged 1 commit into from
Jan 8, 2021
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
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ makedocs(
)

withenv("GITHUB_REPOSITORY" => "FourierFlows/PassiveTracerFlowsDocumentation") do
deploydocs( repo = "github.com/FourierFlows/PassiveTracerFlowsDocumentation.git",
deploydocs( repo = "github.com/FourierFlows/PassiveTracerFlowsDocumentation.git",
versions = ["stable" => "v^", "v#.#", "dev" => "dev"],
push_preview = true
push_preview = false
)
end
12 changes: 12 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@

## Overview

`PassiveTracerFlows.jl` is a collection of modules which leverage the
[FourierFlows.jl](https://github.com/FourierFlows/FourierFlows.jl) framework to solve for
advection-diffusion problems on periodic domains.

!!! info "Unicode"
Oftentimes unicode symbols are used in modules for certain variables or parameters. For
example, `κ` is commonly used to denote the diffusivity, or `∂` is used
to denote partial differentiation. Unicode symbols can be entered in the Julia REPL by
typing, e.g., `\kappa` or `\partial` followed by the `tab` key.

Read more about Unicode symbols in the
[Julia Documentation](https://docs.julialang.org/en/v1/manual/unicode-input/).


## Developers
Expand Down
17 changes: 10 additions & 7 deletions docs/src/modules/traceradvectiondiffusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@

### Basic Equations

This module solves the advection diffusion equation for a passive tracer
concentration ``c(x, y, t)`` in two-dimensions:
This module solves the advection diffusion equation for a passive tracer concentration
``c(x, y, t)`` in two-dimensions by an advecting flow ``\bm{u}(x, y, t)``:

```math
\partial_t c + \boldsymbol{u} \boldsymbol{\cdot} \boldsymbol{\nabla} c = \underbrace{\eta \partial_x^2 c + \kappa \partial_y^2 c}_{\textrm{diffusivity}} + \underbrace{\kappa_h (-1)^{n_{h}} \nabla^{2n_{h}}c}_{\textrm{hyper-diffusivity}}\ ,
\partial_t c + \bm{u} \bm{\cdot} \bm{\nabla} c = \underbrace{\eta \partial_x^2 c + \kappa \partial_y^2 c}_{\textrm{diffusivity}} + \underbrace{\kappa_h (-1)^{n_{h}} \nabla^{2n_{h}}c}_{\textrm{hyper-diffusivity}}\ ,
```

where ``\boldsymbol{u} = (u,v)`` is the two-dimensional advecting flow, ``\eta`` the ``x``-diffusivity and ``\kappa`` is the ``y``-diffusivity. If ``\eta`` is not defined then the code uses isotropic diffusivity, i.e., ``\eta \partial_x^2 c + \kappa \partial_y^2 c\mapsto\kappa\nabla^2``. The advecting flow could be either compressible or incompressible.
where ``\bm{u} = (u, v)`` is the two-dimensional advecting flow, ``\eta`` the ``x``-diffusivity and ``\kappa`` is the ``y``-diffusivity. If ``\eta`` is not defined then the code uses isotropic diffusivity, i.e., ``\eta \partial_x^2 c + \kappa \partial_y^2 c \mapsto \kappa \nabla^2``. The advecting flow could be either compressible or incompressible.


### Implementation

The equation is time-stepped forward in Fourier space:

```math
\partial_t \widehat{c} = - \widehat{\boldsymbol{u} \boldsymbol{\cdot} \boldsymbol{\nabla} c} - \left[ (\eta k_x^2 + \kappa k_y^2) +\kappa_h k^{2\nu_h} \right]\widehat{c}\ .
\partial_t \widehat{c} = - \widehat{\bm{u} \bm{\cdot} \bm{\nabla} c} - \left[ (\eta k_x^2 + \kappa k_y^2) + \kappa_h |\bm{k}|^{2\nu_h} \right] \widehat{c}\ ,
```
where ``\bm{k} = (k_x, k_y)``.

Thus:

```math
\mathcal{L} = -\eta k_x^2 - \kappa k_y^2 - \kappa_h k^{2\nu_h}\ , \\
\mathcal{N}(\widehat{c}) = - \mathrm{FFT}(u \partial_x c + \upsilon \partial_y c)\ .
\begin{aligned}
L & = -\eta k_x^2 - \kappa k_y^2 - \kappa_h |\bm{k}|^{2\nu_h} , \\
N(\widehat{c}) &= - \mathrm{FFT}(u \partial_x c + v \partial_y c) .
\end{aligned}
```