Model.penetrationcheck#

Model.penetrationcheck(collection, check_type)#

Checks the given components for contact surface penetrations. To release the memory after completion, use the function Model.penetrationcheckend(). A valid template must be loaded for the check to occur.

Parameters:
  • collection (Collection) – The collection containing the entities to check for penetration. Valid entities are groups and elements

  • check_type (int) –

    The type of penetration check to perform. Valid values are:

    0 - groups

    3 - elements only

Example#

Check the elements in group “ E2E “ for penetration#
import hm
import hm.entities as ent

model = hm.Model()

# Creating the collection that contains the elements from the group named "E2E"
filter = hm.FilterByCollection(ent.Element, ent.Group)
groups_collection = hm.Collection(model, ent.Group, "name=E2E")
elements_collection = hm.Collection(model, filter, groups_collection)

model.penetrationcheck(collection=elements_collection, check_type=0)
model.penetrationcheckend()