# proper orthogonal decomposition analysis filter

I think it is very easy for the developers to implement a proper orthogonal decomposition for unsteady flow with equal spaced timesteps using Snapshot POD algorithm described in chapter 3.2 of http://web.mit.edu/kwillcox/Public/Web/BTTanMS.pdf

The algorithm is:

0. get timestepvalues of interest as t*i, i=1..N
1. load field P of two timesteps such as as P*i=P(t

*i),P*j=P(t

*j)*

2. calculate the correlation Rij = inner

2. calculate the correlation R

*product(P*i,P

*j)/N, the definition of inner product could be integration of P*i*P

*j over the volume.*

3. get the eigen value lambdai and corresponding vector eV

3. get the eigen value lambda

*ii of matrix {R*ij}

4. construct the i-th POD basis psi

*i = sum(dot(eV*ij,P

*j),j=1..N), usually, only the first bases are used.*

5. reconstruct Prm field using first m POD bases:

5. reconstruct Pr

Pr

*m = sum(lambda*i * psi_i, i = 1.. m)

output the psi*i and Pr*m

I just tried to implement this algorithm using python, but the problem is I need to open the same case file two times, and using a pipeline to integrate over the volume. And I do not know how to sum over all N timesteps weighted with the eigen vector eV_i. It is very complex in python on client side. I think it is better to implement it in C++ as a filter.

Thanks

**13**votes