Skip to main content

CFD-craft for Python

A native Rust research solver for incompressible flow and passive-gas dispersion, called in-process from Python 3.10 or newer. No NumPy, OpenFOAM or subprocess is needed.

python -m pip install cfd-craft

The example loads the small point-source case of the guide (prescribed flow, one tracer, one downstream receptor) directly from GitHub:

import json
import urllib.request
import cfd_craft as cfd

URL = (
    "https://raw.githubusercontent.com/dietmarwo/CFD-craft/main/"
    "examples/manual/point-source.json"
)
with urllib.request.urlopen(URL, timeout=30) as response:
    case = json.load(response)
report = cfd.check(case)
if not report["valid"]:
    raise ValueError(report["diagnostics"])
result = cfd.simulate(case)
print(result["termination"], result["assessment"])
tracer = next(c for c in result["constituents"] if c["id"] == "tracer")
print(f"{tracer['receptors_kg_m3']['R_down'] * 1e9:.6g} micrograms/m3")
completed steady_discrete_solution
17.8118 micrograms/m3

Outputs on this page are real. The documentation check compares floating-point numbers with a relative tolerance of 1e-4; everything else must match exactly.

To keep a local copy, download it once (for example curl -O https://raw.githubusercontent.com/dietmarwo/CFD-craft/main/examples/manual/point-source.json) and load it with case = json.loads(Path("point-source.json").read_text()) after from pathlib import Path. check and simulate also accept a JSON string or bytes.

check runs the native CLI's strict parsing and preflight and returns coded diagnostics with JSON paths. simulate releases the GIL, enforces the case's work, wall-time and thread limits and returns the same summary schema as the Rust CLI; incomplete calculations keep their termination and assessment. Use cancel_file=PATH for cooperative cancellation; Ctrl-C stops the solver and raises KeyboardInterrupt. run.memory_limit_mib is a preflight estimate, and the host-memory refusal applies on Linux only.

python -m cfd_craft describe, check CASE.json and simulate CASE.json print JSON; the cfd-craft-python console script does the same. Fields, checksummed archives, restarts and profiles belong to the Rust CLI (cargo install cfd-craft-cli --locked).

Version 0.1.1 is a research prototype. A numerically accepted run is not an experimentally validated prediction. Experimental canyon validation and a successful fine-grid resolution study remain open.

MIT licensed.

Metadata

Release files for cfd-craft 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cfd-craft 0.1.1
File Size Uploaded Provenance Actions
cfd_craft-0.1.1.tar.gz 158.8 kB Without provenance Details for cfd_craft-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cfd-craft 0.1.1
File Actions
cfd_craft-0.1.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for cfd_craft-0.1.1-cp310-abi3-win_amd64.whl
cfd_craft-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for cfd_craft-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cfd_craft-0.1.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for cfd_craft-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
cfd_craft-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for cfd_craft-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 3.6 MB

Release files / cfd_craft-0.1.1.tar.gz

Download URL cfd_craft-0.1.1.tar.gz
Size 158.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b04f4c1dc1018809164d2f6fda202e5305c8e15c5816f8376f16128d5c693933
BLAKE2b-256 checksum
How to use checksums
2e847d285ac7ea1206e1b9231ec3e1b5edc86b7f8cb740c45ff0953144e69287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cfd_craft-0.1.1-cp310-abi3-win_amd64.whl

Download URL cfd_craft-0.1.1-cp310-abi3-win_amd64.whl
Size 767.5 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
33790c9b8161169dc9973eaea0b2335c34e6e688104f57ccd8c756110dce8f1b
BLAKE2b-256 checksum
How to use checksums
f135a3ec8a36bbe1addb7f93445bfca809ab29c8fcdac820627bcee025f2226f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cfd_craft-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cfd_craft-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 954.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e437961c4be71aed68681fcc40edbb527be1181b6dc406b4520691ec139020a8
BLAKE2b-256 checksum
How to use checksums
3ee28a269ab2117ccb4b56faab7f9feb7184fea2000f4fe7ddd8f99a85ccbed8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cfd_craft-0.1.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL cfd_craft-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Size 845.1 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cf1b54b97b2f29f95c90c61dc8f05fdc5ca50883ba0dd0a7f13912ffcc31a20a
BLAKE2b-256 checksum
How to use checksums
f5b87a358d0acd7ee194f5dfb97e2df607effa14bb3c586422719c67ba309717
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cfd_craft-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL cfd_craft-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 873.6 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a4f5f4ffc48c79248a565476b86d1f4a5f2086d5f83d0d5d8f4944406d97dbe9
BLAKE2b-256 checksum
How to use checksums
fe2dc33fa4a61aee7bdc28a8e5c3c89ae12d335d8d643e822de5916396829a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cfd-craft 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page