Skip to content

Commit 1520ff0

Browse files
authored
add docstrings to the incompressible problems (#279)
1 parent b23588d commit 1520ff0

3 files changed

Lines changed: 18 additions & 11 deletions

File tree

pyro/incompressible/problems/converge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
p(x,y,t) = -\cos(4 \pi (x - t)) - \cos(4 \pi (y - t))
2020
2121
The numerical solution can be compared to the exact solution to
22-
measure the convergence rate of the algorithm.
22+
measure the convergence rate of the algorithm. These initial
23+
conditions come from Minion 1996.
2324
2425
"""
2526

pyro/incompressible/problems/shear.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
Initialize the doubly periodic shear layer (see, for example, Martin
33
and Colella, 2000, JCP, 163, 271). This is run in a unit square
44
domain, with periodic boundary conditions on all sides. Here, the
5-
initial velocity is::
5+
initial velocity is:
66
7-
/ tanh(rho_s (y-0.25)) if y <= 0.5
8-
u(x,y,t=0) = <
9-
\ tanh(rho_s (0.75-y)) if y > 0.5
7+
.. math::
108
11-
v(x,y,t=0) = delta_s sin(2 pi x)
9+
u(x,y,t=0) = \begin{cases}
10+
\tanh(\rho_s (y - 1/4)) & \mbox{if}~ y \le 1/2 \\
11+
\tanh(\rho_s (3/4 - y)) & \mbox{if}~ y > 1/2
12+
\end{cases}
1213
14+
.. math::
1315
16+
v(x,y,t=0) = \delta_s \sin(2 \pi x)
1417
"""
1518

1619

pyro/incompressible_viscous/problems/shear.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
Initialize the doubly periodic shear layer (see, for example, Martin
33
and Colella, 2000, JCP, 163, 271). This is run in a unit square
44
domain, with periodic boundary conditions on all sides. Here, the
5-
initial velocity is::
5+
initial velocity is:
66
7-
/ tanh(rho_s (y-0.25)) if y <= 0.5
8-
u(x,y,t=0) = <
9-
\ tanh(rho_s (0.75-y)) if y > 0.5
7+
.. math::
108
11-
v(x,y,t=0) = delta_s sin(2 pi x)
9+
u(x,y,t=0) = \begin{cases}
10+
\tanh(\rho_s (y - 1/4)) & \mbox{if}~ y \le 1/2 \\
11+
\tanh(\rho_s (3/4 - y)) & \mbox{if}~ y > 1/2
12+
\end{cases}
1213
14+
.. math::
1315
16+
v(x,y,t=0) = \delta_s \sin(2 \pi x)
1417
"""
1518

1619

0 commit comments

Comments
 (0)