(整理)ANSYS焊接高斯热源APDL参考.
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
不准
/UNITS,SI
/CONFIG,NRES,10000
/PREP7
ET,1,SOLID70
MP,DENS,1,7930
MP,C,1,502
mptemp,1,20,100,500
mpdata,kxx,1,1,12.1,16.3,21.4
/VIEW,1,1,1,1
!*************定义基板尺寸***********
lx=0.1
lz=0.1
ly=0.006
!*************定义焊接参数***********
weld=0.01 !每道焊道宽度wheight=0.004 !焊道的高度
LSIZE=0.005
V=0.008 !速度
pi=3.1415926
U=25
I=180
Q=U*I !电源有效功率
R=0.006 !电源有效热半径
effect=0.8
Qmax=effect*Q/(pi*R*R) !中心处最大热流
tinc=LSIZE/V !每小段的时间间隔
!*****************建立模型,生成网格************** block,0,lx,0,ly,0,lz
wpoff,0,ly,lz/2
block,0,lx,0,wheight,-weld/2,weld/2
wpoff,0,0,-weld/2
vsbw,all,,delete
wpoff,0,0,weld
vsbw,all,,delete
vglue,all
lsel,s,,,p
lsel,s,line,,26
lsel,a,line,,30
lsel,a,line,,33
lsel,a,line,,35
lsel,s,line,,26
lsel,a,line,,30
lsel,a,line,,33
lsel,a,line,,35 lesize,all,0.005,,,0.2,,,,1
lsel,s,line,,9,10
lsel,a,line,,12
lsel,a,line,,38 lesize,all,0.005,,,0.2,,,,1
lsel,s,line,,2
lsel,a,line,,4,5
lsel,a,line,,7
lsel,a,line,,14
lsel,a,line,,16
lsel,a,line,,19
lsel,a,line,,39 lesize,all,0.002,,,1,,,,1
lsel,s,line,,23,24
lsel,a,line,,41,42 lsel,a,line,,45
lsel,a,line,,47
lsel,s,line,,23,24
lsel,a,line,,41,42 lsel,a,line,,45
lsel,a,line,,47 lesize,all,0.002,,,1,,,,1
vmesh,all
/PNUM,DEFA EPLOT
fini
/solu
antype,trans,new
!nlgeom,on
timint,0,struct timint,1,therm timint,0,mag
timint,0,elect
tref,25
nropt,auto
autos,on
kbc,0
pred,on
lnsrch,on
!************杀死焊缝去单元***********
nsel,s,loc,y,ly,ly+wheight
esln,s,1
ekill,all
allsel,all
esel,s,live
eplot
!**********施加对流载荷*************
esel,s,live
nsel,s,loc,z,0
nsel,a,loc,z,lz
nsel,a,loc,x,0
nsel,a,loc,x,lx
sf,all,conv,10,25
!************定义数组维数**********
MAX_X=1+lx/LSIZE
!*************定义table数组****************************************** *do,i,1,MAX_X,1
local,12,0,(i-1)*lsize,ly,lz/2,,,,,,
*del,_FNCNAME
*del,_FNCMTID
*del,_FNC_C1
*del,_FNC_C2
*del,_FNC_C3
*del,_FNC_C4
*del,_FNCCSYS
*del,'heatflux'
!定义表格各行
*set,_FNCNAME,'heatflux'
*dim,_FNC_C1,,1
*dim,_FNC_C2,,1
*dim,_FNC_C3,,1
*dim,_FNC_C4,,1
!表格各行赋值
*set,_FNC_C1(1),effect
*set,_FNC_C2(1),U
*set,_FNC_C3(1),I
*set,_FNC_C4(1),R
*set,_FNCCSYS,12
*DIM,%_FNCNAME%,TABLE,6,26,1,,,,%_FNCCSYS%
!
! Begin of equation: 3*effect*U*I*exp(-3*({X}^2+{Z}^2)/R^2)/({PI}*R^2) %_FNCNAME%(0,0,1)= 0.0, -999
%_FNCNAME%(2,0,1)= 0.0
%_FNCNAME%(3,0,1)= %_FNC_C1(1)%
%_FNCNAME%(4,0,1)= %_FNC_C2(1)%
%_FNCNAME%(5,0,1)= %_FNC_C3(1)%
%_FNCNAME%(6,0,1)= %_FNC_C4(1)%
%_FNCNAME%(0,1,1)= 1.0, -1, 0, 3, 0, 0, 17
%_FNCNAME%(0,2,1)= 0.0, -2, 0, 1, -1, 3, 17
%_FNCNAME%(0,3,1)= 0, -1, 0, 1, -2, 3, 18
%_FNCNAME%(0,4,1)= 0.0, -2, 0, 1, -1, 3, 19
%_FNCNAME%(0,5,1)= 0.0, -1, 0, 0, 0, 0, 0
%_FNCNAME%(0,6,1)= 0.0, -3, 0, 1, 0, 0, -1
%_FNCNAME%(0,7,1)= 0.0, -4, 0, 1, -1, 2, -3
%_FNCNAME%(0,8,1)= 0.0, -1, 0, 3, 0, 0, -4
%_FNCNAME%(0,9,1)= 0.0, -3, 0, 1, -4, 3, -1
%_FNCNAME%(0,10,1)= 0.0, -1, 0, 2, 0, 0, 2
%_FNCNAME%(0,11,1)= 0.0, -4, 0, 1, 2, 17, -1
%_FNCNAME%(0,12,1)= 0.0, -1, 0, 2, 0, 0, 4
%_FNCNAME%(0,13,1)= 0.0, -5, 0, 1, 4, 17, -1
%_FNCNAME%(0,14,1)= 0.0, -1, 0, 1, -4, 1, -5
%_FNCNAME%(0,15,1)= 0.0, -4, 0, 1, -3, 3, -1
%_FNCNAME%(0,16,1)= 0.0, -1, 0, 2, 0, 0, 20
%_FNCNAME%(0,17,1)= 0.0, -3, 0, 1, 20, 17, -1
%_FNCNAME%(0,18,1)= 0.0, -1, 0, 1, -4, 4, -3
%_FNCNAME%(0,19,1)= 0.0, -1, 7, 1, -1, 0, 0
%_FNCNAME%(0,20,1)= 0.0, -3, 0, 1, -2, 3, -1
%_FNCNAME%(0,21,1)= 0.0, -1, 0, 2, 0, 0, 20
%_FNCNAME%(0,22,1)= 0.0, -2, 0, 1, 20, 17, -1
%_FNCNAME%(0,23,1)= 0.0, -1, 0, 3.14159265358979310, 0, 0, -2
%_FNCNAME%(0,24,1)= 0.0, -4, 0, 1, -1, 3, -2
%_FNCNAME%(0,25,1)= 0.0, -1, 0, 1, -3, 4, -4
%_FNCNAME%(0,26,1)= 0.0, 99, 0, 1, -1, 0, 0
! End of equation: 3*effect*U*I*exp(-3*({X}^2+{Z}^2)/R^2)/({PI}*R^2) !-->
!**********激活单元*********
esel,s,live
nsel,s,loc,x,(i-1)*lsize-0.002,(i-1)*lsize+0.002
nsel,r,loc,z,-weld/2,weld/2
nsel,r,loc,y,0,wheight
esln,s,0
ealive,all
allsel,all
!**********施加热流载荷********** esel,s,live
nsel,s,loc,Y,wheight
sf,all,hflux,%heatflux%
allsel,all
time,i*tinc
nsubst,2
SOLVE
!*************删除热流载荷*********** nsel,s,loc,y,wheight
sfdele,all,hflux
allsel,all
esel,s,live
eplot
OUTRES,ALL,ALL,
/PSF,HFLUX,,2
/REPLOT
OUTRES,ALL,ALL,
*ENDDO。