How to find nodes actively participating in a contact?
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
-
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.
0 -
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
0 -
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
0 -
0
-
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
1 -
1