VM239 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM239
/OUT,SCRATCH
/PREP7
/OUT
/COM
/TITLE, VM239, MECHANICS OF THE REVOLUTE AND UNIVERSAL JOINTS
/COM
/COM
/COM    J.E. SHIGLEY AND J.J. UICKER, "THEORY OF MACHINES AND
/COM    MECHANISMS" 2ND EDITION, P. 115, 1995.
/COM
/COM ***ANALYSIS USING ALL FLEXIBLE BODIES
/COM
/COM
!C*** ADD UNIVERSAL JOINT MECHANISM TO THE ABOVE PROBLEM.
!C*** PERFORM ANALYSIS USING ALL FLEXIBLE BODIES
/OUT,SCRATCH
PI=4*ATAN(1.0)
MULT  = 12
PI15  = PI/MULT
ANG   = PI15*3
R = .5                               ! LENGTH OF ROTATING ARM
L = 1.5                              ! LENGTH OF CRANK
ZDIST = L*SIN(ACOS(R/L))
!C*** DEFINING ELEMENTS AND MATERIAL PROPERTIES
ET,1,BEAM188                         ! BEAM ELEMENTS
ET,2,MPC184,7                        ! UNIVERSAL JOINT
ET,3,MPC184,6                        ! REVOLUTE JOINT
ET,4,MPC184,3                        ! SLIDER
MP,EX,1,30E6
MP,PRXY,1,0.33
MP,DENS,1,10.0
TYPE,1
MAT, 1
SECTYPE, 1, BEAM, CSOLID
SECDATA, .05
!C*** CREATING NODES AND LINK ELEMENTS
N,1, 0,0,0
N,2, 1,0,0
N,3, 1,0,0
N,4, 1+COS(ANG), SIN(ANG), 0.0
N,5, 1+COS(ANG), SIN(ANG), 0.0
N,6, 2+COS(ANG),SIN(ANG),0
N,8, 2+COS(ANG),.5+SIN(ANG),0
N,9, 2+COS(ANG),.5+SIN(ANG),0
N,10, 2+COS(ANG),SIN(ANG),ZDIST
N,11, 2+COS(ANG),SIN(ANG),.75
N,12, 2+COS(ANG),SIN(ANG),2.25
N,13, 2+COS(ANG),SIN(ANG),2.26
N,14, 2+COS(ANG),SIN(ANG),.74
TYPE,1
MAT, 1
SECNUM, 1
EN,1, 1,2
EN,2, 3,4
EN,3, 5,6
EN,4, 6,8
EN,5, 9,10
EN,6, 11,12
EN,11, 12,13
EN,12, 11,14
LOCAL,11,0, 0,0,0,-90.0         ! DEFINING LOCAL CSYS FOR UNIV. JOINTS
LOCAL,12,0, 0,0,0,-45.0
LOCAL,14,0, 0,0,0, 0,           ! DEFINING LOCAL CSYS FOR REVO. JOINTS
LOCAL,15,0, 0,0,0, 0,
CSLIST
!C*** CREATING UNIVERSAL CONNECTIVITY ELEMENTS
SECTYPE,2,JOIN,UNIV,TESTING02      ! DEFINING UNIVERSAL JOINT
SECJOINT,1,11,12
TYPE,2
SECNUM,2
EN,7, 2,3
SECTYPE,3,JOIN,UNIV,TESTING03      ! DEFINING UNIVERSAL JOINT
SECJOINT,1,11,12
TYPE,2
SECNUM,3
EN,8, 5,4
!C*** CREATING REVOLUTE CONNECTIVITY ELEMENTS
SECTYPE,4,JOIN,REVO,TESTING04      ! DEFINING REVOLUTE JOINT
SECJOINT,,14,15
TYPE,3
SECNUM,4
EN,9, 8,9
!C*** CREATING SLIDER CONNECTIVITY ELEMENTS
TYPE,4
EN,10, 10,11,12
CSYS, 12
NROTAT, 4
CSYS,0
/SOLU                              ! SOLUTION
CSYS,0
ANTYPE, STAT
NLGEOM, ON                         ! LARGE DEFLECTION OPTION
TIME, 1.0
NSUBST, 32, 32, 32
D,1,UX,0,,,,UY,UZ,,ROTY,ROTZ
D,6,UX,0,,,,UY,UZ,,ROTY,ROTZ
NSEL,S,NODE,,13,14,1
D,ALL,ALL
ALLSEL,ALL
D,1,ROTX,2*PI
OUTRES, ALL, ALL
!C*** NOTE: THE FORCES IN THIS PROBLEM ARE REALLY ZERO SINCE
!C*** THIS IS EFFECTIVELY A RIGID BODY ROTATION
CNVTOL,F,1.0 
CNVTOL,M,1.0
SOLVE
FINISH
/POST26 
NUMVAR,200                          ! TIME-HISTORY POSTPROCESSOR
NSOL,2,1,ROT,X,ROTX_1   
NSOL,3,4,ROT,Y,ROTX_4
NSOL,4,6,ROT,X,ROTX_6  
STORE,MERGE
PROD, 5, 2, , , , , , 1.0*180/PI
PROD, 6, 3, , , , , , 1.0*180/PI
PROD, 7, 4, , , , , , 1.0*180/PI
/AXLAB, X, Twist Angle of Driving Shaft
/AXLAB, Y, Twist Angle of Driven Shaft
/XRANGE, 0.0, 360
/YRANGE, 0.0, 360
/GROPT, DIVX, 8
/GROPT, DIVY, 8
XVAR,5
PLVAR,6
PLVAR,7
FINISH
/POST1                             ! GENERAL POSTPROCESSOR
SET,,4
NSEL,S,NODE,,10
*GET,X1,NODE,10,U,Z
ALLSEL,ALL
SET,,8
NSEL,S,NODE,,10
*GET,X2,NODE,10,U,Z
ALLSEL,ALL
SET,,12
NSEL,S,NODE,,10
*GET,X3,NODE,10,U,Z
ALLSEL,ALL
SET,,16
NSEL,S,NODE,,10
*GET,X4,NODE,10,U,Z
ALLSEL,ALL
*DIM,LABEL,CHAR,3
*DIM,VALUE,,3,4
LABEL(1) = 'PI/4','PI/2','3*PI/4'
*VFILL,VALUE(1,1),DATA,0.39708,0.58579,0.39708
*VFILL,VALUE(1,2),DATA,ABS(X1),ABS(X2),ABS(X3)
*VFILL,VALUE(1,3),DATA,ABS(X1/0.39708),ABS(X2/0.58579),ABS(X3/0.39708)
SAVE,TABLE_1
FINISH
/CLEAR,NOSTART
/OUT
/TITLE, VM239, MECHANICS OF THE REVOLUTE AND UNIVERSAL JOINTS
/COM
/COM
/COM *** PERFORM ANALYSIS USING ALL RIGID BODIES
/COM
/COM
/OUT,SCRATCH
/PREP7
PI=4*ATAN(1.0)
MULT  = 12
PI15  = PI/MULT
ANG   = PI15*3
R = .5                               ! LENGTH OF ROTATING ARM
L = 1.5                              ! LENGTH OF CRANK
ZDIST = L*SIN(ACOS(R/L))

