⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cantbeam_ss.inp

📁 vibration simulation using ansys and matlab 一书中的程序
💻 INP
字号:
!  cantbeam_ss.inp, 0.075 thick x 2 wide x 20mm long steel cant
!  title automatically built based on number of elements and eigenvalue extraction method

/prep7

filename = 'cantbeam_ss'

! define number of elements to use

num_elem = 64

! define eigenvalue extraction method, 1 = reduced, 2 = block lanczos	 

eigext = 1

*if,eigext,eq,1, then
	nummodes = num_elem			!  only 1 displacement dof available for each element
*else								  
	nummodes = 2*num_elem		!  both disp and rotation dof's available for each element
*endif	

!	create the file name for storing data

! 	first section of filename

aname = filename
										  
! 	second section of filename, number of elements

bname = num_elem
										  
!	third section of filename, depends on eigenvalue extraction method

*if,eigext,ne,2, then
	cname = 'red'			!  reduced					  
*else								  
	cname = 'bl'			!  block Lanczos
*endif	

! input the title, use %xxx% to substitute parameter name or parametric expression 

aname_ti = 'cantbeam_ss - 0.075 thick x 2 wide x 20mm long steel cant'

/title,%aname_ti%, %bname%, %cname%

et,1,4            	! element type for beam

! steel

ex,1,190e6			! mN/mm^2
dens,1,7.83e-6		! kg/mm^3
nuxy,1,.293         

! real value to define beam characteristics

r,1,0.15,0.05,0.00007031,0.075,0.2		! area, Izz, Iyy, TKz, TKy

! define plotting characteristics

/view,1,1,-1,1      ! iso view
/angle,1,-60        ! iso view
/pnum,mat,1         ! color by material
/num,1              ! numbers off
/type,1,0           ! hidden plot
/pbc,all,1          ! show all boundary conditions

csys,0				! define global coordinate system

! nodes

n,1,0,0,0					! left-hand node
n,num_elem+1,20,0,0			! right-hand node

fill,1,num_elem+1			! interior nodes

nall
nplo

! elements

type,1
mat,1
real,1
e,1,2
egen,num_elem,1,-1

! constrain left-hand end

nall
d,1,all,0			! constrain node 1, all dof's

! constrain all but uz and roty for all other nodes to allow only those dof's

nall
nsel,s,node,,2,num_elem+1
d,all,ux
d,all,uy
d,all,rotx
d,all,rotz

nall
eall
nplo
eplo

! *******************************  eigenvalue run  ******************************************

fini						! fini just in case not in begin

/solu						! enters the solution processor, needs to be here to do editing below

allsel						! default selects all items of specified entity type, typically nodes, elements

nsel,s,node,,2,num_elem+1
m,all,uz

*if,eigext,eq,1,then	   		! use reduced method

	antype,modal,new
	modopt,reduc,nummodes		! method - reduced Householder, nummodes - no to extract
	expass,off					! key = off, no expansion pass, key = on, do expansion
	mxpand,nummodes,,,no		! nummodes to expand,freq beginning,freq ending,elcalc = yes - calculate stresses
	total,num_elem,1  			! total masters, 1 is exclude rotations

*elseif,eigext,eq,2				! use block lanczos

	antype,modal,new
	modopt,lanb,nummodes		! no total required for block lanczos because calculates all eigenvalues
	expass,off
	mxpand,nummodes,,,no

*endif

allsel

solve						! starts the solution of one load step of a solution sequence, modal here

fini

! plot first mode

/post1

/format,,,,,10000

set,1,1

pldi,1

! *******************************  output frequencies  **************************************

save,%aname%%bname%%cname%,sav

/output,%aname%%bname%%cname%,frq  	! write out frequency list to ascii file .frq

set,list

/output,term				! returns output to terminal
 
! *******************************  output eigenvectors  *************************************

! define nodes for output:  forces applied or output displacements

nall

/output,%aname%%bname%%cname%,eig         ! write out frequency list to ascii file .eig

*do,i,1,nummodes
	set,,i
	/page,,,1000				
	prdisp
*enddo

/output,term

! *******************************  plot modes  **********************************************

! pldi plots

/show,%aname%%bname%%cname%,grp,0   	! save mode shape plots to file .grp

allsel

/view,1,,-1,,			! side view for plotting
/angle,1,0
/auto

*do,i,1,nummodes
	set,1,i
    pldi,1
*enddo

/show,term

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -