/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VMC1
/TITLE, VMC1, CLAMPED PLATE UNDER UNIFORMLY-DISTRIBUTED LOAD
*DIM,NARAY,TABLE,13,8 ! 2-D NARAY FOR RESULTS INFO
*TAXIS,NARAY(1,0),1,1,2,3,4,5,6,7,8,9,10
*TAXIS,NARAY(11,0),1,11,12,13
*TAXIS,NARAY(0,1),2,1,2,3,4,5,6,7,8
*CREATE,BASE,
PARSAV,ALL
/CLEAR, NOSTART
PARRES,CHANGE
/PREP7
SMRT,OFF
/TITLE, VMC1, CLAMPED PLATE UNDER UNIFORMLY-DISTRIBUTED LOAD
/COM,
ANTYPE,STATIC
*IF,ETYP,EQ,185,THEN
K2=2
*ELSEIF,ETYP,EQ,186,THEN
K2=1
*ELSE
K2=0
*ENDIF
ET,1,ETYP,,K2 ! DEFINE ELEMENT TYPE PARAMETRICALLY
MP,EX,1,10E6 ! DEFINE MATERIAL PROPERTIES
MP,NUXY,1,.3
A=10 ! DEFINE PLATE EDGE LENGTH
T=1.0 ! DEFINE PLATE THICKNESS
K,1,,,(-T/2) ! DEFINE KEYPOINTS
K,2,(A/2),,(-T/2)
K,3,(A/2),(A/2),(-T/2)
K,4,,(A/2),(-T/2)
KGEN,2,1,4,1,,,(T/2)
L,1,5
*REPEAT,4,1,1
L,1,4
*REPEAT,2,4,4
L,1,2
*REPEAT,2,4,4
L,2,3
*REPEAT,2,4,4
L,3,4
*REPEAT,2,4,4
LSEL,S,LINE,,1,4
LESIZE,ALL,,,ARG2
LSEL,INVE
LESIZE,ALL,,,ARG1
LSEL,ALL
V,1,2,3,4,5,6,7,8
ESIZE,,1
MOPT,VMESH,ALTE
VMESH,ALL ! MESH VOLUMES
*GET,MAXN,NODE,,NUM,MAX ! GET MAX NODE NUMBER
NARAY(ARG3,2)=ARG1 ! STORE N1
NARAY(ARG3,3)=ARG2 ! STORE N2
NARAY(ARG3,4)=MAXN*3 ! C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ARG1,EQ,7,THEN
*IF,ARG2,EQ,1,THEN
/TITLE,VMC1 - TETRAHEDRAL MESH: (N1 = 7, N2 = 1)
EPLOT
*ENDIF
*ENDIF
/SHOW,GRPH
/TITLE, VMC1, CLAMPED PLATE UNDER UNIFORMLY-DISTRIBUTED LOAD
FINISH
/SOLU
EQSLV,PCG
SOLVE
FINISH
/POST1
NOD1=NODE(0,0,0) ! SELECT NODE AT LOCATION 1
*GET,UZ0,NODE,NOD1,U,Z ! GET DISPLACEMENT VALUE UZ(1)
NARAY(ARG3,6)=-(UZ0/.017169) ! CALCULATE NORMALIZED UZ(1)
NOD3=NODE(0,0,-T/2)
*GET,SX3,NODE,NOD3,S,X ! GET STRESS VALUE SX(3)
NARAY(ARG3,8)=(SX3/14.465E3) ! CALCULATE NORMALIZED SX(3)
NOD2=NODE(A/2,0,-T/2) ! SELECT NODES AT LOCATION 2
*GET,SX2,NODE,NOD2,S,X ! GET STRESS VALUE SX(2)
NARAY(ARG3,7)=-(SX2/32.124E3) ! CALCULATE NORMALIZED SX(2)
NSEL,ALL
*GET,NARAY(ARG3,5),PRERR,,SEPC ! STORE PERCENT ENERGY ERROR NORM
PARSAV,,PARAM
FINISH
*END
*DO,I,1,5 ! INITIALIZE COLUMN 1 WITH ELEMENT TYPES
NARAY(I,1)=185
*ENDDO
*DO,I,6,9
NARAY(I,1)=186
*ENDDO
*DO,I,10,13
NARAY(I,1)=187
*ENDDO
*DO,I,1,3 ! FOR ETYP = 185,186,187
*IF,I,LT,3,THEN
*IF,I,EQ,1,THEN
ETYP=185
K2=2
NEND=5
JINDX=0
*ELSEIF,I,EQ,2,THEN
ETYP=186
K2=1
NEND=4
JINDX=5
*ELSEIF,I,EQ,3,THEN
ETYP=187
K2=0
NEND=4
JINDX=5
*ENDIF
/COM, COMMENT: CALL MACRO TO LOOP THROUGH DIFFERENT ELEMENT TYPES
*DO,J,1,NEND
*IF,J,EQ,1,THEN
*USE,BASE,3,1,JINDX+J
*ELSEIF,J,EQ,2,THEN
*USE,BASE,6,1,JINDX+J
*ELSEIF,J,EQ,3,THEN
*USE,BASE,15,2,JINDX+J
*ELSEIF,J,EQ,4,THEN
*USE,BASE,20,4,JINDX+J
*ELSEIF,J,EQ,5,THEN
*USE,BASE,25,5,JINDX+J
*ENDIF
*ENDDO
*ELSE
ETYP=187
NEND=4
JINDX=9
*DO,J,1,NEND
*IF,J,EQ,1,THEN
*USE,BASE,3,1,JINDX+J
*ELSEIF,J,EQ,2,THEN
*USE,BASE,5,1,JINDX+J
*ELSEIF,J,EQ,3,THEN
*USE,BASE,6,1,JINDX+J
*ELSEIF,J,EQ,4,THEN
*USE,BASE,10,2,JINDX+J
*ENDIF
*ENDDO
*ENDIF
*ENDDO
SAVE,TEMP,DB
/GRID,1
/AXLAB,X,NO. DOF'S
/AXLAB,Y,% ERROR IN ENERGY NORM
/GTHK,AXIS,2
/GTHK,CURVE,3
/GROPT,LOGX,ON
/GROPT,LOGY,ON
/XRANGE,10,1E5
/YRANGE,0,1.25
*VLEN,5,1
*VPLOT,NARAY(1,4),NARAY(1,5)
*VLEN,4,1
*VPLOT,NARAY(6,4),NARAY(6,5)
*VLEN,4,1
*VPLOT,NARAY(10,4),NARAY(10,5)
/AXLAB,Y,SX(2) RATIO
/GROPT,LOGY,OFF
*VLEN,5,1
*VPLOT,NARAY(1,4),NARAY(1,7)
*VLEN,4,1
*VPLOT,NARAY(6,4),NARAY(6,7)
*VLEN,4,1
*VPLOT,NARAY(10,4),NARAY(10,7)
FINISH
/DELETE,PARAM
/DELETE,BASE
RESUME,TEMP,DB
/OUT,vmc1,vrt
/COM
/COM,------------------- VMC1 RESULTS LISTING ------------------------------------
/COM,
/COM,| ETYP | N1 | N2 | DOF | %ERR NM | UZ(1)
/COM,
*VWRITE,NARAY(1,1),NARAY(1,2),NARAY(1,3),NARAY(1,4),NARAY(1,5),NARAY(1,6)
(F5.0,' ',F5.0,' ',F5.0,' ',F10.0,' ',F7.3,' ',F5.3)
/COM,-----------------------------------------------------------------------------
/COM
/COM,------------------- VMC1 RESULTS CONT. --------------------------------------
/COM,
/COM,| SX(2) | SX(3) |
/COM,
*VWRITE,NARAY(1,7),NARAY(1,8)
(F7.3,' ',F7.3)
/COM,-----------------------------------------------------------------------------
/OUT
*LIST,vmc1,vrt