Update Slide for June 11

M. Raba

Created: 2024-06-11 Tue 18:56

1. Code Execution and Layout

1.1. Layout

  1. b7.m
  2. initSpectral.m
    • reads in binary files, takes eg m-fft
  3. \(\hookrightarrow\) initEigs.m
    • forms corrMat, finds eigenvalues

1.2. Layout 2

  1. \(\hookrightarrow\) initPod.m
    • carries out POD calculations (quadrature, multiplication ggf betwen \(\alpha \Phi\)) according to Papers (Citriniti George 2000 for Classic POD, Hellstrom Smits 2017 for Snapshot POD)
  2. \(\hookrightarrow\) timeReconstructFlow.m
    • performs 2d reconstruction + plotSkmr (generates 1d radial graph)

1.3. Important Switches

pipe = Pipe(); creates a Pipe Class. As the functions (above) are called, data is stored in sub-structs:

  1. obj.CaseId - stores properties like Re, rotation number \(S\), experimental flags such as quadrature (simpson/trapezoidal), number of gridpoints, frequently called vectors (rMat \(r=1,\ldots , 0.5\))
  2. obj.pod - eigen data, used for calculating POD
  3. obj.solution - computed POD modes
  4. obj.plt - plot configuration

2. Equations Used in Code Procedure

2.1. Classic POD Equations

  • The following equations are used in the above code.
\begin{align} \label{eq:einstein} &\int_{r^{\prime}} \mathbf{S}\left(k ; m ; r, r^{\prime}\right) \Phi^{(n)}\left(k ; m ; r^{\prime}\right) r^{\prime} \mathrm{d} r^{\prime}=\lambda^{(n)}(k ; m) \Phi^{(n)}(k ; m ; r) \\ &\mathbf{S}\left(k ; m ; r, r^{\prime}\right)=\lim _{\tau \rightarrow \infty} \frac{1}{\tau} \int_0^\tau \mathbf{u}(k ; m ; r, t) \mathbf{u}^*\left(k ; m ; r^{\prime}, t\right) \mathrm{d} t \\ &\alpha^{(n)}(k ; m ; t)=\int_r \mathbf{u}(k ; m ; r, t) \Phi^{(n)^*}(k ; m ; r) r \mathrm{~d} r \end{align}

2.2. Classic POD Equations (Fixed)

\begin{align} & \int_{r^{\prime}} \underbrace{r^{1 / 2} S_{i, j}\left(r, r^{\prime} ; m ; f\right) r^{\prime 1 / 2}}_{W_{i, j}\left(r, r^{\prime} ; m ; f\right)} \underbrace{\phi_j^{*(n)}\left(r^{\prime} ; m ; f\right) r^{\prime 1 / 2}}_{\hat{\phi}_j^{\psi(i)}\left(r^{\prime} ; m ; f\right)} \mathrm{d} r^{\prime} \\ & =\underbrace{\lambda^{(n)}(m, f)}_{\hat{\lambda}^{(n)}(m ; f)} \underbrace{r^{1 / 2} \phi_i^{(n)}(r ; m ; f)}_{\hat{\phi}_i^{(n)}(r, m ; f)} \\ %& \Rightarrow\lim _{\tau \rightarrow \infty} \frac{1}{\tau} \int_0^\tau\left(r^{1 / 2} \mathbf{u}(m ; r, t), r^{1 / 2} \\ %\times \mathbf{u}\left(m ; r, t^{\prime}\right)\right) \alpha_n(m ; t) d t^{\prime} \\ %&=\lambda_n(m) \alpha_n(m ; t), &\alpha_n(m ; t)=\int_r \mathbf{u}(m ; r, t) r^{1 / 2} \Phi_n^*(m ; r) d r \end{align}

2.3. Snapshot POD Equations

\begin{align} &\lim _{\tau \rightarrow \infty} \frac{1}{\tau} \int_0^\tau \mathbf{u}_{\mathrm{T}}(k ; m ; r, t) \alpha^{(n)^*}(k ; m ; t) \mathrm{d} t \\ &=\Phi_{\mathrm{T}}^{(n)}(k ; m ; r) \lambda^{(n)}(k ; m) \\ &\mathbf{R}\left(k ; m ; t, t^{\prime}\right)=\int_r \mathbf{u}(k ; m ; r, t) \mathbf{u}^*\left(k ; m ; r, t^{\prime}\right) r \mathrm{~d} r \\ &\lim_{\tau \to \infty} \frac{1}{\tau} \int_{0}^{\tau} \mathbf{u}_{\mathbf{T}}(k; m; r, t) \alpha^{(n)*}(k; m; t) \, \mathrm{d}t \\ &= \Phi_{\mathbf{T}}^{(n)}(k; m; r) \lambda^{(n)}(k; m). \end{align}

