Model.adaptive_wrapper_set_params#
- Model.adaptive_wrapper_set_params(max_elem_size, min_elem_size, string_array)#
Assigns meshing parameters to the adaptive wrapper mesher. Controls include refinement box, refinement options, hole patch, gap patch, leak check, min and max element size, etc.
This function must be called after
Model.adaptive_wrapper_init()and beforeModel.adaptive_wrapper_build().- Parameters:
max_elem_size (double) – The maximum element size for adaptive wrap meshing.
min_elem_size (double) – The minimum element size for adaptive wrap meshing.
string_array (hwStringList) –
The list of parameter strings. Each string should contain one of the following parameters as keywords followed by the parameters values. Keywords and the corresponding values can be separated by a semicolon. Each keyword can be used multiple times to define different groups.
GapPatchTolerance: <tolerance> (optional)
The gap patch tolerance value.
HolePatchTolerance: <tolerance> (optional)
The hole patch tolerance value.
LeakCheckNodes: <node_ID1> <node_ID2> … <node_IDN>
Seed node IDs to use for leak checking. These nodes should not be part of the base mesh.
RefineByAllElemSize: <option>
0: Do not refine the wrap mesh based on average element size.
1: Refine the wrap mesh based on average element size.
RefineByBoxCompIds: <comp_ID1> <comp_ID2> … <comp_IDN>
Specify a refined wrap mesh with the specified size for the specified box. The box definition is given by a list of comp IDs. The component name should be ^elem_size_ctrl_<idx>_<elem_size>, where <idx> is part of the component name and <elem_size> is the size to be assigned to the box.
RefineByFeatureProximity: <option>
0 - Do not refine the wrap mesh based on proximity of features.
1 - Refine the wrap mesh based on proximity of features.
RefineByNodeCurvature: <option>
0 - Do not refine the wrap mesh based on node curvature.
1 - Refine the wrap mesh based on node curvature.
Example#
Usage of the adaptive_wrapper_build functions#import hm import hm.entities as ent model = hm.Model() # Initialization of wrapper mesh with base mesh elems = hm.Collection(model, ent.Element) model.adaptive_wrapper_init(collection=elems, clean_intersection=1, wrap_type=0) # Define features model.adaptive_wrapper_set_features( feature_type=1, collection=elems, feature_angle=30.0, clean_features=1, clean_tol=1.0, ) # Set various meshing and refinement parameters model.adaptive_wrapper_set_params( max_elem_size=10.0, min_elem_size=0.1, string_array=[ "LeakCheckNodes: 20 24 19", "GapPatchTolerance: 3.0", "HolePatchTolerance: 10.0", "RefineByBoxCompIds: 4 5 6", "RefineByNodeCurvature: 1", "RefineByFeatureProximity: 0", "RefineByAllElemSize: 1", ], ) # Proximity options model.adaptive_wrapper_proximity_params( self_proximity_for_all=1, prox_lower_bound=0.2, string_array=[ "WithinGroup: 0.5 1 3 10 12 13", "WithinGroup: 1.5 3 9 20", "AcrossGroup: 0.5 3 10 12 13 4 9 8 7 19", ], ) # Build skeletal octree structure model.adaptive_wrapper_build() # Generate mesh model.adaptive_wrapper_mesh(mesh_type=0, DoRemesh=1, RemeshGrowthRate=1.2) # End of wrapper mesh model.adaptive_wrapper_end()