# UQ¶

Tag: Exploration

The UQ block allows to perform an uncertainty quantification study for the output of the computational model of interest.

## Introduction¶

Let there be a model for analysis which input parameters are affected by some kind of uncertainty. The uncertainty quantification is the determination of the effect of input uncertainties on the analyzed model output.

Input uncertainties are simulated via probabilistic model configured on the Distribution tab. A probabilistic model can be constructed based on the sample of uncertain parameters or based on expert knowledge (see the Distribution block).

If the analyzed model and the probabilistic model are given, the block can be used to estimate:

### Notes¶

• Note for OpenTURNS users. The UQ block allows to conduct uncertainty quantification study for the analyzed model and the probabilistic model that corresponds to Step C (Uncertainty propagation) in OpenTURNS methodology.
• The study requires the block related to analyzed model (e.g. PythonScript) to be connected to the UQ block.
• If you use vector output (see “Black-box input type”), make sure that the order of variables in the probabilistic model matches the order of parameters of the analyzed model (see Variables).

### Simulation Mode¶

This mode allows to conduct Monte Carlo simulation of the analyzed model. Different statistics related to output distribution and the correlation between the inputs and the output are calculated.

“Fit to available distributions” option allows you to generate a report containing information on the fitting of all available distributions to the simulated sample. The results include data to construct the graphs on Analyze screen.

### Reliability Analysis Mode¶

The mode allows the user to create the limit state function and examine the failure probability and other related characteristics.

The following techniques are available:

• Approximation techniques:
• FORM method. The user can define the optimization algorithm parameters. The results include the failure probability, generalized reliability index, Hasofer reliability index, the sensitivity of the factors related to the failure probability and other characteristics.
• Sampling techniques:
• Monte Carlo, Directional Sampling, Latin HyperCube Sampling (LHS). The user can define the maximum budget, the block size, the maximum CV and the confidence parameter for convergence graph. As a result, the user has the failure probability with the confidence interval and its variance estimate. Besides, the data for convergence plot are available to construct the graph on Analyze screen.

## Ports¶

The block has the following ports in all modes:

• value — input of type RealScalar, port for output values of analyzed model;
• point — output of type RealVector, port for input values for analyzed model, only if “variables vector” is set for option “Black-box input type”;
• variable_name — output of type RealScalar for each variable that serve as input values for analyzed model; only if “Black-box input type” equals “separate variables”;
• variable_name_pdf and variable_name_cdf — outputs of type RealMatrix, that allow to visualize PDF/CDF of corresponding variables distributions;
• report — output of type StringScalar, UQ study results with description in text format;
• report_data — output of type Dict, UQ study results data for plotting of graphs;

Simulation mode ports:

• simulated_values — output of type RealMatrix, simulated values;
• simulated_points — output of type RealMatrix, simulated points;
• failure_points — output of type RealMatrix, simulated points in which analyzed model returned Inf or Nan;
• success_failure — output of type RealMatrix, the number of successful runs of analyzed model and the number of runs in which it returned Inf or Nan;
• smoothed_pdf — output of type RealMatrix, PDF of Kernel Smoothing for simulated model output;
• smoothed_cdf — output of type RealMatrix, CDF of Kernel Smoothing for simulated model output;

Reliability analysis mode ports:

• event_probability — output of type RealScalar, event probability;
• confidence_interval — output of type RealVector only for Sampling techniques, a confidence interval for event probability; confidence level is defined with “Reliability analysis/Sampling/confidence level” (see Reliability Analysis: Sampling Techniques);
• convergence_plot — output of type RealMatrix, convergence plot for event probability, for Sampling techniques only;
• upper_bounds — output of type RealMatrix, upper bound for convergence graph for event probability, for Sampling techniques only;
• lower_bounds — output of type RealMatrix, lower bound for convergence graph for event probability, for Sampling techniques only;

Note that values for smoothed_pdf and smoothed_cdf are calculated only if “Simulation/Fit to available distributions” is True.

## Options¶

### General Options¶

“Mode”

• Description: allow the user to specify the mode to conduct uncertainty quantification study.
• Value: “Simulation”, “Reliability analysis”
• Default: “Simulation”

“Seed”

• Description: allow the user to specify the initial state of the random generator. Random generator state affects generation of points from probabilistic model.
• Value: [0, MaxInt]
• Default: 100

“Black-box input type”

• Description: define whether to use single vector port or multiple scalar ports to interact with analyzed model.
• Value: “separate variables” or “variables vector”
• Default: “separate variables”

### Simulation Mode Options¶

“Simulation/Number of simulations”

• Description: specify the number of calls of the analyzed model.
• Value: [1, MaxInt]
• Default: 100

“Simulation/Fit to available distributions”

• Description: allow the user to construct all available types of parametric and nonparametric distributions based on simulated sample for input and output variables. This may take considerable time. The results are in fitting report and can be visualized on Analyze screen.
• Value: True or False
• Default: True

