您好,欢迎访问三七文档
当前位置:首页 > 建筑/环境 > 工程监理 > 焊接模拟ansys实例
WORD格式可编辑专业知识整理分享焊接模拟ansys实例!下面的命令流进行的是一个简单的二维焊接分析,利用ANSYS单元生死和热-结构耦合分析功能进!行焊接过程仿真,计算焊接过程中的温度分布和应力分布以及冷却后的焊缝残余应力。finish/clear/filnam,1-2Delementbirthanddeath/title,WeldAnalysisbyElementBirthandDeath/prep7/unit,si!采用国际单位制!******************************************************et,1,13,4!13号二维耦合单元,同时具有温度和位移自由度et,2,13,4!1号材料是钢!2号材料是铝!3号材料是铜!铝是本次分析中的焊料,它将钢结构部分和铜结构部分焊接起来!下面是在几个温度点下,各材料的弹性模量mptemp,1,20,500,1000,1500,2000mpdata,ex,1,1,1.93e11,1.50e11,0.70e11,0.10e11,0.01e11mpdata,ex,2,1,1.02e11,0.50e11,0.08e11,0.001e11,0.0001e11mpdata,ex,3,1,1.17e11,0.90e11,0.30e11,0.05e11,0.005e11!假设各材料都是双线性随动硬化弹塑性本构关系!下面是各材料在各温度点下的屈服应力和屈服后的弹性模量tb,bkin,1,5tbtemp,20,1tbdata,1,1200e6,0.193e11tbtemp,500,2tbdata,1,933e6,0.150e11tbtemp,1000,3tbdata,1,435e6,0.070e11tbtemp,1500,4tbdata,1,70e6,0.010e11tbtemp,2000,5tbdata,1,7e6,0.001e11!tb,bkin,2,5tbtemp,20,1tbdata,1,800e6,0.102e11tbtemp,500,2tbdata,1,400e6,0.050e11tbtemp,1000,3tbdata,1,70e6,0.008e11WORD格式可编辑专业知识整理分享tbtemp,1500,4tbdata,1,1e6,0.0001e11tbtemp,2000,5tbdata,1,0.1e6,0.00001e11!tb,bkin,3,5tbtemp,20,1tbdata,1,900e6,0.117e11tbtemp,500,2tbdata,1,700e6,0.090e11tbtemp,1000,3tbdata,1,230e6,0.030e11tbtemp,1500,4tbdata,1,40e6,0.005e11tbtemp,2000,5tbdata,1,4e6,0.0005e11!!材料密度(假设为常值)mp,dens,1,8030mp,dens,2,4850mp,dens,3,8900!热膨胀系数(假设为常值)mp,alpx,1,1.78e-5mp,alpx,2,9.36e-6mp,alpx,3,1.66e-5!泊松比(假设为常值)mp,nuxy,1,0.29mp,nuxy,2,0.30mp,nuxy,3,0.30!热传导系数(假设为常值)mp,kxx,1,16.3mp,kxx,2,7.44mp,kxx,3,393!比热(假设为常值)mp,c,1,502mp,c,2,544mp,c,3,385!热膨胀系数(假设为常值)!由于该13号单元还有磁自由度,此处假设一磁特性,但并不影响我们所关心的结果mp,murx,1,1mp,murx,2,1mp,murx,3,1!假设焊料(铝)焊上去后的初始温度是1500℃WORD格式可编辑专业知识整理分享mp,reft,1,20mp,reft,2,1500mp,reft,3,20!******************************************************!下面建立几何模型csys,0k,1,0,0,0k,2,0.5,0,0k,3,1,0,0!长1米k,4,0,0.3,0!厚度0.3米(二维中叫做宽度)k,5,0.35,0.3,0k,6,0.65,0.3,0k,7,1,0.3,0a,1,2,5,4a,2,6,5a,2,3,7,6!!!!!!!!!!!!!!!!!!!!!!!!!!划分网格!!!!!!!!!!!!!!!!!esize,0.025type,2mat,2amesh,2!esize,0.05!网格划分出现问题type,1mat,1amesh,1!mat,3amesh,3eplot!/soluantype,4!瞬态分析trnopt,full!!!!!!!!!!!!!!!!!!!!!!!!在模型的左边界加位移约束!!!!!!!!!!!!!!!!!!!!!!!!!!!nsel,all*get,minx,node,,mnloc,xnsel,s,loc,x,minxd,all,ux,0*get,miny,node,,mnloc,ynsel,r,loc,y,minyd,all,uy,0!*****假设模型的左右边界处温度始终保持在20摄氏度左右*****!其他边界条件如对流和辐射等均可施加,此处因为只是示意而已,故只施加恒温边WORD格式可编辑专业知识整理分享界条件nsel,all*get,minx,node,,mnloc,xnsel,s,loc,x,minxd,all,temp,20nsel,all*get,maxx,node,,mxloc,xnsel,s,loc,x,maxxd,all,temp,20!!!!!!!!!!!!!!!由于第2个面是焊接所在区域,因此首先将该区域的单元“杀死”!!!!!!!!!!!!!!!!nna=2esel,all*get,emax,elem,,num,maxasel,s,area,,nnaesla*get,nse,elem,,count*dim,ne,,nse*dim,nex,,nse*dim,ney,,nse*dim,neorder,,nsemine=0!**********************************************!下面的do循环用于将焊料区的单元按其形心y坐标排序!以便后面模拟焊料由下向上逐步“生长”过程*do,i1,1,nseesel,u,elem,,mine*get,nse1,elem,,countii=0*do,i,1,emax*if,esel(i),eq,1,thenii=ii+1ne(ii)=i*endif*enddo*do,i,1,nse1*get,ney(i),elem,ne(i),cent,y*get,nex(i),elem,ne(i),cent,x*enddominy=1e20minx=1e20*do,i,1,nse1*if,ney(i),lt,miny,thenminy=ney(i)WORD格式可编辑专业知识整理分享minx=nex(i)mine=ne(i)*else*if,ney(i),eq,miny,then*if,nex(i),lt,minx,thenminy=ney(i)minx=nex(i)mine=ne(i)*endif*endif*endif*enddoneorder(i1)=mine*enddo!**************************************************************max_tem=1500!按照前面假设,焊料的初始温度为1500℃dt1=1e-3!用于建立初始条件的一个很小的时间段dt=5!焊接一个单元所需的时间t=0!起始时间esel,alleplot/auto,1/replot*do,i,1,nseekill,neorder(i)esel,s,liveeplot*enddoallsel,alloutres,all,allic,all,temp,20kbc,1timint,0,structtimint,1,thermtimint,0,magtintp,0.005,,,1,0.5,0.2!nsub1=2nsub2=40!**************************************************do,i,1,nseealive,neorder(i)esel,s,liveeplotWORD格式可编辑专业知识整理分享esel,all!******下面的求解用于建立温度的初始条件******t=t+dt1time,tnsubst,1*do,j,1,4d,nelem(neorder(i),j),temp,max_tem*enddosolve!****下面的求解用于保证初始的升温速度为零****t=t+dt1time,tsolve!*********下面的步骤用于求解温度分布***********do,j,1,4ddele,nelem(neorder(i),j),temp*enddot=t+dt-2*dt1time,tnsubst,nsub1solve*enddot=t+50000!*********下面的步骤用于冷却过程求解*****time,tnsubst,nsub2solvesavefinish!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!后处理过程!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!/post1!**************下面的一系列命令用于生成应力的动画文件*******/seg,dele/cont,1,15,0,1200e6/16,1200e6/dscale,1,1.0avprin,0,0avres,1/seg,multi,stress1,0.1esel,all*do,i,1,nseesel,u,elem,,neorder(i)*enddo*do,i,1,nseesel,a,elem,,neorder(i)set,(i-1)*3+1,1WORD格式可编辑专业知识整理分享plnsol,s,eqv*do,j,1,nsub1set,(i-1)*3+3,jplnsol,s,eqv*enddo*enddo*do,i,1,nsub2set,(nse-1)*3+4,iplnsol,s,eqv*enddo/seg,off,stress1,0.1/anfile,save,stress1,avi!**********下面的一系列命令用于生成温度的动画文件************/seg,dele/cont,1,15,0,1500/16,1500/dscale,1,1.0avprin,0,0avres,1/seg,multi,temp1,0.1esel,all*do,i,1,nseesel,u,elem,,neorder(i)*enddo*do,i,1,nseesel,a,elem,,neorder(i)set,(i-1)*3+1,1plnsol,temp*do,j,1,nsub1set,(i-1)*3+3,jplnsol,temp*enddo*enddo*do,i,1,nsub2set,(nse-1)*3+4,iplnsol,temp*enddo/seg,off,temp1,0.1/anfile,save,temp1,avifinish
本文标题:焊接模拟ansys实例
链接地址:https://www.777doc.com/doc-3190397 .html