Examples

Example 1: Deviation of a cantilever beam

This example has been presented in the ESREL 2007 conference in the paper [Dutfoy2009]. It is described in the OpenTURNS Example Guide.

This example is a simple beam, restrained at one side and stressed by a concentrated bending load F at the other side.

1- Problem statement

a- Inputs

  • Stochastic variables:
Name Description Distribution
E Young’s modulus Beta(r=0.93, t=3.2, a=2.8e7, b=4.8e7)
F Charge applied LogNormal(mu=30000., sigma=9000., gamma=15000)
L Length Uniform(a=250, b=260)
I Section modulus Beta(r=2.5, t=4., a=3.1e2, b=4.5e2))

The input variables L and I are dependent. The dependence structure is modelised by a Normal copula (the only copula available for now in the GUI). The Spearman correlation matrix of the input random vector E, F, L, I is :

R_{S} = \left(
    \begin{array}{cccc}
    1 & 0 & 0 & 0 \\
    0 & 1 & 0 & 0 \\
    0 & 0 & 1 & -0.2 \\
    0 & 0 & -0.2 & 1
    \end{array} \right)

b- Output

The deviation y of the free end of the beam equals to:

y = \frac{FL^3}{3EI}

2- Define the model

2-1 Create the study

Click on newButton in the tool bar to create a new study.

../_images/window_OTStudy_startUp.png

2-2 Create the analytical physical model

To define the physical model, click on the button Symbolic model of the window shown above.

The following window appears and a physicalModel item is added in the study tree:

../_images/physicalModelDiagram.png

Click on the Model definition box of the model diagram to create the following window.

../_images/modelDefinition.png

Use the Add buttons below the tables to add as many lines as number of variables in the physical model.

../_images/add_variables_in_tables.png

Fill the tables and rename variables to correspond to the physical model. Click on the Evaluate button below the output variables table in order to check if the formula is not badly defined.

../_images/good_defined_physicalModel.png

The value of the output y must be 13.8178 if:

E F L I
3e7 3e4 255 400

2-3 Create the probabilistic model

To define the probabilistic model, choose Probabilistic model in the context menu of the sub item Definition of the model in the study tree. Only one probabilistic model by physical model can be defined.

../_images/physicalModelDefinitionContextMenu.png

The probabilistic model is defined by associating a distribution to input variables (Marginals tab) and specifying dependence between them if necessary (Dependence tab).

../_images/proba_model_default.png

The Marginals tab lists automatically all the input variables defined in the physical model window. By default, all the lines are unchecked (then all the inputs variables are deterministic) and the right side shows the variable value (the one defined in the model window).

To make a variable stochastic, check its line. Then the combobox in the second column of the table is available and the current text is Normal. By default, the Normal distribution is used with a mean value E[Input] equal to the value defined in the physical model window and with a standard deviation equal to 0.1 * |E[Input]|

../_images/proba_model_default_distribution.png
  • Check all the lines
  • Choose the right distribution for each input (Distribution column)
  • Change the distribution parameters values (right side) (Refer to the Inputs section).
../_images/proba_model.png

On the left of the Dependence tab, all the stochastic input variables are listed. By default, no dependence is set between these variables.

To add dependence between the variables L and I:
  • Select L and I in the list
  • Click on the right arrow:
    • these variables are disabled in the first table (a variable can belong to only one group)
    • [I, L] appears in the second table:
      • the default copula is the Normal copula defined by a correlation matrix equal to the identity matrix. So, at this step, L and I are still independent.
      • on the right side: set the correlation matrix
../_images/correlation.png

3- Central tendency analysis

3-1 Taylor Expansions

For more details on the Linear Taylor Expansions, you can consult the OpenTURNS documentation.

3-1-1 Definition

To perform a central tendency analysis with the Taylor expansions for the estimation of moments, choose New central tendency in the context menu of the probabilistic model item in the study tree.

../_images/probabilisticModelContextMenu.png

Check the radio button Taylor expansions in the wizard which appears.

