首先获得模态的个数,然后读取每一阶模态的频率和每个节
点的偏移量
!从ANSYS中导出模态频率及振型数据
!By:LiuXiaoqin(liuxqsmile@gmail.com), at nuaa,
*get,nodenum,node,,num,max
*set,tempvar,0
*set,modenum,0
!获得模态的阶数
*do,i,1,100,1
*get,tempvar,mode,i,freq
*if,tempvar,LT,0.0001,THEN
*if,modenum,LT,0.0001,THEN
*set,modenum,(i-1)
*endif
*endif
*enddo
!*dim,modefqda,array,modenum,2
*dim,modeshp,array,nodenum,3
*cfopen,modefile,txt
*do,i,1,modenum,1
*get,modefq,mode,i,freq
*get,modeda,mode,i,damp
*vwrite,modefq,modeda
(2e16.8)
set,1,i
!获得每个节点的位移
*do,ii,1,nodenum,1
*get,modeshp(ii,1),node,ii,u,x
*get,modeshp(ii,2),node,ii,u,y
*get,modeshp(ii,3),node,ii,u,z
*enddo
*vwrite,sequ,modeshp(1,1),modeshp(1,2),modeshp(1,3)
(F8.0,3e16.8)
*vwrite,0
(F8.0)
*enddo
*cfclos
http://forum.vibunion.com/UChome ... -blog-id-17697.html |