RepoNVIDIANVIDIApublished Jun 3, 2025seen 2d

NVIDIA/physicsnemo-cfd

Jupyter Notebook

Open original ↗

Captured source

source ↗
published Jun 3, 2025seen 2dcaptured 9hhttp 200method plain

NVIDIA/physicsnemo-cfd

Description: L​ibrary for using the models trained in PhysicsNeMo in Engineering and CFD workflows

Language: Jupyter Notebook

License: Apache-2.0

Stars: 122

Forks: 19

Open issues: 1

Created: 2025-06-03T15:56:05Z

Pushed: 2026-06-09T20:40:44Z

Default branch: main

Fork: no

Archived: no

README:

PhysicsNeMo CFD

![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/#active) [![Code style:

[PhysicsNeMo CFD](#what-is-physicsnemo-cfd) | [Getting started](#getting-started) | [Contributing Guidelines](#contributing-to-physicsnemo) | [Communication](#communication)

What is PhysicsNeMo CFD?

NVIDIA PhysicsNeMo-CFD is a sub-module of NVIDIA PhysicsNeMo framework that provides the tools needed to integrate pretrained AI models into engineering and CFD workflows.

The library is a collection of loosely-coupled workflows around the trained AI models for CFD, with abstractions and relevant data structures.

Refer to the PhysicsNeMo framework to learn more about the full stack.

The library offers utilities for:

  • NIM Inference:
  • An inference recipe calling pre-trained AI models that were trained using

PhysicsNeMo and hosted as NVIDIA Inference Microservices (for example, the DoMINO Automotive Aerodynamics NIM) from a Python interface (physicsnemo.cfd.evaluation.nims.call_domino_nim), facilitating scalable deployment of trained models.

  • Tutorial Jupyter notebooks (DoMINO NIM + DrivAerML surface/volume meshes,

metrics, plots, and no–ground-truth diagnostics) live under [`workflows/nim_inference/`](workflows/nim_inference/README.md).

  • Benchmarking of ML Model Accuracy:
  • A benchmark for evaluating and validating the results of trained ML models

against traditional CFD results using a broad set of built-in engineering metrics (for example, pointwise errors, integrated quantities, spectral metrics, PDE residuals). Related publication

  • The physicsnemo.cfd.evaluation package runs config-driven inference and

uses the same physicsnemo.cfd.postprocessing_tools metric implementations as the [`workflows/benchmarking/`](workflows/benchmarking/) Hydra workflow (run `python main.py` from that directory; see [that README](workflows/benchmarking/README.md)). Pretrained checkpoints for built-in benchmark models are published on [Hugging Face](https://huggingface.co/nvidia) under the nvidia/*_drivaerml model repositories (pinned package roots in [`builtin_packages.py`](physicsnemo/cfd/evaluation/assets/builtin_packages.py)). The benchmark evaluation dataset is [DrivAerML](https://huggingface.co/datasets/neashton/drivaerml) on Hugging Face. For air-gapped or custom layouts, set local checkpoint and dataset paths in YAML or Hydra overrides.

  • Custom models, data, and metrics: you can plug in additional

`CFDModel` wrappers, `DatasetAdapter` implementations, metrics, and optional report visuals for the same Hydra benchmark harness (no fork required). See [Custom models, datasets, and metrics](workflows/benchmarking/README.md#custom-models-datasets-and-metrics) in the benchmarking workflow README and the `physicsnemo.cfd.evaluation` registration APIs (register_metric, register_visual, model registry).

  • Utilities to analyze and visualize predictions from trained ML models

(mesh-based and point-cloud), including outputs produced with custom metrics.

  • Hybrid Initialization:
  • An end-to-end recipe for initializing a CFD simulation with a

trained ML model hybridized with potential flow solutions, to accelerate CFD convergence (particularly for high-fidelity, unsteady cases). Related publication

Installation

PhysicsNeMo-CFD is a Python package that depends on the NVIDIA PhysicsNeMo framework.

PhysicsNeMo-CFD depends on PhysicsNeMo. The pip installation command below will install PhysicsNeMo automatically if not present.

For maximum cross-platform compatibility, we recommend using the PhysicsNeMo Docker container. Steps to use the PhysicsNeMo container can be found in the Getting Started guide.

You can install PhysicsNeMo-CFD via pip:

git clone https://github.com/NVIDIA/physicsnemo-cfd.git
cd physicsnemo-cfd
pip install .

For local development (editable install, tests, and benchmarking workflow checks), use optional dev dependencies from [pyproject.toml](pyproject.toml):

pip install -e ".[dev]"

To get access to GPU-accelerated functionalities from this repository when installing in a conda or custom Python environment, please run the commands below.

If you are using the PhysicsNeMo container, the GPU-specific dependencies are pre-installed, so this additional step is not required.

pip install .[gpu] --extra-index-url=https://pypi.nvidia.com

> [!Note] PhysicsNeMo-CFD is an experimental library and currently v0; expect > breaking changes. PhysicsNeMo-CFD is for *demonstrating* workflows, rather than providing a stable API for production-level deployments.

When updating, see the latest changes in the [CHANGELOG.md](./CHANGELOG.md) file.

Getting started

To get started, use the DoMINO NIM on a sample as shown below:

from physicsnemo.cfd.evaluation.nims import call_domino_nim
import subprocess

filenames = [
"drivaer_202.stl",
]
urls = [
"https://huggingface.co/datasets/neashton/drivaerml/resolve/main/run_202/drivaer_202.stl",
]

for url, filename in zip(urls, filenames):
subprocess.run(["wget", url, "-O", filename], check=True)

output_dict = call_domino_nim(
stl_path="./drivaer_202.stl",
inference_api_url="http://localhost:8000/v1/infer",
data={
"stream_velocity": "38.89",
"stencil_size": "1",
"point_cloud_size": "500000",
},
verbose=True,
)

Reference workflows live…

Excerpt shown — open the source for the full document.