SobolStatistics

Compute SOBOL statistics values of a given VectorPostprocessor objects and vectors.

Overview

This object computes the Sobol sensitivity indices following the procedure defined by Saltelli (2002). This includes the first-order and total-effect indices and optionally the second-order indices as well. The SobolStatistics object only operates on result data generated from Sobol-based sampling strategy, which is provided by the Sobol.

Example Input File Syntax

The following input snippet uses the GFunction test object, which is defined as:

where is defined in the input file, is the vector of model data, and is the number of input variables. The data is generated by the Sobol sampler object.

[Samplers]
  [sample]
    type = MonteCarlo
    distributions = 'uniform uniform uniform uniform uniform uniform'
    num_rows = 4
    seed = 2011
  []
  [resample]
    type = MonteCarlo
    distributions = 'uniform uniform uniform uniform uniform uniform'
    num_rows = 4
    seed = 2013
  []
  [sobol]
    type = Sobol
    sampler_a = sample
    sampler_b = resample
  []
[]

[VectorPostprocessors]
  [results]
    type = GFunction
    sampler = sample
    q_vector = '0 0.5 3 9 99 99'
    execute_on = INITIAL
    outputs = none
  []
  [sobol]
    type = SobolStatistics
    sampler = sobol
    results = results
    execute_on = FINAL
  []
[]
(modules/stochastic_tools/test/tests/vectorpostprocessors/sobol_statistics/sobol.i)

The resulting data includes a single list of all the computed statistics, in the following order: , where give the first-order indices, are the total-effect indices, and are the second-order indices for , for .

results_g_values
0.58775354989454
0.2632494383694
0.035660144918828
0.0056970432830808
5.7774189019761e-05
5.7064241636837e-05
0.6855752603234
0.35589828400645
0.056283261074271
0.006731599671748
-0.0013038267007721
-0.0013173393507955
0.086111877716527
0.0076533281426128
-0.0042528183099492
-0.0059920611119531
-0.0058620907349385
-0.0030183647923982
-0.0030919023968987
-0.0045615778350568
-0.0046244835076265
0.00032316096075386
0.00029440227225901
0.00022338741127334
2.7320523764526e-05
3.5429693653785e-05
2.0772174871302e-08
(modules/stochastic_tools/test/tests/vectorpostprocessors/sobol_statistics/gold/sobol_out_sobol_0002.csv)

Input Parameters

  • contains_complete_historyFalseSet this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

    Default:False

    C++ Type:bool

    Options:

    Description:Set this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

  • parallel_typeREPLICATEDSet how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is preformed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.

    Default:REPLICATED

    C++ Type:MooseEnum

    Options:DISTRIBUTED, REPLICATED

    Description:Set how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is preformed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.

  • resultsStochasticResults object containing data to use for calculation.

    C++ Type:VectorPostprocessorName

    Options:

    Description:StochasticResults object containing data to use for calculation.

  • samplerSobolSampler object.

    C++ Type:SamplerName

    Options:

    Description:SobolSampler object.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Options:

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

  • force_preauxFalseForces the GeneralUserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Options:

    Description:Forces the GeneralUserObject to be executed in PREAUX

  • force_preicFalseForces the GeneralUserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Options:

    Description:Forces the GeneralUserObject to be executed in PREIC during initial setup

  • outputsVector of output names were you would like to restrict the output of variables(s) associated with this object

    C++ Type:std::vector<OutputName>

    Options:

    Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Options:

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

Input Files

References

  1. Andrea Saltelli. Making best use of model evaluations to compute sensitivity indices. Computer Physics Communications, 145(2):280–297, 2002. URL: https://doi.org/10.1016/S0010-4655(02)00280-1.[BibTeX]