Model.shell_mesh_smoother#
- Model.shell_mesh_smoother(collection, fix_nodes_collection, mesh_shape_weight, node_displacement_weight, iterations)#
Performs smoothing on the mesh selection with control on local node displacements and original mesh shape. This smoothing method is particularly useful for CFD while smoothing rough element patches for a wrap mesh.
- Parameters:
collection (Collection) – The collection containing the entities to smooth. Valid entities are components and elements.
fix_nodes_collection (Collection) – The collection containing the fixed node entities.
mesh_shape_weight (double) – This is a value between 0 and 1 that defines how much the original mesh shape has to be preserved.
node_displacement_weight (double) – This is a value between 0 and 1 that defines how much the neighboring elements of the node have an effect on the node displacement itself.
iterations (int) – The number of smoothing iterations.
Example#
Smooth all elements with 2 iterations, keeping the original mesh shape strictly maintained and node displacements respecting the neighboring shape#import hm import hm.entities as ent model = hm.Model() element_collection = hm.Collection(model, ent.Element) model.shell_mesh_smoother( collection=element_collection, fix_nodes_collection=hm.Collection(model, ent.Node, element_collection), mesh_shape_weight=0.4, node_displacement_weight=0.4, iterations=2, )