 # proper orthogonal decomposition analysis filter

From a user voice request

# 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 ti, i=1…N

1. load field P of two timesteps such as as Pi=P(ti),Pj=P(tj)
2. calculate the correlation Rij = innerproduct(Pi,Pj)/N, the definition of inner product could be integration of Pi*Pj over the volume.
3. get the eigen value lambdai and corresponding vector eVii of matrix {Rij}
4. construct the i-th POD basis psii = sum(dot(eVij,Pj),j=1…N), usually, only the first bases are used.
5. reconstruct Prm field using first m POD bases:
Prm = sum(lambdai * psi_i, i = 1… m)

output the psii and Prm

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