VM191 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM191 
/TITLE, VM191, HERTZ CONTACT BETWEEN TWO CYLINDERS
/COM    "FINITE ELEMENT ANALYSIS OF HERTZ CONTACT PROBLEM"
/COM     N. CHANDRASEKARAN, W.E. HAISLER, R.E. GOFORTH,
/COM     FINITE ELEMENTS IN ANALYSIS AND DESIGN 3, 1987, PP 39-56.
/COM
/COM  2-D ANALYSIS USING PLANE182 AND CONTA175
/COM  CONTACT ALGORITHM: AUGMENTED LAGRANGIAN - KEYOPT(2) = 0
/COM
/OUT,SCRATCH
/PREP7 
SMRT,OFF 
ANTYPE,STATIC
ET,1,PLANE182          ! 2-D SOLID ELEMENTS
ET,2,TARGE169          ! 2-D TARGET ELEMENTS
ET,3,CONTA175          ! 2-D CONTACT ELEMENTS
MP,EX,1,30000          ! SMALLER CYLINDER PROPERTIES
MP,NUXY,1,0.25
MP,EX,2,29120          ! LARGER CYLINDER PROPERTIES
MP,NUXY,2,0.30
CSYS,1
K,1                    ! CREATE BIGGER CYLINDER
K,2,13
K,3,13,82
K,4,13,90
K,5,11,90
L,1,5
L,2,3
LESIZE,ALL,,,7
L,3,4                  ! TARGET SURFACE (LINE 3)
LOCAL,11,1,,13
L,3,5
CSYS,1
A,1,2,3,5
A,5,3,4,4
MAT,2
MSHK,1                    ! MAPPED AREA MESH 
MSHA,0,2D                 ! USING QUADS
ESIZE,,4
AMESH,1,2
LOCAL,12,1,,23-1E-5,,-90  ! INTRODUCE SLIGHT INTERFERENCE
K,11                      ! CREATE SMALLER CYLINDER
K,12,10
K,13,10,8
K,14,10,90
K,15,8
L,11,15
L,13,14
LESIZE,7,,,6
LESIZE,8,,,6
L,12,13                ! CONTACT SURFACE (LINE 9)
CSYS,11
L,13,15
CSYS,12
MAT,1
A,12,13,15,15
A,15,13,14,11
ESIZE,,6
AMESH,3,4
LSEL,S,LINE,,9         ! SELECT CONTACT NODES ON SMALLER CYLINDER
NSLL,,1
CM,CYL1,NODE   
REAL,1
TYPE,3
ESURF                  ! GENERATE COTAC175 ELEMENTS  
LSEL,S,LINE,,3         
NSLL,,1                ! SELECT TARGET NODES ON BIGGER CYLINDER
REAL,1
TYPE,2
ESURF                  ! GENERATE TARGE169 ELEMENTS  
NSEL,ALL
CSYS,0
NSEL,S,LOC,Y,23        ! SELECT TOP EDGE OF MODEL
CP,1,UY,ALL            ! COUPLE NODES ON TOP EDGE
*GET,NC,NODE,,NUM,MIN  ! GET LOWEST NODE NUMBER (MASTER)
NSEL,S,LOC,X           ! SYMMETRY CONSTRAINTS
D,ALL,UX
NSEL,S,LOC,Y
D,ALL,UY
NSEL,ALL
FINISH
SAVE,MODEL2D

*CREATE,SOLV2D,MAC     ! CREATE SOLUTION MACRO FOR 2-D CASE
/SOLU
D,NC,UY,-0.005         ! APPLY SMALL DISPLACEMENT TO ENGAGE CONTACT
SOLVE                  ! SOLVE FIRST LOAD STEP
DDELE,NC,UY            ! DELETE IMPOSED DISPLACEMENT
F,NC,FY,-1600          ! APPLY HALF LOAD ON (SYMMETRY) MODEL
NSUB,2,10,1
SOLVE                  ! SOLVE SECOND LOAD STEP
FINISH
*END

SOLV2D                 ! EXECUTE SOLUTION MACRO FOR 2-D CASE

