/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VMD3
/DEVICE,VECTOR,ON
/TITLE, VMD3, FREE-FREE VIBRATION OF A SOLID BEAM
/COM
/COM BLEVINS "FORMULAS FOR NATURAL FREQUENCY AND MODE SHAPE"
/COM TABLE 8-1, PG. 108, AND TABLE 8-16, PG. 183.
/COM
! ------------------------------------------------------------------------
! PARAMETER KEY:
!
! ETYP - ELEMENT TYPE
! ATYP ANALYSIS OPTION (0=BENDING MODE, 1=AXIAL MODE)
! QUAD '1' IF QUADRILATERAL ELEMENTS
! TRI '1' IF TRIANGULAR HIGHER ORDER ELEMENTS
! BRICK '1' IF BRICK ELEMENTS
! TET '1' IF HIGHER ORDER TET ELEMENTS
! LOW '1' LOWER ORDER QUAD OR BRICK ELEMENTS
! HIGH '1' HIGHER ORDER QUAD OR BRICK ELEMENTS
! AD ANALYSIS TYPE (2=2D, 3=3D)
!
! NOTE: FOR QUAD, TRI, BRICK, AND TET ELEMENTS: ONLY ONE BE ACTIVE ('1').
! LOW OR HIGH ARE APPLICABLE ONLY FOR QUAD OR BRICK ELEMENTS. SET
! LOW AND HIGH TO ZERO FOR TRI AND TET ELEMENTS.
! -----------------------------------------------------------------------
/NOPR
/OUTPUT,SCRATCH
*DIM,NF,,7,6
*DIM,LAB,CHAR,7
LAB(1)='RECT' $ LAB(2)='TRAP 15' $ LAB(3)='TRAP 30' $ LAB(4)='TRAP 45'
LAB(5)='PARL 15' $ LAB(6)='PARL 30' $ LAB(7)='PARL 45'
*CREATE,MAC1 ! CREATE MACRO TO MODIFY NODES
ARG1=(ARG1*3.141592654)/180.
DELX=(0.1*TAN(ARG1))
NMODIF,ARG2,(1+DELX) $ *REPEAT,3,4,2
NMODIF,ARG3,(2-DELX) $ *REPEAT,2,4,2
NMODIF,ARG4,(1-DELX) $ *REPEAT,3,4,2
NMODIF,ARG5,(2+DELX) $ *REPEAT,2,4,2
*END
*CREATE,MAC2 ! CREATE MACRO TO MODIFY NODES
ARG1=(ARG1*3.141592654)/180.
DELX=(0.1*TAN(ARG1))
NMODIF,ARG2,(1-DELX) $ *REPEAT,5,2,1
NMODIF,ARG3,(1+DELX) $ *REPEAT,5,2,1
*END
*CREATE,MAC3 ! CREATE MACRO TO PERFORM ANALYSIS
/PREP7
ESEL,S,,,E1,E2 ! SELECT APPROPRIATE (MODEL) ELEMENTS
NSLE,S $ ESEL,INVERT $ NSEL,INVERT ! SELECT UNUSED NODES & ELEMENTS
DDELE,ALL,ALL ! DELETE EXTRANEOUS CONTRAINTS
EDELE,ALL $ NDELE,ALL ! " " NODES & ELEMENTS
NSEL,ALL $ ESEL,ALL
FINISH
/SOLU
ANTYPE,MODAL ! MODAL ANALYSIS
MODOPT,LANB,2 ! LANB EXTRACTION METHOD
MXPAND,2 ! EXPAND FIRST MODE
SOLVE
FINISH
/POST1
*IF,ATYP,EQ,1,THEN
SET,,2 ! SKIP 1ST FREQUENCY - RIGID BODY MOTION
*ELSE
SET,,1
*ENDIF
*GET,NF1,ACTIVE,,SET,FREQ ! GET 1ST NATURAL FREQUENCY
NF(ARG1,J)=NF1/TF ! NORMALIZE
FINISH
E1=E2+1 ! INCREMENT ELEMENTS
E2=E2+EINC
PARSAV,ALL ! SAVE PARAMETES
RESUME ! RESTORE DATABASE
PARRES ! RESTORE PARAMETERS
*END
*DO,I,1,2
*IF,I,EQ,1,THEN ! AXIAL MODE
ATYP=0 $ MTYPE='AXIAL'
*ELSE ! BENDING MODE
ATYP=1 $ MTYPE='BENDING'
*ENDIF
*DO,J,1,5
*IF,J,EQ,1,THEN ! PLANE183
ETYP=183 $ QUAD=1 $ TRI=0 $ BRICK=0 $ TET=0 $ LOW=0 $ HIGH=1 $ AD=2
*ELSEIF,J,EQ,2,THEN ! PLANE 182
ETYP=182 $ QUAD=1 $ TRI=0 $ BRICK=0 $ TET=0 $ LOW=1 $ HIGH=0 $ AD=2
*ELSEIF,J,EQ,3,THEN ! SOLID185
ETYP=185 $ QUAD=0 $ TRI=0 $ BRICK=1 $ TET=0 $ LOW=1 $ HIGH=0 $ AD=3
*ELSEIF,J,EQ,4,THEN ! SOLID187
ETYP=187 $ QUAD=0 $ TRI=0 $ BRICK=0 $ TET=1 $ LOW=0 $ HIGH=0 $ AD=3
*ELSEIF,J,EQ,5,THEN ! SOLID186
ETYP=186 $ QUAD=0 $ TRI=0 $ BRICK=1 $ TET=0 $ LOW=0 $ HIGH=1 $ AD=3
*ENDIF
/PREP7
*IF,BRICK,EQ,1,AND,LOW,EQ,1,THEN
ET,1,ETYP,,3 !SIMPLIFIED ENHANCED STRAIN FORMULATION
*ELSEIF,BRICK,EQ,1,AND,HIGH,EQ,1,THEN
ET,1,ETYP,,1 !FULL INTEGRATION
*ELSEIF,TET,EQ,1,THEN
ET,1,ETYP
*ELSEIF,QUAD,EQ,1,AND,LOW,EQ,1,THEN
ET,1,ETYP,3,,3 !ENHANCED STRAIN FORMULATION
*ELSE
ET,1,ETYP,,,3
*ENDIF
R,1,.1
MP,EX,1,200E9 ! MATERIAL PROPERTIES
MP,NUXY,1,0.3
MP,DENS,1,8000
N,1 $ N,13,6,0
FILL,1,13,5,3,2
NGEN,3,20,1,13,2,0,0.1,0 ! DEFINE CORNER NODES
NGEN,4,200,1,53,2,0,0,0 ! DEFINE NODES FOR TRAPIZOIDAL ELEMENTS
*USE,MAC1,15,203,205,243,245 ! MODIFY NODE LOCATIONS
*USE,MAC1,30,403,405,443,445
*USE,MAC1,45,603,605,643,645
NGEN,2,800,1,53,2,0,0,0 ! DEFINE NODES FOR PARALLALOGRAM ELEMENTS
NGEN,3,200,801,853,2
*USE,MAC2,15,803,843 ! MODIFY NODE LOCATIONS
*USE,MAC2,30,1003,1043
*USE,MAC2,45,1203,1243
*IF,QUAD,EQ,1,THEN ! QUAD ELEMENT
E,1,3,43,41
EGEN,6,2,-1
EGEN,4,200,-6
EGEN,4,200,-6
*IF,HIGH,EQ,1,THEN
EMID
*ENDIF
EPLOT
*ENDIF
*IF,TRI,EQ,1,THEN ! HIGHER ORDER TRIANGLE ELEMENT
E,1,3,41
E,3,43,41
EGEN,6,2,-2
EGEN,4,200,-12
EGEN,4,200,-12
EMID
EPLOT
*ENDIF
*IF,BRICK,EQ,1,THEN ! BRICK ELEMENT
NGEN,2,1300,1,1353,1,,,.1
E,1,3,43,41,1301,1303,1343,1341
EGEN,6,2,-1
EGEN,4,200,-6
EGEN,4,200,-6
*IF,HIGH,EQ,1,THEN
EMID
*ENDIF
EPLOT
*ENDIF
*IF,TET,EQ,1,THEN ! HIGHER ORDER TET ELEMENT
NGEN,2,1300,1,1353,1,,,.1
E,1,1301,1303,1341
E,1,1303,3,43
E,1303,1343,43,1341
E,1,1303,43,1341
E,1,43,1341,41
E,3,1303,5,43
E,1303,1305,5,1345
E,1303,5,43,1345
E,5,43,1345,45
E,1303,1345,43,1343
EGEN,3,4,-10
EGEN,4,200,-30
EGEN,4,200,-30
EMID
EPLOT
*ENDIF
NSLE,S ! SELECT AND DELETE UNNECESSARY NODES
NSEL,INVERT
NDELE,ALL
NSEL,ALL
NSEL,S,LOC,X,6 ! SYMMETRY CONSTRAINTS
DSYMM,SYMM,X
*IF,TET,EQ,1,THEN ! PREVENT OUT-OF-PLANE DISP (3D)
NSEL,S,LOC,Z,0 $ D,ALL,UZ,0 $ NSEL,ALL
*ELSEIF,BRICK,EQ,1,THEN
NSEL,S,LOC,Z,0 $ D,ALL,UZ,0 $ NSEL,ALL
*ENDIF
*IF,ATYP,EQ,1,THEN
TF=7.138 ! TARGET FREQUENCY - BENDING MODE
*ELSE
TF=208.333 ! TARGET FREQUENCY - AXIAL MODE
NSEL,S,LOC,Y,0 $ D,ALL,UY,0 $ NSEL,ALL
NSEL,U,LOC,Y,0 $ NSEL,U,LOC,X,6
*IF,AD,EQ,3,THEN
NSEL,U,LOC,Z,0
*ENDIF
NSEL,ALL
*ENDIF
*IF,TRI,EQ,1,THEN
EINC=12
*ELSEIF,TET,EQ,1,THEN
EINC=30
*ELSE
EINC=6
*ENDIF
SAVE
FINISH
E1=1 $ E2=EINC
/TITLE, MODAL ANALYSIS - RECTANGULAR ELEMENTS
*USE,MAC3,1
/TITLE, MODAL ANALYSIS - TRAPEZOIDAL ELEMENTS - 15 DEG.
*USE,MAC3,2
/TITLE, MODAL ANALYSIS - TRAPEZOIDAL ELEMENTS - 30 DEG.
*USE,MAC3,3
/TITLE, MODAL ANALYSIS - TRAPEZOIDAL ELEMENTS - 45 DEG.
*USE,MAC3,4
/TITLE, MODAL ANALYSIS - PARALLELOGRAM ELEMENTS - 15 DEG.
*USE,MAC3,5
/TITLE, MODAL ANALYSIS - PARALLELOGRAM ELEMENTS - 30 DEG.
*USE,MAC3,6
/TITLE, MODAL ANALYSIS - PARALLELOGRAM ELEMENTS - 45 DEG.
*USE,MAC3,7
*STAT,NF
PARSAV,ALL
/clear, nostart
PARRES
*IF,J,EQ,5,THEN
/OUT
/COM
/COM
/COM
*MSG,INFO,MTYPE
MODE: %C
/COM
/COM 1ST NATURAL FREQUENCY RATIO
/COM
/COM SHAPE | PLANE183 PLANE182 SOLID185 SOLID187 SOLID186
/COM ----------------------------------------------------------------
*VWRITE,LAB(1),NF(1,1),NF(1,2),NF(1,3),NF(1,4),NF(1,5)
(2X,A8,2X,6(F6.3,3X))
*ENDIF
/OUT,SCRATCH
*ENDDO
*ENDDO
/OUT
/TITLE, VMD3, FREE-FREE VIBRATION OF A SOLID BEAM
/COM
/COM BLEVINS "FORMULAS FOR NATURAL FREQUENCY AND MODE SHAPE"
/COM TABLE 8-1, PG. 108, AND TABLE 8-16, PG. 183.
/COM
/NOPR
/OUTPUT,SCRATCH
*DIM,NF,,7,6
*DIM,LAB,CHAR,7
LAB(1)='RECT' $ LAB(2)='TRAP 15' $ LAB(3)='TRAP 30' $ LAB(4)='TRAP 45'
LAB(5)='PARL 15' $ LAB(6)='PARL 30' $ LAB(7)='PARL 45'
*CREATE,MAC1 ! CREATE MACRO TO MODIFY NODES
ARG1=(ARG1*3.141592654)/180.
DELX=(0.1*TAN(ARG1))
NMODIF,ARG2,(1+DELX) $ *REPEAT,3,4,2
NMODIF,ARG3,(2-DELX) $ *REPEAT,2,4,2
NMODIF,ARG4,(1-DELX) $ *REPEAT,3,4,2
NMODIF,ARG5,(2+DELX) $ *REPEAT,2,4,2
*END
*CREATE,MAC2 ! CREATE MACRO TO MODIFY NODES
ARG1=(ARG1*3.141592654)/180.
DELX=(0.1*TAN(ARG1))
NMODIF,ARG2,(1-DELX) $ *REPEAT,5,2,1
NMODIF,ARG3,(1+DELX) $ *REPEAT,5,2,1
*END
*CREATE,MAC3 ! CREATE MACRO TO PERFORM ANALYSIS
/PREP7
ESEL,S,,,E1,E2 ! SELECT APPROPRIATE (MODEL) ELEMENTS
NSLE,S $ ESEL,INVERT $ NSEL,INVERT ! SELECT UNUSED NODES & ELEMENTS
DDELE,ALL,ALL ! DELETE EXTRANEOUS CONSTRAINTS
EDELE,ALL $ NDELE,ALL ! " " NODES & ELEMENTS
NSEL,ALL $ ESEL,ALL
FINISH
/SOLU
ANTYPE,MODAL ! MODAL ANALYSIS
MODOPT,LANB,2 ! LANB EXTRACTION METHOD
MXPAND,2 ! EXPAND FIRST MODE
SOLVE ! PERFORM MODAL ANALYSIS
FINISH
/POST1
*IF,ATYP,EQ,1,THEN
SET,,2 ! SKIP 1ST MODE - RIGID BODY MOTION
*ELSE
SET,,1
*ENDIF
*GET,NF1,ACTIVE,,SET,FREQ ! GET 1ST NATURAL FREQUENCY
NF(ARG1,1)=NF1/TF ! NORMALIZE
FINISH
E1=E2+1 ! INCREMENT ELEMENTS
E2=E2+EINC
PARSAV,ALL ! SAVE PARAMETERS
RESUME ! RESTORE DATABASE
PARRES ! RESTORE PARAMETERS
*END
ETYP=183
ATYP=0 ! 0=BENDING MODE, 1=AXIAL MODE
/PREP7
ET,1,ETYP,1,,3
R,1,.1
MP,EX,1,200E9 ! MATERIAL PROPERTIES
MP,NUXY,1,0.3
MP,DENS,1,8000
N,1 $ N,13,6,0
FILL,1,13,5,3,2
NGEN,3,20,1,13,2,0,0.1,0 ! DEFINE CORNER NODES
NGEN,4,200,1,53,2,0,0,0 ! DEFINE NODES FOR TRAPEZOIDAL ELEMENTS
*USE,MAC1,15,203,205,243,245 ! MODIFY NODE LOCATIONS
*USE,MAC1,30,403,405,443,445
*USE,MAC1,45,603,605,643,645
NGEN,2,800,1,53,2,0,0,0 ! DEFINE NODES FOR PARALLELOGRAM ELEMENTS
NGEN,3,200,801,853,2
*USE,MAC2,15,803,843 ! MODIFY NODE LOCATIONS
*USE,MAC2,30,1003,1043
*USE,MAC2,45,1203,1243
E,1,3,41 ! ELEMENT GENERATION
E,3,43,41
EGEN,6,2,-2
EGEN,4,200,-12
EGEN,4,200,-12
EMID
NSLE,S ! SELECT AND DELETE UNNECESSARY NODES
NSEL,INVERT
NDELE,ALL
NSEL,ALL
NSEL,S,LOC,X,6 ! SYMMETRY CONSTRAINTS
DSYMM,SYMM,X
*IF,ATYP,EQ,1,THEN
TF=7.138 ! TARGET FREQUENCY - BENDING MODE
*ELSE
TF=208.333 ! TARGET FREQUENCY - AXIAL MODE
NSEL,S,LOC,Y,0 $ D,ALL,UY,0 $ NSEL,ALL
NSEL,U,LOC,Y,0 $ NSEL,U,LOC,X,6
NSEL,ALL
*ENDIF
EINC=12
SAVE
FINISH
E1=1 $ E2=EINC
/TITLE, MODAL ANALYSIS - RECTANGULAR ELEMENTS
*USE,MAC3,1
/TITLE, MODAL ANALYSIS - TRAPEZOIDAL ELEMENTS - 15 DEG.
*USE,MAC3,2
/TITLE, MODAL ANALYSIS - TRAPEZOIDAL ELEMENTS - 30 DEG.
*USE,MAC3,3
/TITLE, MODAL ANALYSIS - TRAPEZOIDAL ELEMENTS - 45 DEG.
*USE,MAC3,4
/TITLE, MODAL ANALYSIS - PARALLELOGRAM ELEMENTS - 15 DEG.
*USE,MAC3,5
/TITLE, MODAL ANALYSIS - PARALLELOGRAM ELEMENTS - 30 DEG.
*USE,MAC3,6
/TITLE, MODAL ANALYSIS - PARALLELOGRAM ELEMENTS - 45 DEG.
*USE,MAC3,7
/OUTPUT
/COM
/COM 1ST NATURAL FREQUENCY RATIO
/COM
/COM SHAPE | RATIO
/COM -----------------------
*VWRITE,LAB(1),NF(1,1)
(2X,A8,6X,F6.3)