找回密码
 注册
Simdroid-非首页
查看: 387|回复: 10

怎样将ansys输出的体信息按adina要求的节点格式输出

[复制链接]
发表于 2006-1-21 11:05:48 | 显示全部楼层 |阅读模式 来自 陕西西安
各位大侠那位知道怎么样将ansys输出的体信息按adina要求的节点格式输出,在adina里如何用命令流讲其导入呢?谢谢各位!!!
发表于 2006-1-24 15:56:01 | 显示全部楼层 来自 同济大学

Re:怎样将ansys输出的体信息按adina要求的节点格式输出

Simdroid开发平台
[原创]ansys转adina(结构单元),可按实际情况扩展
!********************************************************************
!*material properties
!********************************************************************
MATNUM=3               !材料种类数目,应根据实际情况修改
*DO,I,1,MATNUM
*GET,MEX,EX, I, TEMP, 0
*GET,MNUXY,NUXY, I, TEMP, 0
*GET,MDENS,DENS, I, TEMP, 0
/OUTPUT,ANOUT,TXT,,APPEND
*VWRITE,I,MEX,MNUXY,MDENS
material elastic name=%3I    e=%20.8G    nu=%20.8G    density=%20.8G
/OUT
*ENDDO

!********************************************************************
!*real const
!********************************************************************
*GET, CONSTNUM, RCON, N, NUM, MAX
*DO,I,1,CONSTNUM
*GET, CONST1, RCON, I, CONST, 1           !AREA
*GET, CONST2, RCON, I, CONST, 2           !IZZ
*GET, CONST3, RCON, I, CONST, 3           !IYY
RIN=CONST2+CONST3
/OUTPUT,ANOUT,TXT,,APPEND
*VWRITE,I,RIN,CONST3,CONST2,CONST1
cross-section properties NAME=%3I   RINERTIA=%20.8G    SINERTIA=%20.8G   TINERTIA=%20.8G   AREA=%20.8G
/OUT  
*ENDDO

!********************************************************************
!*node coordinate
!********************************************************************
ALLSEL,ALL
*GET, NNUM, NODE,  0, COUNT
*GET, NMIN, NODE,  0, NUM, MIN
*DIM,NODES,ARRAY,NNUM,4
*DO,I,1,NNUM
  NODES(I,1)=NMIN
  NODES(I,2)=NX(NMIN)
  NODES(I,3)=NY(NMIN)
  NODES(I,4)=NZ(NMIN)
  NMIN=NDNEXT(NMIN)
*ENDDO
/OUTPUT,ANOUT,TXT,,APPEND
*VWRITE,NNUM
*ELNUM=%8I
/COM,*NODE COORDINATES
/COM,coordinates nodes
/COM,entries node  x  y   z
*VWRITE,NODES(1,1),NODES(1,2),NODES(1,3),NODES(1,4)
%8I %20.8G %20.8G %20.8G
/COM
/COM,*END NODE INPUT
/COM,DATAEND
/COM
/OUT
!********************************************************************
!BEAM4
!********************************************************************
ESEL,ALL
ESEL,S,ENAME,,BEAM4
*GET, ELNUM, ELEM,  0, COUNT
*IF,ELNUM,EQ,0,THEN
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*BEAM4
/COM,*ELNUM=0
/OUT
*ELSE
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*BEAM4
*VWRITE,ELNUM
*ELNUM=%8I
/OUT
*Get,ELMIN,ELEM,0,NUM,MIN
*DIM,BEAM_4,ARRAY,1,3
*DO,J,1,ELNUM
  *GET,MATNUM,ELEM,ELMIN,ATTR,MAT
  *GET,ELSEC,ELEM,ELMIN,ATTR,REAL
  GNAME=10+MATNUM
  *GET, N1, ELEM, ELMIN, NODE, 1
  *GET, N2, ELEM, ELMIN, NODE, 2
  BEAM_4(1,1)=ELMIN
  BEAM_4(1,2)=N1
  BEAM_4(1,3)=N2
  ELMIN=Elnext(ELMIN)
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup beam name=%3I      material=%3I
*VWRITE,GNAME
enodes group=%3I      nnodes=2
/COM,entries el aux n1 n2
*VWRITE,BEAM_4(1,1),BEAM_4(1,2),BEAM_4(1,3)
%8I %8I %8I
*VWRITE,GNAME
edata group=%3I
/COM,entries el material section
*VWRITE,BEAM_4(1,1),MATNUM,ELSEC
%8I %8I %8I
/out
*ENDDO
*ENDIF

