Metadata-Version: 2.4
Name: foamnordic
Version: 1.0.3.dev0
Summary: Declarative orchestration for native OpenFOAM closure workloads
Keywords: OpenFOAM,CFD,HPC,machine learning,scientific computing
Author-Email: Hanseul Kang <hanseul.kang@aalto.fi>
License-Expression: GPL-3.0-only
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Project-URL: Homepage, https://github.com/PentagonToy/FoamNordic
Project-URL: Documentation, https://github.com/PentagonToy/FoamNordic#readme
Project-URL: Issues, https://github.com/PentagonToy/FoamNordic/issues
Project-URL: Source, https://github.com/PentagonToy/FoamNordic
Requires-Python: <3.13,>=3.11
Requires-Dist: foamlib<2,>=1.7
Requires-Dist: onsaemiro>=1.0.5
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://raw.githubusercontent.com/PentagonToy/FoamNordic/main/others/icon.png" alt="FoamNordic" width="220">
</p>

# FoamNordic

FoamNordic is a native C++ and Python framework for ordinary OpenFOAM and
machine-learning closure workloads. It keeps atomic field exchange and model
evaluation outside Python while exposing a compact declarative API for cases,
placement, launch, observations, and results.

FoamNordic is active research software. This development line is
`1.0.3.dev0`.

## Install

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

foamnordic --version
foamnordic --help
foamnordic dir
foamnordic build
```

Binary wheels carry the native Python control runtime. OpenFOAM integration is
prepared against the toolchain declared by each case.

## First case

```python
from pathlib import Path
import foamnordic as fno

case = fno.OpenFOAM.Case(
    name="cavity",
    source=Path("cases/cavity"),
    workspace="output/cavity",
    toolchain=fno.OpenFOAM.Toolchain.module("openfoam/2512"),
)

print(case.fields.keys())

run = fno.Longship(case=case).launch()
result = run.stop(force=False)
result.summary(style="compact")
```

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](https://github.com/gerlero/openfoam-app). It provides current
OpenFOAM releases as Apple Silicon applications and Homebrew packages.

## Learn more

- [Project repository](https://github.com/PentagonToy/FoamNordic)
- [Installation and build guide](https://github.com/PentagonToy/FoamNordic#install)
- [Python run-control API](https://github.com/PentagonToy/FoamNordic/blob/main/docs/python/run-control-api.md)
- [Native C++ documentation](https://github.com/PentagonToy/FoamNordic/tree/main/docs/native)
- [Architecture](https://github.com/PentagonToy/FoamNordic/tree/main/docs/architecture)
- [License](https://github.com/PentagonToy/FoamNordic/blob/main/LICENSE)
