Skip to content

Commit

Permalink
Fix the distribution definition in stiffened panel
Browse files Browse the repository at this point in the history
Model description specifies a dependence between f1 and f2 variables with
Spearman coefficient of -0.8.
Added fields are:
  - the correlation matrix of dimension 10;
  - the Normal copula used for the input variables;
  - the input distribution with the dependence;
  - an independent distribution if needed

Also fix typos in class documentation.
  • Loading branch information
KieranDelamotte authored Jan 20, 2025
1 parent f2588d0 commit 80c1055
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion python/doc/usecases/use_case_stiffened_panel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This use-case implements a simplified model of buckling for a stiffened panel (s
**Figure 3.** Parameterization of the stiffened panel.


This test case is composed of nine random variables:
This test case is composed of ten random variables:

- :math:`E\sim\mathcal{TN}(\num{110.0e9}, \num{55.0e9}, \num{99.0e9}, \num{121.0e9})` : Young modulus (:math:`\unit{\Pa}`)

Expand Down
52 changes: 37 additions & 15 deletions python/src/usecases/stiffened_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,27 @@ class StiffenedPanel:
Half-width of the stiffener (m) distribution
`ot.Uniform(0.03762, 0.03838)`
correlation_matrix : :class:`~openturns.CorrelationMatrix`
The correlation matrix used for inputs dependence, mostly identity except for the term representing the interaction between variables :math:`f_1` and :math:`f_2` which is -0.8.
copula : :class:`~openturns.NormalCopula`
The (Normal) copula used to define the distribution of the input parameters.
distribution : :class:`~openturns.JointDistribution`
The joint distribution of the input parameters.
independentDistribution : :class:`~openturns.JointDistribution`
The joint distribution of the input parameters for the special case of independence.
Examples
--------
>>> from openturns.usecases import stiffened_panel
>>> # Load the stiffened panel model
>>> panel = stiffened_panel.StiffenedPanel()
>>> print("Inputs:", panel.model.getInputDescription())
Inputs: [F,L,a,De,di,E]
Inputs: [E,nu,h_c,ell,f_1,f_2,t,a,b_0,p]
>>> print("Outputs:", panel.model.getOutputDescription())
[Deflection,Left angle,Right angle]
Outputs: [(N_{xy})_{cr}]
"""

def __init__(self):
Expand Down Expand Up @@ -135,17 +144,30 @@ def __init__(self):
self.p = ot.Uniform(0.03762, 0.03838)
self.p.setDescription(["p (m)"])

self.distribution = ot.JointDistribution(
[
self.youngModulus,
self.nu,
self.h_c,
self.ell,
self.f_1,
self.f_2,
self.t,
self.a,
self.b_0,
self.p,
]
# correlation matrix
self.correlation_matrix = ot.CorrelationMatrix(self.dim)
self.correlation_matrix[4, 5] = -0.8
self.copula = ot.NormalCopula(
ot.NormalCopula.GetCorrelationFromSpearmanCorrelation(
self.correlation_matrix
)
)

varList = [
self.youngModulus,
self.nu,
self.h_c,
self.ell,
self.f_1,
self.f_2,
self.t,
self.a,
self.b_0,
self.p,
]

# distribution
self.distribution = ot.JointDistribution(varList, self.copula)

# special case: independent distribution
self.independentDistribution = ot.JointDistribution(varList)

0 comments on commit 80c1055

Please sign in to comment.