/OUTPUT,ANOUT,TXT,,APPEND
/COM
/COM,*END BEAM4 INPUT
/COM
/OUT
!********************************************************************
!BEAM44
!********************************************************************
ESEL,ALL
ESEL,S,ENAME,,BEAM44
*GET, ELNUM, ELEM,  0, COUNT
*IF,ELNUM,EQ,0,THEN
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*BEAM44
/COM,*ELNUM=0
/OUT
*ELSE
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*BEAM44
*VWRITE,ELNUM
*ELNUM=%8I
/OUT
*Get,ELMIN,ELEM,0,NUM,MIN
*DIM,BEAM_44,ARRAY,1,3
*DO,J,1,ELNUM
  *GET,MATNUM,ELEM,ELMIN,ATTR,MAT
  *GET,ELSEC,ELEM,ELMIN,ATTR,REAL
  GNAME=20+MATNUM
  *GET, N1, ELEM, ELMIN, NODE, 1
  *GET, N2, ELEM, ELMIN, NODE, 2
  BEAM_44(1,1)=ELMIN
  BEAM_44(1,2)=N1
  BEAM_44(1,3)=N2
  ELMIN=Elnext(ELMIN)
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup beam name=%3I      material=%3I
*VWRITE,GNAME
enodes group=%3I      nnodes=2
/COM,entries el aux n1 n2
*VWRITE,BEAM_44(1,1),BEAM_44(1,2),BEAM_44(1,3)
%8I %8I %8I
*VWRITE,GNAME
edata group=%3I
/COM,entries el material section
*VWRITE,BEAM_44(1,1),MATNUM,ELSEC
%8I %8I %8I
/out
*ENDDO
*ENDIF
/OUTPUT,ANOUT,TXT,,APPEND
/COM
/COM,*END BEAM44 INPUT
/COM
/OUT
!********************************************************************
!BEAM188
!********************************************************************
ESEL,ALL
ESEL,S,ENAME,,BEAM188
*GET, ELNUM, ELEM,  0, COUNT
*IF,ELNUM,EQ,0,THEN
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*BEAM188
/COM,*ELNUM=0
/OUT
*ELSE
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*BEAM188
*VWRITE,ELNUM
*ELNUM=%8I
/OUT
*Get,ELMIN,ELEM,0,NUM,MIN
*DIM,BEAM_188,ARRAY,1,3
*DO,J,1,ELNUM
  *GET,MATNUM,ELEM,ELMIN,ATTR,MAT
  *GET,ELSEC,ELEM,ELMIN,ATTR,SECN
  GNAME=30+MATNUM
  *GET, N1, ELEM, ELMIN, NODE, 1
  *GET, N2, ELEM, ELMIN, NODE, 2
  BEAM_188(1,1)=ELMIN
  BEAM_188(1,2)=N1
  BEAM_188(1,3)=N2
  ELMIN=Elnext(ELMIN)
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup beam name=%3I      material=%3I
*VWRITE,GNAME
enodes group=%3I      nnodes=2
/COM,entries el aux n1 n2
*VWRITE,BEAM_188(1,1),BEAM_188(1,2),BEAM_188(1,3)
%8I %8I %8I
*VWRITE,GNAME
edata group=%3I
/COM,entries el material section
*VWRITE,BEAM_188(1,1),MATNUM,ELSEC
%8I %8I %8I
/out
*ENDDO
*ENDIF
/OUTPUT,ANOUT,TXT,,APPEND
/COM
/COM,*END BEAM188 INPUT
/COM
/OUT
!********************************************************************
!LINK8
!********************************************************************
ESEL,ALL
ESEL,S,ENAME,,LINK8
*GET, ELNUM, ELEM,  0, COUNT
*IF,ELNUM,EQ,0,THEN
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*LINK8
/COM,*ELNUM=0
/OUT
*ELSE
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*LINK8
*VWRITE,ELNUM
*ELNUM=%8I
/OUT
*Get,ELMIN,ELEM,0,NUM,MIN
*DIM,LINK_8,ARRAY,1,3
*DO,J,1,ELNUM
  *GET,MATNUM,ELEM,ELMIN,ATTR,MAT
  *GET,ELSEC,ELEM,ELMIN,ATTR,REAL
  *GET,ELAREA, RCON, ELSEC, CONST,1
  GNAME=40+MATNUM
  *GET, N1, ELEM, ELMIN, NODE, 1
  *GET, N2, ELEM, ELMIN, NODE, 2
  LINK_8(1,1)=ELMIN
  LINK_8(1,2)=N1
  LINK_8(1,3)=N2
  ELMIN=Elnext(ELMIN)
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup truss name=%3I      material=%3I
*VWRITE,GNAME
enodes group=%3I      nnodes=2
/COM,entries el n1 n2
*VWRITE,LINK_8(1,1),LINK_8(1,2),LINK_8(1,3)
%8I %8I %8I
*VWRITE,GNAME
edata group=%3I
/COM,entries el material area
*VWRITE,LINK_8(1,1),MATNUM,ELAREA
%8I %8I %20.8G
/out
*ENDDO
*ENDIF
/OUTPUT,ANOUT,TXT,,APPEND
/COM
/COM,*END LINK8 INPUT
/COM
/OUT
!********************************************************************
!LINK10
!********************************************************************
ESEL,ALL
ESEL,S,ENAME,,LINK10
*GET, ELNUM, ELEM,  0, COUNT
*IF,ELNUM,EQ,0,THEN
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*LINK10
/COM,*ELNUM=0
/OUT
*ELSE
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*LINK10
*VWRITE,ELNUM
*ELNUM=%8I
/OUT
*Get,ELMIN,ELEM,0,NUM,MIN
*DIM,LINK_10,ARRAY,1,3
*DO,J,1,ELNUM
  *GET,MATNUM,ELEM,ELMIN,ATTR,MAT
  *GET,ELSEC,ELEM,ELMIN,ATTR,REAL
  *GET,ELAREA, RCON, ELSEC, CONST,1
  *GET,EPSIN, RCON, ELSEC, CONST,2
  GNAME=50+MATNUM
  *GET, N1, ELEM, ELMIN, NODE, 1
  *GET, N2, ELEM, ELMIN, NODE, 2
  LINK_10(1,1)=ELMIN
  LINK_10(1,2)=N1
  LINK_10(1,3)=N2
  ELMIN=Elnext(ELMIN)
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup truss name=%3I      material=%3I     displacements=large
*VWRITE,GNAME
enodes group=%3I      nnodes=2
/COM,entries el n1 n2
*VWRITE,LINK_10(1,1),LINK_10(1,2),LINK_10(1,3)
%8I %8I %8I
*VWRITE,GNAME
edata group=%3I
/COM,entries el material area epsin
*VWRITE,LINK_10(1,1),MATNUM,ELAREA,EPSIN
%8I %8I %20.8G %20.8G
/out
*ENDDO
*ENDIF
/OUTPUT,ANOUT,TXT,,APPEND
/COM
/COM,*END LINK10 INPUT
/COM
/OUT
!********************************************************************
!SHELL63
!********************************************************************
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*SHELL and PLATE
/OUT
ESEL,ALL
ESEL,S,ENAME,,SHELL63
*GET, ELNUM, ELEM,  0, COUNT
*IF,ELNUM,EQ,0,THEN
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*SHELL63
/COM,*ELNUM=0
/OUT
*ELSE
/OUTPUT,ANOUT,TXT,,APPEND
/COM,*SHELL63
*VWRITE,ELNUM
*ELNUM=%8I
/OUT
*Get,ELMIN,ELEM,0,NUM,MIN
*DIM,SHELL_63,ARRAY,1,5
QCOUNT=0
TCOUNT=0
*DO,J,1,ELNUM
  *GET,MATNUM,ELEM,ELMIN,ATTR,MAT
  *GET,MATDENS,DENS, MATNUM, TEMP, 0
  *GET,ELSEC,ELEM,ELMIN,ATTR,REAL
  *GET,ELTHICK, RCON, ELSEC, CONST,1
  *GET,ELMASS, RCON, ELSEC, CONST,19
  *GET, N1, ELEM, ELMIN, NODE, 1
  *GET, N2, ELEM, ELMIN, NODE, 2
  *GET, N3, ELEM, ELMIN, NODE, 3
  *GET, N4, ELEM, ELMIN, NODE, 4
  *IF,ELMASS,EQ,0.0,THEN               !根据膜的附加质量和密度计算膜的厚度
    ELTHICK=1.0*ELTHICK
  *ELSE
    ELTHICK=ELMASS/MATDENS
  *ENDIF
  SHELL_63(1,1)=ELMIN
  SHELL_63(1,2)=N1
  SHELL_63(1,3)=N2
  SHELL_63(1,4)=N3
  SHELL_63(1,5)=N4
  ELMIN=Elnext(ELMIN)
  
