LimitState

class persalys.LimitState(*args)

Create a limit state.

Parameters:

name : str

Name

physicalModel : PhysicalModel

Physical model

outputName : str

Interest variable name

operator : ComparisonOperator

Comparison operator against threshold (optional)

threshold : float

Threshold value (optional)

Examples

>>> import openturns as ot
>>> import persalys

Create the model:

>>> R = persalys.Input('R', 0., ot.LogNormalMuSigma(300., 30., 0.).getDistribution(), 'Yield strength')
>>> F = persalys.Input('F', 0., ot.Normal(75000., 5000.), 'Traction load')
>>> G = persalys.Output('G', 'deviation')
>>> physicalModel = persalys.SymbolicPhysicalModel('model1', [R, F], [G], ['R-F/(pi_*100.0)'])

Create the limit state:

>>> limitState = persalys.LimitState('ls1', physicalModel, 'G', ot.Less(), 0.)

Methods

GetClassName
getClassName()
getId() Accessor to the object’s id.
getImplementation(*args) Accessor to the underlying implementation.
getName() Accessor to the object’s name.
getOperator() Comparison operator accessor.
getOutputName() Accessor to the name of output variable of interest in limit state.
getPhysicalModel() Physical model for limit state accessor.
getPythonScript() Python script for limit state accessor.
getThreshold() Threshold value for limit state accessor.
isValid() Whether limit state is valid.
setName(name) Accessor to the object’s name.
setOperator(comparisonOperator) Comparison operator accessor.
setOutputName(outputName) Accessor to the name of output variable of interest in limit state.
setThreshold(threshold) Threshold value for limit state accessor.
__init__(*args)
getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getImplementation(*args)

Accessor to the underlying implementation.

Returns:

impl : Implementation

The implementation class.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getOperator()

Comparison operator accessor.

Returns:

operator : openturns.ComparisonOperator

Comparison operator

getOutputName()

Accessor to the name of output variable of interest in limit state.

Returns:

outputName : str

Interest variable name

getPhysicalModel()

Physical model for limit state accessor.

Returns:

model : PhysicalModel

Physical model

getPythonScript()

Python script for limit state accessor.

Returns:

script : str

Python script to rebuild the limit state

getThreshold()

Threshold value for limit state accessor.

Returns:

threshold : float

Threshold value

isValid()

Whether limit state is valid.

Returns:

isValid : bool

Whether it is valid

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setOperator(comparisonOperator)

Comparison operator accessor.

Parameters:

operator : openturns.ComparisonOperator

Comparison operator

setOutputName(outputName)

Accessor to the name of output variable of interest in limit state.

Parameters:

outputName : str

Interest variable name

setThreshold(threshold)

Threshold value for limit state accessor.

Parameters:

threshold : float

Threshold value