*CREATE,RES2D,MAC      ! CREATE RESULTS MACRO FOR 2-D CASE
/POST1
NSEL,,LOC,Y,23         ! SELECT TOP EDGE OF SMALLER CYLINDER
*GET,D,NODE,NC,U,Y     ! GET APPROACH DISTANCE (D)
ESEL,S,TYPE,,3         ! SELECT CONTACT ELEMENTS
ETABLE,NSTAT,CONT,STAT ! STORE CONTACT STATUS 
ESEL,R,ETAB,NSTAT,2,2  ! SELECT ELEMENTS WITH CONTACT (STAT=2)
CMSEL,S,CYL1           ! SELECT CONTACT COMPONENT NODES
NSLE,R                 ! RESELECT NODES WITH CONTACT
NSORT,LOC,X,1          ! SORT CONTACT NODES BY ASCENDING X LOCATION
*GET,B,SORT,,MAX       ! GET SEMI-CONTACT LENGTH (B)
*STATUS,PARM
*DIM,LABEL,CHAR,2,2
*DIM,VALUE,,2,3
LABEL(1,1) = 'AP DIS ','S-CON LEN '
LABEL(1,2) = ' mm',' mm'
*VFILL,VALUE(1,1),DATA,-.4181,1.2
*VFILL,VALUE(1,2),DATA,D,B
*VFILL,VALUE(1,3),DATA,ABS(D/.4181),ABS(B/1.2)
FINISH
*END

RES2D                  ! EXECUTE POSTPROCESSING MACRO FOR 2-D CASE
SAVE,TABLE_1

/CLEAR, NOSTART 
/COM
/COM  3-D ANALYSIS USING SOLID185 AND CONTA175
/COM  CONTACT ALGORITHM: AUGMENTED LAGRANGIAN - KEYOPT(2) = 0
/COM
/PREP7 $SMRT,OFF 
ANTYPE,STATIC
ET,1,SOLID185          ! 3-D SOLID ELEMENTS
ET,2,170               ! 3-D TARGET ELEMENTS
ET,3,175               ! 3-D CONTACT ELEMENTS
MP,EX,1,30000          ! SMALLER CYLINDER PROPERTIES
MP,NUXY,1,0.25
MP,EX,2,29120          ! LARGER CYLINDER PROPERTIES
MP,NUXY,2,0.30
CSYS,1
K,1                    ! CREATE LOWER BIGGER CYLINDER
K,2,13
K,3,13,82
K,4,13,90
K,5,11,90
KGEN,2,1,5,1,,,1,100   ! UNIT THICKNESS SLICE
L,1,5
L,2,3
L,101,105
L,102,103
LESIZE,ALL,,,7
L,1,101
*REPEAT,5,1,1
LESIZE,5,,,1
*REPEAT,5,1
LOCAL,11,1,,13
L,3,5
L,103,105
CSYS,1
MAT,2
MSHK,1                 ! MAPPED VOLUME MESH 
MSHA,0,3D              ! USING HEX   
ESIZE,,4
V,1,2,3,5,101,102,103,105
V,5,3,4,4,105,103,104,104
VMESH,ALL
LOCAL,12,1,,23-1E-5,,-90 ! INTRODUCE SLIGHT INTERFERENCE
K,11                     ! CREATE UPPER SMALLER CYLINDER
K,12,10
K,13,10,8
K,14,10,90
K,15,8
KGEN,2,11,15,1,,,1,100
L,11,15
L,13,14
LESIZE,18,,,6
LESIZE,19,,,6
L,11,111
*REPEAT,5,1,1
LESIZE,20,,,1
*REPEAT,5,1
CSYS,11
L,13,15
L,113,115
CSYS,12
MAT,1
ESIZE,,6
V,12,13,15,15,112,113,115,115
V,15,13,14,11,115,113,114,111
VMESH,3,4
ASEL,S,AREA,,12        
NSLA,,1                ! SELECT CONTACT NODES ON SMALLER CYLINDER
CM,CYL1,NODE           ! CONTACT NODES COMPONENT 
REAL,1
TYPE,3                  
ESURF                  ! GENERATE 3-D CONTA175 ELEMENTS
ASEL,S,AREA,,8         
NSLA,,1                ! SELECT TARGET NODES ON BIGGER CYLINDER
CM,CYL2,NODE           ! TARGET NODES COMPONENT
REAL,1
TYPE,2
ESURF                  ! GENERATE 3-D TARGE170 ELEMENTS
NSEL,ALL
CSYS,0
NSEL,S,LOC,Y,23        ! SELECT TOP EDGE OF MODEL
CP,1,UY,ALL            ! COUPLE NODES ON TOP EDGE
*GET,NC,NODE,,NUM,MIN  ! GET LOWEST NODE NUMBER (MASTER)
NSEL,S,LOC,X           ! SYMMETRY CONSTRAINTS
D,ALL,UX
NSEL,S,LOC,Y
D,ALL,UY
NSEL,S,LOC,Z
D,ALL,UZ
NSEL,ALL
FINISH
SAVE,MODEL3D

*CREATE,SOLV3D,MAC     ! CREATE SOLUTION MACRO FOR 3-D CASE
/SOLU
D,NC,UY,-0.001         ! APPLY SMALL DISPLACEMENT TO ENGAGE CONTACT
SOLVE                  ! SOLVE FIRST LOAD STEP
DDELE,NC,UY            ! DELETE IMPOSED DISPLACEMENT
F,NC,FY,-1600          ! APPLY HALF LOAD ON (SYMMETRY) MODEL
NSUB,2,10,1
SOLVE                  ! SOLVE SECOND LOAD STEP
FINISH
*END

