-
1
- #1
bgrz
Mechanical
- Aug 24, 2018
- 2
Hi everyone,
using a few examples from forums, I wrote a APDL script for the Workbench (Release 19.1) postprocessor that calculates the area of contact:
SET,LAST !select results from last loadstep
ESEL,R,TYPE,,3 !select contact elements (target elements would be 4, see solver information)
ETABLE,ESTAT,CONT,STAT !store contact status
ESEL,S,ETAB,ESTAT,2,3 !select element in contact (stat=2 sliding,stat=3 sticking)
ETABLE,C_AREA,VOLU !select contact element area (volume is calculated for unite thickness for 2D elements)
SSUM !sum area
*GET,T_AREA,SSUM,0,ITEM,C_AREA !store result in parameter
MY_AREA_1=T_AREA !print area as result
This works fine, BUT if I use symmetric contact definition the calculated area is doubled, because ANSYS finds contact elements on both contacting bodies.
Does anyone have an idea how to make the script convenient for both symmetric or asymmetric contact? Can I somehow select only the contact elements on one volume?
I am thankful for any advice or tips.
using a few examples from forums, I wrote a APDL script for the Workbench (Release 19.1) postprocessor that calculates the area of contact:
SET,LAST !select results from last loadstep
ESEL,R,TYPE,,3 !select contact elements (target elements would be 4, see solver information)
ETABLE,ESTAT,CONT,STAT !store contact status
ESEL,S,ETAB,ESTAT,2,3 !select element in contact (stat=2 sliding,stat=3 sticking)
ETABLE,C_AREA,VOLU !select contact element area (volume is calculated for unite thickness for 2D elements)
SSUM !sum area
*GET,T_AREA,SSUM,0,ITEM,C_AREA !store result in parameter
MY_AREA_1=T_AREA !print area as result
This works fine, BUT if I use symmetric contact definition the calculated area is doubled, because ANSYS finds contact elements on both contacting bodies.
Does anyone have an idea how to make the script convenient for both symmetric or asymmetric contact? Can I somehow select only the contact elements on one volume?
I am thankful for any advice or tips.