谐响应分析
本文主要分享四个谐响应分析案例,看似简单,但只不过是模型简单,麻雀虽小五脏俱全,通过这四个案例完全可以掌握谐响应分析方法,以进一步针对自己的模型需求进行谐响应分析。
一般谐响应分析前需要进行模态求解,案例一至四的模态求解都是采用了Block Lanczos方法求解模态(ANTYPE,mode),案例一至四的主要不同在于其谐响应分析(ANTYPE,HARMONIC)过程中。
附件:命令流
案例1:
finish
/clear
/PREP7
g=386.4 ! gravity in/sec^2
totg=1 ! load in g's
xa=g*totg ! acceleration in/sec^2
pi=3.141592654 ! pi
/title,DIRECT DISPLACEMENT METHOD
!!!!Pre-processing!!!!
RECTNG,20,,.25,,
ET,1,PLANE42
UIMP,1,EX, , ,30e6,
UIMP,1,NUXY, , ,.3,
UIMP,1,DENS, , ,.000729,
LESIZE,2, , ,4, , , , ,1
LESIZE,4, , ,4, , , , ,1
LESIZE,1, , ,80, , , , ,1
LESIZE,3, , ,80, , , , ,1
MSHAPE,0,2D
MSHKEY,1
AMESH,all
nsel,s,loc,x,-10,.0001
d,all,all,0
allsel,all
FINISH
!!!!Solution Processing Modal Analysis!!!!
/SOLU
ANTYPE,2
MODOPT,LANB,6
EQSLV,SPAR
MXPAND,6, , ,0
MODOPT,LANB,6,0,0, ,OFF, ,0
SOLVE
FINISH
!!!!Postprocess Modal Analysis!!!!
/POST1
*GET,freq1,MODE,1,FREQ
*GET,freq2,MODE,2,FREQ
*GET,freq3,MODE,3,FREQ
finish
!!!!Solution Process Full Harmonic Analysis!!!!
/solu
ANTYPE,3
HROPT,FULL
HROUT,ON
EQSLV,FRONT,0, !波前求解器
DDELE,1,ALL
nsel,s,loc,x,-10,.0001
d,all,ux,0
d,all,uy,1
allsel,all
HARFRQ,freq2*.5,freq3*1.2,
NSUBST,50,
KBC,1
DMPRAT,.0003,
outres,all,all
solve
finish
/POST26
NSOL,2,83,U,Y, ! raw results
PROD,3,1,1, , , , ,2*pi,2*pi,1, ! omega squared in radians
QUOT,4,2,3, , , , ,xa,1, ! displacements: (raw results*accel)/omega^2
PROD,5,2, , , , , ,xa ! accelerations: raw results*accel
PROD,6,2, , , , , ,xa/g ! g's: (raw results*accel)/g
/eof
PLVAR,
案例2:
finish
/clear
/PREP7
xm=1e5 ! mass for the large mass
g=386.4 ! acceration of gravity
totg=1 ! total number of g's applied to the model
xa=g*totg ! acceleration applied to the model
xf=xm*xa ! force required to applied desired acceleration f=ma
pi=3.141592654
/title,LARGE MASS METHOD ACCELERATION INPUT
RECTNG,20,,.25,,
ET,1,PLANE42
UIMP,1,EX, , ,30e6,
UIMP,1,NUXY, , ,.3,
UIMP,1,DENS, , ,.000729,
LESIZE,2, , ,4, , , , ,1
LESIZE,4, , ,4, , , , ,1
LESIZE,1, , ,80, , , , ,1
LESIZE,3, , ,80, , , , ,1
MSHAPE,0,2D
MSHKEY,1
AMESH,all
numoff,node,100
!!!!Add large mass!!!
ET,2,MASS21
KEYOPT,2,2,0
KEYOPT,2,3,0
R,2,1e5,1e5,1e5,1e5,1e5,1e5,
n,1,-1
type,2
real,2
mat,2
e,1
nsel,s,loc,x,-1,0
cerig,1,all,all,uxyz
allsel,all
numcmp,all
FINISH
!!!!MODAL ANALYSIS!!!!!!!!!!!!!!!!!!!!!!!
/SOLU
ANTYPE,2
EQSLV,SPAR
MXPAND,20, , ,0
MODOPT,LANB,20,0,0, ,OFF, ,0 /! no shift get all rigid body modes
! this will allow the acceleration at the large mass to be calculated
! otherwise the acceleration at the large mass is incorrect
SOLVE
FINISH
!!!!HARMONIC ANALYSIS!!!!!!!!!!
/solu
ANTYPE,3
HROPT,MSUP,0, ,
HROUT,ON,OFF,0
EQSLV,FRONT,0,
KBC,1
DMPRAT,.03,
outres,all,all
f,1,fy,(xf)
harfrq,10,40
nsubst,25
solve
finish
!!!!POSTPROCESS TIME HISTORY!!!!!!!!!!!!!
/POST26
file,,rfrq
NSOL,2,83,U,Y, ! node 83 displacement
PROD,4,1,1, , , , ,2*pi,2*pi,1, ! omega squared
PROD,5,2,4, , , , ,1,1,1, ! acceleration
PROD,6,5, , , , , ,1/g ! results in g's
/AXLAB,X,Freqency
/AXLAB,Y,Response in G
/GROPT,LOGX,ON
/GROPT,LOGY,OFF
PLVAR,6
/eof
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Expansion results to .rst file!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FINISH
/SOLU
EXPASS,1
NUMEXP,25,10,40,1
HREXP,ALL,
/STATUS,SOLU
SOLVE
FINISH
案例3:
finish
/clear
/PREP7
xm=1e5 ! mass for the large mass
g=386.4 ! acceration of gravity
totg=1 ! total number of g's applied to the model
xa=g*totg ! acceleration applied to the model
xf=xm*xa ! force required to applied desired acceleration f=ma
pi=3.141592654
/title,LARGE MASS METHOD ACCELERATION INPUT
RECTNG,20,,.25,,
ET,1,PLANE42
UIMP,1,EX, , ,30e6,
UIMP,1,NUXY, , ,.3,
UIMP,1,DENS, , ,.000729,
LESIZE,2, , ,4, , , , ,1
LESIZE,4, , ,4, , , , ,1
LESIZE,1, , ,80, , , , ,1
LESIZE,3, , ,80, , , , ,1
MSHAPE,0,2D
MSHKEY,1
AMESH,all
numoff,node,100
!!!!Add large mass!!!
ET,2,MASS21
KEYOPT,2,2,0
KEYOPT,2,3,0
R,2,1e5,1e5,1e5,1e5,1e5,1e5,
n,1,-1
type,2
real,2
mat,2
e,1
nsel,s,loc,x,-1,0
cerig,1,all,all,uxyz
allsel,all
numcmp,all
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FINISH
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!MODAL ANALYSIS!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/SOLU
ANTYPE,2
EQSLV,SPAR
MXPAND,20, , ,0
MODOPT,LANB,20,0,0, ,OFF, ,0 ! no shift get all rigid body modes
! this will allow the acceleration at the large mass to be calculated
! otherwise the acceleration at the large mass is incorrect
SOLVE
FINISH
/POST1
finish
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!HARMONIC ANALYSIS!!!!!!!!!!!!!!!!!!!!!
/solu
ANTYPE,3
!*
HROPT,MSUP,0, ,
HROUT,ON,OFF,0 EQSLV,FRONT,0,
KBC,1
DMPRAT,.03,
outres,all,all
f,1,fy,(xf)
harfrq,10,40
hrout,,on ! turns cluster option on, ansys calculated freqs
nsubst,10 ! 1-10 default 4
solve
finish
!!!!POSTPROCESS TIME HISTORY!!!!!!!!!!!!!!!!!!!!!!
/POST26
file,,rfrq
NSOL,2,83,U,Y, ! node 83 displacement
PROD,4,1,1, , , , ,2*pi,2*pi,1, ! omega squared
PROD,5,2,4, , , , ,1,1,1, ! acceleration
PROD,6,5, , , , , ,1/g ! results in g's
/AXLAB,X,Freqency
/AXLAB,Y,Response in G
/GROPT,LOGX,ON
/GROPT,LOGY,OFF
PLVAR,6
/eof
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Expansion results to .rst file!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FINISH
/SOLU
EXPASS,1
NUMEXP,25,10,40,1
HREXP,ALL,
!*
/STATUS,SOLU
SOLVE
FINISH
案例4:
finish
/clear
/PREP7
xm=1e5 ! mass for the large mass
g=386.4 ! acceration of gravity
totg=1 ! total number of g's applied to the model
xa=g*totg ! acceleration applied to the model
xf=xm*xa ! force required to applied desired acceleration f=ma
pi=3.141592654
/title,LARGE MASS METHOD ACCELERATION INPUT
RECTNG,20,,.25,,
ET,1,PLANE42
UIMP,1,EX, , ,30e6,
UIMP,1,NUXY, , ,.3,
UIMP,1,DENS, , ,.000729,
LESIZE,2, , ,4, , , , ,1
LESIZE,4, , ,4, , , , ,1
LESIZE,1, , ,80, , , , ,1
LESIZE,3, , ,80, , , , ,1
MSHAPE,0,2D
MSHKEY,1
AMESH,all
numoff,node,100
!!!!Add large mass!!!
ET,2,MASS21
KEYOPT,2,2,0
KEYOPT,2,3,0
R,2,1e5,1e5,1e5,1e5,1e5,1e5,
n,1,-1
type,2
real,2
mat,2
e,1
nsel,s,loc,x,-1,0
cerig,1,all,all,uxyz
allsel,all
numcmp,all
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FINISH
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!MODAL ANALYSIS!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/SOLU
ANTYPE,2
EQSLV,SPAR
MXPAND,6, , ,0
MODOPT,LANB,6,1,0, ,OFF, ,0
SOLVE
FINISH
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!HARMONIC ANALYSIS!!!!!!!!!!!!!!!!!!!!!
/solu
ANTYPE,3
HROPT,MSUP,0, ,
HROUT,ON,OFF,0
EQSLV,FRONT,0,
KBC,1
DMPRAT,.03,
outres,all,all
!!!!FIRST SET OF FREQ AND LOAD!!!!
!!!!Parameters of sine sweep spec!!!!!!!!!!!!!!
bfreq1=5 ! begining freq
efreq1=50 ! endding freq
xload1=(.1*g) ! acceleration of load
xoct1=.1 ! oct/time
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Determine how many frequency steps!!!!
cnt1=0
*do,i,1,50
*if,i,ne,1,then
dfreq=dfreq*(1+(xoct1*2))
*endif
*if,i,eq,1,then
dfreq=bfreq1
*endif
*if,dfreq,lt,efreq1,then
cnt1=cnt1+1
*endif
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!dimension freq table col1=freq col2=load!!!!
*dim,freq1,table,cnt1,2
*VFILL,freq1(0,0),RAMP,0,1,
*do,i,1,2
*VFILL,freq1(0,i),RAMP,i,1,
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Build freq table, load model, and solve!!!!!!
*do,i,1,cnt1
*if,i,ne,1,then
freq1(i,1)=freq1((i-1),1)*(1+(xoct1*2))
*endif
*if,i,eq,1,then
freq1(i,1)=bfreq1
*endif
freq1(i,2)=xload1
f,1,fy,(xm*xload1)
harfrq,freq1(i,1),freq1(i,1)
nsubst,1
solve
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!SECOND SET OF FREQ AND LOAD!!!!
!!!!Parameters of sine sweep spec!!!!!!!!!!!!!!
bfreq2=50 ! begining freq
efreq2=200 ! endding freq
xload2=(.5*g) ! acceleration of load
xoct2=.1 ! oct/time
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Determine how many frequency steps!!!!
cnt2=1
*do,i,1,50
*if,i,ne,1,then
dfreq=dfreq*(1+(xoct2*2))
*endif
*if,i,eq,1,then
dfreq=bfreq2
*endif
*if,dfreq,lt,efreq2,then
cnt2=cnt2+1
*endif
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!dimension freq table col1=freq col2=load!!!!
*dim,freq2,table,cnt2,2
*VFILL,freq2(0,0),RAMP,0,1,
*do,i,1,2
*VFILL,freq2(0,i),RAMP,i,1,
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Build freq table, load model, and solve!!!!!!
*do,i,1,cnt2
*if,i,ne,1,then
freq2(i,1)=freq2((i-1),1)*(1+(xoct2*2))
*endif
*if,i,eq,1,then
freq2(i,1)=bfreq2
*endif
freq2(i,2)=xload2
f,1,fy,(xm*xload2)
harfrq,freq2(i,1),freq2(i,1)
nsubst,1
solve
*enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
finish
!!!!POSTPROCESS TIME HISTORY!!!!!!!!!!!!!!!!!!!!!!
/POST26
file,,rfrq
NSOL,2,83,U,Y, ! displacement
PROD,4,1,1, , , , ,2*pi,2*pi,1, ! omega squared
PROD,5,2,4, , , , ,1,1,1, ! acceleration
PROD,6,5, , , , , ,1/g ! results in g's
/eof
/AXLAB,X,Freqency
/AXLAB,Y,Response in G
/GROPT,LOGX,ON
/GROPT,LOGY,OFF
PLVAR,6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!Expansion results to .rst file!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FINISH
/SOLU
EXPASS,1
*do,i,1,cnt1
EXPSOL,,,freq1(i,1) ,1
HREXP,ALL,
SOLVE
*enddo
!!!!!!!!!!!!!!!!!!
*do,i,1,cnt2
EXPSOL,,,freq2(i,1) ,1
HREXP,ALL,
SOLVE
*enddo
finish
全文结束,感谢阅读。