Chapter 1 - Introduction and Supervised
Chapter 1 - Introduction and Supervised
2
fl
General Motivation
Computational Methods in the Age of Deep Learning
Scienti c Discoveries
• Traditional: experiment & theory. Contemporary: computation.
• Machine learning & data-driven approaches:
- Understanding nature: Keppler’s orbit (1609)
- Discovering patterns from observations (Darcy’s law, 1856)
- Principal component analysis (e.g. Pearson, 1901)
• Deep Learning as fundamental step forward
5
fi
Versus Classical Numerical Methods
6
fl
fi
Versus Classical Numerical Methods
ffi
Rough Categorization - Types of Integration
Loss Terms
Hybrid
Inverse
Problems
8
Category 1/3: Supervised / No Integration
E.g.: https://github.com/thunil/Deep-Flow-Prediction
• Supervised loss, di erential equation (PDE / ODE) only used to generate data
• Thuerey et. al: learning RANS ows
9
ff
fl
Category 2/3: Loss Terms / “Unsupervised”
E.g.: https://github.com/google/FluidNet
• “Unsupervised” training
• Tompson et al.: learning Poisson solvers
10 fi
Category 3/3: Interleaved / Tight Integration
E.g.: https://github.com/tum-pbs/Solver-in-the-Loop
• Train neural network to work alongside numerical solver (details will follow)
• Um et al.: “solver in the loop” approach
• Unsuper-/supervised distinction not too meaningful
11
Hybrid Solver Example
Example in Motion: Unsteady Wake Flow in 3D, Re=546.9
0.6
Source Solver + NN
Reference
0.3
0.0
12
Organization
• Main Lecturers
- Nils Thuerey
- Mario Lino
• Exercise Supervision
- Qiang Liu
14
Content
1. Introduction & Supervised Learning
2. Physical Losses & Di erentiable Solvers
3. Constructing Hybrid Solvers
4. Graph Networks
5. Time-Series Predictions
6. Gradients and Adjoint Methods
7. Di usion Models
8. Reinforcement Learning
9. Conclusions
15
ff
ff
Content
What this course is _not_
17
Course Overview
Practical Aspects - Exercises
19
Course Overview
Practical Aspects - Exam
20
Script
Primarily: https://www.physicsbaseddeeplearning.org/
21
Teaser Example from PBDL
https://colab.research.google.com/github/tum-pbs/pbdl-book/blob/main/intro-teaser.ipynb
• DL extremely powerful…
• … but sometimes surprisingly wrong
22
Supervised Learning
ADVANCED DEEP LEARNING FOR PHYSICS
Model Equations
• Di usion
• Burgers
• Navier-Stokes
25
ff
Model Equations
Basic PDEs
• Di usion
• Burgers
• Navier-Stokes
∂u
− α ∇2 u = 0
∂t
Di usion constant α
26
ff
ff
Model Equations
Basic PDEs
• Di usion
• Burgers (in 2D)
• Navier-Stokes
∂ux
+ u ⋅ ∇ux = ν∇ ⋅ ∇ux
∂t
∂uy
+ u ⋅ ∇uy = ν∇ ⋅ ∇uy
∂t
Kinematic Viscosity ν
27
ff
Model Equations
Basic PDEs
• Di usion
• Burgers
• Navier-Stokes (2D)
∂ux 1
+ u ⋅ ∇ux = − ∇p + ν∇ ⋅ ∇ux + gx
∂t ρ
∂uy 1
+ u ⋅ ∇uy = − ∇p + ν∇ ⋅ ∇uy + gy
∂t ρ
s.t. ∇ ⋅ u = 0
28
ff
Model Equations
Basic PDEs
• Di usion
• Burgers
• Navier-Stokes (2D)
Forward: initial & boundary conditions, solve from time t0 to end time
32
𝒫
𝒫
fi
Re-cap Supervised Training
• De nition Supervised Training := purely data-driven, pre-computed x, y, with simple loss (e.g. L 2)
• Fully data-driven
- Physical model not taken into account xi f(xi; θ) yi
33
fi
Supervised Training
https://colab.research.google.com/github/tum-pbs/pbdl-book/blob/main/supervised-airfoils.ipynb
34
Training Surrogate Models
Supervised Training for Time Integration
2
• Then, just like before: arg minθ | f(x; θ) − y* |2
35
Training Surrogate Models
Recurrent Evaluation
36
Training Surrogate Models
Growing Errors - Example
37
fl
Training Surrogate Models
Outlook
38
fi
Supervised Training
Best Practices
39
fi
Supervised Training
Best Practices
40