How to execute OSSmooth from HyperMesh batch mode.

Christos_Sakkoulas
Christos_Sakkoulas
Altair Employee
edited December 2023 in Altair HyperWorks

Introduction:

OSSmooth is a semi-automated design interpretation software, facilitating the recovery of a modified geometry resulting from structural optimization, for further use in the design process and FEA reanalysis. OSSmooth is embedded in HyperMesh and it can be used in three different ways: OSSmooth for geometry, FEA topology reanalysis, and FEA topography reanalysis.

In this article the correct process to execute OSSmooth from the command window via the HyperMesh batch is presented. The following procedures can be used for both Linux and Windows.

Process:

OSSmooth requires the input file (<prefix>.fem), the shape file (<prefix>.sh), and/or the grid file (<prefix>.grid) from an OptiStruct run. The grid file <prefix>.grid contains the grid point locations after a topography or shape optimization and is output at the end of a topography or shape optimization run. The shape file, <prefix>.sh, contains the element density information of a topology optimization and is output at the end of a topology optimization run.

For the execution of OSSmooth via the command line, there is the need for a call of HyperMesh batch mode, which then will call a necessary tcl script. In this tcl script there are the parameters for the correct design interpretation. The directory of the generated files from the OSSmooth run will be the same as the directory of the file obtained from the optimization run.

Command line:

Command line for Windows:

For topography:

<altair_home>\hwdesktop\hm\bin\win64\hmbatch.exe -b -tcl OSSMOOTH_topography_v0.1.tcl inputfile.fem outputfile.grid

For topology:

<altair_home>\hwdesktop\hm\bin\win64\hmbatch.exe -b -tcl OSSMOOTH_topology_v0.1.tcl inputfile.fem outputfile.sh

Command line for Linux:

For topography:

<altair_home>/altair/scripts/hmbatch -tcl OSSMOOTH_topography_v0.1.tcl inputfile.fem outputfile.grid -nobg

For topology:

<altair_home>/altair/scripts/hmbatch -tcl OSSMOOTH_topology_v0.1.tcl inputfile.fem outputfile.sh -nobg

Note:

  1. The location of the tcl script can be different from the one of the files. In this case during the call of the tcl script the path of it should be provided.
  2. It is highly recommended not to run this process from the Altair program installation folder.

The TCL script:

The tcl script is slightly different if the optimization was topology and if it was topography. The script contains three commands on both occasions. The three commands are:

  1. *templatefileset: This command sets the global template file name. This entry shouldn’t be changed for the run.
  2. *createstringarray: This command creates an array of strings for use in a subsequent command.
  3. *ossmooth_12: This command extracts the final design geometry from OptiStruct topology, topography and shape optimization results, and achieve smoothed plies from free-size optimization results on composites.

The last two commands contain all the parameters to be used for the design interpretation. The inputs of the *ossmooth_12 command are listed in the second link at the end of this article. Regarding the second command, the inputs were obtained from a previous manual run via the OSSmooth GUI. In this specific command there is the difference between the two optimization processes.

Useful links:

  1. https://2023.help.altair.com/2023/hwsolvers/os/topics/solvers/os/ossmooth_design_interpretation_r.htm?zoom_highlight=ossmooth
  2. https://help.altair.com/hwdesktop/hwd/topics/reference/hm/_ossmooth_12.htm?zoom_highlight=*ossmooth
  3. https://help.altair.com/hwdesktop/hwd/topics/reference/hm/_createstringarray.htm?zoom_highlight=*createstringarray
  4. https://help.altair.com/hwdesktop/hwx/topics/pre_processing/mvd/batch_file_run_and_create_t.htm?zoom_highlight=hmbatch