Model.adaptive_wrapper_leak_check#

Model.adaptive_wrapper_leak_check(elem_collection, node_collection, min_size)#

This function can be used to quickly identify leaks from the base mesh. Volumes are defined by selection of seed nodes. Seed nodes should not be part of the base mesh.

This function must be called after Model.adaptive_wrapper_init().

Parameters:
  • elem_collection (Collection) – The collection of elements used for adaptive wrap mesh leak detection.

  • node_collection (Collection) – The collection containing the seed nodes.

  • min_size (double) – The minimum element size considered during leak detection. It also acts as the gap patch tolerance to check the closeness of volumes.

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)

# Detect leaks
elems = hm.Collection(model, ent.Element)
nodes = hm.Collection(model, ent.Node, populate=False)
model.adaptive_wrapper_leak_check(
    elem_collection=elems, node_collection=nodes, min_size=0.1
)

# 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()