TAGGED: ansys-mechanical
-
-
July 10, 2025 at 4:30 pm
felix.kaule
SubscriberHello everyone,
I’m using Ansys Mechanical 2024 R2 and want to calculate the surface area of my Tet10 mesh via the
mesh_skin
operator. However, the result includes contact elements (CONTA*/TARGE*), which leads to approximately twice the expected area.My Code:
python
skin_mesh = dpf.operators.mesh.skin(
mesh=sub_mesh,
mesh_scoping=node_scoping
).outputs.mesh.GetData()
area_field = dpf.operators.geo.surface_area(mesh=skin_mesh).outputs.fields_container.GetData()[0]Expected: Only the true boundary faces of the Tet10 elements.
Actual: Additional faces from contact elements are included.What I tried:
Filtering by
mapdl_element_type_id
viascoping.on_property
Using
mesh.faces
instead ofmesh.skin
Explicit element vs. nodal scoping
Question:
How can I exclude contact elements from the skin mesh extraction so that only the structural boundary faces remain?Thanks in advance for your help!
Best regards,
Felix -
July 14, 2025 at 9:04 am
Lydia
Ansys EmployeeHi Felix,
For DPF and scripting related questions, you should go ahead and ask in the Ansys Developers Forum Home - Community Forum.
Thank you for your understanding.
Regards,
Lydia
-
July 14, 2025 at 9:38 am
felix.kaule
SubscriberHello Lydia,
actually that's what I already did, you can delete this thread here if you want.
Regards
Felix -
July 16, 2025 at 7:05 am
OmarWorthing90
SubscriberHello felix.kaule!
from ansys.dpf import core as dpf
# Filter out contact elements (e.g., type IDs for CONTA/TARGE are usually 100+)
element_types_to_keep = [1, 2, 3, 4, 5] # Structural types (adjust based on your model)filtered_mesh_op = dpf.operators.mesh.mesh_filter()
filtered_mesh_op.inputs.mesh.connect(sub_mesh)
filtered_mesh_op.inputs.element_type.connect(element_types_to_keep)
filtered_mesh = filtered_mesh_op.outputs.mesh()# Now apply skin and surface area
skin_mesh = dpf.operators.mesh.skin(mesh=filtered_mesh).outputs.mesh.GetData()
area_field = dpf.operators.geo.surface_area(mesh=skin_mesh).outputs.fields_container.GetData()[0]
-
- You must be logged in to reply to this topic.
-
3492
-
1057
-
1051
-
965
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.