Andre Weiner
TU Braunschweig, Institute of Fluid
Mechanics
Training material available at:
github.com/AndreWeiner/ofw2022_dmd_training
(download the datasets if you want to work alongside)
Flow past a surface mounted cube at $Re=40000$.
Simulation details:
Modal decomp. = spatial structures + temp. behavior
spatial mode
temporal coefficient
Preliminaries - state vector and data matrix:
$\mathbf{x}_n$ - state vector (e.g., pressure, velocity, ...)
$$ \mathbf{X} = \left[ \begin{array}{cccc} | & | & & | \\ \mathbf{x}_1 & \mathbf{x}_2 & ... & \mathbf{x}_{N} \\ | & | & & | \\ \end{array}\right] $$
Preliminaries - singular value decomposition (SVD):
$$ \mathbf{X} = \mathbf{U\Sigma V}^T $$
DMD core idea:
$$ \mathbf{x}_{n+1} = \mathbf{Ax}_n $$
$\mathbf{A}\in \mathbb{C}^{M\times M}$ - (best-fit) linear operator
How to compute $\mathbf{A}$?
$$ \underbrace{[\mathbf{x}_2, ..., \mathbf{x}_N]}_{\mathbf{X}^\prime} = A \underbrace{[\mathbf{x}_1, ..., \mathbf{x}_{N-1}]}_{\mathbf{X}} $$
$$ \mathbf{X}^\prime = \mathbf{AX} \rightarrow A\approx \mathbf{X}^\prime\mathbf{X}^{-1} = \mathbf{X}^\prime\mathbf{V\Sigma}^{-1}\mathbf{U}^T $$
best-fit (least squares) linear operator
The mode decomposition part:
$$ \mathbf{A} = \mathbf{\Phi\Lambda\Phi}^{-1} $$ $$ \mathbf{x}_2 = \mathbf{Ax}_1 = \mathbf{\Phi\Lambda\Phi}^{-1} \mathbf{x}_1 $$ $$ \mathbf{x}_3 = \mathbf{AAx}_1 = \mathbf{\Phi\Lambda\Phi}^{-1}\mathbf{\Phi\Lambda\Phi}^{-1} \mathbf{x}_1 = \mathbf{\Phi\Lambda}^{2}\mathbf{\Phi}^{-1} \mathbf{x}_1 $$ $$ \mathbf{x}_N = \mathbf{\Phi\Lambda}^{N-1}\mathbf{\Phi}^{-1} \mathbf{x}_1 $$
Only the $\mathbf{\Lambda}$ term changes!
Reconstruction and terminology:
$$ \mathbf{x}_n = \sum\limits_{j=1}^{N}\mathbf{\phi}_j \lambda_j^{n-1} b_j $$
What is the meaning of complex eigenvalues? Time-continuous formulation:
$$ \frac{\mathrm{d}\mathbf{x}}{\mathrm{d}t} = \mathbf{\mathcal{A}x} $$
Analytical solution by diagonalization of $\mathbf{\mathcal{A}}$:
$$ \frac{\mathrm{d}\mathbf{x}}{\mathrm{d}t} = \mathbf{\Phi}\tilde{\mathbf{\Lambda}}\mathbf{\Phi}^{-1}\mathbf{x} $$
$$ \mathbf{\Phi}^{-1}\frac{\mathrm{d}\mathbf{x}}{\mathrm{d}t} = \tilde{\mathbf{\Lambda}}\mathbf{\Phi}^{-1}\mathbf{x} $$
substitution $\mathbf{y} = \mathbf{\Phi}^{-1}\mathbf{x}$
$$ \frac{\mathrm{d}\mathbf{y}}{\mathrm{d}t} = \tilde{\mathbf{\Lambda}}\mathbf{y} $$
$$ y_1 = e^{\lambda_1 t} y_1(t=0),\ y_2=... $$
$$ \mathbf{y}(t) = \mathrm{exp}(\tilde{\mathbf{\Lambda}}t)\mathbf{y}_0 $$
$$ \mathbf{y}(t) = \mathrm{exp}(\tilde{\mathbf{\Lambda}}t)\mathbf{y}_0 $$
back-substitution $\mathbf{y} = \mathbf{\Phi}^{-1}\mathbf{x}$
$$ \mathbf{x}(t) = \mathbf{\Phi}\mathrm{exp}(\tilde{\mathbf{\Lambda}}t)\underbrace{\mathbf{\Phi}^{-1}\mathbf{x}_0}_{\mathbf{b}} $$
Back to the meaning of complex eigenvalues:
$$ \begin{align} \tilde{\lambda}_j &= a_i + b_i j \\ \mathrm{exp}\left(\tilde{\lambda}_i t\right) &= \mathrm{exp}\left((a_i+b_i j) t\right)\\ &= \mathrm{exp}\left(a_i t\right)\mathrm{exp}\left(b_i j t\right) \\ &= \mathrm{exp}\left(a_i t\right) \left(\mathrm{cos}\left(b_i t\right)+j\mathrm{sin}\left(b_i t\right)\right), \end{align} $$
$\rightarrow$ open preliminary_flow_analysis.ipynb
$\rightarrow$ open dmd_flowtorch.ipynb
Flow past a surface mounted cube at $Re=40000$.
Reconstruction of main vortex shedding mode.
Reconstruction of high-frequency vortex shedding mode.
$\rightarrow$ open fullCaseDMD
Advantages of OpenFOAM-based DMD:
Some possible improvements:
Analysis of transonic shock buffets using DMD
$\rightarrow$ Aerodynamics I, 10:00 am (Tuesday), Sixties
SIG workshop meeting today at 4:45 pm