Tutorials

Learn by reproducing a published result

Tutorials from a first model to bifurcations, chaos and a GPU run. Each one is a plain Python script, explained piece by piece, that ends on a result from the literature; what you see on the page is what the script printed. New to Conatus? Start with getting started in ten minutes, then tutorial 0, which takes one problem through the whole path.

  1. Getting started: convection between two plates

    The whole path once: a native model, explain(), stability, the onset by critical, a simulation, the heat flux, the Methods paragraph, the run registry.

    Checked against Reid & Harris (1958).

  2. A first eigenvalue problem: Orr–Sommerfeld

    A native model, conditions by wall name, eigenvalues with residuals, critical parameters, verify.

    Checked against Orszag (1971).

  3. 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.

    Checked against linear growth rate, CPU/GPU agreement.

  4. Symmetries and symmetry subspaces

    Linearizing a native model, symmetry subspaces: the same eigenvalue with half the unknowns.

    Checked against Reid & Harris (1958).

  5. Nonlinear boundary-value problems and continuation: Bratu

    A nonlinear boundary-value model, Newton on the exact Jacobian, pseudo-arclength continuation, folds.

    Checked against Bratu (1914), Gelfand (1963).

  6. Invariant solutions: Kuramoto–Sivashinsky, L = 22

    Equilibria, travelling waves and periodic orbits of a native model by Newton–Krylov–hookstep, Floquet exponents.

    Checked against Cvitanović et al. (2010), Ding & Cvitanović (2016).

  7. Polar geometry: a drum, a pipe, two rotating cylinders

    Polar and cylindrical geometry: a drum on cn.Disk, ready pipe and Taylor–Couette problems.

    Checked against Bessel zeros, Meseguer & Trefethen (2003), Recktenwald et al. (1993).

  8. Bifurcations: branch switching, cycles, codimension 2, normal forms

    Branch switching, cycles, codimension 2, normal forms, Landau and Ginzburg–Landau.

    Checked against Lorenz (1963), Kuznetsov (2004), Cross & Hohenberg (1993).

  9. Record, query, reproduce: the run registry

    The run registry on a native simulation: record, certify, query, compare, reproduce bit for bit, cache only on request.

    Checked against heat equation, closed form.

  10. Chaos and ensembles: Lyapunov spectrum, covariant vectors, Poincaré map, basins

    Lyapunov spectrum, covariant vectors, Kaplan–Yorke, Poincaré map, basins from one ensemble.

    Checked against Sprott (Lorenz), exact divergence.

  11. 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.

    Checked against Chomaz (2005) closed forms, Towne et al. (2018).

  12. Coming from Dedalus

    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.

    Checked against Dedalus itself (same method, rounding; check script, needs Dedalus).

  13. Covariant Lyapunov vectors of Kuramoto–Sivashinsky: tangencies and the physical modes

    Sim.lyapunov with covariant vectors: exponents with errors, covariance residual, tangencies, domination and the physical modes.

    Checked against Cvitanović et al. (2010), Ding et al. (2016).

  14. Lagrangian tracers and a numerical dye

    Sim.particles and m.dye: exact velocity at the tracers, observed order in time, a dye whose mass is measured.

    Checked against Taylor–Green and Couette closed forms.

Run them yourself

Once Conatus is installed with the tutorials extra (pip install "conatus[tutorials]": matplotlib for the figures, xarray for tutorial 16), each tutorial is a script you run with Python, on your laptop or on a cluster; tutorial 2b needs a CUDA device and the check script of tutorial 14 needs Dedalus. The same list, with when each script last ran, is the tutorials index of the documentation.