*IF,N3,NE,N4,THEN
QCOUNT=QCOUNT+1
GNAME=100+MATNUM
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup shell name=%3I      material=%3I
*VWRITE,GNAME
enodes group=%3I      nnodes=4
/COM,entries el n1 n2 n3 n4
*VWRITE,SHELL_63(1,1),SHELL_63(1,2),SHELL_63(1,3),SHELL_63(1,4),SHELL_63(1,5)
%8I %8I %8I %8I %8I
/COM,elthickness
*VWRITE,SHELL_63(1,1),ELTHICK,ELTHICK,ELTHICK,ELTHICK
%8I %20.8G %20.8G %20.8G %20.8G
*VWRITE,GNAME
edata group=%3I
/COM,entries el material
*VWRITE,SHELL_63(1,1),MATNUM
%8I %8I
/out

*ELSE
TCOUNT=TCOUNT+1
GNAME=200+MATNUM
/OUTPUT,ANOUT,TXT,,APPEND
/COM
*VWRITE,GNAME,MATNUM
egroup plate name=%3I      material=%3I
*VWRITE,GNAME
enodes group=%3I      nnodes=3
/COM,entries el n1 n2 n3
*VWRITE,SHELL_63(1,1),SHELL_63(1,2),SHELL_63(1,3),SHELL_63(1,4)
%8I %8I %8I %8I
*VWRITE,GNAME
edata group=%3I
/COM,entries el material thick
*VWRITE,SHELL_63(1,1),MATNUM,ELTHICK
%8I %8I %20.8G
/out
*ENDIF
*ENDDO
*ENDIF
/OUTPUT,ANOUT,TXT,,APPEND
/COM
/COM,*END SHELL INPUT
/COM,DATAEND
/COM
/OUT