../_images/central_tendency_wizard_Taylor.png

Click on Finish button. A new item with a default name appears in the study tree and a window is created.

../_images/taylor_window.png

Click on Run button to launch the analysis. When the analysis is finished a result window is created.

3-1-2 Results

The results window contains a table.

../_images/taylor_results_table.png

3-2 Monte Carlo

For more details on the Monte Carlo method, you can consult the OpenTURNS documentation.

3-2-1 Definition

To perform a central tendency analysis with the Monte Carlo method, click on the Central tendency box of the model diagram.

../_images/modelDiagramCentralTendency.png

Check the radio button Monte Carlo in the wizard which appears.

../_images/central_tendency_wizard_Taylor.png

Click on the Continue button to parametrize the Monte Carlo method.

../_images/mc_2nd_page_wizard.png

To see advanced parameters, expand the Advanced parameters group.

Click on Finish button. A new item with a default name appears in the study tree and a window is created.

../_images/MonteCarlo_window.png

Click on Run button to launch the analysis. When the analysis is finished a result window is created.

3-2-2 Results

There are 8 tabs in the result window. The first tab must contain the following values :

../_images/MonteCarlo_results_window.png

4- Min/Max study with deterministic design of experiments

For more details on the Min/Max approach, you can consult the OpenTURNS documentation.

4-1 Definition

To perform a Min/Max study, choose Design of experiments in the context menu of the probabilistic model item in the study tree.

../_images/contextual_menu_DOE.png

Check the radio button Deterministic in the wizard which appears and click on Continue button.

../_images/DOE_wizard.png

In the next table, you can set the grid parameters. By default, all lines are unchecked: the design of experiments contains only point. Check the Name column to make all the inputs variable.

../_images/deterministic_design_of_experiment.png

The minimum and the maximum values are computed automatically from the range of the distribution of the variables. The number of used values per variable is by default 2.

Click on Finish button. A new item with a default name appears in the study tree and a window is created.

4-2 Results

4-2-1 Input variables

The result window shows the input sample of the design of experiments and an analysis of this sample.

../_images/DOE_inputs.png

The points are generated according to the structure of a box design of experiments. This deterministic design of experiments has 16 points obtained by regularly discretizing the pavement:

[2.8e7, 4.8e7] \times [15000, 47021.278] \times [250, 260] \times [310, 450].

Click on Evaluate in the context menu of the design of experiments item. Click on the Finish button of the window which appears.

../_images/doe_eval_wizard.png

To launch the analysis click on the Run button of the new window.

4-2-2 Min/Max values

When the computation is finished, a new window is created. The Table tab contains the input and output values.

../_images/DOE_results.png

The first tab must contain the following values:

../_images/min_max_values_DOE.png

5- Sensitivity analysis

5-1 Sobol indices

For more details on the computation of the Sobol indices, check the OpenTURNS documentation.

5-1-1 Definition

To perform a sensitivity analysis with the Sobol method, the input variables must be independent (In the Dependence tab of the probabilistic model window replace -0.2 by 0). Choose Sensitivity in the context menu of the probabilistic model item in the study tree.

../_images/probabilisticModelContextMenu.png

Check the radio button Sobol in the wizard which appears.

../_images/sensibilityAnalysis_defaultWizard.png

Click on Continue button. On the new page, you can parametrize the Sobol method. To access advanced parameters, expand the Advanced parameters group.

../_images/sobol_parameters.png

Define at least one criterion to stop the algorithm.

In the current example, add a third criterion by selecting the Maximum calls check button.

Changing Replication size will update the max number of calls by iteration: Indeed the algorithm build two input samples with a size equal to the block size value and combines these samples to build nbInputs other samples (nbInputs is the number of input variables). Thus, the maximum number of calls by iteration is computed with the formula: (nbInputs + 2) * blockSize.

If the Replication size is 1000: the maximum number of calls by iteration is 6000.

