Peclet Examples

GPU-accelerated CFD, granular dynamics, and gas–solid coupling — from Python, validated in the open.

peclet is an open-source simulation suite for incompressible CFD (cut-cell immersed boundaries over signed-distance geometry), discrete element granular dynamics (spheres and arbitrary SDF shapes), and coupled gas–solid CFD-DEM — driven entirely from Python, running on one code base from a laptop CPU to multi-GPU clusters (Kokkos: CUDA, HIP, OpenMP; MPI for multi-rank).

pip install peclet          # CPU wheels — every page here runs from this
pip install peclet-flow-cu13 peclet-dem-cu13   # CUDA wheels for the GPU sections

Why peclet?

  • One stack, three physics. A validated Navier–Stokes solver, an XPBD discrete-element solver, and the volume-averaged coupling between them — the same SDF geometry and the same Python arrays end to end.
  • Python-first, zero-copy. Fields and particle states are NumPy/CuPy views into solver memory — no file shuffling, no lock-in, matplotlib/PyVista straight from the GPU.
  • Runs where you are. The identical script runs on a free Colab CPU, a workstation GPU, or an MPI cluster. Every example carries an Open in Colab badge.
  • Evidence, not claims. Every figure on this site is produced by executing the page against the released package — analytical solutions, published benchmarks (Ghia, Schäfer–Turek, Zick–Homsy, MFIX-Exa, X-ray tomography beds), and textbook checks throughout.
  • Honest scale. A million-particle fluidized bed — deposition, drag, projection, collisions — advances in seconds per step on a single GPU.

Single-phase flow

The flow solver: exact and canonical benchmarks for the cut-cell immersed-boundary Navier–Stokes core — from machine-precision channel flow to buoyant convection and a turbulent channel DNS.

Flow through packings & porous media

Where dem meets flow: build a packing with the particle solver, hand the geometry to the fluid solver as a signed-distance field, and measure drag and permeability against the literature.

Two-phase flow (VoF)

Sharp interfaces on a fixed grid: geometric volume-of-fluid transport, a balanced-force continuum surface force, and momentum-consistent advection at large density ratios. Four pages are gated against something outside the solver — an exact algebraic identity, the exact viscous normal modes, a published benchmark — one composes all of it with a dem packing, and the last puts the whole stack to work on the question porous media actually ask: which pore fills first.

Resolved particles & moving geometry

Bodies the fluid actually resolves: analytic CSG shapes as cut-cell geometry, walls and particles that move through the grid, and the exactly conservative reaction force and torque that couple them to dem. Every page here is gated against an exact solution — and two of them document the solver defects they uncovered on the way.

Granular dynamics

The dem solver on its own: dense packings of spheres and arbitrary SDF shapes, moving container geometry, and hundred-thousand-particle scale on one GPU.

Gas–solid CFD-DEM

The coupling module runs both solvers together — volume-averaged gas, per-particle drag, momentum-conserving feedback — and reproduces published gas–solid benchmarks one-to-one.


Trust, but verify

The examples above show what the suite does; two growing collections prove it stays correct:

Run any of this yourself

Every page is a self-contained notebook: it builds its geometry and sets every parameter inline. Click the Open in Colab badge on any example to run it on a free CPU runtime, or:

pip install peclet && git clone https://github.com/computational-chemical-engineering/peclet-examples
quarto render peclet-examples/examples/taylor-green/index.qmd --execute

The GPU sections (million-particle beds, cube drums, DNS) need the CUDA wheels or a local build — each page’s Reproduce this section gives the exact commands.

NoteHow these pages build

Solver-backed outputs are executed by the authors and frozen into the repository, so the site always builds without a GPU — and what you read is exactly what the released code produced.