VM267 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM267
/TITLE,VM267, INCLINED CRACK IN 2D PLATE UNDER UNIFORM TENSION LOADING
/COM, REFERENCE: "T.L.ANDERSON, FRACTURE MECHANICS: FUNDAMENTALS AND APPLICATIONS.
/COM,             CRC PRESS, BOCA RATON, FL, 1995"
/COM,
/PREP7
MM_TO_M=10**(-3)                            ! CONVERT MM TO M
HALF_CRACK_LENGHT = 45*MM_TO_M              ! CRACK LENGTH
ALPHA=30                                    ! ANGLE
SIGMA_INFTY = 10E+06                        ! LOADING CONSTANT (PA)
PI=ACOS(-1)

!DEFINE ELEMENTS TYPE
ET,1,PLANE182
KEYOPT,1,3,2

!MATERIAL PROPERTIES 
YOUNG = 210000E+06     
NU = 0.3              
MP,EX,1,YOUNG 
MP,PRXY,1,NU
        
!BIG RECTANGLE
L_RECTANGLE_LENGHT = 300*MM_TO_M
L_RECTANGLE_HEIGHT = 300*MM_TO_M

!MEDIUM RECTANGLE
M_RECTANGLE_LENGHT = 100*MM_TO_M
M_RECTANGLE_HEIGHT = 100*MM_TO_M

!TORUS
TORUS_MINOR_RADIUS = 18*MM_TO_M
TORUS_MAJOR_RADIUS = HALF_CRACK_LENGHT

!RECTANGLE
RECTNG_LENGHT = ((HALF_CRACK_LENGHT + TORUS_MINOR_RADIUS*2)*2)
RECTNG_HEIGHT = (TORUS_MINOR_RADIUS*2.0)
RECTNG_OFFSET = (- RECTNG_LENGHT/2)       !TORUS_MAJOR_RADIUS - RECTNG_LENGHT/2

!SMALL CIRCULAR AREA
FIRST_ROW_RADIUS = 2 
SMALL_CIRCULAR_RADIUS = (FIRST_ROW_RADIUS*4)*MM_TO_M

!AREAS CREATION
WPSTYLE,,,,,,,,1
WPROTA,ALPHA,,
CSWPLA,11,0

_geomgen=0
_exit=0

*if,_geomgen,eq,1,then

RECTNG,RECTNG_OFFSET,RECTNG_OFFSET+RECTNG_LENGHT,0,RECTNG_HEIGHT
RECTNG,RECTNG_OFFSET,RECTNG_OFFSET+RECTNG_LENGHT,-RECTNG_HEIGHT,0

CYL4,HALF_CRACK_LENGHT,0,SMALL_CIRCULAR_RADIUS,180
CYL4,HALF_CRACK_LENGHT,0,TORUS_MINOR_RADIUS,180
ASBA,1,4,,DELETE,KEEP
ASBA,4,3,,DELETE,KEEP

CYL4,HALF_CRACK_LENGHT,0,SMALL_CIRCULAR_RADIUS,-180
CYL4,HALF_CRACK_LENGHT,0,TORUS_MINOR_RADIUS,-180
ASBA,2,6,,DELETE,KEEP
ASBA,6,4,,DELETE,KEEP

!MERGE THE KEYPOINTS AFTER THE CRACK
KSEL,S,LOC,X,HALF_CRACK_LENGHT,2*HALF_CRACK_LENGHT
NUMMRG,KP
ALLSEL,ALL,ALL

CYL4,-HALF_CRACK_LENGHT,0,SMALL_CIRCULAR_RADIUS,180
CYL4,-HALF_CRACK_LENGHT,0,TORUS_MINOR_RADIUS,180
ASBA,5,8,,DELETE,KEEP
ASBA,8,6,,DELETE,KEEP

CYL4,-HALF_CRACK_LENGHT,0,SMALL_CIRCULAR_RADIUS,-180
CYL4,-HALF_CRACK_LENGHT,0,TORUS_MINOR_RADIUS,-180
ASBA,7,10,,DELETE,KEEP
ASBA,10,8,,DELETE,KEEP

!MERGE THE KEYPOINTS AFTER THE CRACK
KSEL,S,LOC,X,-HALF_CRACK_LENGHT,-(2*HALF_CRACK_LENGHT)
NUMMRG,KP
ALLSEL,ALL,ALL

WPROTA,-ALPHA,,
CSYS,0
RECTNG,-M_RECTANGLE_LENGHT,M_RECTANGLE_LENGHT,-M_RECTANGLE_HEIGHT,M_RECTANGLE_HEIGHT
ALLSEL
ASBA,10,ALL,,DELETE,KEEP

RECTNG,-L_RECTANGLE_LENGHT,L_RECTANGLE_LENGHT,-L_RECTANGLE_HEIGHT,L_RECTANGLE_HEIGHT
ALLSEL
ASBA,10,ALL,,DELETE,KEEP

!RADIAL 2D MESH SETTING AROUND RIGHT CRACK TIP KEYPOINT
ALLSEL,ALL,ALL
WPROTA,ALPHA,,
CSYS,11

KSEL,S,LOC,Y,0
KSEL,R,LOC,X,HALF_CRACK_LENGHT
*GET,TIP_RIGHT_KNUM,KP,0,NUM,MIN
KSCON,TIP_RIGHT_KNUM,FIRST_ROW_RADIUS*MM_TO_M,0,8,1.0 
AESIZE,9,12*MM_TO_M
AESIZE,11,12*MM_TO_M
LESIZE,1,,,2
LESIZE,7,,,2
LESIZE,17,,,2
ALLSEL,ALL,ALL

