vm-nr1677-1-1a-a Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/verify,vm-nr1677-1-1a-a
/title,vm-nr1677-1-1a-a,NRC Piping Benchmark Problems,Volume 1,Problem 1

/com,****************************************************************************
/com,
/com, Reference: Piping Benchmark Problems
/com, 	     NUREG/CR--1677-Vol.1
/com,		     P.Bezier, M.Hartzman, M.Reich
/com,            August 1980
/com, 
/com,  Elements used: Pipe16, Pipe18 and Mass21
/com,
/com, Results comparsion:
/com, The following results are compared against NRC piping benchmark values
/com, 1. Frequencies obtained from modal solution.
/com, 2. Maximum nodal displacements and rotations obtained from spectrum solution.
/com, 3. Element forces/moments obtained from spectrum solution.
/com,****************************************************************************

/out,scratch

/prep7
et,1,pipe16						! Element 1 - PIPE16 (Straight Pipe Element)
et,2,pipe18						! Element 2 - PIPE18 (Pipe Bend Element)
et,3,mass21						! Element 3 - MASS21 (Mass Element)

keyopt,3,3,2					! 3-D Mass without Rotary Inertia

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

r,1,7.288,0.241,0.0,0.0,0.0,0.0		
r,2,7.288,0.241,36.30,0.0,0.0,0.0		

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

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

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

type,1						
mat,1							
real,1						
en,1,1,2						
en,2,2,3
en,5,5,6
en,6,6,7
en,9,9,10
en,10,10,11

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

type,2						
mat,1							
real,2						
en,3,3,4,2						 
en,4,4,5,6
en,7,7,8,6
en,8,8,9,10

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

/com, Real constants for mass element
/com, *******************************

r,12,0.03988					 
r,13,0.05032
r,14,0.02088
r,15,0.01698
r,16,0.01307
r,17,0.01698
r,18,0.01044
r,19,0.01795
r,20,0.01501

/com, Mass Elements
/com,***************

type,3						
real,12						
e,2
							
real,13
e,3

real,14
e,4

real,15
e,5

real,16
e,6

real,17,
e,7

real,18
e,8

real,19
e,9

real,20
e,10

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

d,1,all,0
d,11,all,0

allsel,all
save
finish

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

/solution
antype,modal					
modopt,lanb,5					! LANB mode extraction method				
mxpand,,,,yes					
solve							
save							

/com,===========================
/com, Compare Modal Frequencies
/com,===========================
/com,

*dim,label,,5
*dim,freq_ans,,5
*dim,freq_exp,,5
*dim,freq_err,,5

*do,i,1,5
	label(i)=i
*enddo

*do,i,1,5
	*get,freq_ans(i),mode,i,freq
*enddo

*vfill,freq_exp,data,0.2853e+02,0.5577e+02,0.8150e+02,0.1417e+03,0.1628e+03

*do,i,1,5
	freq_err(i)=abs(freq_ans(i)/freq_exp(i))
*enddo

*status,freq_err
save,table_1
finish						

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

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

/solution
antype,spectr					! Perform Spectrum Analysis
spopt,sprs						! Single Point Excitation Response Spectrum
dmprat,0.02						! Damping Ratio
grp,0.001						! 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,,mcom			

/com, *Labels*
*dim,label2,char,1,6
*dim,label3,char,6,1
*dim,label4,char,6,1

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

label2(1,1) = 'ux_5'
label2(1,2) = 'uy_7'
label2(1,3) = 'uz_4'
label2(1,4) = 'rotx_3'
label2(1,5) = 'roty_7'
label2(1,6) = 'rotz_3'

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

label3(1,1)='PX(I)'
label3(2,1)='VY(I)'
label3(3,1)='VZ(I)'
label3(4,1)='TX(I)'
label3(5,1)='MY(I)'
label3(6,1)='MZ(I)'

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

label4(1,1)='PX(J)'
label4(2,1)='VY(J)'
label4(3,1)='VZ(J)'
label4(4,1)='TX(J)'
label4(5,1)='MY(J)'
label4(6,1)='MZ(J)'

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

/com, *========================================================
/com, * Maximum nodal displacements and rotations comparsion
/com, *==========================================================

/com, Solution obtained from Mechanical APDL
/com, ****************************

*GET,AdisX,NODE,5,U,X
*GET,AdisY,NODE,7,U,Y
*GET,AdisZ,NODE,4,U,Z
*GET,ArotX,NODE,3,ROT,X
*GET,ArotY,NODE,7,ROT,Y
*GET,ArotZ,NODE,3,ROT,Z

/com, Expected results from NRC manual
/com, *********************************

*SET,EdisX,7.84967e-03
*SET,EdisY,2.49629e-03
*SET,EdisZ,1.74471e-02
*SET,ErotX,1.84130e-04
*SET,ErotY,2.12142e-04
*SET,ErotZ,7.01236e-05

/com, Error computation
/com, *********************

ERdisX=ABS((AdisX)/(EdisX))
ERdisY=ABS((AdisY)/(EdisY))
ERdisZ=ABS((AdisZ)/(EdisZ))
ERrotX=ABS((ArotX)/(ErotX))
ERrotY=ABS((ArotY)/(ErotY))
ERrotZ=ABS((ArotZ)/(ErotZ))

*dim,value,,6,3

*vfill,value(1,1),data,EdisX
*vfill,value(1,2),data,AdisX
*vfill,value(1,3),data,ERdisX

*vfill,value(2,1),data,EdisY
*vfill,value(2,2),data,AdisY
*vfill,value(2,3),data,ERdisY

*vfill,value(3,1),data,EdisZ
*vfill,value(3,2),data,AdisZ
*vfill,value(3,3),data,ERdisZ

*vfill,value(4,1),data,ErotX
*vfill,value(4,2),data,ArotX
*vfill,value(4,3),data,ERrotX

*vfill,value(5,1),data,ErotY
*vfill,value(5,2),data,ArotY
*vfill,value(5,3),data,ERrotY

*vfill,value(6,1),data,ErotZ
*vfill,value(6,2),data,ArotZ
*vfill,value(6,3),data,ERrotZ

save,table_2

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

/com, *========================================================
/com, * Element Forces and Moments Comparison
/com, *==========================================================

/com, Solution obtained from Mechanical APDL
/com, ****************************

*dim,elem_res_I,,3,6
*dim,elem_res_J,,3,6

*dim,pxi,,3
*dim,vyi,,3
*dim,vzi,,3
*dim,txi,,3
*dim,myi,,3
*dim,mzi,,3

*dim,pxj,,3
*dim,vyj,,3
*dim,vzj,,3
*dim,txj,,3
*dim,myj,,3
*dim,mzj,,3

esel,s,ename,,16
esel,a,ename,,18

/com,==========
/com,	 Node I
/com,==========

/com, Element #1
/com,***********

*get,pxi(1,1),elem,1,smisc,1
*get,vyi(1,1),elem,1,smisc,2
*get,vzi(1,1),elem,1,smisc,3
*get,txi(1,1),elem,1,smisc,4
*get,myi(1,1),elem,1,smisc,5
*get,mzi(1,1),elem,1,smisc,6

*vfill,elem_res_I(1,1),data,pxi(1,1)
*vfill,elem_res_I(1,2),data,vyi(1,1)
*vfill,elem_res_I(1,3),data,vzi(1,1)
*vfill,elem_res_I(1,4),data,txi(1,1)
*vfill,elem_res_I(1,5),data,myi(1,1)
*vfill,elem_res_I(1,6),data,mzi(1,1)

/com, Element #10
/com,*************

*get,pxi(2,1),elem,10,smisc,1
*get,vyi(2,1),elem,10,smisc,2
*get,vzi(2,1),elem,10,smisc,3
*get,txi(2,1),elem,10,smisc,4
*get,myi(2,1),elem,10,smisc,5
*get,mzi(2,1),elem,10,smisc,6

*vfill,elem_res_I(2,1),data,pxi(2,1)
*vfill,elem_res_I(2,2),data,vyi(2,1)
*vfill,elem_res_I(2,3),data,vzi(2,1)
*vfill,elem_res_I(2,4),data,txi(2,1)
*vfill,elem_res_I(2,5),data,myi(2,1)
*vfill,elem_res_I(2,6),data,mzi(2,1)

/com, Element #4
/com,***********

*get,pxi(3,1),elem,4,smisc,1
*get,vyi(3,1),elem,4,smisc,2
*get,vzi(3,1),elem,4,smisc,3
*get,txi(3,1),elem,4,smisc,4
*get,myi(3,1),elem,4,smisc,5
*get,mzi(3,1),elem,4,smisc,6

*vfill,elem_res_I(3,1),data,pxi(3,1)
*vfill,elem_res_I(3,2),data,vyi(3,1)
*vfill,elem_res_I(3,3),data,vzi(3,1)
*vfill,elem_res_I(3,4),data,txi(3,1)
*vfill,elem_res_I(3,5),data,myi(3,1)
*vfill,elem_res_I(3,6),data,mzi(3,1)


/com,==========
/com,  Node J
/com,==========

/com, Element #1
/com,************

*get,pxj(1,1),elem,1,smisc,7
*get,vyj(1,1),elem,1,smisc,8
*get,vzj(1,1),elem,1,smisc,9
*get,txj(1,1),elem,1,smisc,10
*get,myj(1,1),elem,1,smisc,11
*get,mzj(1,1),elem,1,smisc,12

