激光熔覆ANSYS仿真.docx
《激光熔覆ANSYS仿真.docx》由会员分享,可在线阅读,更多相关《激光熔覆ANSYS仿真.docx(10页珍藏版)》请在冰豆网上搜索。
激光熔覆ANSYS仿真
!
上表面上没有对流换热边界条件
!
单位制:
米、秒、摄氏度
!
/CLEAR,START
/FILNAME,temp,0
/COM,ANSYSRELEASE10.0 UP20050718 20:
15:
52 07/14/2007
/CONFIG,NRES,5000
/PREP7
!
*
!
===============================================================================================!
指定单元
ET,1,SOLID70
!
*
!
*
!
===============================================================================================!
材料属性
MPTEMP,,,,,,,,
MPTEMP,1,0
MPTEMP,2,1350
MPTEMP,3,1400
MPTEMP,4,1420
MPTEMP,5,1440
MPTEMP,6,1490
MPTEMP,7,2000
MPDATA,ENTH,1,,0
MPDATA,ENTH,1,,6.5e9
MPDATA,ENTH,1,,7.2e9
MPDATA,ENTH,1,,8e9
MPDATA,ENTH,1,,9e9
MPDATA,ENTH,1,,9.9e9
MPDATA,ENTH,1,,12.84e9
MPTEMP,,,,,,,,
MPTEMP,1,0
MPTEMP,2,200
MPTEMP,3,400
MPTEMP,4,800
MPTEMP,5,1440
MPTEMP,6,2000
MPDATA,KXX,1,,14.7
MPDATA,KXX,1,,18
MPDATA,KXX,1,,20.8
MPDATA,KXX,1,,26.3
MPDATA,KXX,1,,34.7
MPDATA,KXX,1,,51.5
MPTEMP,,
MPTEMP,1,0
MPTEMP,2,200
MPTEMP,3,400
MPTEMP,4,800
MPTEMP,5,1200
MPTEMP,6,2000
MPDATA,C,1,,494
MPDATA,C,1,,536
MPDATA,C,1,,569
MPDATA,C,1,,644
MPDATA,C,1,,669
MPDATA,C,1,,729
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,DENS,1,,7700
!
===============================================================================================!
定义常量
Width_Base=0.025
!
宽度
Height_Base=0.02 !
基底高度
Length=0.05 !
长度
Width_Clad=0.0015 !
宽度
Height_Deposition=0.0025 !
覆层高度
Layer=10 !
层数
Height_Clad=Height_Deposition/layer
dt=0.00001 !
小量
Temp=50 !
环境温度
Init_Temp=200 !
初始温度
Coff_Conv=30 !
对流换热系数
!
===============================================================================================!
定义常量
Velocity=0.003 !
扫描速度
StepDis=0.001 !
每个载荷步位移
LaserPower=700 !
激光功率
Radius=0.0015 !
激光光斑半径
Area=3.14159265*(Radius**2) !
激光光斑面积
Factor=0.25
!
吸收因子
StepTime=StepDis/Velocity !
每个载荷步时间
TotalTime=(Length+Radius*2)/Velocity !
载荷持续时间(扫描一层)
StepNum=(Length+Radius*2)/StepDis !
载荷步数
!
===============================================================================================!
建模
BLOCK,0,Length,0,Height_Deposition,0,Width_Clad, !
覆层
BLOCK,0,Length,0,-Height_Base,0,Width_Clad, !
基底
BLOCK,0,Length,0,-Height_Base,Width_Clad,Width_Base
VGLUE,ALL
NUMCMP,ALL!
压缩对象编号
!
===============================================================================================!
划分网格
LESIZE,18,,,15,0.125
LESIZE,22,,,15,8
LESIZE,24,,,15,8
LESIZE,26,,,15,8
LESIZE,28,,,15,8
LESIZE,20,,,15,8
LESIZE,21,,,15,8
LESIZE,23,,,15,8
LESIZE,25,,,15,8
LESIZE,27,,,15,8
LSEL,S,LOC,Y,dt,Height_Deposition-dt, !
覆层高度方向的单元数目
LESIZE,ALL,,,Layer,
LSEL,S,LOC,X,dt,Length-dt, !
长度方向的单元数目
LESIZE,ALL,,,Length/StepDis,
LSEL,S,LOC,Z,dt,Width_Clad-dt, !
宽度方向的单元数目
LESIZE,ALL,,,5,
VSEL,ALL !
网格划分
TYPE,1
MAT,1
MSHAPE,0,3D
MSHKEY,1
VMESH,ALL
!
===============================================================================================!
基底边界条件、初始条件
NSEL,S,LOC,Y,-Height_Base,0 !
基底初始温度
IC,ALL,TEMP,Init_Temp
ALLSEL,ALL
NSEL,S,LOC,Y,-Height_Base,0 !
基底侧面,对流换热边界条件
NSEL,R,LOC,Z,Width_Base
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
NSEL,S,LOC,Y,-Height_Base,0 !
基底左端面,对流换热边界条件
NSEL,R,LOC,X,0
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
NSEL,S,LOC,Y,-Height_Base,0 !
基底右端面,对流换热边界条件
NSEL,R,LOC,X,Length
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
NSEL,S,LOC,Y,0 !
基底上表面,对流换热边界条件
NSEL,R,LOC,Z,Width_Clad,Width_Base
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
FINISH
/SOLU
!
===============================================================================================!
瞬态分析参数设置
ANTYPE,4
!
分析类型:
瞬态
!
*
TRNOPT,FULL !
求解方法:
完全的N-R方法
LUMPM,0 !
不使用集中质量矩阵
!
*
!
NSUBST,1
!
指定载荷子步数目
DELTIM,0.01,0.001,0.05 !
载荷子步(默认子步时间步长、最小、最大)——载荷步为0.333
CNVTOL,HEAT,,0.01,1,0.000001, !
收敛准则:
控制热流
OUTRES,NSOL,LAST !
结果输出:
所有
!
===============================================================================================!
杀死单元
NSEL,S,LOC,Y,0,Height_Deposition !
杀死熔覆层单元
ESLN,S,1,ALL
EKILL,ALL
ALLSEL,ALL
ESEL,S,LIVE
EPLOT
ESEL,S,LIVE !
激活单元的上表面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,Y,HeightBase
NSEL,R,LOC,Z,0,Radius
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
!
===============================================================================================!
预热
*DO,i,1,2
m=mod(i,2)
*IF,m,EQ,1,THEN !
如果为奇数层,向右扫描
*DO,k,1,StepNum,1
TIME,TotalTime*(i-1)+StepTime*k !
载荷步结束时间
KBC,1 !
载荷步内载荷随时间分布:
常数
LeftX=StepDis*(k-1)
RightX=StepDis*k
NSEL,S,LOC,Y,0
ESEL,S,LIVE
ESLN,R,0
NSLE,S,1
NSEL,R,LOC,x,RightX-2*Radius,RightX
NSEL,R,LOC,Z,0,Radius !
激活单元的上表面,加热流密度
ESLN,S,1
SFE,ALL,4,HFLUX,,LaserPower*Factor/Area,,,
ALLSEL,ALL
SOLVE
SFEDELE,ALL,4,HFLUX !
删除热流密度载荷
ALLSEL,ALL
ESEL,S,LIVE !
激活单元的上表面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,Y,0
NSEL,R,LOC,x,LeftX-2*StepDis,RightX-2*StepDis
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
ESEL,S,LIVE
EPLOT
*ENDDO
*ELSE !
如果为偶数层,向左扫描
*DO,k,1,StepNum,1
TIME,TotalTime*(i-1)+StepTime*k !
载荷步结束时间
KBC,1 !
载荷步内载荷随时间分布:
常数
LeftX=Length-StepDis*k
RightX=Length-StepDis*(k-1)
NSEL,S,LOC,Y,0
ESEL,S,LIVE
ESLN,R,0
NSLE,S,1
NSEL,R,LOC,x,RightX-2*Radius,RightX
NSEL,R,LOC,Z,0,Radius !
激活单元的上表面,加热流密度
ESLN,S,1
SFE,ALL,4,HFLUX,,LaserPower*Factor/Area,,,
ALLSEL,ALL
SOLVE
SFEDELE,ALL,4,HFLUX !
激活单元的上表面,删除载荷
ALLSEL,ALL
ESEL,S,LIVE
!
激活单元的上表面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,Y,0
NSEL,R,LOC,x,LeftX-2*StepDis,RightX-2*StepDis
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
ESEL,S,LIVE
EPLOT
*ENDDO
*ENDIF
*ENDDO
ESEL,S,LIVE
EPLOT
!
===============================================================================================!
熔覆
*DO,i,1,Layer,1
m=mod(i,2)
*IF,m,EQ,1,THEN !
如果为奇数层,向右扫描
*DO,k,1,StepNum,1
TIME,TotalTime*(i+1)+StepTime*k !
载荷步结束时间
KBC,1 !
载荷步内载荷随时间分布:
常数
LeftX=StepDis*(k-1)
RightX=StepDis*k
NSEL,S,LOC,Y,Height_Deposition/Layer*(i-1),Height_Deposition/Layer*i
NSEL,R,LOC,x,LeftX,RightX
ESLN,S,1
EALIVE,ALL!
激活单元
ALLSEL,ALL
NSEL,S,LOC,Y,Height_Deposition/Layer*(i-1),Height_Deposition/Layer*i
NSEL,R,LOC,x,RightX-2*Radius,RightX
NSEL,R,LOC,Z,0,Radius
ESLN,S,1
SFE,ALL,4,HFLUX,,LaserPower*Factor/Area,,,!
激活单元的上表面,加热流密度
ALLSEL,ALL
ESEL,S,LIVE !
激活单元的表面,如果包含左端面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,X,0
NSEL,R,LOC,Y,Height_Deposition/Layer*(i-1),Height_Deposition/Layer*i
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
ESEL,S,LIVE !
激活单元的表面,如果包含右端面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,X,Length
NSEL,R,LOC,Y,Height_Deposition/Layer*(i-1),Height_Deposition/Layer*i
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
ESEL,S,LIVE !
激活单元的侧面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,Z,Width_Clad
NSEL,R,LOC,Y,Height_Deposition/Layer*(i-1),Height_Deposition/Layer*i
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
SOLVE
SFEDELE,ALL,4,HFLUX !
删除热流密度载荷
ALLSEL,ALL
ESEL,S,LIVE !
激活单元的上表面,指定为对流换热边条
NSLE,S,1
NSEL,R,LOC,Y,Height_Deposition/Layer*i
NSEL,R,LOC,x,LeftX-2*StepDis,RightX-2*StepDis
SF,ALL,CONV,Coff_Conv,Temp
ALLSEL,ALL
NSEL,S,LOC,Y,Height_Deposition/Layer*(i-1) !
激活单元的下表面,删除对流换热边条
ESEL,S,LIVE
ESLN,R,0
NSLE,S,1
NSEL,R,LOC,x,LeftX-2*StepDis,RightX-2*StepDis
NSEL,R,LOC,Z,0,Radius
NSEL,U,LOC,Y,Height_Deposition/Layer*i
ESLN,S,1
SFDELE,ALL,CONV
ALLSEL,ALL
ESEL,S,LIVE
EPLOT
*ENDDO