您的位置:网站首页 > Ansys教程

ANSYS工字梁焊缝初应力例子

时间:2008-09-15 10:53:23 来源:

ANSYS工字梁焊缝初应力例子

!建立好模型
…..
/SOLU
!*
ANTYPE,0
/INPUT,'input','txt',
/INPUT,'output1','txt',
!*
ISFILE,READ,1,txt, ,0
SOLVE
=====================
!定义残余应力矩阵
I=1
fy=310e6
!定义单元中心坐标数组,初应力数组
*DIM,EleCenter,ARRAY,NumNode,3,1, , ,
*DIM,EleIS,ARRAY,NumNode,1,1, , ,
*DO,I, 1, NumNode,1
!得到单元中心坐标
*GET,EleCenter(I,1,1),ELEM,I,CENT,X
*GET,EleCenter(I,2,1),ELEM,I,CENT,Y
*GET,EleCenter(I,3,1),ELEM,I,CENT,Z
!焊缝位置在X=1.0 到1.05 之间
*IF,EleCenter(I,1,1),GT,1,THEN
*IF,EleCenter(I,1,1),LT,1.05,THEN
*IF,EleCenter(I,2,1),GT,0.5,THEN
!上翼缘初始应力
EleIS(I,1,1)=-20*fy*EleCenter(I,3,1)**2+0.3*fy
*endif
*IF,EleCenter(I,2,1),LT,0.0,THEN
!下翼缘初始应力
EleIS(I,1,1)=-20*fy*EleCenter(I,3,1)**2+0.3*fy
*endif
!腹板初始应力
*if,EleCenter(I,2,1),GE,0.0,THEN
*IF,ELECENTER(I,2,1),LE,0.5,THEN
EleIS(I,1,1)=4.076*fy*(EleCenter(I,2,1)-0.5)**2
EleIS(I,1,1)=EleIS(I,1,1)-0.719*fy
*IF,EleIS(I,1,1),LT,-0.3*fy,THEN
ELeIS(I,1,1)=-0.3*fy
*ENDIF

*ENDIF
*ENDIF
*ENDIF
*ENDIF
*ENDDO
===============
!输出应力数值
*CFOPEN,'1','txt',' '
*DO,I,1,3840
!*IF,EleIS(I,1,1),ne,0.,then
*VWRITE,'!'
(A)
*VWRITE,'! Stress for element',
(A,F)
*VWRITE,'!'
(A)
*VWRITE,'eis,',I
(A,F)
P=EleIS(I,1,1)
*VWRITE,P,0.,0.,0.,0.,0.
(E,E,E,E,E,E)
!*ENDIF
*ENDDO
*CFCLOS