POD Reduced Basis Surrogate
This example is meant to demonstrate how a POD reduced basis surrogate model is trained and used on a parametric problem.
Problem statement
The full-order model is a one energy group, fixed-source diffusion-reaction problem, adopted from Prince and Ragusa (2019). The geometry for this problem is presented in Figure 1. The problem has four different material regions, from which three (1, 2 and 3) act as fixed sources.

Figure 1: The geometry of the diffusion-reaction problem used in this example (Prince and Ragusa (2019)).
The fixed-source diffusion-reaction problem with space dependent coefficients can be expressed as:
(1)where is the diffusion coefficient, is the reaction coefficient, is the fixed source term and field variable is the solution of interest. Furthermore, denotes the internal domain, without the boundaries, which can be partitioned into four sub-domains corresponding to the four material regions (, , and ). This equation needs to be supplemented with boundary conditions. For the symmetry lines (dashed lines in Figure 1, denoted by ) a homogeneous Neumann condition is used:
while the rest of the boundaries (in the reflector, denoted by ) are treated with homogeneous Dirichlet conditions:
This problem is parametric in a sense that the solution depends on the values of the coefficients and the source: . In this example, material region-wise constant coefficients and source terms are considered yielding eight uncertain parameters altogether (assuming that Region 4 does not have a source). The material properties in each region have Uniform distributions () specified in Table 1 with and being the lower and upper bounds.
Table 1: The distributions of the uncertain parameters used in this problem (Prince and Ragusa (2019)).
Parameter | Symbol | Distribution |
---|---|---|
Diffusion coefficient in Region 1 | ||
Diffusion coefficient in Region 2 | ||
Diffusion coefficient in Region 3 | ||
Diffusion coefficient in Region 4 | ||
Reaction coefficient in Region 1 | ||
Reaction coefficient in Region 2 | ||
Reaction coefficient in Region 3 | ||
Reaction coefficient in Region 4 | ||
Fixed-source in Region 1 | ||
Fixed-source in Region 2 | ||
Fixed-source in Region 3 |
It is important to mention that POD-RB surrogates are only efficient when the original problem has an affine decomposition. For more information about affine decomposition see PODReducedBasisTrainer. Luckily, the problem at hand has an affine decomposition in the following form:
where , and take the values of , and when and 0 otherwise.
Solving the problem without uncertain parameters
The first step towards creating a POD-RB surrogate model is the generation of a full-order problem which can solve Eq. (1) with fixed parameters. There are three important factors that need to be considered while preparing the input file for this problem:
The user must specify vector tags in the
Problem
block for each component in the affine decomposition of the system. In this example, as shown in Listing 1, 8 vector tags are specified for the eight uncertain parameters. These do not introduce extra work in the full-order model, however they help to identify the affine components throughout the training phase.Listing 1: Complete input file for the heat equation problem in this study.
(contrib/moose/modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)The input file has to reflect the affine decomposition of the problem. This means that the
Kernels
,BCs
andMaterials
have to be created in a way that they correspond to the components in the affine decomposition. This is shown in Listing 2. Note that a separate kernel has been created for every single term in the decomposition. The vector tags in theProblem
block are then applied to these kernels to ensure that the affine components are correctly identified throughout the training phase.Listing 2: Complete input file for the heat equation problem in this study.
(contrib/moose/modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)The values for each uncertain parameter have to be set to 1 by default. This is necessary because the PODReducedBasisTrainer uses the same input file to create the affine constituent operators. This ensures that the mentioned operators are not influenced by the parameter-dependent multipliers. Of course, these values are not fixed and are changed by the main application throughout the simulations to values aligned with those in Table 1. However, the default values in the input file should be set to one. This is shown in Listing 2 as well.
Training surrogate models
For the details of the training procedure of a POD-RB surrogate, see PODReducedBasisTrainer. The first step is the collection of data, which involves the repeated execution of the full-order problem with different parameter combinations and the saving of the full solution vectors. These solution vectors are often referred to as snapshots and this naming is preferred in this example as well. This step is managed by the main input file which creates parameter samples, transfers them to the sub-application and collects the results from the completed computations.
The snapshot collection phase starts with the definition of the distributions in the Distributions
block. The uniform distributions for all the 8 uncertain parameters are specified as:
As a next step, the underlying distributions are sampled to create parameter combinations. This is done using a LatinHypercube defined in the Samplers
block. It is visible that 100 samples are prepared, meaning that 100 snapshots will be collected for the generation of the surrogates.
To be able to create the reduced operators for the surrogate model, a custom MultiApp
, PODFullSolveMultiApp, has been created. This object is responsible for executing sub-problems using different combinations of parameter values provided by the sampler. The secondary function of this object is to create the action of the full-order operators on the basis functions of the reduced subspace. Therefore, this object has to be executed twice in the same simulation. It is visible that unlike a regular SamplerFullSolveMultiApp, this custom object has to know certain parameters of the trainer as well.
In terms of the Transfers
block, besides sending the actual parameter samples to the sub-applications, in this intrusive procedure, the snapshots need to be collected from the sub-applications, the basis functions need to be sent back to different sub-applications and the action of the operators on the basis functions need to be collected as well. This requires four transfer objects. The two custom types (PODSamplerSolutionTransfer and PODResidualTransfer) are specifically used to support PODReducedBasisTrainer at this moment.
Next, the PODReducedBasisTrainer is set up in the Trainers
block. The trainer stores the snapshots and uses them to create basis functions for the reduced subspaces. Furthermore, it is also responsible for creating the reduced-order operators, therefore it needs to be executed twice in the training process. The trainer object needs to know what variable needs to be reduced and the names of the vector tags from the sub-application to be able to identify the affine constituent operators. Furthermore, using the "tag_types" input argument, the user has to specify if the reduced affine constituent operator acts on the variable or not. The ordering must be the same as the names of the vector tags. The meaning of the energy retention limits is discussed in PODReducedBasisTrainer.
As a last step in the training process, the basis functions, reduced operators and every necessary information for the surrogate are saved into an .rd
file. This file can be then used to construct a surrogate model without the need to repeat the training process.
Evaluation of surrogate models
To evaluate surrogate models, a new main input file has to be created. In this example, the same distributions are defined for the parameters as used in the training phase. Therefore, the content of the Distributions
block is identical to the one in the trainer input file. As a next step, new samples are generated using these distributions. Again, a LatinHypercube is employed for this task, however this time the number of samples is increased to 1000 since the surrogates are orders of magnitudes faster than the full-order model.
A PODReducedBasisSurrogate is created in the Surrogates
block. It is constructed using the information available within the corresponding .rd
file and allows the user to change of the rank of the sub-spaces used for different variables through "change_rank" and "new_ranks" parameters.
These surrogate models can be evaluated at the points defined in the testing sample batch by a PODSurrogateTester
object in the VectorPostprocessors
block. In this case, the Quantity of Interest (QoI) is the nodal norm of the solution for .
Running the input files
Since the sub-applications use test objects, one has to allow the executioner to use them by specifying the following argument on the command line:
The same is true for the surrogate input file as well, therefore one needs to start the executions as follows:
Results and Analysis
In the following subsection a short analysis is provided for the results obtained using the example input files. As already mentioned, the problem has 8 uncertain parameters and altogether 100 parameter samples are generated using LatinHypercube to obtain snapshots for the training. Three examples of the snapshots are presented in Figure 6, Figure 7 and Figure 8. It is visible that depending on the actual parameter combination, the profile of the solution can change considerably.

