🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Run analysis automatically

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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

Sort by:
1 - 10 of 101
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi,

    It is possible. Please show your script.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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
     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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

     

     

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi @tinh,

     

    Also, If i want to do optimization analysis, where do i need to change to run optimization instead analysis?

     

    Thank you,

    Alan

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hello @tinh,

     

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

     

    Regards,

    Alan

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

     

    User: "rkopparthi"
    Altair Community Member
    Updated by rkopparthi

    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.