Proper Orthogonal Decomposition

The Proper Orthogonal Decomposition (POD) is a data-processing technique which takes a given dataset and extracts a set of orthogonal basis functions and the corresponding coefficients.

Let us consider the solution of a numerical model of a differential equation \(\mathbf{u}(\mathtt{x},t)\), where \(\mathtt{x} = (x,y,z)\) is the position vector where the function is evaluated and \(t\) is the time. The idea behind the POD is to decompose the random vector field \(\mathbf{u}(\mathtt{x},t)\), into a set of deterministic spatial functions \(\Phi_{k}{\mathtt{x}}\), multiplied by random time coefficients \(\alpha_{k}(t)\), so that:

\[\mathbf{u}(\mathtt{x},t) = \sum_{k=1}^{\infty}\alpha_{k}(t)\Phi_{k}(\mathtt{x})\]

where \(\Phi_{k}(\mathtt{x})\) are the spatial POD modes and \(\alpha_{k}(t)\) are the time coefficients.

The above decomposition is achieved by maximizing the energy that can be captured by the first \(n\) spatial POD modes (Weiss [5]). POD modes are orthonormal and thus one can write

\[\begin{split}\iiint_{\mathtt{x}} \Phi_{k_{1}}(\mathtt{x}) \Phi_{k_{2}}(\mathtt{x}) d\mathtt{x} = \begin{cases} 1, & \text{if $k_1 = k_2$}.\\ 0, & \text{if $k_1 \ne k_2$} \end{cases}\end{split}\]

Furthermore, at each time coefficient \(\alpha_{k}(t)\) only depends on the spatial mode \(\Phi_{k}(\mathtt{x})\). By multiplying the decomposition equation with \(\Phi_{k}(\mathtt{x})\) and integrating over space one obtains the following

\[\alpha_{k}(t) = \iiint_{\mathtt{x}} \mathbf{u}(\mathtt{x},t) \Phi_{k}(\mathtt{x}) d\mathtt{x}\]

The POD method has two variants, the Direct POD (DirectPOD) and Snapshot POD (SnapshotPOD), both implemented as subclasses of the parent POD class. In cases where the dataset is large, the Snapshot POD is recommended because it is much faster.

POD Class

The POD class is the base class for all implementations of the POD.

class POD(solution_snapshots=None, n_modes=None, reconstruction_percentage=None)[source]
Parameters:
  • solution_snapshots (Union[ndarray, list, None]) –

    Array or list containing the solution snapshots. If provided as an numpy.ndarray, it should be three-dimensional, where the third dimension of the array corresponds to the number of snapshots. If provided as a list, the length of the list corresponds to the number of snapshots.

    If solution_snapshots is provided, the run() method will be executed automatically. If it is not provided, then the run() method must be executed manually and provided with solution_snapshots.

  • n_modes (Optional[int]) – Number of POD modes used to approximate the input solution. Must be less than or equal to the number of dimensions in a snapshot. Either n_modes or reconstruction_percentage must be provided, but not both.

  • reconstruction_percentage (Union[int, float, None]) – Specified dataset reconstruction percentage. Must be between 0 and 100. Either n_modes or reconstruction_percentage must be provided, but not both.

run(solution_snapshots)[source]

Executes the POD method. Since POD is an abstract baseclass, one of the concrete implementations will be executed.

Parameters:

solution_snapshots (Union[ndarray, list]) –

Array or list containing the solution snapshots. If provided as an numpy.ndarray, it should be three-dimensional, where the third dimension of the array corresponds to the number of snapshots. If provided as a list, the length of the list corresponds to the number of snapshots.

If solution_snapshots is provided, the run() method will be executed automatically. If it is not provided, then the run() method must be executed manually and provided with solution_snapshots.

Implementations

Examples