C*** DEFINING ELEMENTS, KEY OPTIONS AND MATERIAL PROPERTIES
ET,1,BEAM188                         ! BEAM ELEMENTS
ET,2,MPC184,7                        ! UNIVERSAL JOINT
ET,3,MPC184,6                        ! REVOLUTE JOINT
ET,4,MPC184,3                        ! SLIDER
et,5,MPC184,1,1                      ! RIGID BEAM WITH LAGRANGE MULTIPLIER REDUCTION METHOD

MP,EX,1,30E6
MP,PRXY,1,0.33
MP,DENS,1,10.0

C*** CREATING NODES AND LINK ELEMENTS
N,1, 0,0,0
N,2, 1,0,0
N,3, 1,0,0
N,4, 1+COS(ANG), SIN(ANG), 0.0
N,5, 1+COS(ANG), SIN(ANG), 0.0
N,6, 2+COS(ANG),SIN(ANG),0
N,8, 2+COS(ANG),.5+SIN(ANG),0
N,9, 2+COS(ANG),.5+SIN(ANG),0
N,10, 2+COS(ANG),SIN(ANG),ZDIST
N,11, 2+COS(ANG),SIN(ANG),.75
N,12, 2+COS(ANG),SIN(ANG),2.25
N,13, 2+COS(ANG),SIN(ANG),2.26

! DEFINE RIGID BODIES
TYPE,5
EN,1, 1,2      ! TARGET ELEMENT FOR 1ST RIGID BODY
EN,2, 3,4      ! TARGET ELEMENT FOR 2ND RIGID BODY
EN,3, 6,5
EN,4, 6,8      ! TARGET ELEMENTS FOR 3RD RIGID BODY
EN,5, 10,9     ! TARGET ELEMENT FOR 4TH RIGID BODY
EN,6, 11, 12   ! TARGET ELEMENT FOR 5TH RIGID BODY 
EN,101, 12,13

