!非线性材料求解成功GAUSS分布Z向扫描!!考虑了和基板对流情况下加载热流密度的热分析rb=0.15mm!粉床7.8X3.3mm,烧结区域6X1.5mm!考虑粉床表面的辐射、对流!考虑粉末状、熔化状(液态)、凝固态的边界条件变化!考虑金属蒸发会带走一部分能量,故效率减半eff=0.7!r=0.2mmFINISH/CLEAR,START/BATCH!设置程序模式为“批处理”/CWD,'d:\Ansyswork\EBMFEMSimulationforMetals\3DTemperturedistribution'!更改当前工作目录/FILNAME,EBM_db,0/TITLE,3DTemperturedistrbution!选择分析问题的类型:热/NOPR/PMETH,OFF,0KEYW,PR_SET,1KEYW,PR_STRUC,0KEYW,PR_THERM,1KEYW,PR_FLUID,0KEYW,PR_ELMAG,0KEYW,MAGNOD,0KEYW,MAGEDG,0KEYW,MAGHFE,0KEYW,MAGELC,0KEYW,PR_MULTI,0KEYW,PR_CFD,0/GO/UNITS,SI!StandardUnits!*************************************************************************************************!!开始,进入前处理器,定义下列属性-!0参数定义!1定义单元类型!2实常数!3材料性能!4几何模型!5网格划分控制!6其他!*************************************************************************************************!/PREP7!0参数定义!模型参数!几何模型尺寸me-3=mm*SET,Block_x,7.8e-3*SET,Block_x1,0.9e-3*SET,Block_x2,6.9e-3*SET,Block_y,3.3e-3*SET,Block_y1,0.9e-3*SET,Block_y2,2.4e-3*SET,Block_z,0.3e-3*SET,Block_z1,0.9e-3!划分网格的大小*SET,LMeshx,3e-4!line1*SET,LMeshy,3e-4!line4*SET,LMeshz,3e-4!line9!边界条件参数*SET,Tinit,30!初始温度!1定义单元类型ET,1,SOLID70ET,2,surf152!表面效应单元r,2KEYOPT,2,4,1!表面效应单元设置KEYOPT,2,8,4ET,3,SOLID87!2实常数!Nothing!3材料性能MPTEMPMPTEMP,1,25,400,1200,1600,2000,2500MPDATA,DENS,1,1,3983,4688.4,5406.8,5948.8,6908,6331!密度MPDATA,KXX,1,1,1.6278,2.3812,3.6396,29.8,30.6,32!热导率MPDATA,c,1,1,472,535,679,859,945,1034!比热MPTEMP,,,,,,,,MPTEMP,1,0,200,400,800,1200MPTEMP,6,1400,1454,1800,2000MPDATA,ENTH,1,1,0,7.9729e+8,1.6400e+9,3.4621e+9,5.3897e+9MPDATA,ENTH,1,6,6.3415e+9,8.2595e+9,9.8798e+9,1.0816e+10!热焓MPTEMP,,,,,,,,MPTEMP,1,20,300,600,900,1200,1500,1800,2000,3000,4000MPDATA,HF,1,1,6,50,120,200,250,378,700,850,1746,3799!对流系数MPTEMP,,,,,,,,MPTEMP,1,20,200,400,600,800,900,1000,1100,1200,1420,1460MPDATA,DENS,2,1,7966,7893,7814,7724,7630,7583,7535,7486,7436,7320,7320MPDATA,KXX,2,1,13.31,16.33,19.47,22.38,25.07,26.33,27.53,28.67,29.76,31.95,32!热导率mpdata,c,2,1,470,508,550,592,634,655,676,698,719,765,765MPTEMP,,,,,,,,MPTEMP,1,0,200,400,800,1200MPTEMP,6,1400,1454,1800,2000MPDATA,ENTH,2,1,0,7.9729e+8,1.6400e+9,3.4621e+9,5.3897e+9MPDATA,ENTH,2,6,6.3415e+9,8.2595e+9,9.8798e+9,1.0816e+10!4几何模型BLOCK,0,Block_x,0,Block_y,0,Block_z,BLOCK,Block_x1,Block_x2,Block_y1,Block_y2,0,Block_z,vsel,allVOVLAP,allBLOCK,0,Block_x,0,Block_y,0,-Block_z1,vglue,allnumcmp,all!划分网格lesize,8,LMeshxlesize,5,LMeshylesize,13,LMeshzvsel,s,,,1type,1mat,1mshkey,1vmesh,allallselesize,0.3e-3mshkey,0mshape,1,3dvsel,s,,,2type,3mat,2vmesh,allallselesize,0.3e-3mshkey,0mshape,1,3dvsel,s,,,3type,3mat,1vmesh,allallsel!成形件轨迹单元质心排序width=Block_y2-Block_y1!wpoffs,Block_x1,Block_y1,0!local,11,1,Block_x1,Block_y1,0ALLSEL,ALL*GET,EMAX,ELEM,,COUNT,MAXVSEL,S,,,1ESLV,S*GET,AEMAX,ELEM,,COUNT1,MAX*DIM,ANE,ARRAY,AEMAX,*DIM,ANE1,ARRAY,AEMAX,*DIM,ANE2,ARRAY,AEMAX,*DIM,ANE3,ARRAY,AEMAX,*DIM,ANE4,ARRAY,AEMAX,*DIM,ANE5,ARRAY,AEMAX,*DIM,ANEX,ARRAY,AEMAX*DIM,ANEY,ARRAY,AEMAX*DIM,ANEZ,ARRAY,AEMAX*DIM,ANEORDER,ARRAY,AEMAX,,1!形心排序VSEL,S,,,1ESLV,S*GET,ANSEL,ELEM,,COUNT1II=0*DO,I,1,AEMAX*IF,ESEL(I),EQ,1,THENII=II+1ANE(II)=I*ENDIF*ENDDO*DO,I,1,ANSEL*GET,ANEZ(I),ELEM,ANE(I),CENT,Z*GET,ANEY(I),ELEM,ANE(I),CENT,Y*GET,ANEX(I),ELEM,ANE(I),CENT,X*ENDDOe=0*do,i,1,AEMAX*if,ANEY(I),ge,4*width/5+Block_y1,thene=e+1ANE5(e)=ANE(i)*endif*enddod=0*do,i,1,AEMAX*if,ANEY(I),ge,3*width/5+Block_y1,then*if,ANEY(I),lt,4*width/5+Block_y1,thend=d+1ANE4(d)=ANE(i)*endif*endif*enddoc=0*do,i,1,AEMAX*if,ANEY(I),ge,2*width/5+Block_y1,then*if,ANEY(I),lt,3*width/5+Block_y1,thenc=c+1ANE3(c)=ANE(i)*endif*endif*enddob=0*do,i,1,AEMAX*if,ANEY(I),ge,width/5+Block_y1,then*if,ANEY(I),lt,2*width/5+Block_y1,thenb=b+1ANE2(b)=ANE(i)*endif*endif*enddoa=0*do,i,1,AEMAX*if,ANEY(I),lt,width/5+Block_y1,thena=a+1ANE1(a)=ANE(i)*endif*enddo!*************************对1道焊缝区的单元按质心X坐标进行从低到高排序****************************esel,none*do,i,1,a*if,ANE1(i),NE,0,thenesel,a,elem,,ANE1(i)*endif*enddoMINE=0*DIM,ANEX1,ARRAY,a*DIM,ANEY1,ARRAY,a*DIM,ANEZ1,ARRAY,a*DO,I1,1,aesel,u,elem,,mine*GET,ANSEL1,ELEM,,COUNT1II=0*DO,I,1,AEMAX*IF,ESEL(I),EQ,1,THENII=II+1ANE1(II)=I*ENDIF*ENDDO*DO,I,1,ANSEL1*GET,ANEZ1(I),ELEM,ANE1(I),CENT,Z*GET,ANEY1(I),ELEM,ANE1(I),CENT,Y*GET,ANEX1(I),ELEM,ANE1(I),CENT,X*ENDDOMINZ=1E20MINY=1E20MINX=1E20*DO,I,1,ANSEL1*IF,ANEZ1(I),LT,MINZ,THENMINZ=ANEZ1(I)MINY=ANEY1(I)MINX=ANEX1(I)MINE=ANE1(I)*ELSE*IF,ANEZ1(I),EQ,MINZ,THEN*IF,ANEY1(I),LT,MINY,THENMINZ=ANEZ1(I)MINY=ANEY1(I)MINX=ANEX1(I)MINE=ANE1(I)*ELSE*IF,ANEY1(I),EQ,MINY,THEN*IF,ANEX1(I),LT,MINX,THENMINZ=ANEZ1(I)MINY=ANEY1(I)MINX=ANEX1(I)MINE=ANE1(I)*ENDIF*ENDIF*ENDIF*ENDIF*ENDIF*ENDDOANEORDER(I1)=MINE*ENDDO!*************************对2道焊缝区的单元按质心X坐标进行从高到低排序****************************MAXE=1esel,none*do,j,1,b*if,ANE2(j),NE,0,thenesel,a,elem,,ANE2(j)*endif*enddo*DIM,ANEX2,ARRAY,b*DIM,ANEY2,ARRAY,b*DIM,ANEZ2,ARRAY,b*DO,J1,1,besel,u,elem,,MAXE*GET,ANSEL2,ELEM,,COUNT1JJ=0*DO,J,1,AEMAX*IF,ESEL(I),EQ,1,THENJJ=JJ+1ANE2(JJ)=J*ENDIF*ENDDO*DO,J,1,ANSEL2*GET,ANEZ2(J),ELEM,ANE2(J),CENT,Z*GET,ANEY2(J),ELEM,ANE2(J),CENT,Y*GET,ANEX2(J),ELEM,ANE2(J),CENT,X*ENDDOMAXZ=1E20MAXY=1E20MAXX=-1E2