Skip to main content

FoamNordic

FoamNordic is a native C++ and Python framework for ordinary OpenFOAM and machine-learning field programs, including equation-level closures. It keeps atomic field exchange, packing, and lifecycle in the native runtime, delegates model formats and execution to BindNordic, and exposes a compact declarative API for cases, placement, launch, observations, and results.

Note: The FoamNordic GitHub repository is temporarily private while the software is used in ongoing research and a related publication. The repository will be made public after the research is presented. PyPI distributions remain available in the meantime.

FoamNordic is active research software. Release notes and upgrade guidance are maintained in the changelog.

Documentation · Installation · API

Install

Use Python 3.11 or 3.12. Install the PyPI release with pip:

pip install foamnordic

Or use uv in an existing virtual environment:

uv pip install foamnordic

Follow the public installation guide for optional environment setup, OpenFOAM activation, the integration build and foamnordic doctor checks before running a case.

The ml extra includes scikit-learn, ONNX, Equinox, Optax and CPU JAX on Linux or macOS. Install foamnordic[ml-cuda12] for CUDA 12 JAX on Linux. CUDA selection is explicit rather than inferred from CPU architecture. Install plain foamnordic for ordinary OpenFOAM runs, mathematical functions or existing artefacts that do not require those authoring libraries.

Binary wheels carry the native Python control runtime and compact OpenFOAM source build kit. foamnordic build compiles it for the currently loaded ABI; each case later selects that runtime from its declared of_cmd and shell. The build also prepares the native ONNX ModelHost and verified ONNX Runtime 1.28.0. Offline systems can point FOAMNORDIC_ONNX_RUNTIME_ROOT at an unpacked 1.28.0 distribution.

On macOS with OpenFOAM.app:

openfoam
foamnordic build
foamnordic doctor

Use the Python environment containing FoamNordic inside the OpenFOAM shell. The build calls wmake internally.

First case

from pathlib import Path
import foamnordic as fno

case = fno.OpenFOAM.Case(
    name="cavity",
    case_dir=Path("cases/cavity"),
    run_dir="output/cavity",
    of_cmd="module load openfoam/2512",  # macOS OpenFOAM.app: "openfoam"
    shell="bash",
)

# Use an existing cavity case with a blockMeshDict and initial fields.
case.initialize(ranks=1, mesh="blockMesh", validate_mesh=True)
print(case.fields.keys())

run = fno.Longship(case=case).launch()
run.summary()

result = run.stop()
post = result.postprocess
statistics = post.statistics(["U", "p"], time_idx=-1, verbose=True)

Paths may be strings, pathlib.Path, or text PathLike objects. FoamNordic uses 0/ when available and otherwise copies 0.orig/ to 0/ inside the isolated run without changing the source case.

Platforms

  • Linux x86_64
  • Linux aarch64
  • macOS Apple Silicon (arm64)

Native macOS development uses OpenFOAM.app. It provides current OpenFOAM releases as Apple Silicon applications and Homebrew packages.

Learn more

Metadata

Release files for foamnordic 1.0.10

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

Built distributions (wheels)

Table of built distributions (wheels) for foamnordic 1.0.10
File Actions
foamnordic-1.0.10-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for foamnordic-1.0.10-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
foamnordic-1.0.10-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details for foamnordic-1.0.10-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
foamnordic-1.0.10-cp312-cp312-macosx_12_0_arm64.whl CPython 3.12 CPython 3.12 macOS 12.0+ ARM64 Details for foamnordic-1.0.10-cp312-cp312-macosx_12_0_arm64.whl
foamnordic-1.0.10-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for foamnordic-1.0.10-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
foamnordic-1.0.10-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for foamnordic-1.0.10-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
foamnordic-1.0.10-cp311-cp311-macosx_12_0_arm64.whl CPython 3.11 CPython 3.11 macOS 12.0+ ARM64 Details for foamnordic-1.0.10-cp311-cp311-macosx_12_0_arm64.whl

Total release size: 4.4 MB

Release files / foamnordic-1.0.10-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL foamnordic-1.0.10-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 832.9 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
90cb998f01222f56a85cf62b71fcb269e3b7c8078e088cc7526e3f482e42280e
BLAKE2b-256 checksum
How to use checksums
8c52f7f59dd724e8da2b56432834ab0270ba8c62cc695ec9ea54d37d36266ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / foamnordic-1.0.10-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL foamnordic-1.0.10-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 781.0 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
a87a88f71b420e27d1b15bfe195e7f458f72d0b1af5e0711d7df7deb423e7663
BLAKE2b-256 checksum
How to use checksums
f67fe1594286b080c26a59bc1b72e0b6f58af8882cba9917e5f8ffa6e81fc406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / foamnordic-1.0.10-cp312-cp312-macosx_12_0_arm64.whl

Download URL foamnordic-1.0.10-cp312-cp312-macosx_12_0_arm64.whl
Size 586.4 kB
Tags CPython 3.12 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
1e72ee9a72d8f402f31a147d15a96d88d2e2260c6ea1d7b7fc03046e52774f44
BLAKE2b-256 checksum
How to use checksums
7dbc320f85999bc9d2dab719320400412a03ab844aab2dd7d4be4181f1ae2e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / foamnordic-1.0.10-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL foamnordic-1.0.10-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 833.3 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7f412c4f9b8d1fc71171c65eaca59e1dd6ee4f8fddcc01560640163a2edff500
BLAKE2b-256 checksum
How to use checksums
e21fe44c1cff6457101252f1e6bb82676b7516742f12ca28f7672f6255fc7a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / foamnordic-1.0.10-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL foamnordic-1.0.10-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 781.9 kB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
711d65c54c8048c7e630f78688c0b5f597c494ae6e2a8e489373b1fe3ee9740e
BLAKE2b-256 checksum
How to use checksums
547a0c2535ac52722e06258e79f6c19dedce41b74e4a39e509496f0aa473301f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / foamnordic-1.0.10-cp311-cp311-macosx_12_0_arm64.whl

Download URL foamnordic-1.0.10-cp311-cp311-macosx_12_0_arm64.whl
Size 587.1 kB
Tags CPython 3.11 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
9b31be7e73b44d4ac6a51e1026c6aa34c4f00868f81c6ee2e56f3f3ed797c778
BLAKE2b-256 checksum
How to use checksums
413e6001a9f4ea4c9f5085271fb419e103ecb54efa9d5ed844f818e6790a80ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for foamnordic 1.0.10

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