Running PyTorch models in OpenFOAM – basic setup and examples

  1. Why PyTorch
  2. Docker image with OpenFOAM and PyTorch
  3. Local installation of LibTorch
  4. Setting up Visual Studio Code
  5. Compiling examples using wmake and CMake
  6. Additional links to resources
  7. Summary

Incorporating data-driven workflows in computational fluid dynamics (CFD) is currently a hot topic, and it will undoubtedly gain even more traction over the months and years to come. The main idea is to use available datasets to make simulation-based workflows faster or more accurate. In the field of machine learning (ML) applied to CFD, deep learning (DL) algorithms allow us to tackle high-dimensional problems more effectively and promise significant progress in fields like turbulence modeling, flow control, or shape optimization. If you found your way to this article, chances are high that you don’t need to be convinced of the potential of ML/DL + CFD. So let’s skip the prose and get started with the nitty-gritty of this article: how to set up PyTorch to run DL models in OpenFOAM apps.

Continue reading “Running PyTorch models in OpenFOAM – basic setup and examples”