Introduction
Dedalus comes with a comprehensive set of example scripts that demonstrate how to solve PDEs across various geometries and problem types. These examples range from simple 1D problems to complex 3D simulations on spherical domains, covering initial value problems (IVPs), eigenvalue problems (EVPs), linear boundary value problems (LBVPs), and nonlinear boundary value problems (NLBVPs). All examples are located in theexamples/ directory of the source distribution and are fully documented with clear explanations of the physics, numerics, and expected results.
Running Examples
Most examples can be run directly with Python:plot_snapshots.py) to visualize the saved data:
Example Categories
By Geometry
Cartesian
Rectangular domains with Fourier and Chebyshev bases
Disk & Annulus
Polar coordinate problems in disks and annular regions
Sphere, Shell & Ball
Spherical coordinate problems in full spheres, shells, and balls
Eigenvalue Problems
Linear stability analysis and spectral problems
By Problem Type
- Initial Value Problems (IVP): Time-evolving simulations starting from initial conditions
- Eigenvalue Problems (EVP): Linear stability analysis and mode computation
- Linear Boundary Value Problems (LBVP): Steady-state linear problems
- Nonlinear Boundary Value Problems (NLBVP): Steady-state nonlinear problems solved via Newton iteration
Featured Examples
Rayleigh-Bénard Convection
Classic thermal convection between heated plates
KdV-Burgers Equation
Nonlinear wave equation with dispersion and dissipation
Disk Libration
Librational instability in a rotating disk
Shallow Water on Sphere
Barotropic instability of a mid-latitude jet
Spherical Shell Convection
Boussinesq convection in a spherical shell
Lane-Emden Equation
Astrophysical polytropic structure via nonlinear BVP
Getting Started
If you’re new to Dedalus, we recommend starting with:- 1D KdV-Burgers equation - Simple 1D Fourier basis problem with visualization
- 2D Rayleigh-Bénard convection - Classic fluid dynamics problem in Cartesian geometry
- Waves on a string - Simple eigenvalue problem with analytical solution
Computational Requirements
Examples are designed to run quickly for testing and learning:- 1D examples: Seconds (serial only)
- 2D examples: 5-20 cpu-minutes (parallelizable)
- 3D examples: 10-30 cpu-minutes (parallelizable)