Skip to content

Commit

Permalink
add docstrings to the incompressible problems (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Sep 15, 2024
1 parent b23588d commit 1520ff0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion pyro/incompressible/problems/converge.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
p(x,y,t) = -\cos(4 \pi (x - t)) - \cos(4 \pi (y - t))
The numerical solution can be compared to the exact solution to
measure the convergence rate of the algorithm.
measure the convergence rate of the algorithm. These initial
conditions come from Minion 1996.
"""

Expand Down
13 changes: 8 additions & 5 deletions pyro/incompressible/problems/shear.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
Initialize the doubly periodic shear layer (see, for example, Martin
and Colella, 2000, JCP, 163, 271). This is run in a unit square
domain, with periodic boundary conditions on all sides. Here, the
initial velocity is::
initial velocity is:
/ tanh(rho_s (y-0.25)) if y <= 0.5
u(x,y,t=0) = <
\ tanh(rho_s (0.75-y)) if y > 0.5
.. math::
v(x,y,t=0) = delta_s sin(2 pi x)
u(x,y,t=0) = \begin{cases}
\tanh(\rho_s (y - 1/4)) & \mbox{if}~ y \le 1/2 \\
\tanh(\rho_s (3/4 - y)) & \mbox{if}~ y > 1/2
\end{cases}
.. math::
v(x,y,t=0) = \delta_s \sin(2 \pi x)
"""


Expand Down
13 changes: 8 additions & 5 deletions pyro/incompressible_viscous/problems/shear.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
Initialize the doubly periodic shear layer (see, for example, Martin
and Colella, 2000, JCP, 163, 271). This is run in a unit square
domain, with periodic boundary conditions on all sides. Here, the
initial velocity is::
initial velocity is:
/ tanh(rho_s (y-0.25)) if y <= 0.5
u(x,y,t=0) = <
\ tanh(rho_s (0.75-y)) if y > 0.5
.. math::
v(x,y,t=0) = delta_s sin(2 pi x)
u(x,y,t=0) = \begin{cases}
\tanh(\rho_s (y - 1/4)) & \mbox{if}~ y \le 1/2 \\
\tanh(\rho_s (3/4 - y)) & \mbox{if}~ y > 1/2
\end{cases}
.. math::
v(x,y,t=0) = \delta_s \sin(2 \pi x)
"""


Expand Down

0 comments on commit 1520ff0

Please sign in to comment.