Tutorials¶
Tutorial 0 (getting started) walks the whole path once; the shorter ones after it go deeper, from a first eigenvalue problem to a GPU run, keeping a registry of runs, importing a Dedalus script, covariant Lyapunov vectors and Lagrangian tracers. Each one is a
plain Python script, shown piece by piece on its page, that ends by checking its result against
a published value or a closed form (an assert, with the reference in a comment). The output
printed on each page is the output of that script, executed as it is shown; the table below says
when it last ran and whether it passed.
Prerequisites: Installation with the tutorials extra (pip install "conatus[tutorials]": matplotlib for
the figures, xarray for tutorial 16), and some familiarity with spectral methods. Run a tutorial with
python docs/site/tutorials/code/<script>.py from a copy of the repository. Tutorial 2b needs a
GPU; the check script of tutorial 14 (14b) needs Dedalus.
# |
Tutorial |
You will learn |
Reference value |
|---|---|---|---|
— |
ten minutes: one equation written as on paper, a simulation, a plot, one physical number, four guided changes |
Cole (1951), Hopf (1950) |
|
0 |
the whole path once: a native model, |
Reid & Harris (1958) |
|
1 |
a native model, conditions by wall name, eigenvalues with residuals, critical parameters, |
Orszag (1971) |
|
2 |
2. A first initial-value problem: Rayleigh–Bénard 2D, CPU then GPU |
a simulation on CPU, then on GPU; time steppers, CFL, the Methods paragraph |
linear growth rate, CPU/GPU agreement |
3 |
linearizing a native model, symmetry subspaces: the same eigenvalue with half the unknowns |
Reid & Harris (1958) |
|
4 |
4. Nonlinear boundary-value problems and continuation: Bratu |
a nonlinear boundary-value model, Newton on the exact Jacobian, pseudo-arclength continuation, folds |
Bratu (1914), Gelfand (1963) |
5 |
equilibria, travelling waves and periodic orbits of a native model by Newton–Krylov–hookstep, Floquet exponents |
Cvitanović et al. (2010), Ding & Cvitanović (2016) |
|
8 |
polar and cylindrical geometry: a drum on |
Bessel zeros, Meseguer & Trefethen (2003), Recktenwald et al. (1993) |
|
10 |
10. Bifurcations: branch switching, cycles, codimension 2, normal forms |
branch switching, cycles, codimension 2, normal forms, Landau and Ginzburg–Landau |
Lorenz (1963), Kuznetsov (2004), Cross & Hohenberg (1993) |
11 |
the run registry on a native simulation: record, certify, query, compare, reproduce bit for bit, cache only on request |
heat equation, closed form |
|
12 |
12. Chaos and ensembles: Lyapunov spectrum, covariant vectors, Poincaré map, basins |
Lyapunov spectrum, covariant vectors, Kaplan–Yorke, Poincaré map, basins from one ensemble |
Sprott (Lorenz), exact divergence |
13 |
13. Where a global mode is born, and what the data say about it |
direct and adjoint global modes, wavemaker, base-flow sensitivity; DMD in the exact norm |
Chomaz (2005) closed forms, Towne et al. (2018) |
14 |
a convection cell as a native model, then read from a Dedalus script: line-by-line report, run, native vs translated; optional check against Dedalus |
Dedalus itself (same method, rounding; check script, needs Dedalus) |
|
15 |
15. Covariant Lyapunov vectors of Kuramoto–Sivashinsky: tangencies and the physical modes |
|
Cvitanović et al. (2010), Ding et al. (2016) |
16 |
|
Taylor–Green and Couette closed forms |
Execution status¶
Script |
Last execution |
Time |
Run |
|---|---|---|---|
|
{.cn-pass} |
30.5 s |
|
|
{.cn-pass} |
138.6 s |
|
|
{.cn-pass} |
29.6 s |
|
|
{.cn-pass} |
32.2 s |
|
|
{.cn-pass} |
14.5 s |
|
|
{.cn-pass} |
3.5 s |
|
|
{.cn-pass} |
8.9 s |
|
|
{.cn-pass} |
68.7 s |
|
|
{.cn-pass} |
33.7 s |
|
|
{.cn-pass} |
28.7 s |
|
|
{.cn-pass} |
26.6 s |
|
|
{.cn-pass} |
165.3 s |
|
|
{.cn-pass} |
24.9 s |
|
|
{.cn-pass} |
10.8 s |
|
|
{.cn-pass} |
21.8 s |
|
|
{.cn-pass} |
52.4 s |
|
|
{.cn-pass} |
47.1 s |
|
Scripts are executed by docs/site/run_tutorials.py, on a CPU and, for the GPU parts, on a GPU;
only passing outputs are copied into the pages.