Skip to content

Commit

Permalink
Minor example doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Jul 31, 2022
1 parent 7933b46 commit 32ee038
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 7 deletions.
3 changes: 3 additions & 0 deletions examples/evp_1d_mathieu/mathieu_evp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
We use a Fourier basis to solve the EVP:
dx(dx(y)) + (a - 2*q*cos(2*x))*y = 0
where 'a' is the eigenvalue. Periodicity is enforced by using the Fourier basis.
To run and plot:
$ python3 mathieu_evp.py
"""

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion examples/evp_1d_rayleigh_benard/rayleigh_benard_evp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Dedalus script for calculating the maximum linear growth rates in no-slip
Rayleigh-Benard convection over a range of horizontal wavenumbers. This script
demonstrates solving a 1D eigenvalue problem in a cartesian domain. It can
demonstrates solving a 1D eigenvalue problem in a Cartesian domain. It can
be ran serially or in parallel, and produces a plot of the highest growth rate
found for each horizontal wavenumber. It should take a few seconds to run.
Expand Down
7 changes: 5 additions & 2 deletions examples/evp_1d_waves_on_a_string/waves_on_a_string.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Dedalus script computing the eigenmodes of waves on a clamped string.
This script demonstrates solving a 1D eigenvalue problem and produces
a plot of the relative error of the eigenvalues. It should take just
a few seconds to run (serial only).
plots of the first few eigenmodes and the relative error of the eigenvalues.
It should take just a few seconds to run (serial only).
We use a Legendre basis to solve the EVP:
s*u + dx(dx(u)) = 0
Expand All @@ -14,6 +14,9 @@
Here we choose to use a first-order formulation, putting one tau term
on an auxiliary first-order variable and another in the PDE, and lifting
both to the first derivative basis.
To run and plot:
$ python3 waves_on_a_string.py
"""

import numpy as np
Expand Down
3 changes: 3 additions & 0 deletions examples/evp_shell_rotating_convection/rotating_convection.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
if the resolution is increased. For the given resolutions, the eigenvalues agree
with Table 1 of [1] to several digits of precision.
To run and print the calculated eigenvalues:
$ python3 rotating_convection.py
References:
[1]: P. Marti, M. A. Calkins, K. Julien, "A computationally
efficient spectral method for modeling coredynamics,"
Expand Down
3 changes: 3 additions & 0 deletions examples/ivp_1d_kdv_burgers/kdv_burgers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
We use a Fourier basis to solve the IVP:
dt(u) + u*dx(u) = a*dx(dx(u)) + b*dx(dx(dx(u)))
To run and plot:
$ python3 kdv_burgers.py
"""

import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions examples/ivp_2d_rayleigh_benard/rayleigh_benard.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
Dedalus script simulating 2D horizontally-periodic Rayleigh-Benard convection.
This script demonstrates solving a 2D cartesian initial value problem. It can
This script demonstrates solving a 2D Cartesian initial value problem. It can
be ran serially or in parallel, and uses the built-in analysis framework to save
data snapshots to HDF5 files. The `plot_snapshots.py` script can be used to
produce plots from the saved data. It should take about a cpu-minute to run.
produce plots from the saved data. It should take a few cpu-minutes to run.
The problem is non-dimensionalized using the box height and freefall time, so
the resulting thermal diffusivity and viscosity are related to the Prandtl
Expand Down
3 changes: 3 additions & 0 deletions examples/lbvp_2d_poisson/poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
For a scalar Laplacian on a finite interval, we need two tau terms. Here we
choose to lift them to the natural output (second derivative) basis.
To run and plot:
$ python3 poisson.py
"""

import numpy as np
Expand Down
7 changes: 5 additions & 2 deletions examples/nlbvp_ball_lane_emden/lane_emden.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Dedalus script solving the Lane-Emden equation. This script demonstrates
solving a spherically symmetric nonlinear boundary value problem inside the
ball. It should be ran serially, should converge within roughly a dozen
iterations, and should take just a few seconds to run.
ball. It should converge within roughly a dozen Newton iterations, and produces a
plot of the solution. I should take just a few seconds to run (serial only).
In astrophysics, the Lane-Emden equation is a dimensionless form of Poisson's
equation for the gravitational potential of a Newtonian self-gravitating,
Expand Down Expand Up @@ -30,6 +30,9 @@
For a scalar Laplacian in the ball, we need a single tau term. Here we choose
to lift it to the original (k=0) basis.
To run and plot:
$ python3 lane_emden.py
References:
[1]: http://en.wikipedia.org/wiki/Lane–Emden_equation
[2]: J. P. Boyd, "Chebyshev spectral methods and the Lane-Emden problem,"
Expand Down

0 comments on commit 32ee038

Please sign in to comment.