- change_rankNames of variables whose rank should be changed.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Names of variables whose rank should be changed.
- 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.
- new_ranksThe new ranks that each variable in 'change_rank' shall have.
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:The new ranks that each variable in 'change_rank' shall have.
- penalty100000The penalty parameter for Dirichlet BCs.
Default:100000
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The penalty parameter for Dirichlet BCs.
- trainerThe SurrogateTrainer object. If this is specified the trainer data is automatically gathered and available in this SurrogateModel object.
C++ Type:UserObjectName
Unit:(no unit assumed)
Controllable:No
Description:The SurrogateTrainer object. If this is specified the trainer data is automatically gathered and available in this SurrogateModel object.
PODReducedBasisSurrogate
Evaluates POD-RB surrogate model with reduced operators computed from PODReducedBasisTrainer.
Overview
This surrogate takes the reduced operators and bases from PODReducedBasisTrainer and assembles the reduced equation system for a new parameter sample ():
(1)Following this, the reduced equation system is solved for and an approximate solution is reconstructed as
(2)It must be mentioned that in case of Dirichlet boundary conditions (either nodal or in weak form) there is a contribution in and as well. However, in this case a penalty parameter () is used to enforce the boundary condition at reduced order level. Therefore, the slightly modified equation system can be written as:
(3)the magnitude of can be set using the "penalty" parameter in the input file. It is important to note that by increasing the magnitude of , the condition number of the reduced equation may deteriorate, therefore the overly high values are not recommended.
It is important to mention that the size of the reduced system can be modified by changing the number of bases per variable in the input file. To do this one can use "change_rank" and "new_ranks" input parameters. This feature makes it possible to test the accuracy of the surrogate with different subspace sizes without the need of rerunning the training procedure.
Details of implementation
The approximate solution given by the POD-RB surrogate can be reconstructed using two different approaches. Both approaches are implemented by overloading the evaluateSolution
function:
One can call
(contrib/moose/modules/stochastic_tools/include/surrogates/PODReducedBasisSurrogate.h)evaluateSolution
with a simple parameter sample as an input argument:In this case, the approximate solution vectors are reconstructed and stored within the surrogate object and the QoI-s for a given variable can be acquired using the
(contrib/moose/modules/stochastic_tools/test/src/vectorpostprocessors/PODSurrogateTester.C)getNodalQoI
function. A good example for this approach is the implementation of theexecute
function in (contrib/moose/modules/stochastic_tools/test/src/vectorpostprocessors/PODSurrogateTester.C).The second option is to supply a reference to an external vector to
(contrib/moose/modules/stochastic_tools/include/surrogates/PODReducedBasisSurrogate.h)evaluateSolution
together with a variable name:In this case, the surrogate will try to reconstruct the approximate solution for the given variable into this vector. This option can be used to couple POD-RB surrogates to other, full-order objects.
Example Input File Syntax
To create a POD reduced basis surrogate model, one can use the following syntax:
(contrib/moose/modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/surr.i)It is visible that the reduced operators and basis vectors from PODReducedBasisTrainer have been saved to trainer_out_pod_rb.rd
and the surrogate model is constructed by loading the necessary information from it. For the sampling of the uncertain parameters, the same objects can be used in the Samplers block:
Finally, a vector postprocessor of type PODSurrogateTester
is created to extract the approximate value of the nodal maximum of variable u
in this case:
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.