Skip to content

Getting started

exponax-spde logo

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

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.