Reliability Commands

From OpenSeesWiki
Revision as of 02:46, 10 August 2013 by Mhscott (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • reliability -- makes reliability commands available in the OpenSees/Tcl interpreter


  • wipeReliability -- deletes all existing reliability objects from the OpenSees/Tcl workspace


  • randomVariable $tag pdfType -mean $mean -stdv $stdv -- creates a random variable object with unique identifying integer $tag and probability density function (PDF) of pdfType, mean $mean, and standard deviation $stdv
    • Available PDFs: normal, lognormal, uniform, and more
    • Example: randomVariable 1 normal -mean 5 -stdv 0.7
    • Example: randomVariable 4 lognormal -mean 4 -stdv 0.5


  • getPDF $tag $x -- returns the PDF evaluated at $x for random variable $tag -- p = f(x)
    • Example: set p [getPDF 1 4.2] -- sets the Tcl variable p equal to the PDF of random variable 1 evaluated at 4.2


  • getCDF $tag $x -- returns the CDF evaluated at $x for random variable $tag -- p = F(x)
    • Example: set p [getCDF 1 4.2] -- sets the Tcl variable p equal to the CDF of random variable 1 evaluated at 4.2


  • getInverseCDF $tag $p -- returns the inverse CDF evaluated at $p for random variable $tag -- x = F^{-1}(p)
    • The argument $p must be in the range [0,1]
    • Example: set x [getInverseCDF 1 0.2] -- sets the Tcl variable x equal to the inverse CDF of random variable 1 evaluated at 0.2
    • Example: set x [getInverseCDF 4 [expr rand()]] -- sets the Tcl variable x equal to the inverse CDF of random variable 4 evaluated at a random value on [0,1] using the intrinsic Tcl function rand() (see also srand())
    • When used in conjunction with the updateParameter command (see below), the getInverseCDF command facilitates Monte Carlo simulation


  • parameter $tag <specific parameter args> -- creates a parameter object with unique identifying integer $tag and that points to an object of the finite element domain that is identified using <specific parameter args>
    • Example: parameter 1 element 5 E -- parameter 1 is associated with E of the element with tag 5
    • Example: parameter 4 element 3 section 1 fy -- parameter 4 is associated with fy of section 1 in the element with tag 3
    • In lieu of detailed documentation, see the setParameter() method in the source code for the properties of nodes, loads, elements, sections, materials, etc. that you wish to "parameterize"
    • Example: parameter 2 node 7 disp 1 -- parameter 2 is associated with the DOF 1 displacement of node 7
    • The parameter command can be invoked without first issuing the reliability command


  • parameter $tag randomVariable $rvTag <specific parameter args> -- creates a parameter object that is associated with the previously defined random variable object with tag $rvTag
    • This is essentially the same functionality as randomVariablePositioner objects (now deprecated)
    • The <specific parameter args> follow the same syntax listed above
    • Example: parameter 6 randomVariable 4 -- parameter 6 is associated with random variable 4 (use addToParameter to further associate the parameter with an object of the finite element domain)
    • Example: parameter 7 randomVariable 1 element 4 fy -- parameter 7 links random variable 1 with fy of element 4


  • getParamValue $tag -- returns the current value of parameter $tag
    • Example: set abc [getParamValue 4] -- sets the Tcl variable abc equal to the current value of parameter 4
    • Additionally, a Tcl array named par is created automatically and stores the values of all parameter objects. Values are accessed using the parameter tag as the array key.
      • Example: set abc $par(4) -- sets the Tcl variable abc equal to the current value of parameter 4
      • The par Tcl array should be used in the definition of performanceFunction objects (see below)


  • addToParameter $tag <specific parameter args> -- adds objects of the finite element domain to an existing parameter objects
    • Example: addToParameter 1 element 8 E -- parameter 1 is associated with E of element 8 in addition to any previously defined associations
    • Example: addToParameter 6 element 2 section 5 fy -- parameter 6 is associated with fy at section 5 of element 2 in addition to any previously defined associations
    • The <specific parameter args> follow the same syntax listed above
    • The addToParameter command can be invoked without first issuing the reliability command


  • updateParameter $tag $newValue -- makes the value of parameter $tag equal to $newValue
    • Example: updateParameter 1 30000.0 -- sets the value of all objects associated with parameter 1 equal to 30000.0
    • The updateParameter command can be invoked without first issuing the reliability command, making it useful when one wishes to manually update parameter values in staged analyses
    • When used in conjunction with the getInverseCDF command of random variable objects (see above), the updateParameter command facilitates Monte Carlo simulation


  • performanceFunction $tag $expression -- creates a performance function (or g-function) object with unique identifying integer $tag and string $expression
    • Example: performanceFunction 3 "0.02 - \$par(2)"
    • The use of \$ will defer Tcl variable dereferencing to run-time. Likewise, the use of \[ \] will defer Tcl function evaluation to run-time


More commands will be documented soon