Skip to content

Linear steppers

The deterministic coefficients below follow the exponax conventions. Noise strengths and spectra are set separately.

Diffusion

Exact heat drift and an exact Gaussian increment.

\[ du=\nu\Delta u\,dt+\sigma\,dW_Q \]
import exponax_spde as spde

step = spde.StochasticDiffusion(1, 1.0, 32, 0.01)

Validated by automated tests and the notebook.

exponax_spde.StochasticDiffusion

Periodic Itô diffusion with \(du=\nu\Delta u\,dt+\sigma\,dW_Q\).

Use positive scalar diffusivity. sigma is the noise amplitude and noise_alpha gives q_k = (1+|k|²)^(-alpha). Nonzero forcing with alpha ≤ d/2−1 warns in d ≥ 2 because the continuum point variance diverges. mean_noise=True forces DC. Disable it to preserve the mean.

See exponax's drift API at exponax API and Da Prato & Zabczyk (2014), DOI

Parameters:

Name Type Description Default
num_spatial_dims int

Number of spatial dimensions.

required
domain_extent float

Side length of the domain on every axis.

required
num_points int

Number of grid points per spatial axis.

required
dt float

Time between consecutive states.

required
diffusivity float

Diffusion coefficient.

0.01
sigma float

Physical noise intensity.

0.1
noise_alpha float

Matérn exponent when no explicit spectrum is supplied.

1.0
noise_spectrum Spectrum | None

Explicit spectrum. Leave the Matérn exponent at its default when supplied.

None
noise_symmetry Parity | None

Optional even or odd reflection supported by the drift.

None
mean_noise bool

Whether to force the constant mode when it exists.

True

Advection–diffusion

Constant-velocity transport with exact linear propagation.

\[ du=(\nu\Delta u-v\cdot\nabla u)\,dt+\sigma\,dW_Q \]
import exponax_spde as spde

step = spde.StochasticAdvectionDiffusion(1, 1.0, 33, 0.01, velocity=0.5)

Validated by automated tests.

exponax_spde.StochasticAdvectionDiffusion

Periodic Itô advection–diffusion.

\(du=(\nu\Delta u-v\cdot\nabla u)\,dt+\sigma\,dW_Q\).

The linear drift agrees with exponax. Use positive scalar diffusivity and a finite real velocity (scalar or length-d vector). sigma is the amplitude, noise_alpha is the spectral colour, and mean_noise=True forces DC. Rough forcing warns when alpha ≤ d/2−1 for d ≥ 2. Use odd N to force every resolved non-DC mode.

See exponax API and the complex-symbol section of the noise model.

Parameters:

Name Type Description Default
num_spatial_dims int

Number of spatial dimensions.

required
domain_extent float

Side length of the domain on every axis.

required
num_points int

Number of grid points per spatial axis.

required
dt float

Time between consecutive states.

required
velocity float | Array

Advection velocity, as a scalar or one value per spatial axis.

1.0
diffusivity float

Diffusion coefficient.

0.01
sigma float

Physical noise intensity.

0.1
noise_alpha float

Matérn exponent when no explicit spectrum is supplied.

1.0
noise_spectrum Spectrum | None

Explicit spectrum. Leave the Matérn exponent at its default when supplied.

None
noise_symmetry Parity | None

Only None is supported.

None
mean_noise bool

Whether to force the constant mode when it exists.

True