【原创】ANSYS三维模型导入到ADINA的宏
ansys的三维建模蛮方便的,在mesh后运行此宏,生成mode.in,在adina中设置好单元和材料后,打开mode.in 即可。这里是支持两种单元材料的,若多于两种时,修改一下即可。!ANSYS TO ADINA MODEL
/prep7
allsel
!COMPRESS
*Get,nnod,NODE,0,COUNT
*Dim,xyz,array,nnod,4
*Do,i,1,nnod,1
xyz(i,1) = i
xyz(i,2) = Nx(i)
xyz(i,3) = Ny(i)
xyz(i,4) = Nz(i)
*Enddo
!
*Get,nelm,ELEM,0,COUNT
*Dim,Elist,array,nelm,10
*Do,i,1,nelm,1
*GET,Elist(i,1),elem,i,attr,mat
Elist(i,2)=i
*Do,j,1,8
Elist(i,j+2) = Nelem(i,j)
*Enddo
*Enddo
!
*CFOPEN,Model,in,,
*VWRITE,'COORDINA','TES NODE'
(2a8)
*DO,i,1,nnod
x1=CHRVAL(xyz(i,1))
x2=xyz(i,2)
x3=xyz(i,3)
x4=xyz(i,4)
*VWRITE,x1,x2,x3,x4
(a5,3F10.3)
*ENDDO
!
*VWRITE,'@'
(1a1)
*VWRITE,'*'
(1a1)*
!
*VWRITE,'ENODES ','SUBSTRUC','=0 GROUP','=1'
(a7,2a8,a2)
*DO,i,1,nelm
*if,Elist(i,1),eq,1,then
*do,j,2,10
a%j%=CHRVAL(Elist(i,j))
*enddo
*VWRITE,a2,a3,a4,a5,a6,a7,a8,a9,a10
(9a8)
*endif
*ENDDO
*VWRITE,'@'
(1a1)
*VWRITE,'*'
(1a1)
!
*VWRITE,'ENODES ','SUBSTRUC','=0 GROUP','=2'
(a7,2a8,a2)
*DO,i,1,nelm
*if,Elist(i,1),eq,2,then
*do,j,2,10
a%j%=CHRVAL(Elist(i,j))
*enddo
*VWRITE,a2,a3,a4,a5,a6,a7,a8,a9,a10
(9a8)
*endif
*ENDDO
*VWRITE,'@'
(1a1)
*VWRITE,'*'
(1a1)
!
*CFCLOS 都是高手啊
Re:【原创】ANSYS三维模型导入到ADINA的宏
灯泡那里是: 左括号 i 右括号Re:【原创】ANSYS三维模型导入到ADINA的宏
也可以把ansys中的 x、y、z的约束转化过来,生成 load.in,其它荷载如力、温度等修改后也可。FINISH
/SOL
allsel
***CTRAN
*del,all
*GET,Nmax,NODE,,NUM,MAX
*dim,dd,,7
!
*create,ff
*CFOPEN,Load,in,,
!dx
nsel,s,d,ux
*GET,dn1,NODE,0,num,min
*if,dn1,ge,1,then
*GET,dn2,NODE,0,num,max
*VWRITE,'NODESET ','NAME=1'
(A8,A7)
*DO,i,dn1,dn2
*if,NSEL(i),eq,1,then
*VWRITE,CHRVAL(i),'0','1'
(a5,2x,a1,2x,1a)
*endif
*ENDDO
*endif
!
!dy
nsel,s,d,uy
*GET,dn1,NODE,0,num,min
*if,dn1,ge,1,then
*GET,dn2,NODE,0,num,max
*VWRITE,'NODESET ','NAME=2'
(A8,A7)
*DO,i,dn1,dn2
*if,NSEL(i),eq,1,then
*VWRITE,CHRVAL(i),'0','1'
(a5,2x,a1,2x,1a)
*endif
*ENDDO
*endif
!
!dz
nsel,s,d,uz
*GET,dn1,NODE,0,num,min
*if,dn1,ge,1,then
*GET,dn2,NODE,0,num,max
*VWRITE,'NODESET ','NAME=3'
(A8,A7)
*DO,i,dn1,dn2
*if,NSEL(i),eq,1,then
*VWRITE,CHRVAL(i),'0','1'
(a5,2x,a1,2x,1a)
*endif
*ENDDO
*endif
!
allsel
!
*VWRITE,'FIXITY ','NAME=UX'
(2A7)
*VWRITE,'@CLEAR'
(A6)
*VWRITE,''X-TRANS','LATION' '
(2x,2A8)
*VWRITE,'@'
(A1)
*VWRITE,'*'
(A1)
*VWRITE,'FIXITY ','NAME=UY'
(2A7)
*VWRITE,'@CLEAR'
(A6)
*VWRITE,''Y-TRANS','LATION' '
(2x,2A8)
*VWRITE,'@'
(A1)
*VWRITE,'*'
(A1)
*VWRITE,'FIXITY ','NAME=UZ'
(2A7)
*VWRITE,'@CLEAR'
(A6)
*VWRITE,''Z-TRANS','LATION' '
(2x,2A8)
*VWRITE,'@'
(A1)
!
*VWRITE,'FIXBOUND','ARY NODE','-SET FIX','ITY=ALL '
(4A8)
*VWRITE,'@CLEAR'
(A6)
*VWRITE,'1'UX''
(A8)
*VWRITE,'2'UY''
(A8)
*VWRITE,'3'UZ''
(A8)
*VWRITE,'@'
(A1)
*VWRITE,'*'
(A1)
!
*CFCLOS
*end
/input,ff
Re:【原创】ANSYS三维模型导入到ADINA的宏
很不错的咚咚。谢谢楼主Re:【原创】ANSYS三维模型导入到ADINA的宏
谢谢,收藏!Re:【原创】ANSYS三维模型导入到ADINA的宏
tolaogu:你好,我正在由ANSYS转学ADINA,有空多交流啊
我QQ:56859243
Re:【原创】ANSYS三维模型导入到ADINA的宏
不错,不错,不过我在尝试转化ansys的荷载,尤其是面荷载时,发现ansys和adina中单元的面的定义不同,adina中也没有通过节点施加面力的方式,不知斑竹有没有做过尝试?Re:【原创】ANSYS三维模型导入到ADINA的宏
请教:用宏生成的ADINA文件网格数据不被认可,应怎么处理?谢谢!Re:【原创】ANSYS三维模型导入到ADINA的宏
同楼上楼主的命令是否对啊,ADINA不认可啊
向suker8044兄请教
suker8044兄提到的转化ansys的荷载,尤其是面荷载,现在取得成果没?我正苦恼这件事
欢迎指教
QQ:29998393
E-mail:yxleawhu@126.com 贴子发出来了,可根本就不能用,楼主解释一下好吗?
页:
[1]