pybFoam Documentation¶
pybFoam provides Python bindings for OpenFOAM via nanobind. It enables direct manipulation of OpenFOAM cases, fields, meshes, and solvers from Python, with zero-copy NumPy access to field data.
Prerequisite: Source OpenFOAM v2312+ (source /path/to/OpenFOAM/etc/bashrc)
before building or running anything shown here.
Which doc should I read?
New here? Start with a tutorial — they walk through an end-to-end workflow.
Have a specific task? A how-to guide gives step-by-step recipes.
Looking up an API or flag? See the reference.
Want to understand the design? Read the explanation section.
Tutorials
How-to guides
- Run blockMesh and checkMesh from Python
- Extract typed field entries from a dictionary
- Compute finite-volume operators from Python
- Modify a boundary condition value
- Sample a field along a line
- Sample a field on a plane
- Sample a field on an isosurface
- Build an incompressible turbulence model
- Run pybFoam in parallel
Explanation
Project