In that case the algorithm will perform two iterations. Indeed, at the second iteration the maximum number of calls will not be reached yet. The effective maximum total number of calls will be 12000.

Click on Finish button. A new item with a default name appears in the study tree and a results window is created.

5-1-2 Results

The result window shows a table with the first and total order indices for each variable. Values must correspond to the values of the table below.

../_images/sobol_results_window.png

The interaction between the variables are mentioned below the table. It is the sum of second order indices. It can be visualize on the graphic by the distances between the first order indices and the total order indices.

The warnings inform the user that a total order index is smaller than the first order index. When increasing the sample size, these warnings disappear.

On the Summary tab the value of the effective stopping criteria is written in a table.

../_images/sobol_results_window_summary.png

5-2 SRC indices

For more details on the computation of the SRC indices ( Standard Regression Coefficients), you can consult the OpenTURNS documentation.

5-2-1 Definition

To perform a sensitivity analysis with the SRC method, the input variables must be independent (In the Dependence tab of the probabilistic model window replace -0.2 by 0), then choose Sensitivity in the context menu of the probabilistic model item in the study tree.

../_images/probabilisticModelContextMenu.png

Check the radio button SRC in the wizard which appears.

../_images/sensibilityAnalysis_defaultWizard.png

Click on Continue button. On the new page, you can parametrize the SRC method. To access advanced parameters, expand the Advanced parameters group.

../_images/SRC_parameters.png

Set the block size to 300. In that case the algorithm will generate a sample with 34 iterations (33 iterations with a size of 300 and the last iteration with a size of 100).

Click on Finish button. A new item with a default name appears in the study tree and a results window is created.

5-2-2 Results

The result window contains a table with the SRC indices values for each variable. These values are plotted in a graph.

../_images/SRC_results_window.png

6- Threshold exceedance

To perform the following analyses use again a Gaussian copula (In the Dependence tab of the probabilistic model window replace 0 by -0.2).

6-1 Limit state

To create the limit state function which enables the definition of the failure event, choose Limit state in the context menu of the probabilistic model item in the study tree.

../_images/probabilisticModelContextMenu.png

After clicking, a new item with a default name appears in the study tree and the following window appears:

../_images/default_limitState.png

We consider the event where the deviation exceeds 30cm. Choose the right operator in the combobox and set the value of the threshold in order to obtain the following limit state window:

../_images/good_limit_state.png

6-2 Monte Carlo

For more details on the computation of the failure probability by the method of Monte Carlo, you can consult the OpenTURNS documentation.

6-2-1 Definition

To perform the Monte Carlo simulation, choose Threshold exceedance in the context menu of the limit state item in the study tree.

../_images/reliability_wizard.png

Select the Monte Carlo method and click on Continue button. The new page enables to change the parameters of the analysis.

../_images/MonteCarloSimulation_wizard.png

The user has to define at least one criterion to stop the algorithm.

Add the third criterion by selecting the check button Maximum calls. The maximum number of calls is 10000. Set the block size to 300.

In that case the algorithm will perform 34 iterations with 300 calls to the model function.

Effective maximum total number of calls: 10200

Click on Finish button. A new item with a default name appears in the study tree and a results window is created.

6-2-2 Results

The result window contains the following table:

../_images/FailureProbabilityTable.png

The values of the output y computed during the simulation are stored and plotted in the second tab of the window:

../_images/histogram.png

The convergence graph is in the third tab:

../_images/convergence_graph.png

This graph shows the value of the probability estimate at each iteration.

6-3 FORM

For more details on the computation of the failure probability by the method of FORM, you can consult the OpenTURNS documentation.

6-3-1 Definition

To perform the FORM (First Order Reliability Method) analysis, choose Threshold exceedance in the context menu of the limit state item in the study tree.

../_images/reliability_wizard.png

Select the FORM method and click on Continue button. The new page enables to change the parameters of the analysis.

../_images/FORM_page.png

The starting point is defined by default with the means of the distributions of the stochastic inputs. E[E] = 3.38e7; E[F] = 30000; E[L] = 255; E[I] = 397.5