评分

1

查看全部评分

发表于 2006-1-24 15:58:30 | 显示全部楼层 来自 同济大学

[原创]ansys转adina(质量单元)

[原创]ansys转adina(质量单元)
!********************************************************************
!*MASS POINS
!********************************************************************
ALLSEL,ALL
ESEL,S,ENAME,,MASS21
*GET, MNUM, ELEM,  0, COUNT
*GET, MMIN, ELEM,  0, NUM, MIN
*DIM,MNODE,ARRAY,NNUM,1
*DIM,MREAL,ARRAY,NNUM,6
*DO,I,1,MNUM
  *GET, NREAL, ELEM, MMIN, ATTR, REAL
  *GET, MNODE(I), ELEM, MMIN, NODE, 1
  *GET, MREAL(I,1), RCON, NREAL, CONST, 1
  *GET, MREAL(I,2), RCON, NREAL, CONST, 2
  *GET, MREAL(I,3), RCON, NREAL, CONST, 3
  *GET, MREAL(I,4), RCON, NREAL, CONST, 4
  *GET, MREAL(I,5), RCON, NREAL, CONST, 5
  *GET, MREAL(I,6), RCON, NREAL, CONST, 6
  MMIN=ELNEXT(MMIN)
*ENDDO
/OUTPUT,ANOUT,TXT,,APPEND
/COM,MASSES NODES
/COM,entries node mass1 mass2 mass3 mass4 mass5 mass6
*VWRITE,MNODE(1),MREAL(1,1),MREAL(1,2),MREAL(1,3),MREAL(1,4),MREAL(1,5),MREAL(1,6)
%8I %12.3G %12.5G %12.5G %12.5G %12.5G %12.5G
/COM,DATAEND
/COM,*END NODE MASS INPUT
/COM
/OUT
发表于 2006-1-24 16:00:43 | 显示全部楼层 来自 同济大学

[原创]ansys转adina(边界条件)

[原创]ansys转adina(边界条件)
!********************************************************************
!*node constraints
!********************************************************************
ALLSEL,ALL
*GET, NNUM, NODE,  0, COUNT
*GET, NMIN, NODE,  0, NUM, MIN
CTOL=0
*DO,I,1,NNUM
  *GET, CXN, NODE, NMIN, D,UX
  *GET, CYN, NODE, NMIN, D,UY
  *GET, CZN, NODE, NMIN, D,UZ
  *GET, CXM, NODE, NMIN, D,ROTX
  *GET, CYM, NODE, NMIN, D,ROTY
  *GET, CZM, NODE, NMIN, D,ROTZ
  TOL=CXN*CYN*CZN*CXM*CYM*CZM
