Getting started¶
Build and verify stochastic PDE simulations with JAX. exponax-spde adds Gaussian forcing to exponax spectral steppers and supplies keyed rollouts, coupled paths and diagnostics for periodic and bounded domains.
Install¶
The development branch supports Python 3.12–3.14.
pip install exponax-spde
Quickstart¶
import jax
import jax.numpy as jnp
import exponax_spde as spde
step = spde.StochasticDiffusion(1, 1.0, 64, 0.01, sigma=0.1)
initial = jnp.zeros((1, 64))
run = jax.jit(spde.stochastic_rollout(step, 100, include_init=True))
trajectory = run(initial, jax.random.key(0))
The quickstart notebook adds ensembles, spectra and coupled increments.
Explore the examples¶
-
512 × 512 paper grid, h = 5 × 10⁻⁷ (
PAPER_STEP=True), σ = 0.05. -
Modes (10, 10), (15, 15) and (18, 17) on the paper grid, h = 2 × 10⁻⁶, σ = 5.
-
64 × 64 grid, forcing shells 7–9, h = 0.005, T = 20. The spectrum averages eight terminal fields.
Choose a model¶
| Family | Models | Domains | Noise |
|---|---|---|---|
| Linear | Diffusion, advection–diffusion | Periodic, reflected or bounded | Additive |
| Nonlinear | Burgers, KS, vorticity | Periodic or reflected | Additive |
| Reaction | Allen–Cahn, Cahn–Hilliard, Swift–Hohenberg | Periodic, reflected or bounded | Additive, plus periodic multiplicative Allen–Cahn |
See the capabilities for model-specific limits and the validation summary for independently checked laws.
Cite
Cite exponax-spde using the Zenodo concept DOI or export a citation from CITATION.cff.


