Skip to content

A PYTHON PACKAGE · DOCKER-FIRST · MIT

PDEForge

PDEForge turns PDE solvers into training data. One command runs any of its 41 models; the finite-element stack ships inside the Docker image, and every dataset carries a calibration split reserved for uncertainty quantification. Every physical parameter is a per-sample input, down to the position of the cylinder in the turbulent wake.

github.com/pyatsysh/PDEForge Quickstart

Flow past a NACA 4412 airfoil at 6 degrees

Flow past a NACA 4412 airfoil, AoA 6°: one command for geometry, mesh, solve, splits.
docker run -v $PWD/data:/data ghcr.io/pyatsysh/pdeforge:fenicsx \
    pdeforge generate --model naca_flow_2d --n 200 \
    --resolution x=96 y=48 --seed 0 --out /data/naca

Pull the image on any machine with Docker and watch an airfoil dataset appear from one line: per-sample NACA geometry, meshed and solved, with velocity/pressure fields, an SDF geometry channel, lift and drag coefficients, and full provenance metadata.

What PDEForge is

A unified framework for generating PDE datasets for operator learning and uncertainty quantification. One call, generate_dataset() in Python or pdeforge generate on the command line, serves every model, at any resolution, with any parameters, seeded and reproducible:

import pdeforge

data = pdeforge.generate_dataset("ns_vorticity_2d", n_samples=1000,
                                 resolution={"x": 128, "y": 128}, seed=0)
splits = data.split(train=0.6, val=0.15, cal=0.15, test=0.1)
  • 41 models: spectral (Burgers, Navier-Stokes vorticity, Kolmogorov flow, Kuramoto-Sivashinsky, KdV, Schrodinger, shallow water, Gray-Scott, phase-field families, stochastic PDEs, 3D diffusion and Allen-Cahn), finite-difference elliptic (the canonical Darcy benchmark, 2D and 3D), and finite-element models (cylinder families, LES turbulence, NACA airfoils, inclusion elasticity, Rayleigh-Benard convection, Darcy flow through Cahn-Hilliard microstructures); see Available Models.
  • The canon, regenerable: classic benchmark setups ship as presets with every hyperparameter exposed. The Darcy generator reproduces the distributed FNO data bit for bit: 99% of the 177,241 float32 values in a 421 x 421 sample are identical and none differs by more than 2 ulp, which is MATLAB's sparse LU against SciPy's. The same measure extends to 3D, where no frozen dataset exists.
  • UQ-native: dedicated calibration splits for conformal prediction, out-of-distribution splits by parameter range, multi-fidelity pairs, observation operators; see the Calibration Protocol.
  • Verified ground truth: pdeforge.verify runs convergence studies so the data comes with numerical error estimates; every model carries a physics-validation test (conservation laws, exact solutions).
  • Fast when you want it: process-parallel generation, an optional jit+vmap JAX backend (GPU-capable; ~16x CPU measured), and chunked-to-disk streaming with no RAM ceiling.
  • Reproducible by construction: pdeforge reproduce metadata.json regenerates any seeded dataset from its own metadata. The container pins the environment; the metadata pins the run.

Every image is package output: regenerate them all with python scripts/make_gallery.py.

Six PDE textures

The full set, including the motion loops, lives in the Gallery.

Install

pip install pdeforge            # spectral models: NumPy/SciPy only
pip install pdeforge[jax]       # + GPU-capable backend
docker pull ghcr.io/pyatsysh/pdeforge:fenicsx   # everything, zero install

Start with the Quick Start, compare against the alternatives in Comparison, or read how the calibration split keeps conformal guarantees honest in the Calibration Protocol.