*vfill,elem_res_J(1,1),data,pxj(1,1)
*vfill,elem_res_J(1,2),data,vyj(1,1)
*vfill,elem_res_J(1,3),data,vzj(1,1)
*vfill,elem_res_J(1,4),data,txj(1,1)
*vfill,elem_res_J(1,5),data,myj(1,1)
*vfill,elem_res_J(1,6),data,mzj(1,1)

/com, Element #10
/com,*************

*get,pxj(2,1),elem,10,smisc,7
*get,vyj(2,1),elem,10,smisc,8
*get,vzj(2,1),elem,10,smisc,9
*get,txj(2,1),elem,10,smisc,10
*get,myj(2,1),elem,10,smisc,11
*get,mzj(2,1),elem,10,smisc,12

*vfill,elem_res_J(2,1),data,pxj(2,1)
*vfill,elem_res_J(2,2),data,vyj(2,1)
*vfill,elem_res_J(2,3),data,vzj(2,1)
*vfill,elem_res_J(2,4),data,txj(2,1)
*vfill,elem_res_J(2,5),data,myj(2,1)
*vfill,elem_res_J(2,6),data,mzj(2,1)

/com, Element #4
/com,************

*get,pxj(3,1),elem,4,smisc,7
*get,vyj(3,1),elem,4,smisc,8
*get,vzj(3,1),elem,4,smisc,9
*get,txj(3,1),elem,4,smisc,10
*get,myj(3,1),elem,4,smisc,11
*get,mzj(3,1),elem,4,smisc,12

*vfill,elem_res_J(3,1),data,pxj(3,1)
*vfill,elem_res_J(3,2),data,vyj(3,1)
*vfill,elem_res_J(3,3),data,vzj(3,1)
*vfill,elem_res_J(3,4),data,txj(3,1)
*vfill,elem_res_J(3,5),data,myj(3,1)
*vfill,elem_res_J(3,6),data,mzj(3,1)

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

/com, Results from NRC benchmarks
/com, ***************************

*dim,exp_I,,3,6
*dim,exp_J,,3,6

/com, Element #1
/com,************

*vfill,exp_I(1,1),data,4.958e+00
*vfill,exp_I(1,2),data,1.788e+01
*vfill,exp_I(1,3),data,3.643e+01
*vfill,exp_I(1,4),data,6.296e+02
*vfill,exp_I(1,5),data,3.227e+03
*vfill,exp_I(1,6),data,1.394e+03

*vfill,exp_J(1,1),data,4.958e+00
*vfill,exp_J(1,2),data,1.788e+01
*vfill,exp_J(1,3),data,3.643e+01
*vfill,exp_J(1,4),data,6.296e+02
*vfill,exp_J(1,5),data,1.260e+03
*vfill,exp_J(1,6),data,4.742e+02

/com, Element #10
/com,*************

*vfill,exp_I(2,1),data,2.402e+01
*vfill,exp_I(2,2),data,7.472e+00
*vfill,exp_I(2,3),data,3.478e+01
*vfill,exp_I(2,4),data,1.130e+02
*vfill,exp_I(2,5),data,1.871e+03
*vfill,exp_I(2,6),data,6.501e+02

*vfill,exp_J(2,1),data,2.402e+01
*vfill,exp_J(2,2),data,7.472e+00
*vfill,exp_J(2,3),data,3.478e+01
*vfill,exp_J(2,4),data,1.130e+02
*vfill,exp_J(2,5),data,2.477e+03
*vfill,exp_j(2,6),data,7.745e+02

/com, Element #4
/com,*************

*vfill,exp_I(3,1),data,9.300e+00
*vfill,exp_I(3,2),data,1.063e+01
*vfill,exp_I(3,3),data,9.239e+00
*vfill,exp_I(3,4),data,1.421e+02
*vfill,exp_I(3,5),data,2.899e+02
*vfill,exp_I(3,6),data,8.284e+02

*vfill,exp_J(3,1),data,1.238e+01
*vfill,exp_J(3,2),data,1.063e+01
*vfill,exp_J(3,3),data,4.305e+00
*vfill,exp_J(3,4),data,4.237e+02
*vfill,exp_J(3,5),data,2.613e+02
*vfill,exp_J(3,6),data,5.419e+02

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

/com, Error computation
/com, *********************

*dim,elem_error_I,,3,6
*dim,elem_error_J,,3,6
*dim,elem_tab,,36,3

/com,============
/com,   Node I
/com,============

*do,i,1,3
	*do,j,1,6
		*vfill,elem_error_I(i,j),data,abs(elem_res_I(i,j)/exp_I(i,j))
	*enddo
*enddo

/com,============
/com,   Node J
/com,============

*do,i,1,3
	*do,j,1,6
		*vfill,elem_error_J(i,j),data,abs(elem_res_J(i,j)/exp_J(i,j))
	*enddo
