📄 threedof.inp
字号:
/title, threedof.inp, three dof vibration class model, Ansys Version 5.5
/prep7 ! enter model preparation section
! element type definitions
et,1,21 ! element type for mass
et,2,14 ! element type for spring
! real value definitions
r,1,1,1,1 ! mass of 1kg
r,2,1 ! spring stiffness of 1mn/mm, or 1n/m
! define plotting characteristics
/view,1,-1,0,0 ! z-y plane
/angle,1,0 ! not iso
/pnum,real,1 ! color by real
/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,-1 ! left hand mass at x = -1.0 mm
n,2,0,0,0 ! middle mass at x = 0 mm
n,3,0,0,1 ! right hand mass at x = +1.0 mm
! define masses
type,1
real,1
e,1
e,2
e,3
! define springs
type,2
real,2
e,1,2
e,2,3
! define constraints, ux and uy zero, leaving only uz motion
nsel,s,node,,1,3
d,all,ux,0
d,all,uy,0
allsel
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
! define masters for frequency response (transfer function) run
m,1,uz
m,2,uz
m,3,uz
antype,modal,new
modopt,reduc,3 ! method - Block Lanczos
expass,off ! key = off, no expansion pass, key = on, do expansion
mxpand,3,,,no ! number of modes to expand
total,3,1 ! total masters, all translational dof
allsel
solve ! starts the solution of one load step of a solution sequence, modal
fini
! ******************************* output frequencies ******************************************
/post1
/output,threedof,frq ! write out frequency list to ascii file .frq
set,list
/output,term ! returns output to terminal
! ******************************* output eigenvectors *****************************************
! define nodes for output
allsel
/output,threedof,eig ! write out eigenvectors to ascii file .eig
*do,i,1,3
set,,i
prdisp
*enddo
/output,term
! ******************************* plot modes **************************************************
/show,threedof,grp2,0 ! raster plot, 1 is vector plot, write out to graph file .grp2
allsel
*do,i,1,3
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 ! sets a constant damping ratio for all modes, zeta = 0
allsel
eplo ! show forces applied
f,1,fz,1 ! 1 mn force applied to node 1, left-hand mass
/title, threedof.inp, three degree of freedom, force at mass 1
antype,harmic ! harmonic (frequency response) analysis
hropt,msup,3 ! mode superposition method, nummodes modes used
harfrq,0.0159,1.59 ! frequency range, hz, for solution, -1 to 10 rad/sec
hrout,off,off ! amplitude/phase, cluster off
kbc,1
nsubst,200 ! 200 frequency points
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,1,u,z,z1 ! specifies nodal data to be stored in results file
! u - displacement, z direction
! note that nsol,1 is frequency vector
nsol,3,2,u,z,z2
nsol,4,3,u,z,z3
! 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,threedof,grp1 ! file name for storing
plvar,2,3,4
/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,threedof,grp1
plvar,2,3,4
/show,term
! save ascii data to file
prcplx,1 ! stores phase angle in asci file .dat
/output,threedof,dat
prvar,2,3,4
/output,term
fini
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -