Jump to content
Alan

Run analysis automatically

Recommended Posts

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

Share this post


Link to post
Share on other sites

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
 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

 

 

Share this post


Link to post
Share on other sites
8 hours ago, Alan said:

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

Share this post


Link to post
Share on other sites
8 hours ago, Alan said:

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

Share this post


Link to post
Share on other sites
On 6/20/2018 at 9:53 PM, Alan said:

Hello @tinh,

 

what tcl commands are used to open, read and retrieve the data? 

 

Regards,

Alan

 

The commands are open & read

Please refer to tcl/tk manual 

https://www.google.com.vn/search?q=tcl+tk+manual&rlz=1C1CHBF_enVN776VN776&oq=tcl+tk+manual&aqs=chrome..69i57j0l5.2362j1j7&sourceid=chrome&ie=UTF-8

 

Share this post


Link to post
Share on other sites
On 6/19/2018 at 6:38 AM, tinh said:

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" D:/Air_Filter/air_filter.fem 

 or

\\\\ALTAIR-NW\\Softwares\\Altair\\2017\\hwsolvers\\scripts\\optistruct.bat D:\\Air_Filter\Air_Filter.fem

 

Note: i have edited the batch file so that the location is not referenced.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...