Model.ossmooth_12#
- Model.ossmooth_12(modelsel, exemode, load_op, outputcode, filepath_fem, filepath_sh, filepath_grid, isosurface, autobead, string_array)#
Extract the final design geometry from OptiStruct topology, topography and shape optimization results, and achieve smoothed plies from free-size optimization results on composites.
- Parameters:
modelsel (int) –
Model selection option.
0 - Specify model file path to read.
1 - Use current model in HyperMesh.
exemode (int) –
Flag indicating the execution mode of OSSmooth. Valid values are:
0 - Extract geometry only
1 - Extract geometry and inherit boundary conditions for FEA reanalysis
2 - Smoothing plies from free-sizing optimization results on composites
load_op (int) –
Execution/load option. Valid values are:
0 - Create .oss file only to be used in standalone version (do not execute ossmooth).
1 - Do not load geometry into HyperMesh.
2 - Load geometry into HyperMesh.
outputcode (int) –
Output file format. Valid values are:
1 - Nastran
2 - IGES
3 - STL
4 - H3D
5 - STEP
6 - PARASOLID
7 - IGES (advanced)
filepath_fem (hwString) – The full name and path to the OptiStruct .fem results file generated from the optimization.
filepath_sh (hwString) – The full name and path to the OptiStruct .sh results file generated from the optimization.
filepath_grid (hwString) – The full name and path to the OptiStruct .grid results file generated from the optimization.
isosurface (int) –
Flag indicating whether to create an isosurface. Valid options are:
0 - No
1 - Yes
autobead (int) –
Flag indicating whether to create an autobead design. Valid options are:
0 - No
1 - Yes
string_array (hwStringList) –
The string array that contains the additional parameters. Each argument can be either space or comma separated. There will be at most five strings of parameters, depending on the operations selected. Each string is introduced as follows:
isosurf
"isosurf: surfacecode surfacemode densitythreshold detectbridge lowthreshold distancecoefficient optismoothboundary lapiteration lapfeatureangle lapsmoothboundary drawrecovery"This string is only required when
isosurface = 1.surfacecode
The method used for isosurface extraction. Valid values are:
0 - No smoothing, isosurface only
1 - Optimization based smoothing
2 - No smoothing, element threshold
3 - Laplacian smoothing
surfacemode
Isosurface mode indicating how to process non-design elements. Valid values are:
0 - Keep all non-design elements with half layer around
1 - Split only intersected non-design elements
2 - Split overlap non-design elements with half layer around
3 - Split overlap non-design elements
4 - Extract shells with half layer around non-design
5 - Extract shells without half layer around non-design
densitythreshold
Threshold value for topology optimization (real value ≥ 0 and ≤ 1).
detectbridge
Flag indicating whether to detect connectivity in isosurface (0=no, 1=yes).
lowthreshold
The low density threshold for connectivity detection (real value ≥ 0 and ≤ 1). Low threshold value must be smaller than density threshold value.
distancecoefficient
The distance coefficient to use in optimization based smoothing (real value ≥ -50 and ≤ 50).
optismoothboundary
Flag indicating whether to include the boundary or not in optimization based smoothing (0=no, 1=yes).
lapiteration
The number of iterations to use in Laplacian smoothing (integer ≥ 0).
lapfeatureangle
The feature angle to use in Laplacian smoothing (real value ≥ 1 and ≤ 80).
lapsmoothboundary
Flag indicating whether to include the boundary or not in Laplacian smoothing (0=no, 1=yes).
drawrecovery
Flag indicating whether to recovery draw constraints in topology optimization (0=no, 1=yes).
autobead
"autobead: shapeopt beadthreshold autobeadlayer"This string is only required when
autobead > 0.shapeopt
Method used for topography or shape optimization interpretation. Valid values are:
1 - Create autobead
2 - Update new coordinates to original mesh
beadthreshold
Threshold value for autobead (real value ≥ 0 and ≤ 1).
autobeadlayer
Layer value for autobead (integer value 1 or 2).
remesh
"remesh: remeshsize meshtype attachtype remeshlayer remeshfeatureangle"This string is only required when using remeshing.
remeshsize
The element size used in remeshing.
meshtype
Flag indicating the elements generated in remeshing. Valid values are:
0 - trias
1 - quads
2 - mixed
3 - right trias
attachtype
Flag indicating which elements will be remeshed. Valid values are:
0 - Remeshing a number of layers elements around PLOT elements
1 - Remeshing all elements
remeshlayer
The number of layers when attachtype = 0 (integer ≥ 0).
remeshfeatureangle
The feature angle used in remeshing.
"other_params: units tetrameshingcode createplot surfacereduction reductionfeatureangle"This string is required when
isosurface = 1orautobead = 1.units
Units used for IGES and STEP output. Valid values are:
1 - inch
2 - mm
4 - foot
6 - meter
10 - cm
tetrameshingcode
Flag indicating whether to create tetramesh after creating isosurface (0=no, 1=yes).
createplot
Flag indicating whether to create PLOT elements (0=no, 1=yes).
surfacereduction
Flag indicating whether to use surface reduction (0=no, 1=yes).
reductionfeatureangle
The feature angle to used for surface reduction (real value ≥ 1 and ≤ 80).
ply
"ply: plyfile plysmoothiteration smallregiontype smallregion splitdisconnected"This string is required when
exemode = 2.plyfile
The full name and path to the .fem file to save the smoothed result plies.
plysmoothiteration
The number of iterations to use in ply shape smoothing (integer ≥ 0).
smallregiontype
Flag indicating method used for small region (element patch or hole) detection. Valid values are:
0 - Detect small regions by area ratio
1 - Detect small regions by element count
smallregion
Threshold value to use for small region elimination. Small region depends on smallregiontype: when smallregiontype = 0, this indicates the area ratio (real value ≥ 0 and < 1, calculated by small region area/total design area). When smallregiontype = 1, this indicates the element count (integer, ≥0).
splitdisconnected
Flag indicating whether to split disconnected patches into new plies (0=no, 1=yes).
Examples#
Execute OSSmooth FEA reanalysis on the current model in HyperMesh ( the “ C:/test / os1.fem “ and “ c:/test / os1.sh files “ ) , create isosurface with 0.3 density threshold , split all quads on non - design / design interface , Laplacian smoothing , with 10 iterations and 30.0 degrees feature angle , do remeshe on 2 layers of elements around PLOT , with element size 0.5 , and feature angle 30.0#import hm import hm.entities as ent model = hm.Model() model.ossmooth_12( modelsel=1, exemode=1, load_op=0, outputcode=3, filepath_fem="c:/test/os1.fem", filepath_sh="c:/test/os1.sh", filepath_grid="", isosurface=1, autobead=0, string_array=[ "isosurf: 3 3 0.3 0 -1 0 0 10 30 1 0", "remesh: 0.5 0 0 2 30", "other_params: 1 0 0 0 10", ], )
Execute ply smoothing on “ C:/test / os2.fem “ , eliminate small element patches and holes with less than 20 elements , smooth plies with 20 iterations , split disconnected patches into new plies , export smoothed result plies into “ C:/test / os2_smooth.fem “#import hm import hm.entities as ent model = hm.Model() model.ossmooth_12( modelsel=0, exemode=2, load_op=0, outputcode=1, filepath_fem="C:/test/os2.fem", filepath_sh="", filepath_grid="", isosurface=0, autobead=0, string_array=["ply: C:/test/os2_smooth.fem 20 1 20 1"], )