### Reliability Analysis Mode Options¶

“Reliability analysis/threshold”

• Description: allow the user to specify the threshold for reliability analysis problem statement.
• Value: Real
• Default: 0.0

“Reliability analysis/limit state”

• Description: allow the user to specify the condition type for the reliability analysis problem statement.
• Value: “output < threshold”, “output <= threshold”, “output > threshold”, “output >= threshold”
• Default: “output < threshold”

“Reliability analysis/type”

• Description: allow the user to specify the technique type for reliability analysis problem.
• Value: “Sampling”, “Approximation”
• Default: “Sampling”

#### Reliability Analysis: Sampling Techniques¶

“Reliability analysis/Sampling/method”

• Description: sampling method for the reliability analysis problem. Note 1: Directional Sampling algorithm should be proposed for low to moderate dimension only (5 at most) as its performances quickly deteriorate with the dimension increase. Note 2: For LHS method, the copula of the multi-variate distribution must be independent.
• Value: “MonteCarlo”, “LHS”, “Directional Sampling”
• Default: “MonteCarlo”

“Reliability analysis/Sampling/block size”

• Description: for Monte Carlo and LHS methods, this option allows to save space while allowing multithreading, when available (wrapper function) it is recommended to use the number of available CPUs; for the Directional Sampling, it is recommended to set to 1.
• Value: [1, MaxInt]
• Default: 1

“Reliability analysis/Sampling/maximum outer sampling”

• Description: maximum number of groups of terms in the probability simulation estimator. Note: the maximum number of evaluations of the analyzed model is maximum outer sampling * block size
• Value: [1, MaxInt]
• Default: 100

“Reliability analysis/Sampling/maximum CV”

• Description: maximum coefficient of variation of the simulated sample.
• Value: real
• Default: 0.1

“Reliability analysis/Sampling/confidence level”

• Description: confidence level for confidence interval and convergence graph.
• Value: (0.0, 1.0)
• Default: 0.90

“Reliability analysis/Sampling/confidence level”

• Description: confidence level for confidence interval and convergence graph.
• Value: (0.0, 1.0)
• Default: 0.90

#### Reliability Analysis: Approximation Techniques¶

“Reliability analysis/Approximation/Starting point”

• Description: starting point of the optimization research, declared in the physical space.
• Value: real vector
• Default: None (automatic selection)

“Reliability analysis/Approximation/optimization algorithm”

• Description: optimization algorithm to be used with the approximation method for the reliability analysis problem. Note: The AbdoRackwitz algorithm is a gradient-based constrained optimization method, and the centered finite difference method is used to provide the model gradient. Be aware of the potential pitfalls associated with the use of finite differences.
• Value: “Cobyla”, “AbdoRackwitz”, “SQP”
• Default: “Cobyla”

“Reliability analysis/Approximation/maximum iterations number”

• Description: maximum number of iterations of the optimization algorithms.
• Value: [1, MaxInt]
• Default: 1000

“Reliability analysis/Approximation/maximum absolute error”

• Description: maximum distance between two successive iterates.
• Value: positive Real
• Default: 1.0e-10

“Reliability analysis/Approximation/maximum relative error”

• Description: maximum relative distance between two successive iterates (with regards the second iterate).
• Value: nonnegative Real
• Default: 1.0e-10

“Reliability analysis/Approximation/maximum residual error”

• Description: maximum orthogonality error (lack of orthogonality between the vector Center - Iterate and the constraint surface).
• Value: real
• Default: 1.0e-10

“Reliability analysis/Approximation/maximum constraint error”

• Description: maximum absolute value of the constraint function minus the level value.
• Value: positive real
• Default: 1.0e-10

“Reliability analysis/Approximation/Cobyla/RhoBeg”

• Description: reasonable initial step to the variables.
• Value: positive Real
• Default: 0.1

“Reliability analysis/Approximation/AbdoRackwitz/Tau”

• Description: multiplicative decrease of the linear step.
• Value: (0.0, 1.0)
• Default: 0.5

“Reliability analysis/Approximation/AbdoRackwitz/Omega”

• Description: Armijo factor. It should be rather small.
• Value: (0.0, 1.0)
• Default: 1.0e-4

“Reliability analysis/Approximation/AbdoRackwitz/Smooth”

• Description: increasing rate of the penalisation coefficient for the line search. It should be rather near 1.
• Value: real > 1
• Default: 1.2

“Reliability analysis/Approximation/SQP/Tau”

• Description: multiplicative decrease of the linear step.
• Value: (0.0, 1.0)
• Default: 0.5

“Reliability analysis/Approximation/SQP/Omega”

• Description: Armijo factor. It should be rather small.
• Value: (0.0, 1.0)
• Default: 1.0e-4

“Reliability analysis/Approximation/SQP/Smooth”

• Description: increasing rate of the penalization coefficient for the line search. It should be rather near 1.
• Value: real > 1
• Default: 1.2