OFDataCommittee / openfoam-smartsim

Sub-module for OpenFOAM that provides a solver for embedding SmartSim and its external dependencies (i.e. SmartRedis) into OpenFOAM.
GNU General Public License v3.0
22 stars 11 forks source link
openfoam smartsim

openfoam-smartsim

General Description

Sub-module for OpenFOAM that provides a solver for embedding SmartSim and its external dependencies (i.e. SmartRedis) into arbitrary OpenFOAM simulations.

The sub-module provides examples for coupling OpenFOAM with SmartSim

License

The source code license: GPL-3.0-or-later

Requirements

  1. OpenFOAM-v2312 or newer, or a recent development version from OpenFOAM.com.
  2. SmartSim 0.6.2 installation instructions
  3. SmartRedis latest, installed automatically by ./Allwmake
  4. [PyFoam,pandas,matplotlib]: pip install PyFoam pandas matplotlib

Building

Tested compilers

Compiling and installation

The OpenFOAM-SmartSim coupling functions over a connection that OpenFOAM as a client maintains with the SmartRedis database. This means that OpenFOAM elements (application, solver, function object, boundary condition, etc.) must be able to include SmartRedis source folders and link with a SmartRedis library. To facilitate this, an ./Allwmake Bash script is provided.

To build the project, you need to have a working OpenFOAM environment:

openfoam-smartsim > ./Allwmake

Running

OpenFOAM+SmartSim workflows are implemented in Python programs where SmartSim "governs" the computational workflow. The workflows can be implemented in Jupyter Notebooks or as Python programs.

Examples that use Jupyter Notebooks set some requirements:

Head to one of the tutorials, and run the jupyter notebook or a python program you find there.

Authors / Contributors

Name Affiliation Email
Alessandro Rigazzi HPE
Andrew Shao HPE
Andre Weiner TU Dresden
Matt Ellis HPE
Mohammed Elwardi Fadeli TU Darmstadt
Tomislav Maric TU Darmstadt

References

Maric, T., Fadeli, M. E., Rigazzi, A., Shao, A., & Weiner, A. (2024). Combining Machine Learning with Computational Fluid Dynamics using OpenFOAM and SmartSim. arXiv preprint https://doi.org/10.1007/s11012-024-01797-z.