peclet.flow (CUDA / single-GPU) — Kokkos cut-cell IBM incompressible Navier-Stokes solver (+ pnm)
Project description
flow
GPU-accelerated incompressible Navier–Stokes solver for flow in complex geometry, built around a
staggered MAC grid, a signed-distance-field (SDF) description of the solid, a cut-cell Immersed
Boundary Method, and a pressure-projection step with a geometric multigrid Poisson solve. The code is
written in Kokkos C++ (one source runs on the CUDA, HIP/AMD, and OpenMP backends, selected at build
time) and exposed to Python through nanobind (zero-copy, on core's View↔ndarray bridge);
simulations are driven from Python.
The repository is also known as
pnm_from_sdf(its GitLab origin) — it computes pore-network–scale flow directly from segmented SDF geometry.
Modules
| Module | Role |
|---|---|
flow |
The CFD solver — a distributed (MPI-optional) GPU cut-cell IBM Navier–Stokes solver in physical units, built on the shared core block-decomposition + async halo layer. One code / one API / MPI-optional, with native domain boundary conditions. Exposes peclet.flow.Solver (staggered MAC, default) and peclet.flow.SolverColocated (collocated/cell-centered velocities, ABC approximate projection) — identical API via a GridLayout policy. Validated against analytics and Zick & Homsy sphere-array drag (scripts/validate_zick_homsy_sdflow.py). |
pnm |
Pore-network extraction — SDF VTI reading + pore/segmentation/topology extraction (SDFReader, extract_pores, segment_volume, extract_topology_gpu). The repo's namesake "pnm_from_sdf" feature. |
The original CUDA implementation has been retired (Kokkos became canonical, 2026-06); flow was
validated bit-identical to the CUDA solver — to machine precision, and against Zick & Homsy sphere-array
drag — before the CUDA sources were deleted (restore point: git tag pre-cuda-retirement). The shared
cut-cell IBM primitives now live in src/cut_cell_ibm.hpp; the operator headers are src/mac_*.hpp +
src/flow_ibm.hpp.
Capabilities
- Geometry: SDF solids (negative inside); the cut-cell IBM applies a Robust-Scaled no-slip / moving-wall condition and a matching cut-cell pressure operator (face openness from the SDF).
- Native domain boundary conditions (
flow): per-face periodic / no-slip wall / Dirichlet velocity (inflow) / outflow, plus per-position inlet velocity profiles. Validated on the lid-driven cavity (Ghia et al.), the developing plane channel (Poiseuille), and the backward-facing step (Armaly/Gartling). - Pressure multigrid: rediscretized geometric V-cycle, grid-independent, with MG-PCG and Chebyshev outer accelerators. Works on periodic, IBM, and non-periodic (BC) domains, including semi-coarsening for thin (quasi-2D) grids.
- Time integration: pressure projection with optional incremental pressure, explicit (Koren) or implicit-deferred-correction advection, and Picard outer iteration.
Build
# Canonical: build + install both modules via scikit-build-core
CMAKE_PREFIX_PATH="$PWD/../extern/install/<backend>" pip install . # -> flow + pnm
# Or a dev cmake build (nanobind found via the active interpreter, no cmakedir needed):
cmake -S . -B build -DCMAKE_PREFIX_PATH="$PWD/../extern/install/<backend>" && cmake --build build -j
# distributed flow build (opt-in MPI):
cmake -S . -B build_mpi -DCFD_BUILD_MPI=ON -DCMAKE_PREFIX_PATH="$PWD/../extern/install/<backend>" \
&& cmake --build build_mpi -j
<backend> is one of nvidia-cuda / host-openmp / lumi-hip under ../extern/install/, produced once
by ../tools/bootstrap_deps.sh (a hard build dependency). Requirements: a Kokkos backend (CUDA/HIP/OpenMP
— CUDA is just one option, not required), a C++20 host compiler, nanobind + scikit-build-core, and —
for distributed flow — MPI. Python dependencies live in a virtual environment (.venv).
Run / verify
Simulations are scripts, not C++ mains. The scripts/verify_*_sdflow.py files are the canonical
verification entry points:
source .venv/bin/activate
python scripts/verify_lid_cavity_sdflow.py # lid-driven cavity vs Ghia, Ghia & Shin (1982)
python scripts/verify_channel_sdflow.py # developing plane channel -> Poiseuille
python scripts/verify_bfs_sdflow.py # backward-facing step (reattachment length)
ctest --test-dir build_mpi --output-on-failure # the multi-rank C++ test suite
Documentation
API documentation (C++ classes/kernels and Python scripts) is generated with Doxygen and published to
GitHub Pages by the Documentation CI workflow. Build it locally with:
doxygen docs/Doxyfile # output in docs/html/index.html
The architecture, conventions, and design rationale are described in CLAUDE.md and the design notes
under doc/ in the repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peclet_flow_cu13-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: peclet_flow_cu13-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c284ec4fd734a7722519dd010c3358e34e802778e8375950bec13cb3a7091963
|
|
| MD5 |
0b8698e58aac3270b303e1535d5ca111
|
|
| BLAKE2b-256 |
3516fb4b1b78bfd83dfdc9c3dd815880ea6db6b71a2ac8cabbde5b8dda1b54b5
|
Provenance
The following attestation bundles were made for peclet_flow_cu13-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on computational-chemical-engineering/peclet-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peclet_flow_cu13-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
c284ec4fd734a7722519dd010c3358e34e802778e8375950bec13cb3a7091963 - Sigstore transparency entry: 2090273267
- Sigstore integration time:
-
Permalink:
computational-chemical-engineering/peclet-flow@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/computational-chemical-engineering
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Trigger Event:
push
-
Statement type:
File details
Details for the file peclet_flow_cu13-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: peclet_flow_cu13-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcb079fcca01db46eeca3edf60d95fe31aad3eefb856c4e44bc87adc05c6be53
|
|
| MD5 |
6531594478f098eb95835ee9ba8b9335
|
|
| BLAKE2b-256 |
088569e53704cd963192621dde7908f4ca5baf90a58800da78af5baf6c037375
|
Provenance
The following attestation bundles were made for peclet_flow_cu13-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on computational-chemical-engineering/peclet-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peclet_flow_cu13-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
dcb079fcca01db46eeca3edf60d95fe31aad3eefb856c4e44bc87adc05c6be53 - Sigstore transparency entry: 2090273768
- Sigstore integration time:
-
Permalink:
computational-chemical-engineering/peclet-flow@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/computational-chemical-engineering
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Trigger Event:
push
-
Statement type:
File details
Details for the file peclet_flow_cu13-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: peclet_flow_cu13-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59ec619c23d980e321786a3dbb238200dee8749dc8cb67985453e16368ba046d
|
|
| MD5 |
db54ac2db16666177f4d2f36d9e33fa3
|
|
| BLAKE2b-256 |
6e26911b9480eefc73709d18dfbe6ef564d375bb2681443876426bcb68e47ee0
|
Provenance
The following attestation bundles were made for peclet_flow_cu13-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on computational-chemical-engineering/peclet-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peclet_flow_cu13-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
59ec619c23d980e321786a3dbb238200dee8749dc8cb67985453e16368ba046d - Sigstore transparency entry: 2090273570
- Sigstore integration time:
-
Permalink:
computational-chemical-engineering/peclet-flow@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/computational-chemical-engineering
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Trigger Event:
push
-
Statement type:
File details
Details for the file peclet_flow_cu13-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: peclet_flow_cu13-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9bc9aac180ddbdc3e5ff89646d86d6b75fe8bd24946457287597a4ce9988daf
|
|
| MD5 |
5c80f118af5552e1a65dcc10202b68b6
|
|
| BLAKE2b-256 |
07cb644a1e89991de4b6c56847a4a6479be02ffc47634eb6fb40b013b881ea62
|
Provenance
The following attestation bundles were made for peclet_flow_cu13-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
release.yml on computational-chemical-engineering/peclet-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peclet_flow_cu13-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
d9bc9aac180ddbdc3e5ff89646d86d6b75fe8bd24946457287597a4ce9988daf - Sigstore transparency entry: 2090274261
- Sigstore integration time:
-
Permalink:
computational-chemical-engineering/peclet-flow@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/computational-chemical-engineering
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5cfc5bf30821665a3a2c1821e5b6d221167ec249 -
Trigger Event:
push
-
Statement type: