cantfem.inp
来自「vibration simulation using ansys and mat」· INP 代码 · 共 220 行
INP
220 行
/title, cantfem.inp, 0.05 x 1 x 20mm aluminum cantilever beam, 20 elements
/prep7
et,1,4 ! element type for beam
! aluminum
ex,1,71e6 ! mN/mm^2
dens,1,2.77e-6 ! kg/mm^3
nuxy,1,.345
! real value to define beam characteristics
r,1,1,.00001041,.004166,.05,1 ! area, moments of inertia, thickness
! 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,21,20,0,0 ! right-hand node
fill,1,21 ! interior nodes
nall
nplo
! elements
type,1
mat,1
real,1
e,1,2
egen,20,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
! this will give 20 nodes, node 2 through node 21, each with 2 dof, giving a total of 40 dof
! can calculate a maximum of 40 eigenvalues if don't use Guyan reduction to reduce size of
! eigenvalue problem
nall
nsel,s,node,,2,21
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
antype,modal,new
modopt,reduc,20 ! method - reduced Householder, number of modes to extract
expass,off ! key = off, no expansion pass, key = on, do expansion
mxpand,20,,,no ! nummodes to expand
total,20,0 ! total masters, 20 to be used, 1 to exclude rotational dofs
allsel
solve ! starts the solution of one load step of a solution sequence, modal here
fini
! plot first mode
/post1
set,1,1
pldi,1
! ******************************* output frequencies **************************************
/output,cantfem,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
nsel,s,node,,21 ! cantilever tip
/output,cantfem,eig ! write out eigenvectors to ascii file .eig
*do,i,1,20
set,,i
prdisp
*enddo
/output,term
! ******************************* plot modes **********************************************
! pldi plots
/show,cantfem,grp,0
allsel
/view,1,,-1,, ! side view for plotting
/angle,1,0
/auto
*do,i,1,20
set,1,i
pldi,1
*enddo
/show,term
! ******************************* calculate and plot transfer functions ***********************
fini
/assign,rst,junk,rst ! reassigns a file name to an ANSYS identifier
/solu
dmprat,0.01 ! sets a constant damping ratio for all modes, zeta = 0.01
allsel
eplo ! show forces applied
f,21,fz,1 ! 1 mn force applied to node 21, tip node
/title, cantilever with tip load
antype,harmic ! harmonic (frequency response) analysis
hropt,msup,20 ! mode superposition method, nummodes modes used
harfrq,100,500000 ! frequency range, hz, for solution, -1 to 10 rad/sec
hrout,off,off ! amplitude/phase, cluster off
kbc,1
nsubst,10000 ! 10000 frequency points for very fine resolution
outres,nsol,all, ! controls solution set written to database, nodal DOF solution, all
! frequencies, component name for selected set of nodes
solve
fini
/post26
file,,rfrq ! frequency response results
xvar,0 ! display versus frequency
lines,10000 ! specifies the length of a printed page for frequency response listing
nsol,2,21,u,z ! specifies nodal data to be stored in results file
! u - displacement, z direction
! note that nsol,1 is frequency vector
! plot magnitude
plcplx,0
/grid,1
/axlab,x,frequency, hz
/axlab,y,amplitude, mm
/gropt,logx,1 ! log plot for frequency
/gropt,logy,1 ! log plot for amplitude
/show,cantfem,grp1 ! file name for storing
plvar,2
/show,term
! plot phase
plcplx,1
/grid,1
/axlab,x,freq
/axlab,y,phase, deg ! label for y axis
/gropt,logx,1 ! log plot for frequency
/gropt,logy,0 ! linear plot for phase
/show,cantfem,grp1
plvar,2
/show,term
! save ascii data to file
prcplx,1 ! stores phase angle in asci file .dat
/output,cantfem,dat
prvar,2
/output,term
fini
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?