Skip to content

Peclet

PyPI version Python License: MIT Docs build DOI

A suite of GPU-accelerated and parallel codes for the simulation of transport phenomena — Eulerian (CFD / Navier–Stokes), Lagrangian (DEM / particle packing) and mixed (Voronoi) methods, sharing one MPI block domain decomposition with asynchronous ghost-layer exchange, SDF-described solids, a common immersed-boundary methodology, GPU support (Kokkos: CUDA / HIP / OpenMP), and Python bindings everywhere.

The name nods to the Péclet number — the ratio of advective to diffusive transport, the dimensionless heart of transport phenomena.

Quick start (Python)

The codes are driven from Python — one peclet.* namespace, installable from PyPI. The multicore-CPU (OpenMP) build ships as a self-contained wheel, so this just works:

pip install peclet            # the CPU family: peclet-morton + peclet-flow + peclet-dem + peclet-voro
# or an individual package, e.g.  pip install peclet-flow
import peclet.flow as flow
s = flow.Solver(32, 32, 32)
s.set_rho(1.0); s.set_mu(0.01); s.set_dt(60.0)
s.set_solid(sdf)                      # SDF geometry (<0 inside solid)
for _ in range(100):
    s.step()
u, p = s.get_u(), s.get_p()           # numpy arrays [x,y,z]
print(flow.execution_space)           # -> OpenMP / Cuda / HIP / Serial

Python API reference · Install & run (GPU / MPI / HPC containers).

The codes

Code PyPI · import Role
core peclet-core · peclet.core Shared infrastructure: ORB block decomposition, async grid/particle halo, SDF geometry, VTI I/O, AMR octree
flow peclet-flow · peclet.flow Incompressible Navier–Stokes for porous media (staggered MAC + cut-cell IBM + multigrid); pnm pore extraction
dem peclet-dem · peclet.dem Discrete Element Method (XPBD) + SDF point-shell collision for dense packing
voro peclet-voro · peclet.voro Dynamic 3D Voronoi tessellation of moving particles (periodic & Lees–Edwards) + mesh generation
morton peclet-morton · peclet.morton Morton/Z-order codes with arithmetic in Morton space — the spatial-index primitive

The GPU codes are Kokkos-based: the same source runs on CUDA, HIP (AMD/LUMI) and OpenMP, chosen at build time by the install prefix (or the container).

Documentation

Citing

If you use Peclet in your research, please cite it. Each release is archived on Zenodo:

Machine-readable metadata lives in CITATION.cff — use GitHub's "Cite this repository" button for ready-made BibTeX/APA.