!
!   TITLE:  harmonic_solv2.mac (SOLVE)
!
! Cylindrical rod of length 20 inches and 1.00 inch diameter cantilevered such
! that the cantilevered end is vibrated sinusoidally with an amplitude of 2.00
! inches in a frequency range from 0 to 10000 Hz.  A damping ratio (DMPRAT) of
! 0.05 is used for this system.  A FULL harmonic analysis is calculated for 
! frequency steps (fstep) of 100 Hz increments.
!
!  
/COM,ANSYS RELEASE  5.4    UP19970828         16:53:05    01/06/2000
/input,start,ans     ,/export/cae/ansys54/docu/,,,,,,,,,,,,,,,,1
/prep7

!  
ET,1,PLANE42
ET,2,SOLID45
!  
/units,bin
!  
UIMP,1,EX, , ,30e6,
UIMP,1,DENS, , ,.101/386.4,
UIMP,1,NUXY, , ,0.33,
!
k,,0.5,0
k,,0,0.5
k,,-0.5,0
k,,0,-0.5
!   
csys,1
!  
l,1,2
l,2,3
l,3,4
l,4,1
a,1,2,3,4
!  
LESIZE,ALL, , ,4,1,1
!
MSHKEY,1
AMESH,all
!
/VIEW, 1 ,1,1,1
/ANG, 1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/FOC, 1 ,-0.300000,,,1
/REP,FAST
!   
ESIZE,0,4*20,
TYPE,   2
MAT,       1
REAL,
ESYS,       0
!  
VOFFST,1,20, ,
!  
/ZOOM, 1 ,BACK
/DIST, 1 ,1.371742,1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/DIST, 1 ,1.371742,1
/REP,FAST
/FOC,  1, -3.109    , -2.586    ,  5.695
/REPLO
!  
/title,Harmonic Analysis Trial, Damping Ratio of 0.05, UX Constraint
/REPLOT
! 
ALLSEL,ALL
VSEL,ALL
ASEL,ALL
LSEL,ALL
KSEL,ALL
ESEL,ALL
NSEL,ALL
!
eplot
!
/solu
!
maxf=10000          ! MAXIMUM FREQUENCY IN RANGE
minf=0          ! MINIMUM FREQUENCY IN RANGE
fstep=100               ! NUMBER OF FREQUENCIES PER STEP
numinc=(maxf-minf)/fstep    ! NUMBER OF INCREMENTS IN FREQUENCY RANGE
!
antype,harmic       ! harmonic response element
hropt,full      ! full harmonic response
hrout,off       ! print results as amplitudes & phase angles
outpr,basic,1
nsubst,numinc       ! 100 intervals in range
harfrq,minf,maxf    ! frequency range 0 to 100 Hz
kbc,1
dmprat,0.05     ! step boundary condition
!d,all,uz       ! constrain all z DOF
!d,all,ux       ! constrain all x DOF
!
nsel,s,loc,z,0,,
d,all,uy,2.00
nsel,all
solve
finish
!
/post26
!
csys,0              ! Selected node 1
nsel,s,loc,z,20,,
nsel,r,loc,y,0.5,,
*get,n1,node,,num,max
!
nsel,s,loc,z,4,,        ! Selected node 2
nsel,r,loc,y,0.5,,
*get,n2,node,,num,max
!
nsel,s,loc,z,8,,        ! Selected node 3
nsel,r,loc,y,0.5,,
*get,n3,node,,num,max
!
nsel,s,loc,z,12,,       ! Selected node 4
nsel,r,loc,y,0.5,,
*get,n4,node,,num,max
!
nsel,s,loc,z,16,,       ! Selected node 5
nsel,r,loc,y,0.5,,
*get,n5,node,,num,max
!
nsel,all
!
nsol,2,n1,u,y,disp1
nsol,3,n2,u,y,disp2
nsol,4,n3,u,y,disp3
nsol,5,n4,u,y,disp4
nsol,6,n5,u,y,disp5
!plcplx,3
/grid,1
/axlab,x,freq (Hz)
/axlab,y,Y displacement
prnsol,u,y
plvar,2,3,4,5,6
!   
finish