- energy_thresholdThe energy threshold for the automatic truncation of the number of modes. In general, the lower this number is the more information is retained about the system by keeping more POD modes.
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:The energy threshold for the automatic truncation of the number of modes. In general, the lower this number is the more information is retained about the system by keeping more POD modes.
- extra_slepc_optionsAdditional options for the singular/eigenvalue solvers in SLEPc.
C++ Type:std::string
Unit:(no unit assumed)
Controllable:No
Description:Additional options for the singular/eigenvalue solvers in SLEPc.
- filenameThe name of the file which will be associated with the saved/loaded data.
C++ Type:FileName
Unit:(no unit assumed)
Controllable:No
Description:The name of the file which will be associated with the saved/loaded data.
- num_modes_to_computeThe number of modes that this object should compute. Modes with 0 eigenvalues are filtered out, so the real number of modes might be lower than this. This is also used for setting the subspace sizes for distributed singular value solves. By default, the subspace used for the SVD is twice as big as the number of requested vectors. For more information see the SLEPc manual. If not specified, only one mode is computed per variable.
C++ Type:std::vector<unsigned long>
Unit:(no unit assumed)
Controllable:No
Description:The number of modes that this object should compute. Modes with 0 eigenvalues are filtered out, so the real number of modes might be lower than this. This is also used for setting the subspace sizes for distributed singular value solves. By default, the subspace used for the SVD is twice as big as the number of requested vectors. For more information see the SLEPc manual. If not specified, only one mode is computed per variable.
- solution_storageThe name of the storage reporter where the snapshots are located.
C++ Type:UserObjectName
Unit:(no unit assumed)
Controllable:No
Description:The name of the storage reporter where the snapshots are located.
- variablesThe names of the variables which need a mapping.
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The names of the variables which need a mapping.
PODMapping
Class which provides a Proper Orthogonal Decomposition-based mapping between full-order and reduced-order spaces.
Overview
A mapping which uses a Proper Orthogonal Decomposition (POD) to establish mapping between (high-dimensional) solution vectors coming from numerical simulations and corresponding coefficients in lower-dimensional spaces (latent spaces). For the use cases in MOOSE, this method is equivalent to linear Principal Component Analysis (PCA) or Singular Value Decomposition (SVD).
The process for building the mapping is the following:
Collection of snapshots of the solution fields. This can be done by running the full-order models with different model parameters and saving the solution fields along the simulations. This process is established in SolutionContainer, SerializedSolutionTransfer and ParallelSolutionStorage.
Once the snapshots are at our disposal, we organize them into a snapshot matrix () as follows:
(1)where is the number of different model parameter samples, is the number of snapshots per transient simulation with parameter sample , while denotes the solution vector for variable with parameter sample at time step . Note that the number of time steps might depend on the model parameters. The current implementation supports variable-based POD only.
As the next step, we extract the common features in the snapshots. In other words, we compute the POD or SVD of the snapshot matrix:
(2)where and are the unitary left and right singular vector matrices, respectively. Matrix contains the singular values on its diagonal. Given that the size of the snapshot matrix is high, we use the parallel SVD solver available in SLEPc with a Lánczos method to solve the underlying eigenvalue problem and get only the requested number of singular values. Additional parameters for SLEPc to fine tune the solution algorithm can be supplied using input parameter "extra_slepc_options".
The number of needed singular triplets () for each variable can be prescribed using the "num_modes_to_compute" parameter. The algorithm will select the minimum of these numbers and the number of converged singular triplets. Let's denote these numbers by .
For this mapping object the transition from high-dimensional to low-dimensional and back is determined by the left singular vector computed in the decomposition. We assume that the solution vector () of the system for variable can be approximated as
(3)where vector contains the reduced-order coefficients (or coordinates in the latent) space in the low-dimensional space. Considering that the left singular vector vector matrix is unitary, we can express the mapping from high to low dimensional spaces as:
(4)The last step in this process consists of filtering out singular triplets which do not contribute to the description of variation in the variable fields. For this, we utilize the singular values as follows:
(5)The filtering parameter van be specified for every variable using input parameter "energy_threshold".
Once a mapping is trained, one can save it into a binary file using MappingOutput and load it by specifying the "filename" parameter in the object.
This object is only compatible with PETSc versions above 3.14 with SLEPc support.
Example Input File Syntax
Creating a mapping object:
(contrib/moose/modules/stochastic_tools/test/tests/variablemappings/pod_mapping/pod_mapping_main.i)Loading a mapping object:
(contrib/moose/modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)Syntax
Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.