Stochastic Tools Module

The stochastic tools module is a toolbox designed for performing stochastic analysis for MOOSE-based applications. The following sections detail the various aspects of this module that can be used independently or in combination to meet the needs of the application developer.

Examples

Parameter Studies, Statistics, and Sensitivity Analysis:

Surrogate Models:

Bayesian UQ:

Deep Reinforcement Learning Models:

Performance

The stochastic tools module is optimized in two ways for memory use. First, sub-applications can be executed in batches and all objects utilizing sample data do so using a distributed sample matrix. For further details refer to the following:

Linking MOOSE with external Machine Learning libraries

The stochastic tools module provides neural network-based surrogate modeling capabilities as well. However, to enable it one needs to compile MOOSE with the C++ APIs of pytorch. For this, follow the appropriate installation guide below:

Objects, Actions, and Syntax

The following is a complete list of all objects available in the stochastic tools module.

AuxKernels

AuxScalarKernels

AuxVariables

Controls

  • Stochastic Tools App
  • LibtorchDRLControlSets the value of multiple 'Real' input parameters and postprocessors based on a Deep Reinforcement Learning (DRL) neural network trained using a PPO algorithm.
  • MultiAppCommandLineControlControl for modifying the command line arguments of MultiApps.
  • MultiAppSamplerControlControl for modifying the command line arguments of MultiApps.
  • SamplerReceiverControl for receiving data from a Sampler via SamplerParameterTransfer.

Covariance

Distributions

Functions

  • Stochastic Tools App
  • ScaledAbsDifferenceDRLRewardFunctionEvaluates a scaled absolute difference reward function for a process which is controlled by a Deep Reinforcement Learning based surrogate.

Likelihood

  • Stochastic Tools App
  • AddLikelihoodActionAdds Likelihood objects.
  • ExtremeValueGeneralized extreme value likelihood function evaluating the model goodness against experiments.
  • GaussianGaussian likelihood function evaluating the model goodness against experiments.
  • TruncatedGaussianTruncatedGaussian likelihood function evaluating the model goodness against experiments.

MultiApps

  • Stochastic Tools App
  • PODFullSolveMultiAppCreates a full-solve type sub-application for each row of a Sampler matrix. On second call, this object creates residuals for a PODReducedBasisTrainer with given basis functions.
  • SamplerFullSolveMultiAppCreates a full-solve type sub-application for each row of each Sampler matrix.
  • SamplerTransientMultiAppCreates a sub-application for each row of each Sampler matrix.

Outputs

ParameterStudy

Postprocessors

Reporters

  • Stochastic Tools App
  • ActiveLearningGPDecisionEvaluates a GP surrogate model, determines its prediction quality, launches full model if GP prediction is inadequate, and retrains GP.
  • AdaptiveImportanceStatsReporter to compute statistics corresponding to the AdaptiveImportanceSampler.
  • AdaptiveMonteCarloDecisionGeneric reporter which decides whether or not to accept a proposed sample in Adaptive Monte Carlo type of algorithms.
  • AffineInvariantDifferentialDecisionPerform decision making for Affine Invariant differential MCMC.
  • AffineInvariantStretchDecisionPerform decision making for Affine Invariant stretch MCMC.
  • BiFidelityActiveLearningGPDecisionPerform active learning decision making in bi-fidelity modeling.
  • ConditionalSampleReporterEvaluates parsed function to determine if sample needs to be evaluated, otherwise data is set to a default value.
  • CrossValidationScoresTool for extracting cross-validation scores and storing them in a reporter for output.
  • DRLControlNeuralNetParametersOutputs the parameters of a LibtorchArtificialNeuralNetwork within a LibtorchDRLControlTrainer.
  • DRLRewardReporterReporter containing the reward values of a DRL controller trainer.
  • EvaluateSurrogateTool for sampling surrogate models.
  • IndependentMHDecisionPerform decision making for independent Metropolis-Hastings MCMC.
  • MappingReporterA reporter which can map full solution fields to a latent space for given variables.
  • MorrisReporterCompute global sensitivities using the Morris method.
  • PMCMCDecisionGeneric reporter which decides whether or not to accept a proposed sample in parallel Markov chain Monte Carlo type of algorithms.
  • ParallelSolutionStorageParallel container to store serialized solution fields from simulations on sub-applications.
  • PolynomialChaosReporterTool for extracting data from PolynomialChaos surrogates and computing statistics.
  • SingularTripletReporterTool for accessing and outputting the singular triplets of a singular value decomposition in PODMapping.
  • SobolReporterCompute SOBOL statistics values of a given VectorPostprocessor or Reporter objects and vectors.
  • SolutionContainerClass responsible for collecting distributed solution vectors into a container. We append a new distributed solution vector (containing all variables) at every execution.
  • StatisticsReporterCompute statistical values of a given VectorPostprocessor objects and vectors.
  • StochasticMatrixTool for extracting Sampler object data and storing data from stochastic simulations.
  • StochasticReporterStorage container for stochastic simulation results coming from Reporters.

Samplers

StochasticTools

  • Stochastic Tools App
  • StochasticToolsActionAction for performing some common functions for running stochastic simulations.

Surrogates

Trainers

Transfers

UserObjects

  • Stochastic Tools App
  • InverseMappingEvaluates surrogate models and maps the results back to a full solution field for given variables.

VariableMappings

  • Stochastic Tools App
  • AddVariableMappingActionAdds Mapping objects from a VariableMappings block.
  • PODMappingClass which provides a Proper Orthogonal Decomposition-based mapping between full-order and reduced-order spaces.

VectorPostprocessors

  • Stochastic Tools App
  • GaussianProcessDataTool for extracting hyperparameter data from gaussian process user object and storing in VectorPostprocessor vectors.
  • SamplerDataTool for extracting Sampler object data and storing in VectorPostprocessor vectors.
  • SobolStatisticsCompute SOBOL statistics values of a given VectorPostprocessor objects and vectors.
  • StatisticsCompute statistical values of a given VectorPostprocessor objects and vectors.
  • StochasticResultsStorage container for stochastic simulation results coming from a Postprocessor.