Model.remesh_optistruct#

Model.remesh_optistruct(fgrd='', fsh='', fdesvar='', fhist='')#

Remeshes 2D elements at intersection locations. Only elements belonging to different components are taken as counterparts for the intersection calculation. Moreover, elements sharing a node are not counterparts for the intersection calculation.

Parameters:
  • fgrd (hwString) – This string is optional, indicating the .grid file to be applied to update the shape of the model. The argument can be set as fgrd=filepath_grid, where filepath_grid is the full name and path to the .grid results file generated from the optimization.

  • fsh (hwString) – This string is optional, indicating the .sh file to be used in remeshing. The argument can be set as fsh=filepath_sh, where filepath_sh is the full name and path to the .sh results file generated from the optimization.

  • fdesvar (hwString) – This string is optional, indicating the .desvar file to be used in remeshing. The argument can be set as fdesvar=filepath_desvar, where filepath_desvar is the full name and path to the .desvar file generated from the optimization.

  • fhist (hwString) – This string is optional, indicating the .hist file to be used in remeshing. The argument can be set as fhist=filepath_hist, where fhist is the full name and path to the .hist file generated from the optimization.

Example#

Execute the function on the current model, taking the optimized grid coordinates from the file “C:/test/torquearm.grid”, and performing remeshing with grids in SET number 2 fixed#
import hm
import hm.entities as ent

model = hm.Model()

model.remesh_optistruct(fgrd="C:/test/ torquearm.grid")