Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Michael Baudin
    @mbaudin47
    @Bae-Jae-Hyeon It seems that all the variance is explained by the first variable, with only a negligible part captured by the second. Notice that the degree three polynomial associated with only the first variable is associated with 19% of the variance. This implies that this computation is OK if the total degree is at least 4, but highly questionable if the total degree is 3.
    @bahramymohsen The formatting of the code was lost when it was pasted, which makes the code unusable - can you re-post it with correct indentation please? At the same time, you seem to use lots of modules, which makes the bug difficult to reproduce: can you simplify it in order to get the shortest possible code that reproduces the bug?
    @bahramymohsen Using the IndependentCopula class is not required, given that the copula is independent by default if it is not provided as input argument.
    Bae-Jae-Hyeon
    @Bae-Jae-Hyeon
    Thanks for your advise.
    I will check the order of PCE. After I increase the total order to 4 or more, How to check the right order for PCE?
    And Do you have any reference for PCE validation and Q2 instruction(I don't know something like Q2 and Sobol index)
    Bae-Jae-Hyeon
    @Bae-Jae-Hyeon
    Also what is the difference between mean in summary method and computMean() method
    Michael Baudin
    @mbaudin47
    I suggest that you read http://openturns.github.io/openturns/master/bibliography.html#blatman2009 It contains most things you need to know about the polynomial chaos implemented in OpenTURNS. The PDF can be downloaded from the website, under the ".pdf" link.
    The "mean" in the summary output of a FunctionalChaosSobolIndices is the mean of the chaos. I do not understand what "computeMean" method you are talking about.
    bahramymohsen
    @bahramymohsen
    @mbaudin47, Hi, I just could paste a pic of my code cause the formatting of code messed up when paste it in the forum, So here is my code
    image.png
    @mbaudin47 , WRN - The Sobol total indices are computed wrt the basis measure, and there is no one-to-one transformation between this measure and the input distribution. The interpretation of the total indices may be misleading.
    Warning! Impossible to use factory MeixnerDistributionFactory. Reason=InvalidArgumentException : Error: cannot estimate a MeixnerDistribution distribution if the sample kurtosis=1.78981 is not greater than 2*skewness^2+3=3
    WRN - Warning! Impossible to use factory StudentFactory. Reason=InvalidArgumentException : Error: can build a Student distribution only if nu > 2.0, here nu=-0.00169151
    WRN - Warning! The TNC algorithm could not enforce the convergence criteria
    WRN - Warning! Impossible to use factory DirichletFactory. Reason=InvalidArgumentException : Error: the sample contains points not in the unit simplex: x=class=Point name=Unnamed dimension=1 values=[1]
    Bae-Jae-Hyeon
    @Bae-Jae-Hyeon

    I make the PCE and input the sampling data using LHS(1000size samples for Mach ~ Normal(0.7,0.1), AOA ~ Normal(2,0.1)).
    After that, calculate the mean using 'computMean()' but it is quite different the mean in the summary

    sampleSize = 1000
    latin = ot.LHSExperiment(distribution,sampleSize).generate()
    evaluation = metamodel(latin)
    mean = evaluation.computeMean()

    bahramymohsen
    @bahramymohsen
    can we run a uq analysis with our older generated list, Not by ot generated one?
    bahramymohsen
    @bahramymohsen
    @mbaudin47 Can we add any sample to a our old sample generated lists or can we exclude any sample from our old list?
    bahramymohsen
    @bahramymohsen
    @mbaudin47 I tried sobol experiment and wanna add new samples to my list to check adequacy of number of samples per uncertain parameter.
    Michael Baudin
    @mbaudin47
    @Bae-Jae-Hyeon You compare the mean of the chaos (exact) with the mean of a sample from the chaos (estimated): such a discrepancy is expected.
    Marazzi Mattia
    @MattiaMarazzi_gitlab
    Hi, I have a problem running the PCE of a highly ODE non-linear system.
    When running the PCE, the code returns me the several of these warnings: WRN - set the component 1 of contributor 122=0 to zero as it is too small
    WRN - set the component 3 of contributor 122=0 to zero as it is too small
    WRN - set the component 4 of contributor 122=0 to zero as it is too small
    WRN - set the component 5 of contributor 122=0 to zero as it is too small
    Marazzi Mattia
    @MattiaMarazzi_gitlab

    hermiteFamily = HermiteFactory()
    for i in range(1,dim):
    polyColl[i] = OrthogonalUniVariatePolynomialFamily(hermiteFamily)

    print ("============================================================")
    multivariateBasis = OrthogonalProductPolynomialFactory(polyColl,EnumerateFunction(dim))

    maximumConsideredTerms = 500
    mostSignificant = 50
    significanceFactor = 1.e-8 #Original 1e-8
    truncatureBasisStrategy = CleaningStrategy(OrthogonalBasis(multivariateBasis),maximumConsideredTerms, mostSignificant, significanceFactor, True)
    print ("============================================================")
    evaluationCoeffStrategy = LeastSquaresStrategy(LHSExperiment(sampleCreatePC))
    print ("============================================================")

    polynomialChaosAlgorithm = FunctionalChaosAlgorithm(pcmodel, Distribution(myDist), AdaptiveStrategy(truncatureBasisStrategy),ProjectionStrategy(evaluationCoeffStrategy))

    print ("============================================================")
    polynomialChaosAlgorithm.run()
    polynomialChaosResult = polynomialChaosAlgorithm.getResult()

    coefficients = polynomialChaosResult.getCoefficients()
    print(coefficients)
    metaModel = polynomialChaosResult.getMetaModel()
    print ("============================================================")
    print ("PC built, checking now...")

    This is the code I am using
    Michael Baudin
    @mbaudin47
    @regislebrun : Do you have any idea ?
    Julien Schueller
    @jschueller
    @MattiaMarazzi_gitlab these warnings can generally be ignored
    GPSalachs
    @GPSalachs
    Hello
    Are there any examples of openturns and code_Aster, i have searched in the code_aster website but didnt come up with any resutls
    Michael Baudin
    @mbaudin47
    Hello ! SALOME_MECA has a "Export to OpenTURNS" button. This is shown in the YouTube video at : https://www.youtube.com/watch?v=5ZaO35L0Hgs
    GPSalachs
    @GPSalachs
    @mbaudin47 Hello, yes i have seen the option !Thing is i havent found any documentation regarding the coupling or examples of use!
    GPSalachs
    @GPSalachs
    My concern is on how to define a the input model for Openturns and secondly, do i have to rerun the analysis on Code Asters side once i have initial results or can i always reference those resutls for future analysis with Openturns and see the differences?!
    Michael Baudin
    @mbaudin47
    @GPSalachs
    On question 1) The principle to define a model is to define a deterministic study inside AsterStudy (step A), create a parametric study by defining the inputs and outputs (step B), then export this study to OpenTURNS (step C). This creates a PhysicalModel within OpenTURNS, which is implemented as a Python function which uses the AsterStudy Python API. From there you can use this model e.g. to estimate the central dispersion, estimate a probability or perform sensitivity anaysis. So your question is on what exact step: on the AsterStudy side or on the OpenTURNS side?
    On question 2) Once e.g. a design of experiments has been evaluated within OpenTURNS, the study can be saved into a XML file. This file contains everything the GUI knows of: the physical model, the probabilistic model, the various methods and the results of the computations. Please notice that this "Save" feature is the one inside the "OpenTURNS" menu, which is different from the "File" menu of SALOME_MECA (which saves the SALOME study in a HDF5 file). If you quit SALOME, start it again and open the XML study (again, with the "Open" entry in the OpenTURNS menu), all the objects are there again. Is this the answer you requested?
    GPSalachs
    @GPSalachs
    Hello and yes this is a really great answer to my question! To have also a reference are there any examples that i can consult?
    Michael Baudin
    @mbaudin47
    Hello ! I guess that this depends on which component you are interested in. SALOME provides its documentation in the "Help" menu, where there is a "OpenTURNS" entry where the doc for the OpenTURNS GUI is provided: there are tutorials and full documentation of the features and meaning. On the Aster side, I guess that this is the same, but I cannot ensure that the definition of a parametric study has a tutorial. On this topic, I would recommend to ask to Aster users on the appropriate forum.
    Michael Baudin
    @mbaudin47

    Hi @jschueller ! I cannot make the doc :

    [...]
    [100%] Generating sphinx_build/user_manual/transformations.rst
    usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
    sphinx-build: error: cannot find files ['/home/osboxes/GIT/openturns-dev/openturns/build/python/src/sphinx_build/html']
    make[2]: *** [python/src/CMakeFiles/sphinx_html.dir/build.make:588: python/src/CMakeFiles/sphinx_html] Error 2
    make[1]: *** [CMakeFiles/Makefile2:39207: python/src/CMakeFiles/sphinx_html.dir/all] Error 2
    make: *** [Makefile:163: all] Error 2

    Could it be a sphinx version issue ? I currently use sphinx 2.2.1.

    Michael Baudin
    @mbaudin47
    I think I got it: i had a mix of ubuntu packages dependencies and conda dependencies. Once I used only conda dependencies, everything turned right again!
    GPSalachs
    @GPSalachs
    Which is the best use for list accessing within OpenTURNS? For example,If i have a list reso[0][0] or should i try something else?
    GPSalachs
    @GPSalachs
    Hello, i have defined a modal analysis study in Code_Aster. I define as input the Elastic modulus of the material and as output the frequencies of the first five modes of vibration. Now in the gui of OpenTURNS in code_Aster i can relate each mode/frequency as singular values, is it possible though to do it in a list so to create eventually a meta-model with all the five modes together?
    Also in the documentation provided it is mentioned that the library NLopt can be installed. How can i do that in Cοde_Αster? Are there also other libraries that can be installed?
    Michael Baudin
    @mbaudin47
    @GPSalachs Let me try to answer point by point .
    1) This is a Python question and is not related to OpenTURNS. The answer depends on the type of the OpenTURNS reso object, so I cannot answer.
    2) Indeed, what you suggest is doable. To do this, define a Python function which returns the list of five modes. However, please be aware that this might be unstable, because the order of the modes might be depending on small changes in the data. A post-processing might be required, e.g. sorting the modes by increasing order.
    3) NLopt is a built-in dependency of OpenTURNS, so if you have OpenTURNS, then you have NLopt.

    @josephmure Please find below a script which build OpenTURNS on Ubuntu, using Ubuntu packages only:

    https://github.com/mbaudin47/vboxenv/blob/master/get_and_build_openturns.sh

    This has almost full option, including bonmin, dlib, nlopt, cminpack, etc... The only exception is Optpp. I know how to build it:

    https://github.com/mbaudin47/vboxenv/blob/master/build_optpp.sh

    but I was not able to make OpenTURNS use the Optpp binaries I built. None of the cmake options I tried (i.e. OPTPP_LIBRARY OPTPP_INCLUDE_DIR OPTPP_INCLUDE_DIRS OPTPP_ROOT_DIR) were able to do that magic happen.

    GPSalachs
    @GPSalachs
    @mbaudin47 Thank you very much for the respoce! I will try to implement the procedure from outside the GUI of OpenTURNS in CA to see if it works!
    Michael Baudin
    @mbaudin47
    @GPSalachs I did not mean exactly this, but this can work too. What I meant by "define a Python function" is define a Python function within the OpenTURNS GUI. However, this can also be done outside the GUI of course. What you lose, however, is the ability to connect easily to code_aster with the GUI, but you can use the Aster_API Python interface if you want to.
    GPSalachs
    @GPSalachs
    @mbaudin47 Hello, yes indeed it should be better to have the easy part of the connection with code_aster. Regarding this connection tho, is it possible to automate the procedures with YACS ? Do you have examples of such use?
    Michael Baudin
    @mbaudin47
    Training - PRACE HPC and Uncertainty Treatment - Examples with OpenTURNS and Uranie :
    https://github.com/openturns/openturns/wiki/PRACE-Training-June-2020
    bahramymohsen
    @bahramymohsen
    Hi everyone,
    I have problems with installing otmorris, it does not have setup.py! Could anyone suggest sth?
    stup.py does not exist in github!
    Michael Baudin
    @mbaudin47
    You should use
    conda install -c conda-forge otmorris