{"id":28182783,"url":"https://github.com/simzero/openfoam-ml-rom","last_synced_at":"2025-05-16T04:14:06.250Z","repository":{"id":178096275,"uuid":"623161059","full_name":"simzero/openfoam-ml-rom","owner":"simzero","description":"OpenFOAM examples for data-driven ML and ROM","archived":false,"fork":false,"pushed_at":"2023-07-25T11:55:16.000Z","size":3500,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2023-12-16T15:56:59.059Z","etag":null,"topics":["cfd","deep-learning","flowaroundobstacles","fluids","machine-learning","ml","onnxruntime","openfoam","pitzdaily","reduced-order-modeling","rom","simulations","workflows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-03T20:23:39.000Z","updated_at":"2023-11-03T11:09:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"e133a532-df5b-4ab0-b79a-535c331867b6","html_url":"https://github.com/simzero/openfoam-ml-rom","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.0535714285714286,"last_synced_commit":"393ed00ceca1e3de27b2f4068c236f797445da82"},"previous_names":["simzero/openfoam-ml-rom"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simzero%2Fopenfoam-ml-rom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simzero%2Fopenfoam-ml-rom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simzero%2Fopenfoam-ml-rom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simzero%2Fopenfoam-ml-rom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simzero","download_url":"https://codeload.github.com/simzero/openfoam-ml-rom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464897,"owners_count":22075571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfd","deep-learning","flowaroundobstacles","fluids","machine-learning","ml","onnxruntime","openfoam","pitzdaily","reduced-order-modeling","rom","simulations","workflows"],"created_at":"2025-05-16T04:13:41.128Z","updated_at":"2025-05-16T04:14:06.241Z","avatar_url":"https://github.com/simzero.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e :warning: **This project is currently in active development**: Expect frequent updates and potential changes. Feel free to contribute or raise issues as needed.\n\n# openfoam-ml-rom\n\nModels and workflows for generating and deploying OpenFOAM surrogate models:\n\n* Machine Learning (ML)\n  - flowAroundObstacles ( [demo](https://simzero.github.io/openfoam-ml-rom/OF/incompressible/simpleFoam/flowAroundObstacles/view.html) | [model](https://simzero.github.io/pg/v0.2/onnx/flowAroundObstacles.onnx) | [mesh](https://simzero.github.io/pg/v0.2/onnx/flowAroundObstacles.vtu) | [source](https://github.com/simzero/openfoam-ml-rom/tree/main/OF/incompressible/simpleFoam/flowAroundObstacles) )\n\n* Reduced Order Modeling (non-ML)\n  - pitzDaily ( [demo](https://simzero.github.io/openfoam-ml-rom/OF/incompressible/simpleFoam/pitzDaily/view.html) | [model]() | [mesh]()  | [source](https://github.com/simzero/openfoam-ml-rom/tree/main/OF/incompressible/simpleFoam/pitzDaily) )\n  - windAroundBuildings (WIP)\n\n## Usage with Docker\n\nWe provide a Docker image for directly running the models. You need Docker-CE to be [installed](https://docs.docker.com/engine/install) and [configured](https://docs.docker.com/engine/install/linux-postinstall) in your machine. The workflows include ML trainning for which support of CPU is automatically enabled, but GPU is highly recommended. To enable the use of GPUs from inside the container you need to install [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).\n\nYou can create an alias for the docker run command and options for convenience:\n\n```bash\nalias runModel='docker run --gpus all -it --user \"$(id -u):$(id -g)\" -w /model -v ${PWD}:/model ghcr.io/simzero/openfoam-ml-rom:v0.2.0'\n```\n\n`runModel` is a Docker command designed to run specific models with specified options. This command makes use of GPU acceleration and mounts your current directory to the Docker container.\n\n```bash\nrunModel [OPTIONS]\n\nExample: runModel -m OF/incompressible/simpleFoam/pitzDaily -j 30\n\nOPTIONS:\n\n-l, --list: List all available models, e.g.: `runModel` -l to get the list of models.\n\n-m, --model: Run a specified model, e.g.: `runModel` -m OF/incompressible/simpleFoam/flowAroundObstacles.\n-s, --skipTraining: Flag to skip training and evaluation steps.\n-j: Specify the number of cores for the run, .e.g.: `-j 4`.\n\n-c, --command: Instead of running a model, specify a command to run, e.g.: `runModel -c blockMesh`.\n\n-h, --help: Display help text, including the list of options and their descriptions.\n```\n\nFor `--skipTraining`, no GPUs are used and `--gpus all` is not required.\n\n## Usage from the repository\n\n### Installation requirements\n\nInitialize the thirdparty submodules with:\n\n```\ngit submodule update --init --recursive\n```\n\nThis project requires several packages to be installed on your system.\n\nCommon:\n* Python3\n* [Node.js](https://github.com/nodejs/node)\n* [jsfluids](https://github.com/simzero/jsfluids)\n\nML-based:\n* [OpenFOAM](https://develop.openfoam.com/Development/openfoam) (\u003e= v2106)\n* [openfoam-sdf-label](https://github.com/simzero/openfoam-sdf-label)\n* [deepcfd](https://github.com//carpemonf/deepcfd)\n* [cfdonnx](https://github.com/simzero/cfdonnx)\n* [OpenSCAD](https://openscad.org/downloads.html)\n\nROM-based\n* [OpenFOAM](https://develop.openfoam.com/Development/openfoam) (v2106)\n* ITHACA-FV 3.0 ([@carpemonf fork](https://github.com/carpemonf/ITHACA-FV))\n\n\nIf you are using a Debian-based Linux distribution, such as Ubuntu, you can install the following dependencies with the following command. Note that this step requires sudo access:\n\n```\nmake requirements-debian\n```\n\nYou can build the thirdparty packages with:\n\n```\nCORES=8 make thirdparty\n```\n\nThis will build OpenFOAM and related tools in the thirdparty folder.\n\n### Running models\n\nYou can now run all the models specifying the number of `CORES`. This will:\n\n- Generate the CFD data\n- Train the ML model, or build the ROM\n- Export to ONNX format if suitable\n- Evaluate models\n\n```\nCORES=30 make models\n```\n\nAlternatively, you can navigate to the OpenFOAM examples and run `./Allrun 30`.\n\n## Disclaimer\n\nThis offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. This offering is not approved or endorsed by any software packages mentioned above or their respective owners, and should not be considered as such.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimzero%2Fopenfoam-ml-rom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimzero%2Fopenfoam-ml-rom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimzero%2Fopenfoam-ml-rom/lists"}