ansys提取谐响应命令流问题
/post1freqe=30
freqb=0
df=1
nfreq=(freqe-freqb)/df+1 !freqb,freqe,df分别为导出结果的起始频率、截止频率和频率间隔
*get,nnod,node,,count !把当前选择的节点总数读出,存到nnod
*dim,r,array,nnod,7,nfreq!建立r数组存储节点结果
*do,i,1,nfreq,1
set,,i !读出第i个频率结果的实部
*get,nd,node,,num,min !读出当前最小节点编号,赋给nmin
*do,j,1,nnod,1
r(j,1,i)=nd
r(j,2,i)=ux(nd)
r(j,4,i)=uy(nd)
r(j,6,i)=uz(nd)
nd=ndnext(nd)
*enddo
set,,i,,1 !读出第i个频率结果的虚部
*get,nd,node,,num,min !读出当前最小节点编号,赋给nmin
*do,j,1,nnod,1
r(j,3,i)=ux(nd)
r(j,5,i)=uy(nd)
r(j,7,i)=uz(nd)
nd=ndnext(nd)
*enddo
*enddo
*cfopen,result,fre
*do,i,1,nfreq,1 !freqb,freqe分别为结果起始频率和截止频率
*vwrite,'SYSNOISE','DISPLAC','EMENTS','FILE'
(a,a,a7,a4)
*vwrite,'Rev 5.5','IBM P2ES','SL 20-AP','R-04'
(a,a,a,a4)
*vwrite,'Displace','_Structu','re'
(a,a,a2)
*vwrite,'20-APR-','2004 10:','07:13'
(a,a,a5)
*vwrite,'FREQUENC','Y'
(a,a1)
freq=freqb+(i-1)*df !freq为当前存储频率
*vwrite,freq
(e20.8)
*vwrite,'NODAL DI','SPLACEME','NT VALUE','S'
(a,a,a,a1)
*do,j,1,nnod,1
nseq=chrval(j) !将序号转换成字符,便于输出
a=r(j,1,i) !取节点编号值
nd=chrval(a) !将节点编号值转换成字符,便于输出
uxr=r(j,2,i) !取X方向实部到uxr
uxi=r(j,3,i) !取x方向虚部到uxr
uyr=r(j,4,i) !取y方向实部到uxr
uyi=r(j,5,i) !取y方向虚部到uxr
uzr=r(j,6,i) !取z方向实部到uxr
uzi=r(j,7,i) !取Z方向虚部到uxr
*vwrite,' ',nseq,' ',nd,uxr,uxi,uyr
(a2,a8,a2,a8,e20.8,e20.8,e20.8)
*vwrite,'','','',uyi,uzr,uzi
(a8,a8,a4,e20.8,e20.8,e20.8)
*vwrie,'','','',0,0,0
(a8,a8,a4,e20.8,e20.8,e20.8)
*vwrite,'','','',0,0,0
(a8,a8,a4,e20.8,e20.8,e20.8)
*enddo
*enddo
*cfclos
为何我提取到第4步是nd为0了,其位移也为0,哪位给与回答 顶,虽然命令长了点,但是还是学习了
页:
[1]