6-3-2 Results

The result window includes the following tables.

../_images/FORM_summary_result.png

When the maximum number of iterations has been reached, a warning icon appears nearby the iterations number value: it warns the user that the optimization result may not be accurate enough.

The Design point tab indicates the value of the design point in the standard space and in the physical space. The table contains the importance factors which are displayed in the pie chart.

../_images/FORM_designPoint_result.png

For more details on the Importance factors, you can consult the OpenTURNS documentation.

The Sensitivity tab indicates the sensitivity factors. For more details on the Sensitivity factors, you can consult the OpenTURNS documentation.

6-4 FORM-Importance sampling

For more details on the computation of the failure probability by the method of Importance sampling, you can consult the OpenTURNS documentation.

6-4-1 Definition

To perform the FORM-IS (First Order Reliability Method-Importance sampling) analysis, choose Threshold exceedance in the context menu of the limit state item in the study tree.

../_images/reliability_wizard.png

Select the FORM-Importance sampling method and click on Continue button. The following page allows to change the parameters of the Importance sampling analysis. It’s the same page as the one for the Monte Carlo method.

Click on Continue button. The following page enables setting the parameters of the FORM analysis. It’s the same page as the one for the FORM method.

The analysis consists in performing firstly a FORM analysis, then the computed design point is used to initialize the Importance sampling analysis.

6-4-2 Results

The FORM-IS result window contains the same tabs as the Monte Carlo result window as well as a FORM result tab, which displays the tabs of a FORM result window.

../_images/FORM-IS_FORMresult.png

We can see in the following table, the design point from the FORM analysis result.

../_images/FORM-IS_ParametersResult.png

The following histogram shows that, by contrast of the Monte Carlo method, the sampling is centered on the threshold of the event failure with the Importance sampling method.

../_images/FORM-IS_HitogramResult.png

7- Construction of response surfaces

A response surface is built from samples. So we first create a design of experiments.

7-1 Design of experiments

Create a design of experiments by choosing New design of experiments in the context menu of the Designs of experiments item.

../_images/DOE_proba_wizard.png

Select Probabilistic and click on Continue button.

../_images/DOE_probaParamPage.png

The methods LHS and Quasi-Monte Carlo are not available because the model contains dependent stochastic input variables.

Keep the default values. Click on Finish button

Choose Evaluate in the context menu of the new design of experiments item. Launch the evaluation by clicking on the Run button of the window which appears.

7-2 Functional chaos

For more details on the computation of a metamodel by the method of Functional chaos, you can consult the OpenTURNS documentation.

The functional chaos allows to compute the Sobol indices. Beware that these indices cannot be used for correlated stochastic variables. In order to use these indices, replace the value -0.2 by 0 in the Dependence tab of the probabilistic model window.

7-2-1 Definition

Choose Metamodel in the context menu of the sub-item Evaluation of the design of experiments item.

../_images/metamodel_wizard.png

Select the Functional chaos method and click on Continue button.

../_images/chaos_page.png

Set the chaos degree to 4 and click on Continue and then on Finish button in the next page.

Launch the analysis.

7-2-2 Results

The first tab of the result window displays the metamodel. The relative error expresses the quality of the metamodel.

../_images/chaos_result_metamodel.png

The moments retrieved from the polynomial basis correspond to the result of the central tendency analyses.

../_images/chaos_result_summary.png

The windows shows the Sobol indices. We can see that the values are similar to the ones obtained with the sensitivity analysis.

../_images/chaos_result_sobol.png
The analysis computes a surrogate model which can be retrieved and checked:
  • Click on the context menu of the metamodel item.

    ../_images/metamodel_contextMenu.png
    • Choose Convert metamodel into physical model. A new item MetaModel_0 appears in the study tree.
  • Click on its sub-item Definition. A model definition window appears:
    • Evaluate the model by clicking on the Evaluate button. The output value is close to the value obtained with the analytical formula.

      ../_images/metamodel_definition.png

