VM184 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM184
/PREP7
smrt,off
/TITLE, VM184, STRAIGHT CANTILEVER BEAM
C***  ANY BASIC MECHANICS OF MATERIALS TEXT
C***  USING SOLID5 HEXAHEDRONS
/OUT,SCRATCH
ANTYPE,STATIC         ! STATIC ANALYSIS
ET,1,SOLID5,2         ! MULTI-FIELD SOLID5
MP,EX,1,1E7
MP,NUXY,1,0.3
K,1
K,2,6
KGEN,2,1,2,1,,.2
KGEN,2,1,4,1,,,.1
L,1,2
LESIZE,ALL,,,10
ESIZE,,1
V,1,2,4,3,5,6,8,7
VMESH,1
NSEL,S,LOC,X,0
D,ALL,ALL              ! CONSTRAIN LEFT END
NSEL,ALL
FK,2,FX,0.25           ! APPLY AXIAL FORCES
*REPEAT,4,2
FINISH
/SOLU    
SOLVE
FKDELE,ALL,FX          ! DELETE AXIAL FORCES
FK,2,FY,0.25           ! APPLY IN-PLANE LOADS
*REPEAT,4,2
SOLVE
FKDELE,ALL,FY          ! DELETE IN-PLANE LOADS
FK,2,FZ,0.25           ! APPLY OUT-OF-PLANE LOADS
*REPEAT,4,2
SOLVE
FINISH
/POST1                 ! PRINT END DISPLACEMENTS AS RATIO OF Mechanical APDL:TARGET
CSYS,0
*CREATE,MAC            ! DEFINE MACRO TO CALCULATE Mechanical APDL:TARGET RATIOS
SET,ARG1,1
LCDEF,ARG1,ARG1
NSEL,S,LOC,X,6         ! SELECT NODE AT END OF BEAM
PRNSOL,U,COMP          ! PRINT DISPLACEMENTS
LCFACT,ARG1,ARG2       ! APPLY SCALE FACTOR "ARG2" TO LOAD CASE 1
LCASE,ARG1
PRNSOL,U,COMP          ! PRINT DISPLACEMENTS
*END
/COM                   *** USE MACRO TO PROCESS ALL 3 LOADCASES  ***
*USE,MAC,1,(1/3E-5)
SET,1,1
LCSEL,S,0,0
N1=NODE(6,0,0)
*GET,UX1,NODE,N1,U,X
*USE,MAC,2,(1/.108)
SET,2,1
LCSEL,S,0,0
*GET,UY1,NODE,N1,U,Y
*USE,MAC,3,(1/.432)
SET,3,1
LCSEL,S,0,0
*GET,UZ1,NODE,N1,U,Z
*DIM,LABEL,CHAR,3,2
*DIM,VALUE,,3,3
LABEL(1,1) = 'DEFL X ','DEFL Y ','DEFL Z '
LABEL(1,2) = 'in','in','in'
*VFILL,VALUE(1,1),DATA,3E-5,.108,.432
*VFILL,VALUE(1,2),DATA,UX1,UY1,UZ1
*VFILL,VALUE(1,3),DATA,ABS(UX1/(3E-5)),ABS(UY1/.108),ABS(UZ1/.432)
SAVE,TABLE_1
FINISH
/CLEAR, NOSTART 
/PREP7
smrt,off
MOPT,VMESH,MAIN
MOPT,AMESH,ALTE
/TITLE, VM184, STRAIGHT CANTILEVER BEAM
C***  USING SOLID92 TETRAHEDRONS
ANTYPE,STATIC          ! STATIC ANALYSIS
ET,1,SOLID92           ! STRUCTURAL SOLID92
MP,EX,1,1E7
MP,NUXY,1,0.3
K,1
K,2,,.2
KGEN,2,1,2,1,,,.1
KGEN,2,1,4,1,(2/3)
ESIZE,,1
V,1,2,4,3,5,6,8,7
VMESH,1
VGEN,9,1,1,1,(2/3),,,4 ! GENERATE 9 VOLUMES TO COMPLETE BEAM
NSEL,S,LOC,X,0
D,ALL,ALL              ! CONSTRAIN LEFT END
SAVE
/COM                   *** GET NODE NUMBERS FOR LOAD APPLICATION ***
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.05
*GET,MIDD,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.2
NSEL,R,LOC,Z,.05
*GET,TOPP,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.0
NSEL,R,LOC,Z,.05
*GET,BOTT,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.10
*GET,LFT,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.00
*GET,RGHT,NDMX
NSEL,ALL
/COM                   *** APPLY LOADS TO PARAMETRIC NODE NUMBERS ***
F,RGHT,FX,(1/6)
F,LFT,FX,(1/6)
F,TOPP,FX,(1/6)
F,BOTT,FX,(1/6)
F,MIDD,FX,(1/3)
FINISH
/SOLU    
SOLVE
FDELE,ALL              ! REMOVE ALL FORCES
F,RGHT,FY,(1/6)
F,LFT,FY,(1/6)
F,TOPP,FY,(1/6)
F,BOTT,FY,(1/6)
F,MIDD,FY,(1/3)
SOLVE
FDELE,ALL              ! REMOVE ALL FORCES
F,RGHT,FZ,(1/6)
F,LFT,FZ,(1/6)
F,TOPP,FZ,(1/6)
F,BOTT,FZ,(1/6)
F,MIDD,FZ,(1/3)
SOLVE
FINISH
/POST1                 ! PRINT END DISPLACEMENTS AS RATIO OF Mechanical APDL:TARGET
/COM                   *** USE MACRO TO PROCESS ALL 3 LOADCASES  ***
*USE,MAC,1,(1/3E-5)
SET,1,1
LCSEL,S,0,0
N1=NODE(6,0,0)
*GET,UX2,NODE,N1,U,X
*USE,MAC,2,(1/.108)
SET,2,1
LCSEL,S,0,0
*GET,UY2,NODE,N1,U,Y
*USE,MAC,3,(1/.432)
SET,3,1
LCSEL,S,0,0
*GET,UZ2,NODE,N1,U,Z
*DIM,LABEL,CHAR,3,2
*DIM,VALUE,,3,3
LABEL(1,1) = 'DEFL X ','DEFL Y ','DEFL Z '
LABEL(1,2) = 'in','in','in'
*VFILL,VALUE(1,1),DATA,3E-5,.108,.432
*VFILL,VALUE(1,2),DATA,UX2,UY2,UZ2
*VFILL,VALUE(1,3),DATA,ABS(UX2/(3E-5)),ABS(UY2/.108),ABS(UZ2/.432)
SAVE,TABLE_2
FINISH
/CLEAR, NOSTART 
/PREP7
smrt,off
MOPT,VMESH,MAIN
MOPT,AMESH,ALTE
/COM                   *** REPEAT USING SOLID98 TETRAHEDRONS ***
RESUME                 ! RESTORE PREP7 DATABASE
ET,1,SOLID98,2         ! MULTI-FIELD SOLID98
/COM                   *** GET NODE NUMBERS FOR LOAD APPLICATION ***
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.05
*GET,MIDD,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.2
NSEL,R,LOC,Z,.05
*GET,TOPP,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.0
NSEL,R,LOC,Z,.05
*GET,BOTT,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.10
*GET,LFT,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.0
*GET,RGHT,NDMX
NSEL,ALL
/COM                   *** APPLY LOADS TO PARAMETRIC NODE NUMBERS ***
F,RGHT,FX,(1/6)
F,LFT,FX,(1/6)
F,TOPP,FX,(1/6)
F,BOTT,FX,(1/6)
F,MIDD,FX,(1/3)
FINISH
/SOLU    
SOLVE
FDELE,ALL              ! REMOVE ALL FORCES
F,RGHT,FY,(1/6)
F,LFT,FY,(1/6)
F,TOPP,FY,(1/6)
F,BOTT,FY,(1/6)
F,MIDD,FY,(1/3)
SOLVE
FDELE,ALL              ! REMOVE ALL FORCES
F,RGHT,FZ,(1/6)
F,LFT,FZ,(1/6)
F,TOPP,FZ,(1/6)
F,BOTT,FZ,(1/6)
F,MIDD,FZ,(1/3)
SOLVE
FINISH
/POST1                 ! PRINT END DISPLACEMENTS AS RATIO OF Mechanical APDL:THEORY
/COM                   *** USE MACRO TO PROCESS ALL 3 LOADCASES  ***
*USE,MAC,1,(1/3E-5)
SET,1,1
LCSEL,S,0,0
N1=NODE(6,0,0)
*GET,UX3,NODE,N1,U,X
*USE,MAC,2,(1/.108)
SET,2,1
LCSEL,S,0,0
*GET,UY3,NODE,N1,U,Y
*USE,MAC,3,(1/.432)
SET,3,1
LCSEL,S,0,0
*GET,UZ3,NODE,N1,U,Z
*DIM,LABEL,CHAR,3,2
*DIM,VALUE,,3,3
LABEL(1,1) = 'DEFL X ','DEFL Y ','DEFL Z '
LABEL(1,2) = 'in','in','in'
*VFILL,VALUE(1,1),DATA,3E-5,.108,.432
*VFILL,VALUE(1,2),DATA,UX3,UY3,UZ3
*VFILL,VALUE(1,3),DATA,ABS(UX3/(3E-5)),ABS(UY3/.108),ABS(UZ3/.432)
SAVE,TABLE_3
FINISH
/CLEAR,NOSTART
/PREP7
smrt,off
MOPT,VMESH,MAIN
MOPT,AMESH,ALTE
/TITLE, VM184, STRAIGHT CANTILEVER BEAM
C***  USING SOLID187 TETRAHEDRONS
ANTYPE,STATIC          ! STATIC ANALYSIS
ET,1,SOLID187           ! STRUCTURAL SOLID92
MP,EX,1,1E7
MP,NUXY,1,0.3
K,1
K,2,,.2
KGEN,2,1,2,1,,,.1
KGEN,2,1,4,1,(2/3)
ESIZE,,1
V,1,2,4,3,5,6,8,7
VMESH,1
VGEN,9,1,1,1,(2/3),,,4 ! GENERATE 9 VOLUMES TO COMPLETE BEAM
NSEL,S,LOC,X,0
D,ALL,ALL              ! CONSTRAIN LEFT END
SAVE
/COM                   *** GET NODE NUMBERS FOR LOAD APPLICATION ***
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.05
*GET,MIDD,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.2
NSEL,R,LOC,Z,.05
*GET,TOPP,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.0
NSEL,R,LOC,Z,.05
*GET,BOTT,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.10
*GET,LFT,NDMX
NSEL,S,LOC,X,6
NSEL,R,LOC,Y,.1
NSEL,R,LOC,Z,.00
*GET,RGHT,NDMX
NSEL,ALL
/COM                   *** APPLY LOADS TO PARAMETRIC NODE NUMBERS ***
F,RGHT,FX,(1/6)
F,LFT,FX,(1/6)
F,TOPP,FX,(1/6)
F,BOTT,FX,(1/6)
F,MIDD,FX,(1/3)
FINISH
/SOLU    
SOLVE
FDELE,ALL              ! REMOVE ALL FORCES
F,RGHT,FY,(1/6)
F,LFT,FY,(1/6)
F,TOPP,FY,(1/6)
F,BOTT,FY,(1/6)
F,MIDD,FY,(1/3)
SOLVE
FDELE,ALL              ! REMOVE ALL FORCES
F,RGHT,FZ,(1/6)
F,LFT,FZ,(1/6)
F,TOPP,FZ,(1/6)
F,BOTT,FZ,(1/6)
F,MIDD,FZ,(1/3)
SOLVE
FINISH
/POST1                 ! PRINT END DISPLACEMENTS AS RATIO OF Mechanical APDL:TARGET
/COM                   *** USE MACRO TO PROCESS ALL 3 LOADCASES  ***
*USE,MAC,1,(1/3E-5)
SET,1,1
LCSEL,S,0,0
N1=NODE(6,0,0)
*GET,UX2,NODE,N1,U,X
*USE,MAC,2,(1/.108)
SET,2,1
LCSEL,S,0,0
*GET,UY2,NODE,N1,U,Y
*USE,MAC,3,(1/.432)
SET,3,1
LCSEL,S,0,0
*GET,UZ2,NODE,N1,U,Z
*DIM,LABEL,CHAR,3,2
*DIM,VALUE,,3,3
LABEL(1,1) = 'DEFL X ','DEFL Y ','DEFL Z '
LABEL(1,2) = 'in','in','in'
*VFILL,VALUE(1,1),DATA,3E-5,.108,.432
*VFILL,VALUE(1,2),DATA,UX2,UY2,UZ2
*VFILL,VALUE(1,3),DATA,ABS(UX2/(3E-5)),ABS(UY2/.108),ABS(UZ2/.432)
SAVE,TABLE_4
RESUME,TABLE_1
/COM                   *** CLIPPED AND CAPPED DISPLAY OF STRESS CONTOURS  ***
NSEL,ALL
/VIEW,1,2,1,1
EPLOT                  ! ELEMENT PLOT
/TYPE,1,CAP            ! DISPLAY TYPE CAP
/DIST,1,.2
/FOCUS,1,.3,.15,.09    ! SET FOCUS FOR SECTION LOCATION
PLNSOL,S,X             ! STRESS CONTOUR PLOT
/COM
/OUT,vm184,vrt
/COM,------------------- VM184 RESULTS COMPARISON ------------
/COM,
/COM,                      TARGET   |    Mechanical APDL   |    RATIO
/COM, SOLID5
/COM,
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F11.3,'  ',F15.3,'   ',1F16.2)
/NOPR
RESUME,TABLE_2
/GOPR
/COM,
/COM, SOLID92
/COM,
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F11.3,'  ',F15.3,'   ',1F16.2)
/NOPR
RESUME,TABLE_3
/GOPR
/COM,
/COM, SOLID98
/COM,
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F11.3,'  ',F15.3,'   ',1F16.2)
/NOPR
RESUME,TABLE_4
/GOPR
/COM,
/COM, SOLID187
/COM,
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F11.3,'  ',F15.3,'   ',1F16.2)
/COM,---------------------------------------------------------
/OUT
FINISH
/DELETE,MAC
/DELETE,TABLE_1
/DELETE,TABLE_2
/DELETE,TABLE_3
/DELETE,TABLE_4
*LIST,vm184,vrt