Machine learning in computational fluid dynamics
This repository contains resources accompanying the lecture machine learning in computational fluid dynamics provided by the Institute of Fluid Mechanics at TU Braunschweig. Note that slides, notebooks, and other resources will be regularly updated throughout the term.
Glossary
The following list of acronyms may help you when exploring notebooks and slides:
- CFD - computational fluid dynamics
- DL - deep learning
- GPU - graphics processing unit
- IEEE - Institute of Electrical and Electronics Engineers
- IEEE 754 - IEEE standard for floating-point arithmetics
- JIT - just in time (compiler)
- LES - large eddy simulation
- LHS - latin hypercube sampling
- MAE - mean absolute error
- ML - machine learning
- MPI - message passing interface
- MSE - mean squared error
- PINN - physics-informed neural network
- RANS - Reynolds-averaged Navier Stokes
- TPU - tensor processing unit
Datasets
Both exercises and lectures sometimes require datasets. Usually, there are instructions how to create or extract the data yourself. For convenience, a downloadable snapshot of the latest data (20. Dec 2021) is provided, too.
Lectures
If equations in the lecture notebooks do not get rendered properly on Github, download the notebook and open it using jupyter-lab
(refer to the first exercise session for an overview of dependencies and installation instructions).
# | topic | slides | notebook |
---|---|---|---|
1 | Course overview and motivation | link | view online |
2 | Finite-volume-based CFD in a nutshell | link | view online |
3 | Introduction to machine learning | link | view online |
4 | Predicting the stability regime of rising bubbles | link | view online |
5 | Computing highly accurate mass transfer at rising bubbles I | link | view online |
6 | Computing highly accurate mass transfer at rising bubbles II | link | view online |
7 | Analyzing coherent structures in flows displaying transonic buffets I | link | view online |
8 | Analyzing coherent structures in flows displaying transonic buffets II | link | view online |
9 | Reduced-order modeling of the flow past a cylinder | link | view online |
10 | Controlling the flow past a cylinder I | link | view online |
11 | Controlling the flow past a cylinder II | link | view online |
Exercises
Prerequisites
The exercises are designed for native Linux operating systems like Ubuntu (recommended). They may also work on Windows Subsystem for Linux (WSL). To set up your system for the exercises, refer to the notebook accompanying exercise session 1.
Exercise sessions
# | topic | slides | notebook |
---|---|---|---|
1 | Setting up your system | - | view online |
2 | End-to-end simulations in OpenFOAM and Basilisk | - | view online |
3 | End-to-end machine learning project in PyTorch | - | view online |
4 | Building a robust path regime classification model in PyTorch | - | view online |
5 | Generation and processing of training data for regression | - | view online |
6 | Model creation in PyTorch and mass transfer simulations in OpenFOAM | - | view online |
7 | Principal component analysis of surface pressure data | - | view online |
8 | Dynamic mode decomposition of a buffeting flow | - | view online |
9 | Creating a reduced-order model in flowTorch | - | view online |
10 | Open-loop control of the flow past a cylinder in OpenFOAM | - | view online |
11 | Closed-loop control of the flow past a cylinder with OpenFOAM and PyTorch | - | view online |
Getting and providing help and feedback
If you
- get stuck solving an exercise problem
- have technical issues
- have theoretical questions about math or programming
- think that some instructions or explanations might need improvement
- want to report typos or logical errors
- want to provide feedback and suggestions about the course
the easiest way to get in touch is to open a new issue in this repository. Before opening a new issue, please use the search function to see if a related issue was reported previously. It also helps greatly if you label your issue using one or more of the predefined labels (lecture, exercise, OpenFOAM, ...), and if you take some time to state your problem as clearly as possible. Note that everyone is welcome to participate in discussion and solving issues.
If you are a student at TU Braunschweig enrolled in the course Machine Learning in Computational Fluid Dynamics, you may also get in touch via the studIP platform or via mail. However, the issue-workflow described above is the preferred method.
References and other resources
Book recommendations
- books for computational fluid dynamics
- The OpenFOAM technology primer by T. Marić, J. Höpken, and K. G. Mooney
- The finite volume method in computational fluid dynamics by F. Moukalled, L. Mangani, and M. Darwish
- An introduction to computational fluid dynamics: the finite volume method by H. K. Versteeg and W. Malalasekera
- books for linear algebra
- Introduction to linear algebra by G. Strang
- books for data-driven modelling and control
- Data-driven science and engineering: machine learning, dynamical systems, and control by S. L. Brunton and J. N. Kutz
- Dynamic mode decomposition: data-driven modeling of complex systems by J. N. Kutz, S. L. Brunton, B. W. Brunton, and J. L. Proctor
- Grokking deep reinforcement learning by M. Morales
- Deep learning with PyTorch by E. Stevens, L. Antiga, and T. Viehmann
- books for programming
- Python crash course by E. Matthes
- C++ crash course: a fast-paced introduction by J. Lospinoso
- The Linux command line by W. Shotts