Figure 6: Snap. example #1.

Figure 7: Snap. example #2.

Figure 8: Snap. example #3.
After all of the snapshots are obtained, the basis functions of the reduced subspaces are extracted. In this scenario, an energy retention limit of 0.999 999 999 is used in the trainer which will keep 55 basis functions for the reduced subspace. The decay of the eigenvalues of the snapshot correlation matrix is shown in Figure 2. The reduced operators are then computed using these 55 basis functions.
Figure 2: Scree plot of the eigenvalues of the correlation matrix.
As a next step, two surrogate models are prepared using the "change_rank" and "new_ranks" parameters of PODReducedBasisSurrogate to change the size of the reduced system. The first surrogate model has 1 basis function, while the other has 8. Both models are then run on a 1000 sample test set and the nodal norms of the approximate solutions are saved. Additionally, a full-order model was executed on the same test set and the results are saved to serve as reference values. Figure 3 presents the results with the surrogate model built with 1 basis function only. It is visible that the distribution of the QoI (nodal norm) on the test set is considerably different than the reference distribution.
Figure 3: The histogram of the QoI for the full-order reference model and the surrogate built with 1 basis function.
Figure 4 shows the distribution of the QoI obtained by a surrogate with 8 basis functions. It is visible that the difference between the reference values and those from the surrogate is negligible.
Figure 4: The histogram of the QoI for the full-order reference model and the surrogate built with 8 basis function.
To see the convergence of the results from the surrogate to those of the full-order model, the surrogate model is run multiple times with different ranks and the following error indicators are computed for each sample in the test set:
Then, the maximum and average relative errors are recorder as function of the number of basis functions used. Figure 5 shows the results. It is visible that by increasing the number of basis functions, both error indicators decrease rapidly.
Figure 5: The convergence of averaged quantities of interest.
Lastly, the computation time full-order model on the test set is compared to the combined cost of training and evaluating a POD-RB surrogate model in Table 2. The test has been carried out on one processor only, not using the parallel capabilities of the MultiApp system. The results show that it is beneficial to create a POD-RB surrogate if more than 148 evaluations are needed. This assumes that the full-order evaluation time can be equally distributed among the 1000 test samples (0.779 s/sample). By dividing the training time with this number we get a critical sample number above which the generation of a surrogate model is a better alternative.
Table 2: The computation time of the full-order solutions on the test set compared to the cost of training a surrogate and evaluating it on the same test set.
Process | Execution time (s) |
---|---|
Evaluation of the full-order model on the 1000 sample test set | 779.5 |
Training a POD-RB surrogate using 100 samples | 116.2 |
Evaluation of the POD-RB surrogate on the 1000 sample test set (4 basis functions) | 0.592 |
Evaluation of the POD-RB surrogate on the 1000 sample test set (8 basis functions) | 0.937 |
Evaluation of the POD-RB surrogate on the 1000 sample test set (16 basis functions) | 1.576 |
References
- Zachary M Prince and Jean C Ragusa.
Parametric uncertainty quantification using proper generalized decomposition applied to neutron diffusion.
International Journal for Numerical Methods in Engineering, 119(9):899–921, 2019.[BibTeX]