# 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 R_ij = inner_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 lambda_i and corresponding vector eV_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 Pr_m field using first m POD bases:

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

**10**votes