Use the Directional Sampling Algorithm

In this example we estimate a failure probability with the directional simulation algorithm provided by the DirectionalSampling class.

Introduction

The directional simulation algorithm operates in the standard space based on:

  1. a root strategy to evaluate the nearest failure point along each direction and take the contribution of each direction to the failure event probability into account. The available strategies are: - RiskyAndFast - MediumSafe - SafeAndSlow

  2. a sampling strategy to choose directions in the standard space. The available strategies are: - RandomDirection - OrthogonalDirection

Let us consider the analytical example of the cantilever beam described here.

from openturns.usecases import cantilever_beam
import openturns as ot
import openturns.viewer as otv

We load the model from the usecases module :

We load the joint probability distribution of the input parameters :

We load the model giving the displacement at the end of the beam :

We create the event whose probability we want to estimate.

Root finding algorithm.

Direction sampling algorithm.

Create a simulation algorithm.

Retrieve results.

result = algo.getResult()
probability = result.getProbabilityEstimate()
print("Pf=", probability)
Pf= 4.810790032649496e-07

We can observe the convergence history with the drawProbabilityConvergence method.

DirectionalSampling convergence graph at level 0.95

Display all figures