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.
pip install cfd-craft
The example loads the small point-source case of the user manual (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 = result["constituents"][0]
print(tracer["receptors_kg_m3"]["R_down"] * 1e9, "micrograms/m3")
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.0 is a research prototype: experimental canyon validation and a successful fine-grid resolution study remain open, and a numerical acceptance is not physical validation.
MIT licensed.
Metadata
Release files for cfd-craft 0.1.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 |
|---|---|---|---|---|
| cfd_craft-0.1.0.tar.gz | 158.3 kB | Without provenance | Details for cfd_craft-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| cfd_craft-0.1.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for cfd_craft-0.1.0-cp310-abi3-win_amd64.whl |
| cfd_craft-0.1.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.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| cfd_craft-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for cfd_craft-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
| cfd_craft-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for cfd_craft-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 3.6 MB
Release files / cfd_craft-0.1.0.tar.gz
| Download URL | cfd_craft-0.1.0.tar.gz |
|---|---|
| Size | 158.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d208c43b5d18f2d112c8e45a2bcbaa1d2adf7c330e172c8250f0cd52f20f364f
|
|
BLAKE2b-256 checksum How to use checksums |
934d69418346a3c161417279baae4c4d833f681efd9f4fbc1cd850a940262e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.0-cp310-abi3-win_amd64.whl
| Download URL | cfd_craft-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 767.5 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e3594bed23978bb64d733ac8944bebb201ffa7d87463bf351e1f530aef77a40f
|
|
BLAKE2b-256 checksum How to use checksums |
62b5b19587bf330571af4e80e0a9732b15ea22ca4fcb4fe41f18bebb6b246741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cfd_craft-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 952.5 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b47ccc0fc6ba443d75b50ffec0ed9d865fa9bbefd9ee49288cf5355966ca0222
|
|
BLAKE2b-256 checksum How to use checksums |
cb9236e5de6b56a82f7782402425aef218b9fff97f1e004d5785921ff7c97845
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | cfd_craft-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 844.8 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0cc66f4194c637f18b8bdd258dcfb4c62dbbb58851db95b0a2f5fa5954a263c1
|
|
BLAKE2b-256 checksum How to use checksums |
927c17d63ba2ab5c99b0f922ea88de676d70e7798496b571a025b35fff853b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | cfd_craft-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 873.4 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
dc309a4c58ae770d77ba52fef32b98ebcbde47b9e6820fe429621b725c958039
|
|
BLAKE2b-256 checksum How to use checksums |
f237d92075e2798d4c2e19a61a583dec2f919c445639fa1e37cb3c85bf054cca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.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.