SOLV3D                 ! EXECUTE SOLUTION MACRO FOR 3-D CASE 

*CREATE,RES3D,MAC      ! CREATE RESULTS MACRO FOR 3D CASE
/POST1
NSEL,,LOC,Y,23         ! SELECT TOP EDGE OF SMALLER CYLINDER
*GET,D,NODE,NC,U,Y     ! GET APPROACH DISTANCE (D)
ESEL,S,TYPE,,3         ! SELECT CONTACT ELEMENTS
ETABLE,NSTAT,CONT,STAT ! STORE CONTACT STATUS 
ESEL,R,ETAB,NSTAT,2,2  ! SELECT ELEMENTS WITH CONTACT (STAT=2)
CMSEL,S,CYL1           ! SELECT CONTACT COMPONENT NODES
NSLE,R                 ! RESELECT NODES WITH CONTACT
NSORT,LOC,X,1          ! SORT CONTACT NODES BY ASCENDING X LOCATION
*GET,B,SORT,,MAX       ! GET SEMI-CONTACT LENGTH (B)
*STATUS,PARM
*DIM,LABEL,CHAR,2,2
*DIM,VALUE,,2,3
LABEL(1,1) = 'AP DIS ','S-CON LEN '
LABEL(1,2) = ' mm',' mm'
*VFILL,VALUE(1,1),DATA,-.4181,1.2
*VFILL,VALUE(1,2),DATA,D,B
*VFILL,VALUE(1,3),DATA,ABS(D/.4181),ABS(B/1.2)
FINISH
*END

RES3D                  ! EXECUTE POSTPROCESSING MACRO FOR 3-D CASE
SAVE,TABLE_2

/CLEAR, NOSTART 
/COM
/COM  2-D ANALYSIS USING PLANE182 AND CONTA175
/COM  CONTACT ALGORITHM: LAGRANGE MULTIPLIER - KEYOPT(2) = 3
/COM
RESUME,MODEL2D
/PREP7
KEYOPT,3,2,3           ! LAGRANGE MULTIPLIER ON CONTACT NORMAL AND PENALTY ON TANGENT
FINISH
SOLV2D
RES2D 
SAVE,TABLE_3

/CLEAR, NOSTART 
/COM
/COM  3-D ANALYSIS USING SOLID185 AND CONTA175
/COM  CONTACT ALGORITHM: LAGRANGE MULTIPLIER - KEYOPT(2) = 3
/COM
RESUME,MODEL3D
/PREP7
KEYOPT,3,2,3           ! LAGRANGE MULTIPLIER ON CONTACT NORMAL AND PENALTY ON TANGENT
FINISH
SOLV3D
RES3D 
SAVE,TABLE_4


RESUME,TABLE_1
/COM
/OUT,vm191,vrt
/COM,=========== VM191 RESULTS COMPARISON ======================
/COM,
/COM,                    |  TARGET  |   Mechanical APDL  | RATIO
/COM,
/COM, 2-D ANALYSIS USING PLANE182 AND CONTA175:
/COM, CONTACT ALGORITHM: AUGMENTED LAGRANGIAN
/COM,
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F10.4,'  ',F14.4,'   ',1F15.3)
/NOPR
RESUME,TABLE_2
/GOPR
/COM,
/COM, 3-D ANALYSIS USING SOLID185 AND CONTA175:
/COM, CONTACT ALGORITHM: AUGMENTED LAGRANGIAN
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F10.4,'  ',F14.4,'   ',1F15.3)
/NOPR
RESUME,TABLE_3
/GOPR
/COM,
/COM, 2-D ANALYSIS USING PLANE182 AND CONTA175:
/COM, CONTACT ALGORITHM: LAGRANGE MULTIPLIER
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F10.4,'  ',F14.4,'   ',1F15.3)
/NOPR
RESUME,TABLE_4
/GOPR
/COM,
/COM, 3-D ANALYSIS USING SOLID185 AND CONTA175:
/COM, CONTACT ALGORITHM: LAGRANGE MULTIPLIER
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F10.4,'  ',F14.4,'   ',1F15.3)
/COM,===========================================================
FINISH
/OUT,
*LIST,vm191,vrt
/OUT,SCRATCH,,,APPEND
/DELETE,TABLE_1
/DELETE,TABLE_2
/DELETE,TABLE_3
/DELETE,TABLE_4
/DELETE,MODEL2D
/DELETE,MODEL3D
/DELETE,SOLV2D,MAC
/DELETE,SOLV3D,MAC
/DELETE,RES2D,MAC
/DELETE,RES3D,MAC