Course overview and introduction

Andre Weiner
TU Dresden, Institute of fluid mechanics, PSM Creative Commons License
These slides and most of the linked resources are licensed under a
Creative Commons Attribution 4.0 International License.

Outline

  • course logistics
  • reporting issues
  • ML in fluid mechanics
  • lecture projects
  • technology stack

Course logistics

Times and location

  • lecture: Tuesdays 1:00-2:30pm
  • exercise: Wednesdays 7:30-9:00am
  • location: ZEU/114/H

Refer to OPAL for a detailed schedule of all lecture and exercises.

Workload and requirements

  • 5 CP, ~150h workload
  • 13 lectures + 13 exercise sessions
  • $150h-13*3h \approx 110h$ of self-study
  • prior ML/CFD knowledge is a plus
  • programming knowledge is essential
  • written exam 1.5h

Resources and communication

  • slides and exercises available on GitHub
  • all resources are updated regularly
  • getting help: GitHub issues (preferred), mail
  • general feedback: mail/OPAL

Exercises

  • exercise session: short introduction and Q & A
    $\rightarrow$ mostly self-study
  • exception: exercise 0 (Python intro)
  • remote support by course assistant

Github issues

learn to communicate professionally

Do you have a Github account?

Note: a Github account is not required but recommended.

How to open a new issue:

  1. go to the Github repository
  2. click on Issues (top left)
  3. use the search to check if a similar
    issue has been reported already
  4. if not, open a New issue (top left)
  5. report the issue and click on
    Submit new issue (bottom right)
issue

How to write an issue report:

  1. precise title
    Incorrect eigenvalue formula lecture 2 slides
  2. short description
    Comparing the formulas between script and slides of lecture 2, I found an inconsistency.
  3. precise problem description
    The formula reads $\mathbf{XQ}=\mathbf{Q\Lambda}$ in the script and $\mathbf{XQ}=\mathbf{\Lambda Q}$ on the slides.

Optional tips for writing issues:

  • expected behavior
    I expected a 3x2 tensor but got a 2x3 tensor.
  • suggestion for correction
    I believe the correct formula is $\mathbf{XQ}=\mathbf{Q\Lambda}$.
  • link related issues using #issue_number
    The problem might be related to issue #6.
  • provide details about your setup
    I am running Ubuntu 20.04 using WSL.

See also: 45 Github Issues Dos and Don't

Using ML in fluid mechanics

the study of fluid mechanics ...

  • produces large amounts of complex data
  • requires data or representations thereof

ML ...

  • finds patterns in data
  • creates useful representations of data

primary (physical) data

  • flow snapshots (volume, boundaries, slices)
  • derived quantities (averages, force coefficients)
  • ...

secondary data (the rest)

  • log files (residuals, quality metrics)
  • setting (numerical schemes, physical models)
  • ...
data-size

Progression of snapshot size in direct numerical simulations (DNS).

Simulations become more and more sophisticated:

  • turbulence models
  • transport models
  • equations of state
  • mixture models
  • linear solver settings
  • discretization schemes
  • ...

$\rightarrow$ closure models and decision making required

data-2

Examples: surrogate modeling, flow analysis

data-1

Examples: boundary conditions, material models

data-3

Examples: scale/complexity-reduced modeling

data-3

Examples: flow control, parameter optimization

ML is not a magic problem solver

matching given inputs and continuous outputs

matching given inputs and discrete outputs

finding low-dimensional representations

grouping similar data points

learning optimal control in dynamic environments

model

What type of ML could be helpful in the following scenarios?

Creating a transport model $\mu (T)$ based on experimental data ...

  1. regression
  2. classification
  3. clustering
  4. dimensionality reduction

Predicting the impact behavior of a droplet on a surface ...

  1. regression
  2. classification
  3. clustering
  4. dimensionality reduction

Switching between two turbulence models in a RANS simulation ...

  1. regression
  2. classification
  3. clustering
  4. reinforcement learning

Finding coherent structures in turbulent flows ...

  1. reinforcement learning
  2. classification
  3. clustering
  4. dimensionality reduction

Closed-loop active flow control of the flow past a cylinder

  1. regression
  2. reinforcement learning
  3. clustering
  4. dimensionality reduction

hints to create sensible ML applications

  • domain knowledge is essential
  • ML shines in higher dimensions
  • combination of multiple ML techniques
  • combine the strengths of ML and
    standard (classical) approaches

Lecture projects

Lectures 2 & 3: write a CFD solver from scratch

data-size

Lectures 4 & 5: learn approximate velocity profiles

data-size

Lecture 6: predict the stability regime of rising bubbles

data-size

Lectures 7: compute mass transfer at high Schmidt numbers

Lectures 8 & 9: find coherent structures in turbulent flows

Lecture 10: create a reduced-order flow model

data-size

Lecture 11: optimal open-loop flow control

data-size

Lectures 12 & 13: learn an agnostic control law from scratch

Technology stack

Linux and the command line

Git and GitHub

Jupyter labs

Python

PyTorch

OpenFOAM

Apptainer/containers