How to find nodes actively participating in a contact?

Options
Collins
Collins Member Posts: 10
Name Dropper First Comment
edited May 24 in Structures

I am trying to find all the nodes in a contact region.

I have noticed that the contact region is a combination of the surfaces involved in the contact, and therefore the nodes on the contact region are the same as the nodes on both surfaces combined.

What I want to find is the nodes between the two bodies in contact, specifically around the region where the two bodies touch.

Comments

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 283
    First Anniversary First Comment 5 Likes Ansys Employee
    Options

    You can use DPF to find all the contact elements and then do post processing on contact status, pressure, or gap. Any of these can be used as filter criteria to see what nodes are actually involved in transferring force across the contact.

  • Collins
    Collins Member Posts: 10
    Name Dropper First Comment
    Options

    @Mike.Thompson

    Thank you so much for your reply.

    This is what I have so far

    My original idea was to find the nodes in the contact region and then check for nodes that have two bodies but it turns out that nodes on contact region (specifically where the bodies touch) don't share bodies.

    mesh_data = ExtAPI.DataModel.Project.Model.Analyses[0].MeshData
    conta = DataModel.GetObjectsByType(DataModelObjectCategory.ContactRegion)
    cont_faceId = [conta[i].SourceLocation.Ids for i in range(len(conta))]
    cont_faceId = [faces for sublist in cont_faceId for faces in sublist]
    cont_face_mesh = [mesh_data.MeshRegionById(face) for face in cont_faceId]
    cont_face_mesh_nodeId = [face_mesh.Nodes for face_mesh in cont_face_mesh]
    cont_face_mesh_nodeId = [nodes for sublist in cont_face_mesh_nodeId for nodes in sublist]
    cont_nodeId = [ cont_face_node.BodyIds for cont_face_node in cont_face_mesh_nodeId]
    indices = [i for i, sublist in enumerate(cont_nodeId) if len(sublist) > 1]

    I already have all the nodes on the two surfaces in contact

    could you explain a little be more about post processing on contact status, pressure, or gap.

    THank you

  • Collins
    Collins Member Posts: 10
    Name Dropper First Comment
    Options

    @Mike.Thompson

    Thank you so much.

    My original idea was to find all nodes on the surfaces in contact and then filter them to find node that are connected to two or more bodies. But it turns out that nodes that actively participate in contact region don't share bodies.

    This is my code

    mesh_data = ExtAPI.DataModel.Project.Model.Analyses[0].MeshData
    conta = DataModel.GetObjectsByType(DataModelObjectCategory.ContactRegion)
    cont_faceId = [conta[i].SourceLocation.Ids for i in range(len(conta))]
    cont_faceId = [faces for sublist in cont_faceId for faces in sublist]
    cont_face_mesh = [mesh_data.MeshRegionById(face) for face in cont_faceId]
    cont_face_mesh_nodeId = [face_mesh.Nodes for face_mesh in cont_face_mesh]
    cont_face_mesh_nodeId = [nodes for sublist in cont_face_mesh_nodeId for nodes in sublist]
    cont_nodeId = [ cont_face_node.BodyIds for cont_face_node in cont_face_mesh_nodeId]
    indices = [i for i, sublist in enumerate(cont_nodeId) if len(sublist) > 1]

    I already have all nodes on the surfaces in contact.

    Could you please explain a little more about post processing on contact status, pressure, or gap

    If you have any reference that would be helpful.

    Thank you

  • Collins
    Collins Member Posts: 10
    Name Dropper First Comment
    Options

    @Mike.Thompson

    @Pernelle Marone-Hitz

    Any ideas will be very much appreciated.
    thank you in advance

  • Collins
    Collins Member Posts: 10
    Name Dropper First Comment
    Options

    For anyone trying to achieve similar results, here is how went around it

    I preprocessed the geometry in Design Modeler. Specifically, I used the projection tool to create a region/face where the contact occurred on the surface of interest and gave it a Named Selection.

    Then in my code, I used this Named Selection to pick the face (the region of contact) and then found the nodes on this face using the code above.

    Cheers

  • Erik Kostson
    Erik Kostson Member, Employee Posts: 130
    First Answer Name Dropper First Anniversary Ansys Employee
    Options

    Thanks @Collins for posting your work around and solution.

    Hope others might find it useful

    Erik