cfdrs-python
Python bindings for CFD-rs: High-performance computational fluid dynamics in Rust, exposed via PyO3 and Maturin.
The wheel includes cfd_python.pyi and the PEP 561 py.typed marker. The
long-running 1D bifurcation and legacy 2D Poiseuille calls convert Python
inputs before releasing the GIL around their Rust solver work.
The PyPI distribution is cfdrs-python; the Rust package is cfd-python and
the Python module is cfd_python.
Installation
cd crates/cfd-python
pip install maturin
maturin develop # Development mode (editable install)
# or
maturin build --release # Production wheel
pip install target/wheels/cfdrs_python-*.whl
Optional dependencies:
pip install "cfdrs-python[dev]" # pytest, matplotlib, pandas
pip install "cfdrs-python[validation]" # adds scipy and jupyter
Quick Start
import cfd_python
# 1D bifurcation solver
bifurc = cfd_python.BifurcationSolver(
d_parent=100e-6,
d_daughter1=80e-6,
d_daughter2=80e-6,
)
blood = cfd_python.CassonBlood()
result = bifurc.solve(flow_rate=3e-8, pressure=40.0, blood=blood)
print(f"Pressure drop 1: {result.dp_1:.2f} Pa")
print(f"Wall shear rate 1: {result.gamma_1:.2f} s⁻¹")
Available Classes
1D Solvers
| Class | Description |
|---|---|
BifurcationSolver / BifurcationResult |
Single bifurcation network |
TrifurcationSolver / TrifurcationResult |
Trifurcation network |
SerpentineSolver1D / SerpentineResult1D |
Serpentine channel resistance |
VenturiSolver1D / VenturiResult1D |
Venturi constriction resistance |
2D Solvers
| Class | Description |
|---|---|
PoiseuilleSolver / PoiseuilleResult / PoiseuilleConfig |
Poiseuille pipe flow |
Poiseuille2DSolver / Poiseuille2DResult |
2D Poiseuille flow |
VenturiSolver2D / VenturiResult2D |
2D Venturi constriction |
TrifurcationSolver2D / TrifurcationResult2D |
2D trifurcation |
BifurcationSolver2D / BifurcationResult2D |
2D bifurcation |
CavitySolver2D / CavityResult2D |
Lid-driven cavity (Ghia benchmark) |
3D Solvers
| Class | Description |
|---|---|
Bifurcation3DSolver / Bifurcation3DResult |
3D FEM bifurcation |
Trifurcation3DSolver / Trifurcation3DResult |
3D FEM trifurcation |
Poiseuille3DSolver / Poiseuille3DResult |
3D Poiseuille flow |
Venturi3DSolver / Venturi3DResult |
3D Venturi constriction |
Serpentine3DSolver / Serpentine3DResult |
3D serpentine channel |
Blood Rheology Models
| Class | Description |
|---|---|
CassonBlood |
Casson non-Newtonian model |
CarreauYasudaBlood |
Carreau-Yasuda shear-thinning model |
CrossBlood |
Cross model |
FahraeuasLindqvist |
Fåhraeus-Lindqvist effect |
Pulsatile Flow
| Class | Description |
|---|---|
WomersleyNumber |
Womersley number calculation |
WomersleyProfile |
Velocity profile for pulsatile flow |
WomersleyFlow |
Full pulsatile flow solution |
Features
- 1D/2D/3D CFD solvers unified under a single Python module
- Non-Newtonian blood rheology (Casson, Carreau-Yasuda, Cross, Fåhraeus-Lindqvist)
- Pulsatile Womersley flow
- Lid-driven cavity benchmark (Ghia et al.)
- Validated against analytical solutions
Documentation
See the crates/cfd-validation/ directory in the monorepo for comprehensive validation examples.
Metadata
Release files for cfdrs-python 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cfdrs_python-0.3.0.tar.gz | 72.0 MB | With provenance | Details for cfdrs_python-0.3.0.tar.gz |
Built distributions (wheels)
Total release size: 81.6 MB
Release files / cfdrs_python-0.3.0.tar.gz
| Download URL | cfdrs_python-0.3.0.tar.gz |
|---|---|
| Size | 72.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ce6e0df2036e88b29859fc03efd23dc2f06c3090c3aa04a61c3b5a7fa1da7bc
|
|
BLAKE2b-256 checksum How to use checksums |
ac1cc16560698dbb08c59987be9cda6f23e30dc41ef8078dbd09ad7755825e61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cfdrs_python-0.3.0-cp39-abi3-win_amd64.whl
| Download URL | cfdrs_python-0.3.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e11dc08b5c79973c1a521f770d064d1c9f8dec425529a1ff6c92a19ec6cec473
|
|
BLAKE2b-256 checksum How to use checksums |
4cb0106ac6e1856968dc084a2ff1e6e22193985bf219720ad48cb0ddac9b45d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cfdrs_python-0.3.0-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | cfdrs_python-0.3.0-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e693c057b1bbda4b4f551487ff68f31e35e3e2e840afa95d14572ba7ee12bb97
|
|
BLAKE2b-256 checksum How to use checksums |
f64c0e92d13fad85550acaca9f7b4682c6955fbb69df3a23b596bba60f76d883
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cfdrs_python-0.3.0-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | cfdrs_python-0.3.0-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
00976aa6a91c2564818a1fc48769c6d1ebb6e95f1864a6c9bfd55315fd6e3833
|
|
BLAKE2b-256 checksum How to use checksums |
336057cd652edfb7875a75fe0871f609d65ddb3202d9b13f076bea24746938d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cfdrs_python-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cfdrs_python-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
31167dba8771e1ccd4f8697fa4318f640cc75ef8e6425572b225599d895848fd
|
|
BLAKE2b-256 checksum How to use checksums |
f3471a61ae646202e792d93a8fafc7fdde6e30ce45741a01b4ad4a96515a7387
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cfdrs_python-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | cfdrs_python-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
2827ada23b548ef5b20304e56299b13b8f1667900bbe1580b4ad5e42c1d6a1db
|
|
BLAKE2b-256 checksum How to use checksums |
10bd29aa11799ac010d694c5f82b8fdd638e1208585006224f62db54fbf47e1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / cfdrs_python-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | cfdrs_python-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2d445b32982f4a3c640d10667896ab5ac1724a85579fe849a174e665f3659d67
|
|
BLAKE2b-256 checksum How to use checksums |
c5271481ad089fb5f0b61e81b4bc265c3a60a5b3d240921ff795b6c153a4029e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logSecurity for cfdrs-python 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for cfdrs_python-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.