Hello everybody, I am new to openTURNS and fairly new to python in general.
I am trying to perform an UQ of some complex physical model, for that my aim is to compute the sobol indices using sobolIndicesExperiment and the SaltelliAlgorithm.
Now, my physical model has a ton of variables and is actually written in Fortran so I am basically calling it from python. I am selecting a handful of random variables (parameters of interest), and giving them a determined distribution, then save them into a dataframe so I can extract them and propagate them through my model which is located in another script:
ot.RandomGenerator.SetSeed(0)
marginals = [ot.LogNormal(np.log(0.03),np.log(4/3)), ot.Normal(-40,4), ot.Normal(1,0.1), ot.Normal(1,0.1)]
distribution = ot.ComposedDistribution(marginals, ot.IndependentCopula(len(marginals)))
size = 1000
sie = ot.SobolIndicesExperiment(distribution, size)
inputDesign = sie.generate()
print(inputDesign.getSize())
print(inputDesign)
AAA = inputDesign.asDataFrame()
AAA.to_csv('AAA.csv', index=False)
After I run all the simulations I get back my output:
results_AAA = pd.read_csv('results_AAA.csv')
outputSample = ot.Sample.BuildFromDataFrame(results_AAA.loc[:,['ai']])
print(outputSample)
I know I have to use SobolIndicesExperiment to have the right format so that SaltelliSensitivityAlgorithm can be applied.
sensitivityAnalysis = ot.SaltelliSensitivityAlgorithm(inputDesign, outputSample, 1000)
But then when i check the results and sum the first order indices, these are less than 1, impossible!
I do´nt really know this is actually working, as OT is completly unaware of my model and it´s strong non-linearities, so in the first place I am not even sure this is the right thing to do. I know that a good idea is to parametrized my physical mdoel using PCE but I wanted to try with the model without an polynomial approximation first.
So basically my questions are:
- Which can beethe root of the problem for summing the 1st order indices and these not adding up to 1?
- Can I use SobolIndicesExperiment and Saltelli (or Martinez) to compute sobol indices of a model that OT is completly unaware of, receiving only the input and output distributions, but the rest being a black box?
- Is there any papers/documents in which somebody has used OT to perform a UQ of some software/model or any example in which sobol indices are computed for a function that is not already pre-built in OT?
Thank you for your answers!!