*IF,TOL,EQ,0.0,THEN
CTOL=CTOL+1  
*ELSE

*ENDIF
NMIN=NDNEXT(NMIN)
*ENDDO
/OUT

ALLSEL,ALL
*GET, NNUM, NODE,  0, COUNT
*GET, NMIN, NODE,  0, NUM, MIN
*DIM,NNUMS,ARRAY,CTOL,1
*DIM,NCONS,CHAR,CTOL,6
CNTOL=0
*DO,I,1,NNUM
  *GET, CXN, NODE, NMIN, D,UX
  *GET, CYN, NODE, NMIN, D,UY
  *GET, CZN, NODE, NMIN, D,UZ
  *GET, CXM, NODE, NMIN, D,ROTX
  *GET, CYM, NODE, NMIN, D,ROTY
  *GET, CZM, NODE, NMIN, D,ROTZ
  TOL=CXN*CYN*CZN*CXM*CYM*CZM
*IF,TOL,EQ,0.0,THEN
  CNTOL=CNTOL+1
  NNUMS(CNTOL)=NMIN
        *IF,CXN,GT,1.0E10,THEN
          NCONS(CNTOL,1)='FREE'
  *ELSE
    NCONS(CNTOL,1)='FIXED'
  *ENDIF
  *IF,CYN,GT,1.0E10,THEN
          NCONS(CNTOL,2)='FREE'
  *ELSE
    NCONS(CNTOL,2)='FIXED'
  *ENDIF
  *IF,CZN,GT,1.0E10,THEN
          NCONS(CNTOL,3)='FREE'
  *ELSE
    NCONS(CNTOL,3)='FIXED'
  *ENDIF
  *IF,CXM,GT,1.0E10,THEN
          NCONS(CNTOL,4)='FREE'
  *ELSE
    NCONS(CNTOL,4)='FIXED'
  *ENDIF
  *IF,CYM,GT,1.0E10,THEN
          NCONS(CNTOL,5)='FREE'
  *ELSE
    NCONS(CNTOL,5)='FIXED'
  *ENDIF
  *IF,CZM,GT,1.0E10,THEN
          NCONS(CNTOL,6)='FREE'
  *ELSE
    NCONS(CNTOL,6)='FIXED'
  *ENDIF
*ELSE

*ENDIF
  NMIN=NDNEXT(NMIN)
*ENDDO
/OUTPUT,ANOUT,TXT,,APPEND
/COM,BOUNDARIES
/COM,entries node ux uy uz rx ry rz
*VWRITE,NNUMS(1),NCONS(1,1),NCONS(1,2),NCONS(1,3),NCONS(1,4),NCONS(1,5),NCONS(1,6)
%8I %8C %8C %8C %8C %8C %8C
/COM,DATAEND
/COM,*END NODE BOUNDARIES INPUT
/COM
/OUT
发表于 2006-1-24 16:04:07 | 显示全部楼层 来自 同济大学

要求加分

要求加分!

[ 本帖最后由 sucisuci 于 2006-4-28 10:31 编辑 ]
 楼主| 发表于 2006-1-26 19:30:55 | 显示全部楼层 来自 陕西西安

Re:怎样将ansys输出的体信息按adina要求的节点格式输出

谢谢二位,好人拉,春节到了祝你们新年快乐
发表于 2006-1-30 18:28:52 | 显示全部楼层 来自 同济大学

Re:怎样将ansys输出的体信息按adina要求的节点格式输出

不顶勿下!
发表于 2006-2-7 20:33:50 | 显示全部楼层 来自 江苏南京

Re:怎样将ansys输出的体信息按adina要求的节点格式输出

感谢  sucisuci  ^_^
farland 该用户已被删除
发表于 2006-10-27 15:27:25 | 显示全部楼层 来自 四川成都
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2007-3-21 09:22:59 | 显示全部楼层 来自 江苏南京

不错

不错,就是不知道有没有用呢
发表于 2008-10-6 10:02:14 | 显示全部楼层 来自 天津
谢谢高人
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-11-2 13:32 , Processed in 0.043970 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表