This lecture is funded by the foundation for innovation in higher education.
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.
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 |
2+3 | Finite-volume-based simulations in a nutshell | link | view |
4+5 | Introduction to machine learning | link | view |
6 | Surrogate modeling for discrete predictions | link | view |
7+8 | Surrogate modeling for continuous predictions | link | view |
9 | Approximating flow fields from limited data | link | view |
10+11 | Analyzing coherent structures | link | view |
12 | Reduced-order modeling of flow fields | link | view |
13 | Optimal open-loop control | link | view |
14+15 | Closed-loop control using DRL | link | view |
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 | notebook |
---|---|---|
0 | Course-specific Python refresher | view |
1 | Setting up your system | view |
2+3 | End-to-end simulations in OpenFOAM and Basilisk | view |
4+5 | End-to-end machine learning project in PyTorch | view |
6 | Building a robust path regime classification model | view |
7+8 | Computing highly accurate mass transfer at rising bubbles | view |
9 | Learning the flow past a cylinder from limited data | view |
10+11 | Analyzing coherent structures with POD and DMD | view |
12 | Creating a reduced-order model using CNM | view |
13 | Optimal open-loop control of the flow past a cylinder | view |
14+15 | Closed-loop control of the flow past a cylinder | view |
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.
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.
Glossary
The following list of acronyms may help you when exploring notebooks and slides:
- CFD - computational fluid dynamics
- CNM - cluster-based network modeling
- DL - deep learning
- DRL - deep reinforcement 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
- RL - reinforcement learning
- TPU - tensor processing unit
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