!
! File: \\e-mag.asheville.kearfott.com\sl\eng\beam1.des
!
! Perform a modal analysis on a simple pipe with pinned ends.
!
! Set the number of elements below (nel_beam) and the pipe properties
! in beam1.des
!
! This macro is useful for determining the effects of changing various
! parameters and comparing the results to Euler's beam equations.
! 
! PIPE16 elements are used.
!
! Written by David Edwards, KGN Engineering,  11-29-98
!

! Blow away current database
fini
/clear,start

! All input and results are written to this file
/out,beam1,out

! Model Parameters
nel_beam=50

! Read in the single beam design file
/inp,beam1,des

/PREP7

ET,1,PIPE16


R,1,odbeam,tbeam

mp,EX,1,emod
mp,GXY,1,gmod
mp,DENS,1,bdens
mp,NUXY,1,bnu


_xinc=lbeam/nel_beam        ! Length of each beam element             

! Create the beam nodes and pipe elements
N,1,0,0,0,,,,
*do,_inode,2,nel_beam+1
    N,_inode,(_inode-1)*_xinc,0,0
    E,_inode-1,_inode
*enddo

! Uncomment the line below to build the model only.
!*go,:skip

FINISH
/SOLU

ANTYPE,2

MODOPT,SUBSP,10
EQSLV,FRONT
MXPAND,10, , ,1
LUMPM,0
PSTRES,0

MODOPT,SUBSP,10,0,10000, ,OFF
RIGID,
SUBOPT,0,0,0,0,0,ALL
D,1,all,0
D,nel_beam+1,all,0
/STAT,SOLU
SOLVE

:skip

/out