HyperStudy

Sample Script: Running OptiStruct

Sample Script: Running OptiStruct

Previous topic Next topic No expanding text in this topic  

Sample Script: Running OptiStruct

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The sample script shown below runs an OptiStruct simulation, calls HyperView in batch mode to extract results, and then copies the results.  This is a .bat script written for Windows.

Note:The need for the call statement when calling optistruct.bat.

In the case of nested .bat files, call is required; otherwise, the main script continues without waiting for the completion of the second script.

 

set HST_ALTAIR_HOME=C:\Altair\hw11.0

REM ##  Perform Simulation

call %HST_ALTAIR_HOME%\hwsolvers\bin\win64\optistruct.bat %STUDY_RUN_PATH%\model.fem

REM ##  Perform the result extraction

start  /wait /min  %HST_ALTAIR_HOME%\hw\bin\win64\hw.exe %STUDY_RUN_PATH%\model.h3d %STUDY_RUN_PATH%\model.h3d -tcl %STUDY_DIR_PATH%\export_maxStress_val.tcl -b

REM ##  copy the results in the current study folder

copy C:\result.txt %STUDY_RUN_PATH%\result.txt