# In Situ Framework for Coupling Simulation and Machine Learning with Application to CFD

arXiv: https://arxiv.org/abs/2306.12900 · HTML: https://mlsanity.com/paper/2306.12900/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 36 references that are in the map.
- First posted on arXiv 22 Jun 2023.

## Builds on (most cited first, 11 of 11)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Learning Mesh-Based Simulation with Graph Networks](https://mlsanity.com/paper/2010.03409/) (2020)
- [Machine Learning for Fluid Mechanics](https://mlsanity.com/paper/1905.11075/) (2019)
- [Scientific multi-agent reinforcement learning for wall-models of turbulent flows](https://mlsanity.com/paper/2106.11144/) (2021)
- [Quantifying model form uncertainty in Reynolds-averaged turbulence models with Bayesian deep neural networks](https://mlsanity.com/paper/1807.02901/) (2018)
- [A Fortran-Keras Deep Learning Bridge for Scientific Computing](https://mlsanity.com/paper/2004.10652/) (2020)
- [Deep Reinforcement Learning for Turbulence Modeling in Large Eddy Simulations](https://mlsanity.com/paper/2206.11038/) (2022)
- [QuadConv: Quadrature-Based Convolutions with Applications to Non-Uniform PDE Data Compression](https://mlsanity.com/paper/2211.05151/) (2022)
- [Dynamic Deep Learning LES Closures: Online Optimization With Embedded DNS](https://mlsanity.com/paper/2303.02338/) (2023)
- [Deploying deep learning in OpenFOAM with TensorFlow](https://mlsanity.com/paper/2012.00900/) (2020)
- [PythonFOAM: In-situ data analyses with OpenFOAM and Python](https://mlsanity.com/paper/2103.09389/) (2021)

## Built on by (most cited first, 2 of 2)

- [Scalable and Consistent Graph Neural Networks for Distributed Mesh-based Data-driven Modeling](https://mlsanity.com/paper/2410.01657/) (2024)
- [SAMpLE: A SystemC-AMS Machine LEarning-based Framework for Virtual Prototyping](https://mlsanity.com/paper/2608.25910/) (2026)

## Abstract (arXiv)

Recent years have seen many successful applications of machine learning (ML) to facilitate fluid dynamic computations. As simulations grow, generating new training datasets for traditional offline learning creates I/O and storage bottlenecks. Additionally, performing inference at runtime requires non-trivial coupling of ML framework libraries with simulation codes. This work offers a solution to both limitations by simplifying this coupling and enabling in situ training and inference workflows on heterogeneous clusters. Leveraging SmartSim, the presented framework deploys a database to store data and ML models in memory, thus circumventing the file system. On the Polaris supercomputer, we demonstrate perfect scaling efficiency to the full machine size of the data transfer and inference costs thanks to a novel co-located deployment of the database. Moreover, we train an autoencoder in situ from a turbulent flow simulation, showing that the framework overhead is negligible relative to a solver time step and training epoch.
