Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DedalusProject/dedalus/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Eigenvalue problems (EVPs) in Dedalus are used to compute linear stability characteristics and eigenmodes of fluid systems. These examples demonstrate:- Setting up eigenvalue problems with the
d3.EVPclass - Using sparse and dense eigensolvers
- Computing growth rates and critical parameters
- Comparing numerical results with analytical solutions
Rayleigh-Bénard Stability Analysis
File:examples/evp_1d_rayleigh_benard/rayleigh_benard_evp.py
Description
Computes the maximum linear growth rates for Rayleigh-Bénard convection over a range of horizontal wavenumbers. This classic stability problem determines the onset of convection and the preferred wavelength of convection rolls.Problem Setup
The eigenvalue problem for linear perturbations around the conductive state:Key Technique: Parametrized Wavenumber
To scan over horizontal wavenumbers, we use a Fourier basis with 2 modes and set the domain size to match the desired fundamental wavenumber:Complete Example
Running the Example
Expected Results
- Runtime: A few seconds
- Output: Plot of growth rates vs wavenumber
- Physics: Near Ra = 1708, the critical Rayleigh number, growth rates transition from negative (stable) to positive (unstable)
Waves on a String
File:examples/evp_1d_waves_on_a_string/waves_on_a_string.py
Description
Computes eigenmodes of waves on a clamped string. This simple problem has analytical solutions, making it perfect for validating the eigenvalue solver.Mathematical Problem
s_n = -(nπ/L)² for n = 1, 2, 3, …
Complete Code
Running the Example
Expected Results
- Runtime: A few seconds (serial only)
- Output:
eigenvalue_error.png: Shows spectral accuracy (machine precision for low modes)eigenvectors.png: First five eigenmodes (sine waves)
- Validation: Eigenvalues match analytical solution to machine precision
Tips for Eigenvalue Problems
Sparse vs Dense Solvers
Choosing a Target
target=0: Find least stable/most unstable modestarget=1j*ω: Find modes near frequency ω- Adjust NEV to capture enough modes