Skip to main content

CFD-craft for Python

A native Rust research solver for incompressible flow and the dispersion of gases and particles around buildings, 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.2.0 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.2.0

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.2.0
File Size Uploaded Provenance Actions
cfd_craft-0.2.0.tar.gz 208.1 kB Without provenance Details for cfd_craft-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cfd-craft 0.2.0
File Actions
cfd_craft-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for cfd_craft-0.2.0-cp310-abi3-win_amd64.whl
cfd_craft-0.2.0-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.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cfd_craft-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for cfd_craft-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
cfd_craft-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for cfd_craft-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 4.2 MB

Release files / cfd_craft-0.2.0.tar.gz

Download URL cfd_craft-0.2.0.tar.gz
Size 208.1 kB
Tags Source
SHA-256 checksum
How to use checksums
53cf13bd1106c66d4a65023331255b4c8b73a1b9fe2810e3f5af0533220f5398
BLAKE2b-256 checksum
How to use checksums
a8a42631cf4d1a2e56bf9cd324e58c782d73b8f4a8bbd19d26046c57af79c11f
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.2.0-cp310-abi3-win_amd64.whl

Download URL cfd_craft-0.2.0-cp310-abi3-win_amd64.whl
Size 892.8 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0a53cb6475565fe696eebfac9be10723a055244c517c73a3f05508f4fb485e90
BLAKE2b-256 checksum
How to use checksums
fe78ebc093716cdbd88f2127cc3532f98b098973edb620b2c73ba0a5b8926176
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.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cfd_craft-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
23d7395c7ea60107adc0da5d86f125aa5d1474dc0cc2fbb840a963729434fb4a
BLAKE2b-256 checksum
How to use checksums
104ea52aa6b59846939d6983a52ea844248ed72e9eed1ec0db3a321c75d3c8eb
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.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL cfd_craft-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 960.9 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
60e62d4ac8e87506ab1cd3df4287e858dbc238e8f9d12503240bd45967a066a5
BLAKE2b-256 checksum
How to use checksums
9617f5f7ab4684d640fe5849012ed33a0902aa838a5fb965e56b426f0bc0455e
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.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL cfd_craft-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.0 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2f0b32d45cda592c749d109a5226a29ca34663b1c6df94e1c3483f5426585573
BLAKE2b-256 checksum
How to use checksums
22bb81dae5ea53c16a0acbfbf72cf93f5461aef80e89ba626a8ad69101ab1665
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.2.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.

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