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, scaling, and lifecycle in the native runtime while exposing 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.

Install

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install foamnordic

# Load or enter the desired OpenFOAM environment once, then:
foamnordic build

foamnordic --version
foamnordic --help
foamnordic dir
foamnordic doctor

The same installation includes ONNX packaging, compiled and Joblib/scikit-learn models, and JAX/Equinox resident models. No backend-specific extra is required.

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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

foamnordic-1.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (733.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

foamnordic-1.0.6-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (685.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

foamnordic-1.0.6-cp312-cp312-macosx_12_0_arm64.whl (499.7 kB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

foamnordic-1.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (733.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

foamnordic-1.0.6-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (687.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

foamnordic-1.0.6-cp311-cp311-macosx_12_0_arm64.whl (500.3 kB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

File details

Details for the file foamnordic-1.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for foamnordic-1.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b9a9b542aed0a35584493cec9c43872241f7fc291950cbf8fc9e34429781062
MD5 3dfe0c2754ac3de70fc33c08df9c6caa
BLAKE2b-256 f73eb08a492753e7f771494d288519eabb7e67ed4d78d5379ad59ac36a935cf8

See more details on using hashes here.

File details

Details for the file foamnordic-1.0.6-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for foamnordic-1.0.6-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fcd3f88d78e2bbdec98bab73a4fbffdc5430a96c13f44f211ad4d9836a9e7fab
MD5 a50167f6d273e120e3054393ebd42af1
BLAKE2b-256 ba4a397d851b9f747adf8f7e854d4eac96017d287ee2576874b520843c251edb

See more details on using hashes here.

File details

Details for the file foamnordic-1.0.6-cp312-cp312-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for foamnordic-1.0.6-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 ba08bb866980a906ac0fb35d95ab7bb49b7e0f07d1477c02d83538cfd30db2cd
MD5 2180a98c68444c405f2f033587e24d29
BLAKE2b-256 defd9e9b4f9fd5080eb32baf3b70027e270978cd108e1e99a599498fd627b3be

See more details on using hashes here.

File details

Details for the file foamnordic-1.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for foamnordic-1.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 781ade6e808aa63dc43bdb35cf6b7d66243ff68f569116050731048e3d3e41c4
MD5 c2c648e4fbb842d28a183c24967acde7
BLAKE2b-256 3061ff69ccaee9673293fe980bab9fdb3f8b7823bbb6f3f721c82b598849534e

See more details on using hashes here.

File details

Details for the file foamnordic-1.0.6-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for foamnordic-1.0.6-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fb199c9e047406c1616a774dc20c2ce56d46b7bf911caf330c12aeb6eb8fe0c8
MD5 2a945d821871c279c9da8230713f7d5b
BLAKE2b-256 c0db6bb50238bc9415bd03a76ab790e1306d2d92ae558c5077a6655953eb6633

See more details on using hashes here.

File details

Details for the file foamnordic-1.0.6-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for foamnordic-1.0.6-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 0313f689f762f01866ac10be2cc148d9602ab98184fcfc13e0be8fd274dda95e
MD5 80d3c1e21a7d9e99cab47e32d6eeff37
BLAKE2b-256 152f81c45520cbbd7e18f8626d8b521aae755587b41544679ba4aa299523ddb6

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.8

6 files

1.0.7

6 files

This release

1.0.6 This release

6 files

1.0.5

6 files

1.0.4

6 files

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