/batch,list
/verify,demonstration_problem2_16_18
JPGPRF,500,100,1
/title,Piping model meshed with PIPE16 and PIPE18 elements

/COM, PIPE16 + PIPE18 

/filnam,16-18

/prep7

et,1,pipe16						! Element 1 - PIPE16 (Straight Pipe Element)

et,2,pipe18						! Element 2 - PIPE18 (Pipe Bend Element)


/com, Real Constants
/com,****************

fact=1.5

r,1,7.288*fact,0.241,0.0,0.0,0.0,0.0	! Outer Diameter, Wall Thickness	
r,2,7.288*fact,0.241,36.30,0.0,0.0,0.0	! Outer Diameter, Wall Thickness, Radius of Curvature


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


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


/com, Nodes
/com,*******

 n,    1,    0.0000,      0.0000,      0.0000       
 n,    2,    0.0000,      54.450,      0.0000       
 n,    3,    0.0000,      18.150,      0.0000       
 n,    4,    0.0000,      36.300,      0.0000       
 n,    5,    0.0000,      108.90,      0.0000       
 n,    6,    0.0000,      72.600,      0.0000       
 n,    7,    0.0000,      90.750,      0.0000       
 n,    8,    36.300,      145.20,      0.0000       
 n,    9,    54.150,      145.20,      0.0000       
 n,   10,    42.250,      145.20,      0.0000       
 n,   11,    48.200,      145.20,      0.0000       
 n,   12,    72.000,      145.20,      0.0000       
 n,   13,    60.100,      145.20,      0.0000       
 n,   14,    66.050,      145.20,      0.0000       
 n,   15,    108.30,      145.20,      36.300       
 n,   16,    108.30,      145.20,      56.800       
 n,   17,    108.30,      145.20,      43.133       
 n,   18,    108.30,      145.20,      49.967       
 n,   19,    108.30,      145.20,      77.300       
 n,   20,    108.30,      145.20,      63.633       
 n,   21,    108.30,      145.20,      70.467       
 n,   22,    10.632,      134.57,      0.0000       
 n,   23,   0.31055,      113.64,      0.0000       
 n,   24,    1.2369,      118.30,      0.0000       
 n,   25,    2.7632,      122.79,      0.0000       
 n,   26,    4.8633,      127.05,      0.0000       
 n,   27,    7.5013,      131.00,      0.0000       
 n,   28,    14.202,      137.70,      0.0000       
 n,   29,    18.150,      140.34,      0.0000       
 n,   30,    22.409,      142.44,      0.0000       
 n,   31,    26.905,      143.96,      0.0000       
 n,   32,    31.562,      144.89,      0.0000       
 n,   33,    97.668,      145.20,      10.632       
 n,   34,    76.737,      145.09,     0.31421       
 n,   35,    81.393,      145.02,      1.2428       
 n,   36,    85.889,      145.00,      2.7698       
 n,   37,    90.148,      145.02,      4.8691       
 n,   38,    94.097,      145.09,      7.5049       
 n,   39,    100.80,      145.10,      14.203       
 n,   40,    103.43,      145.05,      18.152       
 n,   41,    105.53,      145.03,      22.411       
 n,   42,    107.06,      145.05,      26.907       
 n,   43,    107.99,      145.10,      31.563       


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

type,1						
mat,1							
real,1	

e,1,3
e,3,4
e,4,2
e,2,6
e,6,7
e,7,5
e,8,10
e,10,11
e,11,9
e,9,13
e,13,14
e,14,12
e,15,17
e,17,18
e,18,16
e,16,20
e,20,21
e,21,19



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

type,2						
mat,1							
real,2
  
  
e,5,24,7
e,24,26,5
e,26,22,24
e,22,29,26
e,29,31,8
e,31,8,10
e,12,35,14
e,35,37,12
e,37,33,35
e,33,40,37
e,40,42,33
e,42,15,17  
  
 
					
/com, Constraints
/com,*************

d,1,all,0
d,19,all,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,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,spectrum					! Perform Spectrum Analysis
spopt,sprs						! Single Point Excitation Response Spectrum
dmprat,0.02						! 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,16-18,mcom

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

plnsol,u,sum
*get,umax,plnsol,0,max
*get,umin,plnsol,0,min
plnsol,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