2.4. Reconstruction

The reconstruction is given by,

\begin{align} q(\xi,t) - \bar{q}(\xi) &\approx \sum_{j=1}^{r} a_j(t) \varphi_j(\xi) \Rightarrow \\ q(r,\theta,t;x) &= \bar{q}(r,\theta,t;x) + \sum_{n=1} \sum_{m=0} \alpha^{(n)}(m;t) \Phi^{(n)} (r;m;x) \end{align}

Since the snapshot pod implementation is not error-free, the reconstruction can only be recovered by writing for \(\text{factor} \gg 0\).

\begin{align} q(r,\theta,t;x) &= \bar{q}(r,\theta,t;x) + \text{(factor $\gamma$)}\sum_{n=1} \sum_{m=0} \alpha^{(n)}(m;t) \Phi^{(n)}(r;m;x) \end{align}

2.5. Reconstruction

In order to reconstruct in code, caseId.fluctuation = ’off’. This is incorrect. The necessary use of (factor \(\gamma\)) is incorrect

3. Derivation

To derive the questioned equation, consider the integral:

\begin{align} \frac{1}{\tau} \int_0^\tau \mathbf{u}_{\mathrm{T}}(k ; m ; r, t) \alpha^{(n)^*}(k ; m ; t) d t . \end{align}

Substitute \(\mathbf{u}_{\mathrm{T}}\) with its expansion:

\begin{align} \frac{1}{\tau} \int_0^\tau\left(\sum_l \Phi_{\mathrm{T}}^{(l)}(k ; m ; r) \alpha^{(l)}(k ; m ; t)\right) \alpha^{(n)^*}(k ; m ; t) d t . \end{align}

3.1. 4 Derivation

Exchange the order of summation and integration, and apply orthogonality,

\begin{align} \sum_l \Phi_{\mathrm{T}}^{(l)}(k ; m ; r)\left(\frac{1}{\tau} \int_0^\tau \alpha^{(l)}(k ; m ; t) \alpha^{(n)^*}(k ; m ; t) d t\right) . \end{align}

Due to the orthogonality, namely that \(\alpha^{(n)}\) and \(\alpha^{(p)}\) are uncorrelated

\begin{align} \langle a^{(n)} \alpha^{(p)} \rangle = \lambda^{(n)} \delta_{np} \end{align}

all terms where \(l \neq n\) will vanish, and there remains only the \(l=n\) term,

\begin{align} \Phi_{\mathrm{T}}^{(n)}(k ; m ; r)\left(\frac{1}{\tau} \int_0^\tau \alpha^{(n)}(k ; m ; t) \alpha^{(n)^*}(k ; m ; t) d t\right) . \end{align}

This derivation assumes the normalization of modes and their orthogonality, along with the eigenvalue relationship to simplify the original integral into a form that reveals the spatial structure ( \(\Phi_{\mathrm{T}}^{(n)}\) ) of each mode scaled by its significance \(\left(\lambda^{(n)}\right)\).

3.2. 6 Derivation

The cross-correlation tensor \(\mathbf{R}\) is defined as \(\mathbf{R}\left(k ; m ; t, t^{\prime}\right)=\int_r \mathbf{u}(k ; m ; r, t) \mathbf{u}^*\left(k ; m ; r, t^{\prime}\right) r \mathrm{~d} r\). This tensor is now transformed from \(\left[3 r \times 3 r^{\prime}\right]\) to a \(\left[t \times t^{\prime}\right]\) tensor. The \(n\) POD modes are then constructed as,

\begin{align} \lim _{\tau \rightarrow \infty} \frac{1}{\tau} \int_0^\tau \mathbf{u}_{\mathrm{T}}(k ; m ; r, t) \alpha^{(n)^*}(k ; m ; t) \mathrm{d} t=\Phi_{\mathrm{T}}^{(n)}(k ; m ; r) \lambda^{(n)}(k ; m) . \end{align}

4. Result Comparison Classic/Snapshot

4.1. Radial Classic

classic-pod-radial.png

4.2. Snapshot-Classic Comparison

classic-snapshot-compare-radial.png

4.3. Klassik POD S=0.0

pod.k0.0.png

4.4. Klassik POD S=3.0

pod.k3.0.png

5. Energy n=0 Classic

k.n0.egy.png

5.1. n=3 Classic

k.n3.egy.png

5.2. Analysis

6. Reconstruction

6.1. Reconstruction

reconstruct-400-50.png

7. Thesis

  • Thesis File