! COORDINATE SYSTEMS FOR JOINTS
LOCAL,11,0, 0,0,0,-90.0         ! DEFINING LOCAL CSYS FOR UNIV. JOINTS
LOCAL,12,0, 0,0,0,-45.0
LOCAL,14,0, 0,0,0, 0,           ! DEFINING LOCAL CSYS FOR REVO. JOINTS
LOCAL,15,0, 0,0,0, 0,

C*** CREATING UNIVERSAL CONNECTIVITY ELEMENTS
SECTYPE,2,JOIN,UNIV,TESTING02      ! DEFINING UNIVERSAL JOINT
SECJ,1,11,12
TYPE,2
SECNUM,2
EN,7, 2,3
!
SECTYPE,3,JOIN,UNIV,TESTING03      ! DEFINING UNIVERSAL JOINT
SECJ,1,11,12
TYPE,2
SECNUM,3
EN,8, 5,4
!
C*** CREATING REVOLUTE CONNECTIVITY ELEMENTS
SECTYPE,4,JOIN,REVO,TESTING04      ! DEFINING REVOLUTE JOINT
SECJ,,14,15
TYPE,3
SECNUM,4
EN,9, 8,9
!
C*** CREATING SLIDER CONNECTIVITY ELEMENTS
TYPE,4
EN,10, 10,11,12

CSYS, 12
NROTAT, 4
CSYS,0

/SOLU                              ! SOLUTION
CSYS,0
ANTYPE, STAT
NLGEOM, ON                         ! LARGE DEFLECTION OPTION
TIME, 1.0
NSUBST, 32, 6400, 32
D,1,UX,0,,,,UY, UZ
D, 6, UY, 0.0
D, 6, UZ, 0.0
D, 13, UX, 0,,,,UY,UZ,ROTX,ROTY,ROTZ
D,1,ROTX,2*PI
D,1,ROTY
D,1,ROTZ
D,10,ROTY
OUTRES, ALL, ALL
LNSRCH,OFF 
CNVTOL, F
CNVTOL, M
CNVTOL,U 
CNVTOL,ROT
SOLVE
FINISH

/POST26 
NUMVAR,200                          ! TIME-HISTORY POSTPROCESSOR
NSOL,2,1,ROT,X,ROTX_1   
NSOL,3,4,ROT,Y,ROTX_4
NSOL,4,6,ROT,X,ROTX_6
STORE,MERGE
PROD, 5, 2, , , , , , 1.0*180/PI
PROD, 6, 3, , , , , , 1.0*180/PI
PROD, 7, 4, , , , , , 1.0*180/PI
/AXLAB, X, Twist Angle of Driving Shaft
/AXLAB, Y, Twist Angle of Driven Shaft
/XRANGE, 0.0, 360
/YRANGE, 0.0, 360
/GROPT, DIVX, 8
/GROPT, DIVY, 8
XVAR,5
PLVAR,6
PLVAR,7
FINISH
/POST1                             ! GENERAL POSTPROCESSOR
SET,,4
NSEL,S,NODE,,10
*GET,X1,NODE,10,U,Z
ALLSEL,ALL
SET,,8
NSEL,S,NODE,,10
*GET,X2,NODE,10,U,Z
ALLSEL,ALL
SET,,12
NSEL,S,NODE,,10
*GET,X3,NODE,10,U,Z
ALLSEL,ALL
SET,,16
NSEL,S,NODE,,10
*GET,X4,NODE,10,U,Z
ALLSEL,ALL
*DIM,LABEL,CHAR,3
*DIM,VALUE,,3,4
LABEL(1) = 'PI/4','PI/2','3*PI/4'
*VFILL,VALUE(1,1),DATA,0.39708,0.58579,0.39708
*VFILL,VALUE(1,2),DATA,ABS(X1),ABS(X2),ABS(X3)
*VFILL,VALUE(1,3),DATA,ABS(X1/0.39708),ABS(X2/0.58579),ABS(X3/0.39708)
SAVE,TABLE_2
FINISH
RESUME,TABLE_1
/OUT,vm239,vrt
/COM
/COM,------------------ VM239 RESULTS COMPARISON --------------------
/COM,
/COM,    APPLIED ROTX   |   TARGET   |   Mechanical APDL   |   RATIO
/COM,
/COM, RESULTS FOR ANALYSIS WITH ALL FLEXIBLE BODIES
/COM,
*VWRITE,LABEL(1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A12,'       ',F10.5,'  ',F14.5,'     ',1F15.1)
/NOPR
RESUME,TABLE_2
/GOPR
/COM,
/COM, RESULTS FOR ANALYSIS WITH ALL RIGID BODIES
/COM,
*VWRITE,LABEL(1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A12,'       ',F10.5,'  ',F14.5,'     ',1F15.1)
/COM,----------------------------------------------------------------
/OUT
FINISH
*LIST,vm239,vrt