mbaudin47 / otusecases

A repository of OpenTURNS test cases
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Add Waarts system #2

Open mbaudin47 opened 5 years ago

mbaudin47 commented 5 years ago

Waarts, P.-H. (2000). Structural reliability using finite element methods: an appraisal of DARS: Directional Adaptive Response Surface Sampling. Ph. D. thesis, Technical University of Delft, The Netherlands.

See :

Thèse Vincent Dubourg 2011, Méta-modèles adaptatifs pour l’analyse de fiabilité et l’optimisation sous contrainte fiabiliste, section "A two-dimensional four-branch serial system", page 182:

http://phimeca.com/IMG/pdf/these_dubourg_2011.pdf

mbaudin47 commented 5 years ago

https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_RS2.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_concave.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_convex.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_25_quadratic_terms.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_discontinuous_lsf.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_noisy_lsf.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_saddle.py https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_Waarts_system_series.py

mbaudin47 commented 5 years ago

https://github.com/openturns/openturns/blob/aed050d8fc20b7d7114efc8017f4f9876e5b0b67/python/test/t_SubsetSampling_Waarts_system_series.py

mbaudin47 commented 4 years ago

Below is an implementation of the four-branch serial system from Waarts 2000, adapted from a script from Vincent Chabridon.

Here is a ipynb implementation:

Waarts_function.ipynb.txt

Here is the Python implementation:

# # A two-dimensional four-branch serial system (Waarts, 2000)

# ## References

# * [1] Waarts, P.-H. (2000). "Structural reliability using finite element methods: an appraisal of
# DARS: Directional Adaptive Response Surface Sampling." PhD thesis. Technical University of Delft, The Netherlands.
# * [2] Dubourg, V. (2011). "Adaptive surrogate models for reliability analysis and reliability-based design
# optimization". PhD thesis. Université Blaise Pascal – Clermont II.

# ## Numerical example with OpenTURNS

import openturns as ot
import numpy as np

## Input probabilistic model
x0 = ot.Normal(0.,1.)
x1 = ot.Normal(0.,1.)
inputDistribution = ot.ComposedDistribution((x0,x1))
inputRandomVector = ot.RandomVector(inputDistribution)

## Limit-state function
formulaList = ['var y0 := 3 + 0.1 * (x0 - x1)^2 - (x0 + x1) / sqrt(2)', 
               'var y1 := 3 + 0.1 * (x0 - x1)^2 + (x0 + x1) / sqrt(2)', 
               'var y2 := x0 - x1 + 7 / sqrt(2)', 
               'var y3 := x1 - x0 + 7 / sqrt(2)', 
               'y := min(y0,y1,y2,y3)']
formula = ';'.join(formulaList)
waartsfunction = ot.SymbolicFunction(['x0', 'x1'], ['y'], formula)

y = waartsfunction([2.1,2.1])

## Creation d'une PythonFunction
def waartsfunction_py(x):
    y0 = 3+0.1*(x[0]-x[1])**2-(x[0]+x[1])/(2**0.5)
    y1 = 3+0.1*(x[0]-x[1])**2+(x[0]+x[1])/(2**0.5)
    y2 = x[0]-x[1]+7/(2**0.5)
    y3 = x[1]-x[0]+7/(2**0.5)
    y=min(y0,y1,y2,y3)
    return [y]

yy = waartsfunction_py([2.1,2.1])

myfunction = ot.PythonFunction(2,1,waartsfunction_py)
y = myfunction([2.1,2.1])

outputVect =  ot.CompositeRandomVector(myfunction, inputRandomVector)

montecarlosize = 1000
outputSample = outputVect.getSample(montecarlosize)

histo = ot.HistogramFactory().build(outputSample)

histo.drawPDF()
mbaudin47 commented 4 years ago

This is the picture from Waarts (2000) page 58.

image

The probability is given in terms of beta = 2.9.

Page 160, more details are provided with beta = 2.85.

image

The shape of the unsafe domain is presented page 69.

image

mbaudin47 commented 4 years ago

Here is the plot in Dubourg page 183.

image