Model.adaptive_wrapper_proximity_params#
- Model.adaptive_wrapper_proximity_params(self_proximity_for_all, prox_lower_bound, string_array)#
Assigns proximity parameters to the adaptive wrapper mesher. Both local and global proximity controls can be assigned. This function also allows an option for checking self proximity.
This function must be called after
Model.adaptive_wrapper_init()andModel.adaptive_wrapper_build().- Parameters:
self_proximity_for_all (int) – Global option to check self proximity for all elements. Gaps below this value are considered to be closed.
prox_lower_bound (double) – Lower proximity bound for global self proximity check.
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.
WithinGroup: <proximity_lower_bound> <self_proximity_flag> <number_of_comps> <comp_ID1> <comp_ID2> … <comp_IDN>
Local option to check proximity within specified components. For example, to specify a lower proximity value of 0.5 for comps 11-13: “WithinGroup: 0.5 1 3 11 12 13”
AcrossGroups: <proximity_lower_bound> <number_of_comps_in_first_set> <comp1_ID1> <comp1_ID2> … <comp1_IDN> <number of comps in second set> <comp2_ID1> <comp2_ID2> … <comp2_IDN>
Local option to check proximity between two sets of components. For example, to specify a lower proximity value of 0.5 between comps 10-12 and 20-24: “AcrossGroups: 0.5 3 10 11 12 5 20 21 22 23 24”
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()