- 积分
- 4
- 注册时间
- 2005-12-16
- 仿真币
-
- 最后登录
- 1970-1-1
|
问题描述如下:
如图,一悬臂梁右端A点受正弦力激励,取B点的响应。
要求:1,使用模态叠加法;
2,B点的位移要在计算过程中提取出来(因为后面须要根据B点的位移计算出控制力,并加载到悬臂梁上);
代码如下:
/PREP7
ET,1,SOLID45
MP,EX,1,210e9
MP,PRXY,1,0.33
MP,DENS,1,7800
block,0,0.1,0,0.02,0,0.004
vmesh,1
del_time = 5e-6
total_time_step = 20
fndid1 = node(0.1,0.01,0.004)
sensor1 = node(0.1,0.01,0)
pi = acos(-1.0)
am = 8 ! amplitude
ww = 2*pi*400.0
*dim, sensorpos1,, total_time_step, 4
! -------Modal Analysis----------------------------
/solu
antype,modal
allsel
nsel,s,loc,x,0
d,all,all,0
allsel
modopt,lanb,20
mxpand,20
outres, all, all
solve
finish
! ------------------------------------------------
! transient analysis
/solu
antype, trans
trnopt,msup,20
lumpm, 0
eqslv, spar
kbc, 1
nsubst, 1, 0, 0
deltime,del_time
outres, all, none
outres, nsol, all
allsel
solve
curr_time = 0.0
*do, nn, 1, total_time_step, 1
! apply force
t1 = (nn-1)*del_time ! time
fff = am*sin(ww*t1)
f, fndid1, fz, fff
curr_time = curr_time + del_time
time, curr_time
solve
! save information
sdx = ux(sensor1) !这一行及下面两行取得的结果为什么都是0?
sdy = uy(sensor1)
sdz = uz(sensor1)
sensorpos1(nn, 1) = curr_time
sensorpos1(nn, 2) = sdx
sensorpos1(nn, 3) = sdy
sensorpos1(nn, 4) = sdz
*enddo
finish
!! *** expansion pass
/solu
expass,on
numexp,all
fini
!----------------------
! Write result to file
!----------------------
*cfopen, sensorpos_result, 'txt',
*vwrite, sensorpos1(1, 1), sensorpos1(1, 2), sensorpos1(1, 3), sensorpos1(1, 4)
(4E12.4)
*cfclos
计算结束后,打开文件“sensorpos_result.txt”,发现所得到的位移都是0.0,请各位高手指教,多谢! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|