Model.setedgedensitylinkwithaspectratio#
- Model.setedgedensitylinkwithaspectratio(aspectratio)#
Sets the aspect ratio for linking opposite edge densities during automeshing. This forces opposite edges of a surface to use consistent edge densities, provided that the starting densities are close enough. This creates tapered lines of elements, instead of using trias to transition between inconsistent densities. This is only valid for size and bias or edge deviation surface meshing.
- Parameters:
aspectratio (double) –
Specifies the aspect ratio to use for edge density linking. Valid values are:
-1 - Do not link opposite edge densities.
0 - Attempt to link opposite edge densities with default value.
> 0 - Attempt to link opposite edge densities with specified value.
Example#
Mesh surface with ID 12 with first order elements of size 0.5 , and specify an edge density link use a value of 2.0#import hm import hm.entities as ent model = hm.Model() model.setedgedensitylinkbytypeandaspectratio(type=1, aspect_ratio=3.0) model.setedgedensitylinkwithaspectratio(aspectratio=2.0) hm.setoption(element_order=1) model.interactivemeshsurf( collection=hm.Collection(model, ent.Surface, [12]), elementsize=1.0, elem_type=2, elem_type2=2, forcing=2, size_control=1, skew_control=1, ) model.set_meshfaceparams( face_index=0, shape_type=2, elem_type=2, alg_type=0, elem_size=0, smooth_method=1, smooth_tol=0.5, size_control=1, skew_control=1, ) model.set_meshedgeparams( edge_index=0, elem_density=32, alg_type=1, bias_style=0, bias=0, min_size=0, max_size=1, chordal_dev=0, max_angle=0, ) model.set_meshedgeparams( edge_index=4, elem_density=5, alg_type=1, bias_style=0, bias=0, min_size=0, max_size=1, chordal_dev=0, max_angle=0, ) model.automesh(face_index=0, algorithm=2, elem_type=2) model.storemeshtodatabase(elemstosurfcomp=1) model.ameshclearsurface()