!RADIAL 2D MESH SETTING AROUND LEFT CRACK TIP KEYPOINT
ALLSEL,ALL,ALL
KSEL,S,LOC,Y,0
KSEL,R,LOC,X,-HALF_CRACK_LENGHT
*GET,TIP_LEFT_KNUM,KP,0,NUM,MIN
KSCON,TIP_LEFT_KNUM,FIRST_ROW_RADIUS*MM_TO_M,0,8,1.0 
LESIZE,23,,,2
LESIZE,15,,,2
LESIZE,35,,,2
ALLSEL,ALL,ALL
AESIZE,12,20*MM_TO_M   
AESIZE,13,80*MM_TO_M   

WPROTA,-ALPHA,,
CSYS,0

TYPE,1
AMESH,3
AMESH,4
AMAP,1,13,10,9,12
AMAP,2,17,14,9,12
AMESH,6
AMESH,8
AMAP,5,19,15,7,18
AMAP,7,19,15,21,24
AMESH,9,11,2
MOPT,TRANS,2
AMESH,12,13
ALLSEL
cdwrite,all,vm267,cdb

*if,_exit,eq,1,then
*endif

*else

/out,scratch
/PREP7 
   cdread,db,vm267,cdb
*endif
FINISH

/SOLU
ALLSEL
CSYS,0
NSEL,S,LOC,X,-L_RECTANGLE_LENGHT
D,ALL,UX,0
ALLSEL
NSEL,S,LOC,Y,L_RECTANGLE_HEIGHT
SF,ALL,PRES,-SIGMA_INFTY
ALLSEL
NSEL,S,LOC,Y,-L_RECTANGLE_HEIGHT
D,ALL,UY,0
ALLSEL,ALL
NSEL,S,NODE,,NODE(0.039,0.0225,0)
TIP_RIGHT_NNUM=NODE(0.039,0.0225,0)
CM,RIGHT_TIP,NODE
CSYS,0
ALLSEL,ALL
CINT,NEW,1                                ! DEFINE CRACK ID
CINT,TYPE,SIFS
CINT,CTNC,RIGHT_TIP                       ! DEFINE RIGHT CRACK TIP NODE COMPONENT         
CINT,SYMM,OFF                             ! SYMMETRY OFF
CINT,NCON,5                               ! NUMBER OF COUNTOURS
CINT,NORMAL,11,2                          ! DEFINE CRACK PLANE NORMAL
CINT,LIST
ALLSEL,ALL
ANTYPE,STATIC
EQSLV,SPARSE
SOLVE

/OUT,SCRATCH
/POST1
PRCINT,1,,K1					! STRESS INTENSITY FOR MODE 1 FRACTURE
*GET,K1_1,CINT,1,CTIP,TIP_RIGHT_NNUM,,1,DTYPE,K1
*GET,K1_2,CINT,1,CTIP,TIP_RIGHT_NNUM,,2,DTYPE,K1
*GET,K1_3,CINT,1,CTIP,TIP_RIGHT_NNUM,,3,DTYPE,K1
*GET,K1_4,CINT,1,CTIP,TIP_RIGHT_NNUM,,4,DTYPE,K1
*GET,K1_5,CINT,1,CTIP,TIP_RIGHT_NNUM,,5,DTYPE,K1

PRCINT,1,,K2					! STRESS INTENSITY FOR MODE 2 FRACTURE
*GET,K2_1,CINT,1,CTIP,TIP_RIGHT_NNUM,,1,DTYPE,K2
*GET,K2_2,CINT,1,CTIP,TIP_RIGHT_NNUM,,2,DTYPE,K2
*GET,K2_3,CINT,1,CTIP,TIP_RIGHT_NNUM,,3,DTYPE,K2
*GET,K2_4,CINT,1,CTIP,TIP_RIGHT_NNUM,,4,DTYPE,K2
*GET,K2_5,CINT,1,CTIP,TIP_RIGHT_NNUM,,5,DTYPE,K2

/OUT
ALPHA=30*PI/180
K1_REF = (SIGMA_INFTY*SQRT(PI*HALF_CRACK_LENGHT))*(COS(ALPHA)*COS(ALPHA))
K2_REF = (SIGMA_INFTY*SQRT(PI*HALF_CRACK_LENGHT))*(COS(ALPHA)*SIN(ALPHA))
K1_ANSYS=(K1_2+K1_3+K1_4+K1_5)/4
K2_ANSYS=(K2_2+K2_3+K2_4+K2_5)/4
/COM
/OUT,vm267,vrt
/COM,------------ VM267 RESULTS COMPARISON --------------
/COM,
/COM,          |  TARGET   |   Mechanical APDL  |   RATIO
/COM,
/COM,  STRESS INTENSITY FOR MODE 1 FRACTURE
/COM,
*VWRITE,'KI',K1_REF,K1_ANSYS,K1_ANSYS/K1_REF
(1X,A8,'   ',F10.0,'  ',F14.0,'   ',F15.3)
/COM,
/COM,
/COM,  STRESS INTENSITY FOR MODE 2 FRACTURE
/COM,
*VWRITE,'KII',K2_REF,K2_ANSYS,K2_ANSYS/K2_REF
(1X,A8,'   ',F10.0,'  ',F14.0,'   ',F15.3)
/COM,
/COM,
/COM,-------------------------------------------------------
/OUT
FINISH
*LIST,vm267,vrt