7-3 Kriging

For more details on the computation of a metamodel by the method of Kriging, you can consult the OpenTURNS documentation.

7-3-1 Definition

Choose Metamodel in the context menu of the sub-item Evaluation of the design of experiments item.

../_images/metamodel_wizard.png

Select the Kriging method and click on Continue button.

../_images/kriging_page.png

Check the button By K-Fold method. For more details on the K-Fold method, check the OpenTURNS documentation. Beware the computation may be expensive: In the current example, the K-Fold method builds a metamodel five times.

../_images/kriging_validation_page.png

Click on Finish button.

Launch the analysis.

7-3-2 Results

The window contains a Validation tab, which presents:

  • the metamodel predictivity coefficient: \displaystyle Q2 = 1 - \frac{\sum_{i=0}^N (y_i - \hat{y_i})^2}{\sum_{i=0}^N {(\bar{y} - y_i)^2}}
  • the residual: \displaystyle res = \frac{\sqrt{\sum_{i=0}^N (y_i - \hat{y_i})^2}}{N}.

with N, the sample size; y_i, the real values and \hat{y_i}, the predicted values.

../_images/kriging_LOO_result.png

Here the Q2 value is nearly equal to 1, so we can conclude that the metamodel is valid.

The Results tab displays the optimized covariance model parameters and the trend coefficients.

../_images/kriging_result1.png

8- Data analysis

To perform the following analyses use again a Gaussian copula (In the Dependence tab of the probabilistic model window replace 0 by -0.2).

8-1 Data

We first create a sample for our example:

  • Create a design of experiments by choosing New design of experiments in the context menu of the Designs of experiments item.

    ../_images/DOE_proba_wizard.png
  • Select Probabilistic and click on Continue button. Note the probabilistic experiment uses the distribution of the model to generate the sample (marginals and copula).
../_images/DOE_probaParamPage.png
  • Set the sample size to 1000. Click on Finish button.
  • In the Table tab of the window click on Export button.
  • Save the sample in a file.

8-2 Data model

On the study window click on Data model.

A new item and a new window appear:

../_images/dataModel_diagram.png

Click on the Model definition box of the diagram.

A window is created to define the model. Click on the button and load the file created in the previous part. Define the last variable as an input by finding the right item in the combo box on the line Type.

../_images/dataModel_definition.png

8-3 Analysis

Choose Data analysis in the context menu of the sub-item Definition of the model.

Launch the analysis.

The following window appears.

../_images/dataAnalysisResult.png

In the dependence tab, we can see that the variables L and I are correlated: this is in agreement with the distribution used to generate this variable.

../_images/dataAnalysisResult_dependence.png

9- Inference

9-1 Definition

Choose Inference in the context menu of the sub-item Definition of the model.

A window appears:
  • In the current example, we choose to select 3 variables (E,F,I) : uncheck L.
  • Add all the distributions for the other variables by choosing the All item in the combo box Add.
  • Click on the Finish button.
../_images/inferenceWizard.png

Launch the analysis.

9-2 Results

../_images/inferenceResultWindow.png

The inference analysis recognized a Beta distribution for the variable E: this is in agreement with the distribution used to generate this variable.

10- Dependence inference

To explore dependence between variables, the user can use dependence inference analysis.

10-1 Definition

Choose Dependence inference in the context menu of the sub-item Definition of the model.

The window which appears, may have default defined groups. There are detected from the Spearman’s matrix estimate. In the current example, the variables L and I are dependent.

By default, the Normal copula is tested. Add all the copulas by choosing the All item in the combo box Add.

../_images/dependenceWizard.png

Launch the analysis.

10-2 Results

The dependence inference analysis recognized a Normal copula for the group [L, I]: this is in agreement with the distribution used to generate this variable. The Spearman coefficient is not exactly equal to -0.2 because the sample is not large enough.

../_images/dep_inferenceResultWindow.png ../_images/dep_inferenceParamResult.png