Skip to content

Commit

Permalink
🎨 Update theme to article-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Aug 16, 2023
1 parent 7311694 commit 8fdf68f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file was created automatically with `myst init --gh-pages` 🪄 💚

name: MyST GitHub Pages Deploy
on:
push:
Expand Down
Binary file added images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 22 additions & 7 deletions myst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,30 @@ project:
orcid: 0000-0002-7859-8394
corresponding: true
email: [email protected]
affiliations:
- University of British Columbia
twitter: rowancockett
github: rowanc1
affiliation: ubc
roles: writing
url: https://row1.ca
- name: Lindsey Heagy
orcid: 0000-0002-1551-5926
affiliations:
- University of British Columbia
affiliation: ubc
- name: Douglas Oldenburg
orcid: 0000-0002-4327-2124
affiliations:
- University of British Columbia
thebe:
affiliation: ubc
affiliations:
- id: ubc
institution: University of British Columbia
ror: https://ror.org/03rmrcq20
isni: 0000 0001 2288 9830
department: Department of Earth, Ocean and Atmospheric Sciences
address: 2020 – 2207 Main Mall
city: Vancouver
region: British Columbia
country: Canada
postal_code: V6T 1Z4
phone: 1 (604) 822-2449
jupyter:
binder:
url: https://xhrtcvh6l53u.curvenote.dev/services/binder/
repo: curvenote/tle-finitevolume
Expand All @@ -50,8 +63,10 @@ project:
- requirements.txt
resources:
- all-together-now.ipynb
banner: ./images/banner.png
site:
title: 'Pixels and Their Neighbours: Finite Volume'
template: article-theme
actions:
- title: Download PDF
url: ./cockett-heagy-oldenburg-2016.pdf
Expand Down
2 changes: 1 addition & 1 deletion paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ $$\text{v} \mathbf{D}\mathbf{j} = q$$ (eq:div)

## (2) Scalar equations only, please

Equation [](#eq:div) is a vector equation, so really it is two or three equations involving multiple components of $\vec{j}$. We want to work with a single scalar equation, allow for anisotropic physical properties, and potentially work with non-axis-aligned meshes - how do we do this?! We can use the **weak formulation** where we take the inner product ($\int \vec{a} \cdot \vec{b} dv$) of the equation with a generic face function, $\vec{f}$. This reduces requirements of differentiability on the original equation and also allows us to consider tensor anisotropy or curvilinear meshes .
Equation [](#eq:div) is a vector equation, so really it is two or three equations involving multiple components of $\vec{j}$. We want to work with a single scalar equation, allow for anisotropic physical properties, and potentially work with non-axis-aligned meshes - how do we do this?! We can use the **weak formulation** where we take the inner product ($\int \vec{a} \cdot \vec{b} dv$) of the equation with a generic face function, $\vec{f}$. This reduces requirements of differentiability on the original equation and also allows us to consider tensor anisotropy or curvilinear meshes.

In [](#fig-weak-formulation), we visually walk through the discretization of equation (b). On the left hand side, a dot product requires a _single_ cartesian vector, $\mathbf{j_x, j_y}$. However, we have a $j$ defined on each face (2 $j_x$ and 2 $j_y$ in 2D!). There are many different ways to evaluate this inner product: we could approximate the integral using trapezoidal, midpoint or higher order approximations. A simple method is to break the integral into four sections (or 8 in 3D) and apply the midpoint rule for each section using the closest $\mathbf{j}$ components to compose a cartesian vector. A $\mathbf{P}_i$ matrix (size $2 \times 4$) is used to pick out the appropriate faces and compose the corresponding vector (these matrices are shown with colors corresponding to the appropriate face in the figure). On the right hand side, we use a vector identity to integrate by parts. The second term will cancel over the entire mesh (as the normals of adjacent cell faces point in opposite directions) and $\phi$ on mesh boundary faces are zero by the Dirichlet boundary condition. This leaves us with the divergence, which we already know how to do!

Expand Down

0 comments on commit 8fdf68f

Please sign in to comment.