怎样将ansys输出的体信息按adina要求的节点格式输出
各位大侠那位知道怎么样将ansys输出的体信息按adina要求的节点格式输出,在adina里如何用命令流讲其导入呢?谢谢各位!!!Re:怎样将ansys输出的体信息按adina要求的节点格式输出
[原创]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 nodexy 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
[原创]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
[原创]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
要求加分
要求加分![ 本帖最后由 sucisuci 于 2006-4-28 10:31 编辑 ]
Re:怎样将ansys输出的体信息按adina要求的节点格式输出
谢谢二位,好人拉,春节到了祝你们新年快乐Re:怎样将ansys输出的体信息按adina要求的节点格式输出
不顶勿下!Re:怎样将ansys输出的体信息按adina要求的节点格式输出
感谢sucisuci^_^不错
不错,就是不知道有没有用呢 谢谢高人
页:
[1]