Changeset 993
- Timestamp:
- 10/30/08 17:27:06 (2 months ago)
- Files:
-
- trunk/doc/configure.ac (modified) (1 diff)
- trunk/doc/src/DocumentationGuide/OpenTURNS_DocumentationGuide.tex (modified) (4 diffs)
- trunk/doc/src/ExamplesGuide (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide)
- trunk/doc/src/ExamplesGuide/ImportanceFactorsDrawingFORM.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/ImportanceFactorsDrawingFORM.pdf)
- trunk/doc/src/ExamplesGuide/Makefile.am (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/Makefile.am)
- trunk/doc/src/ExamplesGuide/Math_Notations.sty (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/Math_Notations.sty)
- trunk/doc/src/ExamplesGuide/OpenTURNS_ExamplesGuide.tex (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/OpenTURNS_ExamplesGuide.tex)
- trunk/doc/src/ExamplesGuide/convergenceGrapheDS.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/convergenceGrapheDS.pdf)
- trunk/doc/src/ExamplesGuide/convergenceGrapheIS.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/convergenceGrapheIS.pdf)
- trunk/doc/src/ExamplesGuide/convergenceGrapheLHS.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/convergenceGrapheLHS.pdf)
- trunk/doc/src/ExamplesGuide/convergenceGrapheMonteCarlo.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/convergenceGrapheMonteCarlo.pdf)
- trunk/doc/src/ExamplesGuide/distributionE_pdf.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/distributionE_pdf.pdf)
- trunk/doc/src/ExamplesGuide/distributionF_pdf.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/distributionF_pdf.pdf)
- trunk/doc/src/ExamplesGuide/distributionI_pdf.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/distributionI_pdf.pdf)
- trunk/doc/src/ExamplesGuide/distributionL_pdf.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/distributionL_pdf.pdf)
- trunk/doc/src/ExamplesGuide/poutre.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/poutre.pdf)
- trunk/doc/src/ExamplesGuide/resultatExampleBeam.tex (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/resultatExampleBeam.tex)
- trunk/doc/src/ExamplesGuide/scriptExample_beam.py (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/scriptExample_beam.py)
- trunk/doc/src/ExamplesGuide/smoothedCDF.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/smoothedCDF.pdf)
- trunk/doc/src/ExamplesGuide/smoothedPDF.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/smoothedPDF.pdf)
- trunk/doc/src/ExamplesGuide/smoothedPDF_and_GaussianPDF.pdf (copied) (copied from branches/dutfoy/devel/doc/src/ExamplesGuide/smoothedPDF_and_GaussianPDF.pdf)
- trunk/doc/src/Makefile.am (modified) (1 diff)
- trunk/doc/src/ReferenceGuide/OpenTURNS_ReferenceGuide.tex (modified) (1 diff)
- trunk/doc/src/ReferenceGuide/global_methodology_content.tex (modified) (1 diff)
- trunk/doc/src/ReferenceGuide/reference_guide_content.tex (modified) (1 diff)
- trunk/doc/src/ReferenceGuide/reference_guide_title.tex (modified) (1 diff)
- trunk/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex (modified) (27 diffs)
- trunk/doc/src/UserManual/BaseObjects_UserManual.tex (modified) (7 diffs)
- trunk/doc/src/UserManual/Distribution_UserManual.tex (modified) (9 diffs)
- trunk/doc/src/UserManual/Graphs_UserManual.tex (modified) (3 diffs)
- trunk/lib/src/Base/Func/StringXMLConverter.hxx (copied) (copied from branches/dutfoy/devel/lib/src/Base/Func/StringXMLConverter.hxx)
- trunk/lib/src/Base/Func/XMLStringConverter.hxx (copied) (copied from branches/dutfoy/devel/lib/src/Base/Func/XMLStringConverter.hxx)
- trunk/lib/src/Base/Func/XMLWrapperErrorHandler.cxx (copied) (copied from branches/dutfoy/devel/lib/src/Base/Func/XMLWrapperErrorHandler.cxx)
- trunk/lib/src/Base/Func/XMLWrapperErrorHandler.hxx (copied) (copied from branches/dutfoy/devel/lib/src/Base/Func/XMLWrapperErrorHandler.hxx)
- trunk/lib/src/Uncertainty/Distribution/ComposedCopula.cxx (modified) (3 diffs)
- trunk/lib/src/Uncertainty/Distribution/ComposedCopula.hxx (modified) (1 diff)
- trunk/lib/src/Uncertainty/Distribution/ExtraFunc/DistFunc.cxx (modified) (1 diff)
- trunk/lib/src/Uncertainty/Model/CopulaImplementation.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/configure.ac
r992 r993 113 113 src/ReferenceGuide/Makefile 114 114 src/ContributionGuide/Makefile 115 src/ExamplesGuide/Makefile 115 116 ]) 116 117 # src/CodingRulesGuide/Makefile trunk/doc/src/DocumentationGuide/OpenTURNS_DocumentationGuide.tex
r862 r993 75 75 \begin{itemize} 76 76 \item[$\bullet$] {\itshape Open TURNS - Reference Guide}, 77 \item[$\bullet$] {\itshape Open TURNS - Example Guide} (to appear soon).77 \item[$\bullet$] {\itshape Open TURNS - Examples Guide}. 78 78 \end{itemize} 79 79 … … 89 89 \item[$\bullet$] {\bf Link with the Open TURNS Methodology} : this field recalls the position of the algorithm in the Global Methodology. It precises to which step of the Global Methodology it participates. 90 90 \item[$\bullet$] {\bf References and theoretical basics} : this field gives some usefull references to the User who wants to know more about the method. It recalls, too, some limits in the use of the method. 91 \item[$\bullet$] {\bf Examples} : this field applies the method on a simple example. Most of the forms of this documentation present the analytical example of a cantilever beam, of Young's modulus E, length L, section modulus I, which undergoes a concentrated bending force at one end. We study then the vertical displacement of the extreme end.92 \end{itemize} 93 94 To have an example of the use of a particular algorithm or of a particular method, the User is invited to refer either to the documentation {\itshape Reference Guide - Open TURNS} in its section {Example} or to the documentation {\itshape Example Guide - Open TURNS} which applies the Global Methodology on a particular example.\\91 \item[$\bullet$] {\bf Examples} : this field applies the method on some examples. Most of the forms of this documentation present the analytical example of a cantilever beam, of Young's modulus E, length L, section modulus I, which undergoes a concentrated bending force at one end. We study then the vertical displacement of the extreme end. 92 \end{itemize} 93 94 To have an example of the use of a particular algorithm or of a particular method, the User is invited to refer either to the documentation {\itshape Reference Guide - Open TURNS} in its section {Example} or to the documentation {\itshape Examples Guide - Open TURNS} which applies the Global Methodology on a particular example.\\ 95 95 96 96 Some hyperlinks are present to facilitate the navigation between the documentation {\itshape Uncertainty Reference Guide - Open TURNS} and the others ones. 97 97 98 98 99 \subsection{ Example Guide} 100 101 This Guide applies the whole Global Methodology on the following analytical example : the evaluation of the height of an embankment to protect from flows.\\ 102 103 The User may find in this documentation a complete probabilistic uncertainty treatment study. In particular, all the results are discussed and the documentation aims at explicitating the interest of such a study. \\ 104 Let's note that the documentation {\itshape Open TURNS - Use Cases Guide for the Textual User Interface} gives also the example of an uncertainty study, performed on the analytical example of a cantilever beam wich undergoes a concentrated bending force at one end.\\ 99 \subsection{Examples Guide} 100 101 This Guide applies the whole Global Methodology on some analytical examples. For now, there is only one example: the case of a cantilever beam wich undergoes a concentrated bending force at one end.\\ 102 103 The User may find in this documentation a complete probabilistic uncertainty treatment study.\\ 105 104 106 105 The User is invited to refer to that documentation in particular to apprehend properly the signification of the results of the methods preconised in the Globel Methodology.\\ 107 106 108 Some links are present to facilitate the navigation between the documentation {\itshape Example Guide - Open TURNS} and the {\itshape Reference Guide - Open TURNS} one.107 Some links are present to facilitate the navigation between the documentation {\itshape Examples Guide - Open TURNS} and the {\itshape Reference Guide - Open TURNS} one. 109 108 110 109 … … 141 140 The presentation follows the steps preconised in the Global Methodology.\\ 142 141 143 The User is invited to consult this documentation before implementating a study through the TUI : he will probably find there an example of what he wants to perform. The documentation is made to enable the User to make some cut/copy from the documentation into his study.\\ 144 145 An example of complete uncertainty study is given at the end of the documentation : the analytical example of a cantilever beam wich undergoes a concentrated bending force at one end. 142 The User is invited to consult this documentation before implementating a study through the TUI : he will probably find there an example of what he wants to perform. The documentation is made to enable the User to make some cut/copy from the documentation into his study. 146 143 147 144 \section{Software Source.} … … 201 198 \item {\itshape Reference Guide} : \\ 202 199 source file $OpenTURNS\_ReferenceGuide.tex$, 203 \item {\itshape Example Guide} : \\204 source file $OpenTURNS\_Example Guide.tex$.200 \item {\itshape Examples Guide} : \\ 201 source file $OpenTURNS\_ExamplesGuide.tex$. 205 202 \end{itemize} 206 203 \item[$\bullet$] {\bf TextualUserInterface} : trunk/doc/src/Makefile.am
r862 r993 25 25 include $(top_srcdir)/config/common.am 26 26 27 SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual WrapperGuide GNU_free_documentation_licence ContributionGuide #CodingRulesGuide28 DIST_SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual WrapperGuide GNU_free_documentation_licence ContributionGuide #CodingRulesGuide27 SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual ExamplesGuide WrapperGuide GNU_free_documentation_licence ContributionGuide ExamplesGuide #CodingRulesGuide 28 DIST_SUBDIRS = ArchitectureGuide DocumentationGuide ReferenceGuide UseCasesGuide UserManual ExamplesGuide WrapperGuide GNU_free_documentation_licence ContributionGuide ExamplesGuide #CodingRulesGuide 29 29 30 30 EXTRA_DIST = logoOpenTURNS.jpg trunk/doc/src/ReferenceGuide/OpenTURNS_ReferenceGuide.tex
r862 r993 1 %Copyright (c) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % under the terms of the GNU Free Documentation License, Version 1.2 trunk/doc/src/ReferenceGuide/global_methodology_content.tex
r862 r993 1 %Copyright (c) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % under the terms of the GNU Free Documentation License, Version 1.2 trunk/doc/src/ReferenceGuide/reference_guide_content.tex
r862 r993 1 %Copyright (c) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % under the terms of the GNU Free Documentation License, Version 1.2 trunk/doc/src/ReferenceGuide/reference_guide_title.tex
r862 r993 1 %Copyright (c) 200 7EDF-EADS-PHIMECA.1 %Copyright (c) 2005 EDF-EADS-PHIMECA. 2 2 % Permission is granted to copy, distribute and/or modify this document 3 3 % under the terms of the GNU Free Documentation License, Version 1.2 trunk/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex
r972 r993 107 107 It is important to note that the python test files given in open source with the code source of Open TURNS are very useful : they provide to the User an example of the utilisation of each object of Open TURNS. The User is invited to refer to them : they will surely help him to write his study through the TUI with the right syntax.\\ 108 108 109 110 111 112 \subsection*{Loading the openturns python library} 113 \addcontentsline{toc}{subsection}{Loading the openturns python library} 114 109 115 In order to write a python file using fonctionalities proposed by the \emph{openturns} python module, it is necessary to load the module in the python shell. If there is no danger to overload functionalities coming from other python modules, the loading command is : 110 116 … … 138 144 \end{center} 139 145 gives a general overview of the whole objects proposed by the \emph{openturns} python library.\\ 146 147 148 149 \subsection*{Verbosity level of the Open TURNS platform} 150 \addcontentsline{toc}{subsection}{Verbosity level of the Open TURNS platform} 151 152 It is possible to specify the verbosity level of the Open TURNS platform, through the object {\itshape Log} which contains the internal following variables : 153 \begin{itemize} 154 \item {\itshape Log.DBG} to catch the messages related the level debug, 155 \item {\itshape Log.WRAPPER} to catch the messages related to the wrapper, 156 \item {\itshape Log.INFO} to catch the messages related to the platform information, 157 \item {\itshape Log.USER} to catch the messages defined by the User, 158 \item {\itshape Log.WARN} to catch the messages related to warnings, 159 \item {\itshape Log.ERROR} to catch the messages related to errors. 160 \end{itemize} 161 By default, the Open TURNS platform shows all the messages related to the levels DBG, WARN and ERROR.\\ 162 It is possible to change it by the command {\itshape Log.Show()}. For example to catch the messages related to the level debug, the warnings and information, the command is : 163 \begin{center} 164 \begin{lstlisting} 165 Log.Show(Log.DBG + Log.WARN + Log.INFO) 166 \end{lstlisting} 167 \end{center} 168 In order to catch all the possible messages (highest verbosity level), the command is : 169 \begin{center} 170 \begin{lstlisting} 171 Log.Show(Log.ALL) 172 \end{lstlisting} 173 \end{center} 174 In order to catch no message (lowest verbosity level), the command is : 175 \begin{center} 176 \begin{lstlisting} 177 Log.Show(Log.NONE) 178 \end{lstlisting} 179 \end{center} 180 181 182 183 184 \subsection*{Some usefull general commands} 185 \addcontentsline{toc}{subsection}{Some usefull general commands} 186 140 187 141 188 The command {\itshape help} gives detailed information on each object of the {\itshape openturns} python library. For example, to get information on the object {\itshape NumericalPoint}, the command is : … … 188 235 where $[TAB]$ is the Tabulation touch. 189 236 237 238 239 240 241 \subsection*{Link with other python standards} 242 \addcontentsline{toc}{subsection}{Link with other python standards} 243 244 It is possible to define a NumericalPoint from a list python, as follows : 245 \begin{center} 246 \begin{lstlisting} 247 point = NumericalPoint( [1.1, 2.2, 3.3, 4.4] ) 248 \end{lstlisting} 249 \end{center} 250 251 252 It is possible to define a NumericalPoint from a tuple python, as follows : 253 \begin{center} 254 \begin{lstlisting} 255 point2 = NumericalPoint( (1.1, 2.2, 3.3, 4.4) ) 256 \end{lstlisting} 257 \end{center} 190 258 191 259 … … 347 415 We explicitate here the probability density function of the Non Central Student : 348 416 $$ 349 p_T(x) = \frac{\exp(-\delta^2 / 2)}{\sqrt{\nu\pi} \Gamma(\nu / 2)}\left(\frac{\nu}{\nu + (x +\gamma)^2}\right) ^ {(\nu + 1) / 2} \sum_{j=0}^{\infty} \frac{\Gamma\left(\frac{\nu + j + 1}{2}\right)}{\Gamma(j + 1)}\left((x+\gamma)\delta\sqrt{\frac{2}{\nu + x^2}}\right) ^ j417 p_T(x) = \frac{\exp(-\delta^2 / 2)}{\sqrt{\nu\pi} \Gamma(\nu / 2)}\left(\frac{\nu}{\nu + (x-\gamma)^2}\right) ^ {(\nu + 1) / 2} \sum_{j=0}^{\infty} \frac{\Gamma\left(\frac{\nu + j + 1}{2}\right)}{\Gamma(j + 1)}\left(\delta(x-\gamma)\sqrt{\frac{2}{\nu + (x-\gamma)^2}}\right) ^ j 350 418 $$ 351 419 … … 3412 3480 3413 3481 \index{Sample Statistics!Min - Max} 3482 \index{Sample Statistics!Moments evaluation} 3414 3483 \index{Sample Statistics!Covariance} 3415 3484 \index{Sample Statistics!Skewness} … … 3650 3719 \vspace*{0.5cm} 3651 3720 3652 It is necessary to refer to the documentation {\itshape Open TURNS - Wrappers Guide} to have explanations on what constitues an Open TURNS wrapper.\\ 3721 It is necessary to refer to the documentation {\itshape Open TURNS - Wrappers Guide} to have explanations on what constitues an Open TURNS wrapper. \\ 3722 It is possible to separate the loading of the wrapper file and the creation of the NumericalMathFunction, as indicated in CASE 2 of the script given belows. 3653 3723 3654 3724 \requirements{ … … 3677 3747 3678 3748 \begin{lstlisting} 3749 # CASE 1 : we load the wrapper file and create the NumericalMathFunction at the same time 3679 3750 # Create the limit state function 'poutre' from the wrapper 'poutre' 3680 3751 poutre = NumericalMathFunction("poutre") 3752 3753 # CASE 2 : we load separately the wrapper file and create the NumericalMathFunction 3754 # Load the wrapper file 3755 wrap = WrapperFile.FindWrapperByName("poutre") 3756 # Create the limit state function 'poutre' from the wrapper wrap 3757 poutre = NumericalMathFunction(wrap) 3681 3758 \end{lstlisting} 3682 3759 … … 3696 3773 \item[$\bullet$] the hessian evaluation method is the centered finite difference method, with the differential increment $h=1e-4$ for each direction. 3697 3774 \end{itemize} 3698 it is possible to change the evaluation method for the gradietnor the hessian. The following Use Case shows how to proceed.\\3775 It is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 3699 3776 3700 3777 The example here is the AnalyticalFunction {\itshape myAnalyticalFunction} defined by the formula : … … 3761 3838 \end{lstlisting} 3762 3839 3840 3841 3842 \subsubsection{UC : From a fonction defined in the script python} 3843 3844 \index{Limit State Function!Function declarde in the script python} 3845 3846 3847 The objective of this UC is to create the limit state function, from a function defined in the script python. Open TURNS automatically gives to the analytical formula an implementation for the gradient and the hessian : by default, 3848 \begin{itemize} 3849 \item[$\bullet$]the gradient evaluation method is the centered finite difference method, with the differential increment $h=1e-5$ for each direction, 3850 \item[$\bullet$] the hessian evaluation method is the centered finite difference method, with the differential increment $h=1e-4$ for each direction. 3851 \end{itemize} 3852 It is possible to change the evaluation method for the gradient or the hessian. The following Use Case shows how to proceed.\\ 3853 3854 In order to be able to use the function with the {\itshape openturns} library, it is necessary to define a class which derives from {\itshape OpenTURNSPythonFunction} as indicated belows. The example here is the functions {\itshape modelePYTHON} and {\itshape modelePYTHON2}: 3855 \begin{equation} 3856 \begin{array}{l|lcl} 3857 modelePYTHON : & \mathbb{R}^4 & \rightarrow & \mathbb{R} \\ 3858 & (E,F,L,I) & \mapsto & \displaystyle \frac{FL^3}{3EI} 3859 \end{array} 3860 \end{equation} 3861 3862 \begin{equation} 3863 \begin{array}{l|lcl} 3864 modelePYTHON2 : & \mathbb{R}^4 & \rightarrow & \mathbb{R}^2 \\ 3865 & (a,b,c) & \mapsto & \displaystyle (a^2, abc) 3866 \end{array} 3867 \end{equation} 3868 3869 3870 \requirements{ 3871 none 3872 } 3873 { 3874 \begin{description} 3875 \item[$\bullet$] the limit state function : {\itshape modeleOpenTURNS} 3876 \item[type] : NumericalMathFunction 3877 \end{description} 3878 } 3879 3880 \espace 3881 Python script for this UseCase : 3882 3883 \begin{lstlisting} 3884 # CASE 1 : function : R^4 --> R 3885 3886 # Create here the python lines to define the implementation of the function 3887 3888 # In order to be able to use that function with the openturns library, 3889 # it is necessary to define a class which derives from OpenTURNSPythonFunction 3890 3891 class modelePYTHON(OpenTURNSPythonFunction) : 3892 # that following method defines the input size (4) and the output size (1) 3893 def __init__(self) : 3894 OpenTURNSPythonFunction.__init__(self,4,1) 3895 3896 # that following method gives the implementation of modelePYTHON 3897 def f(self,x) : 3898 E=x[0] 3899 F=x[1] 3900 L=x[2] 3901 I=x[3] 3902 return [-(F*L*L*L)/(3.*E*I)] 3903 3904 # Use that function defined in the script python 3905 # with the openturns library 3906 # Create a NumericalMathFunction from modelePYTHON 3907 modeleOpenTURNS = NumericalMathFunction(modelePYTHON()) 3908 3909 3910 # CASE 2 : function : R^3 --> R^2 3911 3912 # Create here the python lines to define the implementation of the function 3913 3914 # In order to be able to use that function with the openturns library, 3915 # it is necessary to define a class which derives from OpenTURNSPythonFunction 3916 3917 class modelePYTHON2(OpenTURNSPythonFunction) : 3918 # that following method defines the input size (3) and the output size (2) 3919 def __init__(self) : 3920 OpenTURNSPythonFunction.__init__(self,3,2) 3921 3922 # that following method gives the implementation of modelePYTHON 3923 def f(self,x) : 3924 a=x[0] 3925 b=x[1] 3926 c=x[2] 3927 return [-a*a,a*b*c] 3928 3929 # Use that function defined in the script python 3930 # with the openturns library 3931 # Create a NumericalMathFunction from modelePYTHON2 3932 modeleOpenTURNS2 = NumericalMathFunction(modelePYTHON2()) 3933 \end{lstlisting} 3763 3934 3764 3935 … … 4000 4171 # Give directly to the 'poutreReduced' function a gradient evaluation method 4001 4172 # thanks to the finite difference technique 4002 # For example, radient technique : non centered finite difference method4173 # For example, gradient technique : non centered finite difference method 4003 4174 myGradient = NonCenteredFiniteDifferenceGradient(NumericalPoint(2, 1.0e-7), poutreReduced.getEvaluationImplementation()) 4004 4175 print "myGradient = ", myGradient … … 4711 4882 In order to evaluate the central tendance of the output variable of interest described by a numerical sample, it is possible to use all the functionalities described in the Use Case \ref{statistical}.\\ 4712 4883 4713 The Use Case \ref{correlationAnalysis} describes the correlation analysis we can perform between the random input vector, described by a numerical sample, and the output variable of interest described by a numerical sample too. 4714 4715 \subsubsection{UC : Correlation analysis on samples : Pearson and Spearman coefficients, PCC, PRCC, SRC, SRRC coefficients}\label{correlationAnalysis} 4716 4717 \index{Correlation!Pearson correlation coefficient} 4718 \index{Correlation!Partial Pearson correlation coefficient (PCC)} 4719 \index{Correlation!Spearman correlation coefficient} 4720 \index{Correlation!Partial rank correlation coefficient (PRCC)} 4721 \index{Correlation!Standard regression coefficient (SRC)} 4722 \index{Correlation!Standard rank regression coefficient (SRRC)} 4723 4724 4725 \requirements{ 4726 \begin{description} 4727 \item[$\bullet$] a first numerical sample : {\itshape inputSample}, may be of dimension >1 4728 \item[type] : NumericalSample 4729 \item[$\bullet$] a second numerical sample : {\itshape outputSample}, must be of dimension =1 4730 \item[type] : NumericalSample 4731 \end{description} 4732 } 4733 { 4734 \begin{description} 4735 \item[$\bullet$] the different correlation coefficients : {\itshape PCCcoefficient, PRCCcoefficient, SRCcoefficient, SRRCcoefficient, pearsonCorrelation, spearmanCorrelation} 4736 \item[type] : NumericalPoint 4737 \end{description} 4738 } 4739 4740 \espace 4741 Python script for this UseCase : 4742 4743 \begin{lstlisting} 4744 # PCC coefficients evaluated between the outputSample and each coordinate of inputSample 4745 PCCcoefficient = CorrelationAnalysis.PCC(inputSample, outputSample) 4746 4747 # PRCC evaluated between the outputSample and each coordinate of inputSample (based on the rank values) 4748 PRCCcoefficient = CorrelationAnalysis.PRCC(inputSample, outputSample) 4749 4750 # SRC evaluated between the outputSample and each coordinate of inputSample 4751 SRCcoefficient = CorrelationAnalysis.SRC(inputSample, outputSample) 4752 4753 # SRRC evaluated between the outputSample and each coordinate of inputSample (based on the rank values) 4754 SRRCcoefficient = CorrelationAnalysis.SRRC(inputSample, outputSample) 4755 4756 # Pearson Correlation Coefficient 4757 # CARE : inputSample must be of dimension 1 4758 pearsonCorrelation = CorrelationAnalysis.PearsonCorrelation(inputSample, outputSample) 4759 4760 # Spearman Correlation Coefficient 4761 # CARE : inputSample must be of dimension 1 4762 spearmanCorrelation = CorrelationAnalysis.SpearmanCorrelation(inputSample, outputSample) 4763 \end{lstlisting} 4764 4765 4766 4767 4768 \subsubsection{UC : Moments evaluation from the Taylor variance decomposition method and evaluation of the importance factors associated} 4769 4770 \index{Quadratic Cumul} 4771 \index{Graph!Quadratic Cumul importance factors} 4884 The Use Case \ref{correlationAnalysis} describes the correlation analysis we can perform between the input random vector, described by a numerical sample, and the output variable of interest described by a numerical sample too. 4885 4886 4887 4888 \subsubsection{UC : Moments evaluation from the Taylor variance decomposition method (or Quadratic Cumul method) and evaluation of the importance factors associated} 4889 4890 \index{Taylor variance decomposition (Quadratic Cumul)} 4891 \index{Quadratic Cumul (Taylor variance decomposition)} 4892 \index{Graph!Taylor variance decomposition (Quadratic Cumul) importance factors} 4772 4893 \index{Graph Manipulation!ViewImage} 4773 4894 \index{Graph Manipulation!Show} … … 4777 4898 \requirements{ 4778 4899 \begin{description} 4779 \item[$\bullet$] the random input vector : {\itshape input} 4780 \item[type] : RandomVector which implementation is a UsualRandomVector 4781 \item[$\bullet$] the output variable of interest : {\itshape output} 4900 \item[$\bullet$] the output variable of interest : {\itshape output}, which may be of dimension $\geq 1$ 4782 4901 \item[type] : RandomVector which implementation is a CompositeRandomVector 4783 4902 \end{description} … … 4785 4904 { 4786 4905 \begin{description} 4787 \item[$\bullet$] M oments (order 1, 2, 3) of the variable of interest and its components4906 \item[$\bullet$] Mean and covariance of the variable of interest 4788 4907 \item[type] : NumericalPoint, Matrix 4789 4908 \item[$\bullet$] Importance factors from quadratical cumul method only for {\itshape output} of dimension 1 … … 4857 4976 4858 4977 4978 4979 4980 \subsubsection{UC : Moments evaluation a random sample of the output variable of interest} 4981 4982 \index{Sample Statistics!Moments evaluation} 4983 \index{Graph!Taylor variance decomposition (Quadratic Cumul) importance factors} 4984 \index{Graph Manipulation!ViewImage} 4985 \index{Graph Manipulation!Show} 4986 4987 The objective of this UC is to evaluate the mean and standard deviation of the output variable of interest by generating a random sample of the output variable of interest and evaluate the empirical indicators from that sample.\\ 4988 4989 \requirements{ 4990 \begin{description} 4991 \item[$\bullet$] the output variable of interest : {\itshape output}, which may be of dimension $\geq 1$ 4992 \item[type] : RandomVector which implementation is a CompositeRandomVector 4993 \end{description} 4994 } 4995 { 4996 \begin{description} 4997 \item[$\bullet$] Mean and covariance of the variable of interest 4998 \item[type] : NumericalPoint, CovarianceMatrix 4999 \end{description} 5000 } 5001 5002 \espace 5003 Python script for this UseCase : 5004 5005 \begin{lstlisting} 5006 # Create a random sample of the output variabe of interest of size 1000 5007 size = 1000 5008 outputSample = output.getNumericalSample(size) 5009 5010 # Get the empirical mean 5011 empiricalMean = outputSample.computeMean() 5012 print "Empirical Mean = ", empiricalMean 5013 5014 # Get the empirical covariance matrix 5015 empiricalCovarianceMatrix = outputSample.computeCovariance() 5016 print "Empirical Covariance Matrix = ", empiricalCovarianceMatrix 5017 5018 # Get the standard deviation of the i-th component of the output variabe of interest 5019 # Import the sqrt functionality from the math python library 5020 from math import sqrt 5021 for i in range(output.getDimension()) : 5022 print "Standard deviation of component", i+1, " = ", sqrt(empiricalCovarianceMatrix[i,i]) 5023 \end{lstlisting} 5024 \espace 5025 5026 5027 5028 5029 5030 \subsubsection{UC : Correlation analysis on samples : Pearson and Spearman coefficients, PCC, PRCC, SRC, SRRC coefficients}\label{correlationAnalysis} 5031 5032 \index{Correlation!Pearson correlation coefficient} 5033 \index{Correlation!Partial Pearson correlation coefficient (PCC)} 5034 \index{Correlation!Spearman correlation coefficient} 5035 \index{Correlation!Partial rank correlation coefficient (PRCC)} 5036 \index{Correlation!Standard regression coefficient (SRC)} 5037 \index{Correlation!Standard rank regression coefficient (SRRC)} 5038 5039 5040 This Use Case describes the correlation analysis we can perform between the input random vector, described by a numerical sample, and the output variable of interest described by a numerical sample too.\\ 5041 5042 \requirements{ 5043 \begin{description} 5044 \item[$\bullet$] a first numerical sample : {\itshape inputSample}, may be of dimension >1 5045 \item[type] : NumericalSample 5046 \item[$\bullet$] a second numerical sample : {\itshape outputSample}, must be of dimension =1 5047 \item[type] : NumericalSample 5048 \end{description} 5049 } 5050 { 5051 \begin{description} 5052 \item[$\bullet$] the different correlation coefficients : {\itshape PCCcoefficient, PRCCcoefficient, SRCcoefficient, SRRCcoefficient, pearsonCorrelation, spearmanCorrelation} 5053 \item[type] : NumericalPoint 5054 \end{description} 5055 } 5056 5057 \espace 5058 Python script for this UseCase : 5059 5060 \begin{lstlisting} 5061 # PCC coefficients evaluated between the outputSample and each coordinate of inputSample 5062 PCCcoefficient = CorrelationAnalysis.PCC(inputSample, outputSample) 5063 5064 # PRCC evaluated between the outputSample and each coordinate of inputSample (based on the rank values) 5065 PRCCcoefficient = CorrelationAnalysis.PRCC(inputSample, outputSample) 5066 5067 # SRC evaluated between the outputSample and each coordinate of inputSample 5068 SRCcoefficient = CorrelationAnalysis.SRC(inputSample, outputSample) 5069 5070 # SRRC evaluated between the outputSample and each coordinate of inputSample (based on the rank values) 5071 SRRCcoefficient = CorrelationAnalysis.SRRC(inputSample, outputSample) 5072 5073 # Pearson Correlation Coefficient 5074 # CARE : inputSample must be of dimension 1 5075 pearsonCorrelation = CorrelationAnalysis.PearsonCorrelation(inputSample, outputSample) 5076 5077 # Spearman Correlation Coefficient 5078 # CARE : inputSample must be of dimension 1 5079 spearmanCorrelation = CorrelationAnalysis.SpearmanCorrelation(inputSample, outputSample) 5080 \end{lstlisting} 5081 5082 5083 5084 5085 5086 5087 4859 5088 \subsubsection{UC : Quantile estimations : Wilks and empirical estimators} 4860 5089 4861 5090 4862 \index{Quantile!Empirical estimation }5091 \index{Quantile!Empirical estimation} 4863 5092 \index{Quantile!Wilks estimation} 4864 5093 \index{Wilks} … … 5003 5232 This section gives elements to create events in the physical space {\itshape Event} and in the standard space {\itshape StandardEvent}.\\ 5004 5233 5005 The example here is the output variable {\itshape output} defined from the limit state function {\itshape poutre} defined in Eq.(\ref{equatPoutre}) and the random inputvector $(E,F,L,I)$. The event considered is :5234 The example here is the output variable {\itshape output} defined from the limit state function {\itshape poutre} defined in Eq.(\ref{equatPoutre}) and the input random vector $(E,F,L,I)$. The event considered is : 5006 5235 $$ 5007 5236 myEvent = \{ (E,F,L,I) \in \mathbb{R}^4 / poutre(E,F,L,I) \leq -1.5\}. … … 5048 5277 This section gives elements to manipulate an {\itshape StandardEvent} in Open TURNS .\\ 5049 5278 5050 The example here is an output variable {\itshape output} defined from the limit state function {\itshape f} and the random inputvector {\itshape input}. The event considered is :5279 The example here is an output variable {\itshape output} defined from the limit state function {\itshape f} and the input random vector {\itshape input}. The event considered is : 5051 5280 $$ 5052 5281 myEvent = \{ output=f(input) \leq -1.5 \}. … … 5112 5341 \requirements{ 5113 5342 \begin{description} 5114 \item[$\bullet$] the random inputvector : {\itshape input}5343 \item[$\bullet$] the input random vector : {\itshape input} 5115 5344 \item[type] : RandomVector which implementation is a UsualRandomVector 5116 5345 \item[$\bullet$] the output variable of interest : {\itshape output} of dimension 1 … … 5373 5602 \requirements{ 5374 5603 \begin{description} 5375 \item[$\bullet$] the random inputvector : {\itshape input}5604 \item[$\bullet$] the input random vector : {\itshape input} 5376 5605 \item[type] : RandomVector which implementation is a UsualRandomVector 5377 5606 \item[$\bullet$] the output variable of interest of dimension 1 : {\itshape output} … … 5708 5937 # Draw the convergence graph and the confidence intervalle of level alpha 5709 5938 # By default, alpha = 0.95 5710 alpha = 0.9 55711 convergenceGraph = myAlgo.drawProbabilityConvergence( 0.90)5939 alpha = 0.90 5940 convergenceGraph = myAlgo.drawProbabilityConvergence(alpha) 5712 5941 5713 5942 # Impose a bounding box : x-range and y-range … … 5924 6153 # Draw the convergence graph and the confidence intervalle of level alpha 5925 6154 # By default, alpha = 0.95 5926 alpha = 0.9 55927 convergenceGraph = myAlgo.drawProbabilityConvergence( 0.90)6155 alpha = 0.90 6156 convergenceGraph = myAlgo.drawProbabilityConvergence(alpha) 5928 6157 5929 6158 # Impose a bounding box : x-range and y-range … … 6010 6239 # Draw the convergence graph and the confidence intervalle of level alpha 6011 6240 # By default, alpha = 0.95 6012 alpha = 0.9 56013 convergenceGraph2 = myAlgo2.drawProbabilityConvergence( 0.90)6241 alpha = 0.90 6242 convergenceGraph2 = myAlgo2.drawProbabilityConvergence(alpha) 6014 6243 6015 6244 # Impose a bounding box : x-range and y-range … … 6153 6382 # Draw the convergence graph and the confidence intervalle of level alpha 6154 6383 # By default, alpha = 0.95 6155 alpha = 0.9 56156 convergenceGraph = myAlgo1.drawProbabilityConvergence( 0.90)6384 alpha = 0.90 6385 convergenceGraph = myAlgo1.drawProbabilityConvergence(alpha) 6157 6386 6158 6387 # Impose a bounding box : x-range and y-range … … 6228 6457 # Draw the convergence graph and the confidence intervalle of level alpha 6229 6458 # By default, alpha = 0.95 6230 alpha = 0.9 56231 convergenceGraph = myAlgo2.drawProbabilityConvergence( 0.90)6459 alpha = 0.90 6460 convergenceGraph = myAlgo2.drawProbabilityConvergence(alpha) 6232 6461 6233 6462 # Impose a bounding box : x-range and y-range … … 6270 6499 \subsection{UC : Linear and Quadratic Taylor approximations} 6271 6500 6272 \index{Response Surface!Linear Taylor approximation}6273 \index{Response Surface!Quadratic Taylor approximation}6274 \index{Response Surface!Linear least squares approximation}6501 \index{Response Surface!Linear Taylor approximation} 6502 \index{Response Surface!Quadratic Taylor approximation} 6503 \index{Response Surface!Linear least squares approximation} 6275 6504 6276 6505 This section details the first method to construct a response surface : from the linear or quadratic Taylor approximations of the function at a particular point.\\ … … 6340 6569 6341 6570 6342 \index{Response Surface!Linear least squares approximation}6571 \index{Response Surface!Linear least squares approximation} 6343 6572 \index{Random Generator} 6344 6573 … … 6401 6630 6402 6631 6403 \index{Response Surface!Linear least squares approximation}6632 \index{Response Surface!Linear least squares approximation} 6404 6633 \index{Random Generator} 6405 6634 … … 6625 6854 6626 6855 6627 6628 6629 6630 \newpage6631 \section{Annexe 1 : One example of a complete study}6632 6633 \subsection{Presentation of the study case}6634 6635 This Annexe presents several Use Cases described previoulsy in order to show one example of a complete study. \\6636 This example has been presented in the ESREL 2007 conference in the paper : {\itshape Open TURNS, an Open source initiative to Treat Uncertainties, Risks'N Statistics in a structured industrial approach}, from A. Dutfoy(EDF R\&D), I. Dutka-Malen(EDF R\&D), R. Lebrun (EADS innovation Works) \& all.\\6637 6638 Let's consider the following analytical example of a cantilever beam, of Young's modulus $E$, length $L$, section modulus $I$. One end is built in a wall and we apply a concentrated bending load at the other end of the beam. The deviation (vertical displacement) y of the free end is equal to :6639 $$6640 y(E, F, L, I) = \frac{FL^3}{3EI}6641 $$6642 6643 \begin{figure}[Hhbtp]6644 \begin{center}6645 \psfrag{F}{F}6646 \psfrag{E}{E}6647 \psfrag{L}{L}6648 \psfrag{I}{I}6649 \psfrag{a}{a}6650 \psfrag{e}{e}6651 \includegraphics[width=10cm]{poutre.pdf}6652 \end{center}6653 \caption{cantilever beam under a ponctual bending load.}6654 \end{figure}6655 6656 6657 The objective of this UC is to evaluate the influence of uncertainties on the input data $(E, F, L, I)$ on the deviation $y$.\\6658 We consider a steel beam with a hollow square section of length $a = 2. e-2 m$ and of thickness $t=1.e-3 m$. Thus, the flexion section inertie of the beam is equal to $I = 2.47e-9 m^4$. The beam length is $L = 1 m$. The Young's modulus $E$ is $E = 2.1e11 kg.m^{-1}.s^{-2}$. The charge applied is $F = 10 kg.m.s^{-2}$.\\6659 The random modelisation of the input data is the following one : we consider for each input data a gaussian distribution, which mean $\mu$ is the deterministic value given above and which standard deviation is a percentile of the mean :6660 \begin{itemize}6661 \item[$\bullet$] E = Gaussian($\mu_E$, 5\% * $\mu_E$)6662 \item[$\bullet$] F = Gaussian($\mu_F$, 10\% * $\mu_F$)6663 \item[$\bullet$] L = Gaussian($\mu_L$, 1\% * $\mu_L$)6664 \item[$\bullet$] I = Gaussian($\mu_I$, 1\% * $\mu_I$)6665 \end{itemize}6666 \vspace*{0.5cm}6667 This example treats the following points of the methodology :6668 \begin{itemize}6669 \item[$\bullet$] Deterministic Study : Min/Max study6670 \begin{itemize}6671 \item with a deterministic experiment plane,6672 \item with a random experiment plane,6673 \end{itemize}6674 \item[$\bullet$] Random Study : central tendance of the output variable of interest6675 \begin{itemize}6676 \item Taylor variance decomposition,6677 \item Random sampling,6678 \end{itemize}6679 \item[$\bullet$] Random Study : threshold exceedance: deviation <-1cm6680 \begin{itemize}6681 \item FORM,6682 \item SORM,,6683 \item Monte Carlo simulation method,6684 \item Directional Sampling method,6685 \item Latin HyperCube Sampling method,6686 \item Importance Sampling method6687 \item Kernel Smoothing Fitting.6688 \end{itemize}6689 \end{itemize}6690 6691 6692 6693 \subsection{The TUI File}6694 6695 6696 \begin{lstlisting}6697 #! /usr/bin/env python6698 6699 from openturns import *6700 6701 from math import *6702 6703 from openturns_viewer import ViewImage6704 6705 # This function enables a pretty print of a NumericalPoint6706 def printNumericalPoint(point, digits) :6707 oss = "["6708 eps = pow(0.1, digits)6709 for i in range(point.getDimension()) :6710 if i == 0 :6711 sep = ""6712 else :6713 sep = ","6714 if fabs(point[i]) < eps :6715 oss += sep + str(fabs(point[i]))6716 else :6717 oss += sep + str(point[i])6718 sep = ","6719 oss += "]"6720 return oss6721 6722 6723 ###########################################6724 ### Fonction 'poutre'6725 ###########################################6726 6727 # We create a numerical math function6728 myFunction = NumericalMathFunction("poutre")6729 6730 6731 ###########################################6732 ### Random input vector6733 ###########################################6734 6735 6736 6737 dim = myFunction.getInputNumericalPointDimension()6738 6739 # We create a normal distribution point of dimension 46740 mean = NumericalPoint(dim, 0.0)6741 # E : steel : 210000 MPa6742 mean[0] = 2.1e116743 # F : 1kg : 10N6744 mean[1] = 10.06745 # L : 1 m6746 mean[2] = 1.06747 # I : square hollow section of width 2 cm and thickness 1mm : 2.47325 e-96748 mean[3] = 2.47325e-96749 sigma = NumericalPoint(dim, 1.0)6750 # E : 5% * mean6751 sigma[0] = 0.05 * mean[0]6752 # F : 10% * mean6753 sigma[1] = 0.1 * mean[1]6754 # L : 1% * mean6755 sigma[2] = 0.01 * mean[2]6756 # I : 1% * mean6757 sigma[3] = 0.01 * mean[3]6758 6759 R = IdentityMatrix(dim)6760 myDistribution = Normal(mean, sigma, R)6761 6762 6763 input = RandomVector(myDistribution)6764 6765 output = RandomVector(myFunction, input)6766 6767 6768 ###########################################6769 ### Deterministic Study6770 ###########################################6771 6772 6773 print "####################"6774 print " Deterministic Study"6775 print "####################"6776 6777 print "deterministic evaluation at the mean point : "6778 print "deviation(mean point) = ", myFunction(mean)6779 6780 6781 ####################################################6782 # Min/Max study with deterministic experiment plane6783 ####################################################6784 6785 print "###################################################"6786 print " Min/Max study with deterministic experiment plane"6787 print "###################################################"6788 6789 6790 # Creation of the structure of the experiment plane : type Axial6791 6792 # On each direction separately, several levels are evaluated6793 # here, 3 levels : +/-1, +/-3, +/-5 from the center6794 levelsNumber = 36795 levels = NumericalPoint(levelsNumber, 0.0, "Levels")6796 levels[0] = 16797 levels[1] = 36798 levels[2] = 56799 # Creation of the axial plane6800 myPlane = Axial(dim, levels)6801 print "myPlane = " , myPlane6802 6803 # Generation of points according to the structure of the experiment plane6804 # (in a reduced centered space)6805 inputSample = myPlane.generate()6806 6807 # Scaling of the structure of the experiment plane6808 # scaling vector for each dimension of the levels of the structure6809 # to take into account the dimension of each component6810 # for example : the standard deviation of each component of 'input'6811 # in case of a RandomVector6812 scaling = NumericalPoint(dim)6813 scaling[0] = sqrt(input.getCovariance()[0,0])6814 scaling[1] = sqrt(input.getCovariance()[1,1])6815 scaling[2] = sqrt(input.getCovariance()[2,2])6816 scaling[3] = sqrt(input.getCovariance()[3,3])6817 print "sigma = ", scaling6818 inputSample.scale(scaling)6819 print "centered Sample = ", inputSample6820 6821 # Translation of the nonReducedSample onto the center of the experiment plane6822 # center = mean point of the input distribution6823 center = input.getMean()6824 inputSample.translate(center)6825 print "inputSample = ", inputSample6826 pointNumber = inputSample.getSize()6827 print "points number = ", pointNumber6828 6829 outputSample = myFunction(inputSample)6830 6831 minValue = outputSample.getMin()6832 maxValue = outputSample.getMax()6833 6834 print " From an axial experiment plane of size = ", pointNumber6835 print "levels = ", levels6836 print "min Value = ", minValue[0]6837 print "max Value = ", maxValue[0]6838 print ""6839 6840 ###########
