MoriNet: A Machine Learning-based Mori-Zwanzig Perspective on Weakly Compressible SPH
Rene Winchenbach
Technical University Munich
Machine Learning and you
Take your simulations
Turn it into linear steps
Feed it all the data
→ Solve Navier Stokes!
… right?
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
2
Neural Network
(Matrix Multiplications)
“Training”
General solution for
Everything everywhere
Simulated with diffSPH
(our differentiable solver)
The Problem
The classic Machine Learning Task:
Start with some random flow data for training
Neural Network Architecture not important
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
3
Weak Compressibility in SPH
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
4
SPH Density: The summation approach
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
5
SPH Density: The modern approach
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
6
Density as Hidden Information
„Classic“ SPH: Positions define density
„Modern“ SPH: Density independent variable
Two options:
2. Ignore density as an input feature
The second approach is the Machine Learning way
But can this work?
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
7
Density as Hidden Information 2
We can setup a simple experiment:
Result:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
8
End of Presentation
9
(not really)
Mori Zwanzig Formalism (very basic overview)
Mori Zwanzig comes from statistical mechanics
Given a complex system of high order
The physical system is First Order Markovian (it only depends on current information)
We use a Reduced Order Model (ROM)
ROM can come in many shapes
This means:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
10
Markovian Term
Memory Term
Noise Term
Mori Zwanzig Simplism
A pendulum has well defined physics
Given the full state (positions and velocities) we know the next state
This is first order Markovian
ROM: Take a picture
Next state no longer defined
MZ: Given a history of positions we can infer velocity
Next state can be estimated
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
11
Mori Zwanzig Practicism
Full simulation: First Order Markovian
„Modern“ SPH without density information: Incomplete ROM
Mori Zwanzig:
Provide history → Infer full state → Prediction improves
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
12
Mori Zwanzig in practice: Results
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
13
No History
16 Steps History
Flipping the perspective
Mori Zwanzig gives a very theoretical view on Machine Learning
No general consensus on what Mori Zwanzig actually implies
Recall:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
14
Flipping the perspective
Mori Zwanzig gives a very theoretical view on Machine Learning
No general consensus on what Mori Zwanzig actually implies
Recall:
We are dealing with WCSPH -
Density variations matter for short timescales -
Long term behavior converges to mean behavior -
Temporal Coarse Graining → We only consider long term behavior! -
15
Flipping the perspective: Results
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
16
No History
Result after 32 Steps
Emulator Superiority: The Machine Learning Way
Can an emulator be better than its reference?
„„„„„„Yes!““““““
… some caveats apply to this:
In this case:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
17
What does this behavior look like?
Dr. rer. nat. Erika Mustermann (TUM) | kann beliebig erweitert werden | Infos mit Strich trennen
18
Closure Modelling
Dr. rer. nat. Erika Mustermann (TUM) | kann beliebig erweitert werden | Infos mit Strich trennen
19
Why Machine Learning to begin with?
Why do we want Machine Learning anyways?
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
20
21
Differentiable SPH Solvers can do it all:
Shape Optimization:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
22
Optimize Interference
at point in space
Inverse Problems:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
23
Match Initial Conditions to match trajectory
Parameter Optimization:
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
24
Closure Modelling
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
25
Neural Network
+
Explicit Euler
RK4
Solver In The Loop
Loss based Physics
Define Problem using Loss
Evolving Physics == Minimize Loss
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
26
Conclusions
Machine Learning can be analyzed from a theoretical perspective
Emulators can be better than their reference data …
… in some cases
Closure Modelling requires tight integration of solver and network
Adjoint Problems don‘t require Neural Networks to solve
Check out our fully differentiable SPH Solver:
diffSPH
MoriNet: A Mori-Zwanzig perspective on weakly compressible SPH
27