Skip to content

Commit 2bc8f0b

Browse files
authored
add some ppm docs (#34)
1 parent 1cce7df commit 2bc8f0b

6 files changed

Lines changed: 89 additions & 25 deletions

File tree

File renamed without changes.

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sphinx:
4141
add_module_names: False
4242
html_show_copyright: False
4343
nb_execution_timeout: 300
44-
44+
suppress_warnings: "etoc.toctree"
4545
launch_buttons:
4646
binderhub_url: "https://mybinder.org"
4747
colab_url: "https://colab.research.google.com"

docs/_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ parts:
1111
chapters:
1212
- file: euler-eqs.md
1313
- file: euler-riemann.ipynb
14+
- file: ppm.md
1415
- file: euler.ipynb
1516
- file: convergence.ipynb
1617
- file: hse-reconstruction.ipynb

docs/euler-eqs.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,3 @@ were linear, we'd be done -- each characteristic variable would advect
170170
at its given wave speed without interacting with one-another.
171171

172172

173-
## PPM reconstruction
174-
175-
The PPM interface construction is more involved because there are 3 characteristic waves.
176-
We integrate under the parabola for the distance each of these waves moves over a timestep
177-
and then add up the jumps carried by each wave if it is moving toward the interface.
178-
179-
Additionally, we use a reference state, $\tilde{{\bf q}}$, (the integral
180-
under the fastest wave moving toward the interface) to make the
181-
characteristic decomposition operate on smaller jumps. This gives a
182-
state:
183-
184-
$${\bf q}_{i+1/2,L}^{n+1/2} = \tilde{{\bf q}}_+ -
185-
\sum_{\nu;\lambda^{(\nu)}\ge 0} {\bf l}_i^{(\nu)} \cdot \left (
186-
\tilde{{\bf q}}_+ - \mathcal{I}_+^{(\nu)}({\bf q}_i)
187-
\right ) {\bf r}_i^{(\nu)}$$
188-
189-
and a similar expression for the right state.

docs/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/ppm.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# The Piecewise Parabolic Method for Hydrodynamics
2+
3+
4+
The PPM interface construction is more involved for hydrodynamics than advection
5+
because there are 3 characteristic waves. The basic overview of the method is:
6+
7+
* Convert the conserved state, ${\bf U}$ to primitive variables, ${\bf q}$
8+
9+
* Reconstruct each of the primitive variables as a parabola.
10+
11+
We first find the values of the parabola on the left and right edges of the zone,
12+
${\bf q}_{-,i}$ and ${\bf q}_{+,i}$. This is done by defining a conservative
13+
cubic interpolant that passes through the 2 zones on each side of the interface.
14+
The unlimited version of this would be:
15+
16+
$${\bf q}_{i+1/2} = \frac{7}{12} ({\bf q}_i + {\bf q}_{i+1}) - \frac{1}{12} ({\bf q}_{i-1} + {\bf q}_{i+2})$$
17+
18+
we then use this value to set:
19+
20+
$${\bf q}_{+,i} = {\bf q}_{-,i+1} = {\bf q}_{i+1/2}$$
21+
22+
Working zone-by-zone, the values ${\bf q}_{-,i}$ and ${\bf q}_{+,i}$
23+
are then limited, and we define the parabolic reconstruction in zone
24+
$i$ as:
25+
26+
$${\bf q}_i(x) = {\bf q}_{-,i} + \xi (\Delta {\bf q}_i + {\bf q}_{6,i} (1 - \xi))$$
27+
28+
where
29+
30+
$$\Delta {\bf q}_i = {\bf q}_{+,i} - {\bf q}_{-,i}$$
31+
32+
$${\bf q}_{6,i} = 6 \left({\bf q}_i - \frac{1}{2} ({\bf q}_{-,i} + {\bf q}_{+,i})\right )$$
33+
34+
and
35+
36+
$$\xi = \frac{x - x_{i-1/2}}{\Delta x}$$
37+
38+
* Integrate under the parabola for the distance $\lambda^{(\nu)}_i \Delta t$ for each of the
39+
characteristic waves $\nu$: $u-c$, $u$, and $u+c$. We define the dimensionless wave speed, $\sigma_i^{(\nu)}$:
40+
41+
$$\sigma_i^{(\nu)} = \frac{\lambda^{(\nu)} \Delta t}{\Delta x}$$
42+
43+
From the right edge, we have:
44+
45+
\begin{align*}
46+
\mathcal{I}_+^{(\nu)}({\bf q}_i) &=
47+
\frac{1}{\sigma_i^{(\nu)}} \Delta x \int_{x_{i+1/2} - \sigma_i^{(\nu)}\Delta x}^{x_{i+1/2}} {\bf q}(x) \, dx \\
48+
&= {\bf q}_{+,i} - \frac{\sigma_i^{(\nu)}}{2} \left [ \Delta {\bf q}_i - {\bf q}_{6,i} \left (1 - \frac{2}{3} \sigma_i^{(\nu)}\right )\right ]
49+
\end{align*}
50+
51+
and from the left edge, we have:
52+
53+
\begin{align*}
54+
\mathcal{I}_-^{(\nu)}({\bf q}_i) &=
55+
\frac{1}{\sigma_i^{(\nu)}} \Delta x \int_{x_{i-1/2}}^{x_{i-1/2} + \sigma_i^{(\nu)}\Delta x} {\bf q}(x) \, dx \\
56+
&= {\bf q}_{-,i} + \frac{\sigma_i^{(\nu)}}{2} \left [ \Delta {\bf q}_i + {\bf q}_{6,i} \left (1 - \frac{2}{3} \sigma_i^{(\nu)}\right )\right ]
57+
\end{align*}
58+
59+
* Define a reference state. We are going to project the amount of
60+
${\bf q}$ carried by each wave into the characteristic variables and
61+
then sum up all of the jumps that move toward each interface. To
62+
minimize the effects of this characteristic projection, we will
63+
subtract off a reference state, $\tilde{\bf q}$:
64+
65+
$$\tilde{\bf q}_{+,i} = \mathcal{I}_+^{(+)}({\bf q}_i)$$
66+
67+
$$\tilde{\bf q}_{-,i} = \mathcal{I}_-^{(-)}({\bf q}_i)$$
68+
69+
In each case, we are picking the fastest wave moving toward the interface.
70+
71+
* Define the left and right states on the interfaces seen by zones $i$ by
72+
adding up all of the jumps that reach that interface:
73+
74+
$${\bf q}_{i+1/2,L}^{n+1/2} = \tilde{{\bf q}}_+ -
75+
\sum_{\nu;\lambda^{(\nu)}\ge 0} {\bf l}_i^{(\nu)} \cdot \left (
76+
\tilde{{\bf q}}_+ - \mathcal{I}_+^{(\nu)}({\bf q}_i)
77+
\right ) {\bf r}_i^{(\nu)}$$
78+
79+
$${\bf q}_{i-1/2,R}^{n+1/2} = \tilde{{\bf q}}_- -
80+
\sum_{\nu;\lambda^{(\nu)}\le 0} {\bf l}_i^{(\nu)} \cdot \left (
81+
\tilde{{\bf q}}_+ - \mathcal{I}_-^{(\nu)}({\bf q}_i)
82+
\right ) {\bf r}_i^{(\nu)}$$
83+
84+
Notice that zone $i$ gives the left state on interface $i+1/2$ and the
85+
right state on zone $i-1/2$.
86+
87+
We then solve the Riemann problem using these state.

0 commit comments

Comments
 (0)