Read data from txt with apdl commands inserted in tree
I'm working in workbench mechanical (2022r2) in a coupled field module. I want to insert apdl commands in the tree to read a table and interpolate to get some results.
I have a file (txt with values separated by comma)with element ids and for each element i have temperature and two parameters defined. Separately i have a 3D table with a result(val) based on temperature and the two parameters. !
So in the table the value is defined as val1(param1,param2,temp).
How can i read my file and interpolate on the table with apdl commands inserted in the tree? I am new to apdl.
Is there a way to do this with mechanical scripting?
*DEL, model, , NOPR
*DIM, model, TABLE, 50, 20, 40
*TREAD, model, 'Model', 'table'
*DEL, final_val, , nopr
*DIM, final_val, TABLE, numlines,1
*VITRP, final_val(1,1), model, mytable(3,2,), mytable(2,2,), mytable(4,2,)
this is what i used. i know it's not defined properly but i can't figure out how to define it.
Any help is much appreciated!
A nice day to everyone