*enddo

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

*do,i,1,3
	cs=(i-1)*6
	*do,j,1,6
		n=cs+j
		*vfill,elem_tab(n,1),data,elem_res_I(i,j)
		*vfill,elem_tab(n,2),data,exp_I(i,j)
		*vfill,elem_tab(n,3),data,elem_error_I(i,j)
	*enddo

	*do,j,1,6
		m=cs+j+18
		*vfill,elem_tab(m,1),data,elem_res_J(i,j)
		*vfill,elem_tab(m,2),data,exp_J(i,j)
		*vfill,elem_tab(m,3),data,elem_error_J(i,j)
	*enddo
*enddo

save,table_3

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

/com
/com,-----------------vm-nr1677-1-1a-a Results Verification----------------------
/com,

/nopr
resume,table_1
/gopr

/out,vm-nr1677-1-1a-a,vrt
/com, 
/com, =============================================
/com,		  COMPARISON OF MODAL FREQUENCY 
/com,			WITH EXPECTED RESULTS
/com, =============================================
/com,

/com,			Mode | Expected | Mechanical APDL |  Ratio
/com,

*vwrite,label(1),freq_exp(1),freq_ans(1),freq_err(1)
(1X,F3.0,2X,F8.4,3X,F8.4,3X,F4.2,'  ')

/com,

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

/nopr
resume,table_2
/gopr

/com,
/com,====================================================
/com,  COMPARISON OF MAXIMUM NODAL DISPLACEMENTS AND ROTATIONS
/com,		       WITH EXPECTED RESULTS
/com,====================================================
/com,

/com,			Result_Node | Expected | Mechanical APDL |  Ratio
/com,

*vwrite,label2(1,1),value(1,1),value(1,2),value(1,3)
(1x,a8,'  ',f10.4,'  ',f10.4,'   ',f5.3)
*vwrite,label2(1,2),value(2,1),value(2,2),value(2,3)
(1x,a8,'  ',f10.4,'  ',f10.4,'   ',f5.3)
*vwrite,label2(1,3),value(3,1),value(3,2),value(3,3)
(1x,a8,'  ',f10.4,'  ',f10.4,'   ',f5.3)
*vwrite,label2(1,4),value(4,1),value(4,2),value(4,3)
(1x,a8,'  ',f10.4,'  ',f10.4,'   ',f5.3)
*vwrite,label2(1,5),value(5,1),value(5,2),value(5,3)
(1x,a8,'  ',f10.4,'  ',f10.4,'   ',f5.3)
*vwrite,label2(1,6),value(6,1),value(6,2),value(6,3)
(1x,a8,'  ',f10.4,'  ',f10.4,'   ',f5.3)

/com,

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

/nopr
resume,table_3
/gopr

/com,
/com,===============================================
/com,  COMPARISON OF ELEMENT FORCES AND MOMENTS
/com,		     WITH EXPECTED RESULTS
/com,===============================================
/com,

/com,------------------------------------------------
/com,	Note: Element Forces and Moments along Y & Z
/com,		directions are flipped between Mechanical APDL
/com,		and NRC results 
/com,------------------------------------------------

/com,				Result | Expected | Mechanical APDL |  Ratio
/com,

/com,===============
/com,   Element 1
/com,===============
/com,

*vwrite,label3(1,1),elem_tab(1,1),elem_tab(1,2),elem_tab(1,3)
(1x,a5,'   ',f10.4,'  ',f10.4,'   ',f5.3)

/com,

*vwrite,label4(1,1),elem_tab(19,1),elem_tab(19,2),elem_tab(19,3)
(1x,a5,'   ',f10.4,'  ',f10.4,'   ',f5.3)

/com,
/com,

/com,===============
/com,   Element 10
/com,===============
/com,

*vwrite,label3(1,1),elem_tab(7,1),elem_tab(7,2),elem_tab(7,3)
(1x,a5,'   ',f10.4,'  ',f10.4,'   ',f5.3)

/com,

*vwrite,label4(1,1),elem_tab(25,1),elem_tab(25,2),elem_tab(25,3)
(1x,a5,'   ',f10.4,'  ',f10.4,'   ',f5.3)

/com,
/com,

/com,===============
/com,   Element 4
/com,===============
/com,

*vwrite,label3(1,1),elem_tab(13,1),elem_tab(13,2),elem_tab(13,3)
(1x,a5,'   ',f10.4,'  ',f10.4,'   ',f5.3)

/com,

*vwrite,label4(1,1),elem_tab(31,1),elem_tab(31,2),elem_tab(31,3)
(1x,a5,'   ',f10.4,'  ',f10.4,'   ',f5.3)


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

/out,
*list,vm-nr1677-1-1a-a,vrt
fini