Run analysis automatically
Hello there,
I am the beginner of customization. I am wondering if i can use any code in the script to run static analysis or optimization automatically. and then import calculated stress and strain data to further calculate maybe summation or minimum value of those data?
I tried to record and reuse the command from I manually run the analysis, but the program stopped after a fem is generated. It did not pop out hyperworks solver view.
Basically, after i open the tcl script and input variables, it will not stop till the final result.
Thank you for your help
Alan
Find more posts tagged with
Hello @tinh,
this is what i used for static analysis
*createstringarray 1 'CONNECTORS_SKIP '
*feoutputwithdata 'C:/Program Files/Altair/2017-edu/templates/feoutput/optistruct/optistruct' 'C:/Users/sihao/Desktop/beam_r_4_l_10.fem' 1 0 2 1 1
I simply recorded it and ran again. but it only gave me a fem file without analysis.
Also, once i can run the static analysis or optimization. I want to obtain stress and strain energy density for each element. What codes are used to write such a file?
Please help.
Thank you
Alan
Hello @tinh,
Thank you very much it worked. Once static analysis is done, Is there a way to collect stress and strain results for a particular iteration and element? It doesnt seem like that command.tcl records macro in hyperview.
Regards,
Alan
Hi @tinh,
Also, If i want to do optimization analysis, where do i need to change to run optimization instead analysis?
Thank you,
Alan
Hello @tinh,
Thank you very much it worked. Once static analysis is done, Is there a way to collect stress and strain results for a particular iteration and element? It doesnt seem like that command.tcl records macro in hyperview.
Regards,
Alan
Use GLOBAL_OUTPUT_REQUEST, indicate output stress & strain for a set of element to a file typed text (ex ASCII)
OS will ouput data to a file, and you can use tcl commands open, read to retrieve the data
Hi @tinh,
Also, If i want to do optimization analysis, where do i need to change to run optimization instead analysis?
Thank you,
Alan
I think it will run optimization if you defined a designvar in *.fem file, unless a run option named -optskip is specified in command line.
you can refer to run options of OS in menu Help>Altair Help Home> Solvers > Optistruct > User Guide > Running Optistruct > Run Options for Optistruct
The commands are open & read
Please refer to tcl/tk manual
Hi,
this command will invoke Optistruct:
'C:/Program Files/Altair/2017-edu/hwsolvers/scripts/optistruct.bat' C:/Users/sihao/Desktop/beam_r_4_l_10.fem
for stress & strain energy output, please use GLOBAL_OUTPUT_REQUEST
I am facing a similar issue.
I have tried the above said but i am getting an error 'invalid command name' when i try it with tcl script.
But if i try the same command from command window i am able to invoke optistruct.
Please help me.
My script : 'D:/Imp_Stuff/optistruct.bat' /Air_Filter/air_filter.fem
or
\\\\ALTAIR-NW\\Softwares\\Altair\\2017\\hwsolvers\\scripts\\optistruct.bat \\Air_Filter\Air_Filter.fem
Note: i have edited the batch file so that the location is not referenced.
Hi,
It is possible. Please show your script.