Let’s talk about uncertainty quantification and sensibility analysis!
There is an open-source tool for that called OpenTurns which is integrated in Salome_Meca 2019 (Linux version).
This is the tutorial number 2, in which we will talk about deeper settings:
- How to export your code_aster study manually
- How to prepare the files in the correct way
- How to set it back up in Openturns using YACS.
Here’s the video:
A big thanks to Fernando Oleo Blanco (Irvise) for making this video and sharing his experience of Openturns and Code_Aster with the community! I trust it will help a lot of engineers to get started.
The various scripts used in the video are here:
Young = VARIABLE(NOM_PARA='Young', VALE=210e9)
Force = VARIABLE(NOM_PARA='Force', VALE=-37e3)
---------------------------
def _exec(Force, Young):
from asterstudy.api import ParametricCalculation
calc = ParametricCalculation(".",
['Force', 'Young'], [Force, Young],
keep_results=True)
calc.set_logger(print)
calc.setup()
# following parameters are set in the 'parametric.export' file
# but can be overridden here:
calc.use(version="stable",
memory=2048,
time="00:15:00",
mpicpu=1,
nodes=1,
threads=0,
language="fr",
args="")
calc.run()
results = calc.output_values()
if len(results) != 1:
calc.log("ERROR: See log files:", calc.logfiles())
raise ValueError("Calculation failed with inputs: {0}"
.format((Force, Young)))
DZ = results[0]
return DZ
--------------
P actions make_etude
P memory_limit 2048
P mpi_nbcpu 1
P mpi_nbnoeud 1
P ncpus 0
P server localhost
P time_limit 900
P version stable
F comm parametric.comm D 1
F libr _ExportedFromSalomeObject_0_1_2_3.med D 20
F nom inputs.pick D 0
F libr outputs.npy R 8
The first tutorial is here if you didn’t watch it:
Check also this video if you are curious about YACS and how it works:
If you like the video, please like the video and subscribe to the newsletter!
There’s more to come!
Cyprien “Always deeper into Opensource FEA” Rusu
Leave a Reply