/batch,list
/verify,demonstration_problem2_290
JPGPRF,500,100,1
/title,Piping model meshed with ELBOW290 elements

/COM, ELBOW290

/filnam,290

/prep7

et,1,pipe289					! Element 1 - PIPE289 (Straight Pipe Element)

et,2,elbow290					! Element 2 - ELBOW290 (Elbow Element)
keyopt,2,2,6					! General section deformation is 6					


/com, Section properties
/com,****************

fact = 1.5

sectype,1,pipe					! Pipe section definition
secdata,7.288*fact,0.241,24


/com, Material properties
/com, ********************


mp,ex,1,24e6					
mp,nuxy,1,0.3	
mp,dens,1,0.000125


/com, keypoints
/com,*******

k,1,0.0,0.0,0.0					
k,2,0.0,54.45,0.0
k,3,0.0,108.9,0.0
k,4,10.632,134.568,0.0
k,5,36.3,145.2,0.0
k,6,54.15,145.2,0.0
k,7,72.0,145.2,0.0
k,8,97.668,145.2,10.632
k,9,108.3,145.2,36.3
k,10,108.3,145.2,56.80
k,11,108.3,145.2,77.3

k,12,2.7631,122.79,0
k,13,22.408,142.44,0
k,14,85.9,145,2.76
k,15,106,145,22.4


/com, Lines
/com, ************

l,1,2			
l,2,3			
larc,3,4,12,-36.30
larc,4,5,13,-36.30
l,5,6
l,6,7
larc,7,8,14,-36.30
larc,8,9,15,-36.30
l,9,10
l,10,11


/com, Straight Pipe (Tangent Elements)
/com,**********************************

type,1						
mat,1							
secnum,1
lsel,s,line,,1
lsel,a,line,,10
lesize,all,,,12
lmesh,all
lsel,all

lsel,s,line,,2
lsel,a,line,,5
lsel,a,line,,6
lsel,a,line,,9
lesize,all,,,12
lmesh,all
allsel,all

/com, Bend Pipe Elements
/com,**********************************

type,2						
mat,1							
secnum,1

lsel,s,line,,3
lsel,a,line,,4
lsel,a,line,,7
lsel,a,line,,8

lesize,all,,,12
lmesh,all
allsel,all


/com, Converting all PIPE289 into ELBOW290 elements
/com, *********************************************************

emodif,all,type,2
allsel,all

					
/com, Constraints
/com,*************


ksel,s,,,1
ksel,a,,,11
nslk,s
d,all,all,0
d,all,sect,0

allsel,all
finish

/com,
/com,=============
/com,	Modal Solve
/com,=============
/com,

/solution
antype,modal
outres,all,all					
modopt,lanb,15					! LANB mode extraction method				
mxpand,15,,,yes					! Expand all 15 modes			
solve							
finish	

/post1
set,list						! Frequencies obtained from modal solve
/show,jpeg
/eshape,1
/efacet,2
/view,1,1,1,1
/graphics,power
eplot
/replot
set,1,1
plnsol,u,sum
set,1,2
plnsol,u,sum
set,1,3
plnsol,u,sum
set,1,4
plnsol,u,sum
set,1,5
plnsol,u,sum
set,1,6
plnsol,u,sum
set,1,7
plnsol,u,sum
set,1,8
plnsol,u,sum
set,1,9
plnsol,u,sum
set,1,10
plnsol,u,sum
set,1,11
plnsol,u,sum
set,1,12
plnsol,u,sum
set,1,13
plnsol,u,sum
set,1,14
plnsol,u,sum
set,1,15
plnsol,u,sum
finish


/com,----------------------------------------------------------------------------

/com,
/com,================
/com,	Spectrum Solve
/com,================
/com,

/solution
antype,spectr					! Perform Spectrum Analysis
spopt,sprs						! Single Point Excitation Response Spectrum
dmprat,0.5						! Constant Damping Ratio
grp,0.00						! Group Modes based on significance level
svtyp,2						! Seismic Acceleration Response Loading

sed,1							! Excitation in X direction
freq
freq,3.1,4,5,5.81,7.1,8.77,10.99,14.08,17.24
freq,25,28.5,30,34.97,55,80,140,162,588.93
sv,0.02,400,871,871,700,1188,1188,440,775,775
sv,0.02,533.2,467.2,443.6,380,289,239.4,192.6,184.1,145
solve

sed,,1						! Excitation in Y direction
freq
freq,3.1,4,5,5.81,7.1,8.77,10.99,14.08,17.24
freq,25,28.5,30,34.97,55,80,140,162,588.93
sv,0.02,266.7,580.7,580.7,466.7,792,792,293.3,516.7,516.7
sv,0.02,355.5,311.5,295.7,253.3,192.7,159.6,128.4,122.7,96.7
solve

sed,,,1						! Excitation in Z direction
freq
freq,3.1,4,5,5.81,7.1,8.77,10.99,14.08,17.24
freq,25,28.5,30,34.97,55,80,140,162,588.93
sv,0.02,400,871,871,700,1188,1188,440,775,775
sv,0.02,533.2,467.2,443.6,380,289,239.4,192.6,184.1,145
solve
fini

/com,----------------------------------------------------------------------------

/post1
/input,290,mcom

/com, *========================================================
/com, * Displacement Sum and Equivalent Stress 
/com, *==========================================================			

plnsol,u,sum
*get,umax,plnsol,0,max
*get,umin,plnsol,0,min
plesol,s,eqv
*get,smax,plnsol,0,max
*get,smin,plnsol,0,min
/show,close
*stat,umax
*stat,umin
*stat,smax
*stat,smin
finish
/exit,nosave