马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
/UNITS,SI
/PREP7
*set,length,0.02
*set,width,0.02
*set,height,0.010
*SET,V,1
*SET,power,14
*SET,ESIZE,0.001
*SET,TINC,ESIZE/V
*SET,R,0.00175
*SET,pi,3.1415926
*SET,MAX_TIME,3*(LENGTH/ESIZE+1)
*SET,MAX_X,length/ESIZE+1
*SET,MAX_Y,width/ESIZE+1
*SET,power_max,0.8*power/(pi*R*R)
*SET,x0,0
*SET,y0,0
et,1,solid70
MPTEMP
MPTEMP,1,25,100,180,220,400
MPDATA,DENS,1,1,600,650,750,1075,1020
MPDATA,KXX,1,1,0.27,0.3,0.25,0.245,0.24
mpdata,c,1,1,1600,1620,1630,1670,1700
MPTEMP,,,,,,,,
MPTEMP,1,20,100,200,300,400
MPDATA,HF,1,1,6,25,35,50,90
block,0,length,0, width, 0, height,
!vglue,all
numcmp,all
FLST,5,1,4,ORDE,1
FITEM,5,9
CM,_Y,LINE
LSEL, , , ,P51X
CM,_Y1,LINE
CMSEL,,_Y
!*
LESIZE,_Y1, , ,10, , , , ,1
!*
FLST,5,1,4,ORDE,1
FITEM,5,1
CM,_Y,LINE
LSEL, , , ,P51X
CM,_Y1,LINE
CMSEL,,_Y
!*
LESIZE,_Y1, , ,20, , , , ,1
!*
FLST,5,1,4,ORDE,1
FITEM,5,4
CM,_Y,LINE
LSEL, , , ,P51X
CM,_Y1,LINE
CMSEL,,_Y
!*
LESIZE,_Y1, , ,20, , , , ,1
MSHKEY,1
VMESH,1
Save
*DIM,laser,TABLE,MAX_X,MAX_Y,MAX_TIME,X,Y,TIME
*DO,K,1,MAX_TIME,1
*if,K,le,MAX_TIME/3,then
*DO,I,1,MAX_X,1
*SET,laser(I,0,K),(I-1)*ESIZE
*ENDDO
*DO,J,1,MAX_Y,1
*SET,laser(0,J,K),(J-1)*ESIZE
*ENDDO
*DO,I,1,MAX_X,1
*DO,J,1,MAX_Y,1
*SET,XCENTER,V*(K-1)*TINC
*SET,YCENTER,0.005
*SET,DISTANCE,SQRT(((I-1)*ESIZE-XCENTER)**2+((J-1)*ESIZE-YCENTER)**2)
*IF,DISTANCE,LE,R,THEN
*SET,laser(I,J,K),power_max*EXP(-DISTANCE**2/(R**2)) !
*ELSE
*SET,laser(I,J,K),0
*ENDIF
*ENDDO
*ENDDO
*SET,laser(0,0,K),(K-1)*TINC
*elseif,K,le,2/3*(MAX_TIME)
*DO,I,1,MAX_X,1
*SET,laser(I,0,K),(I-1)*ESIZE
*ENDDO
*DO,J,1,MAX_Y,1
*SET,laser(0,J,K),(J-1)*ESIZE
*ENDDO
*DO,I,1,MAX_X,1
*DO,J,1,MAX_Y,1
*SET,XCENTER,V*(K-1/3*MAX_TIME)*TINC
*SET,YCENTER,0.005
*SET,DISTANCE,SQRT(((I-1)*ESIZE-XCENTER)**2+((J-1)*ESIZE-YCENTER)**2)
*IF,DISTANCE,LE,R,THEN
*SET,laser(I,J,K),power_max*EXP(-DISTANCE**2/(R**2)) !
*ELSE
*SET,laser(I,J,K),0
*ENDIF
*ENDDO
*ENDDO
*SET,laser(0,0,K),(K-1)*TINC
*elseif,K,le,MAX_TIME
*DO,I,1,MAX_X,1
*SET,laser(I,0,K),(I-1)*ESIZE
*ENDDO
*DO,J,1,MAX_Y,1
*SET,laser(0,J,K),(J-1)*ESIZE
*ENDDO
*DO,I,1,MAX_X,1
*DO,J,1,MAX_Y,1
*SET,XCENTER,V*(K-2/3*MAX_TIME)*TINC
*SET,YCENTER,0.005
*SET,DISTANCE,SQRT(((I-1)*ESIZE-XCENTER)**2+((J-1)*ESIZE-YCENTER)**2)
*IF,DISTANCE,LE,R,THEN
*SET,laser(I,J,K),power_max*EXP(-DISTANCE**2/(R**2)) !
*ELSE
*SET,laser(I,J,K),0
*ENDIF
*ENDDO
*ENDDO
*SET,laser(0,0,K),(K-1)*TINC
*endif
*ENDDO
save
FINISH
/SOL
!Csys,1
antype,trans
timint,on
autots,off
toffst,273
tunif,180
kbc,1 !step load
asel,u,,,2
sfa,all,,conv,10,180 !
allsel
*SET,tim,1e-12
*do,I,1,MAX_TIME,1
*SET,tim,tim+tinc
time,tim
autots,off
deltim,,,,1 !Use final time step from previous load step
kbc,1
tsres,erase
Nsel,s,loc,z,height,height
Nsel,r,loc,x,x0,x0+length
Nsel,r,loc,y,y0,y0+width
Sf,all,hflux,%laser%
/GO
Allsel,all
Solve
save
*enddo
FINISH
/POST1
set,,,1,,1.5
plnsol,temp,,0
这是一个激光移动高斯热源的程序,但是我想把
MPTEMP
MPTEMP,1,25,100,180,220,400
MPDATA,DENS,1,1,600,650,750,1075,1020
MPDATA,KXX,1,1,0.27,0.3,0.25,0.245,0.24
mpdata,c,1,1,1600,1620,1630,1670,1700
MPTEMP,,,,,,,,
MPTEMP,1,20,100,200,300,400
改成
MPTEMP
MPTEMP,1,300,400,500,600
MPDATA,DENS,1,7824,7824,7824,7824,7824
MPDATA,KXX,1,55,50,43,37,31
mpdata,c,1,524,560,615,700,854
MPTEMP,,,,,,,,
MPTEMP,1,200,300,400,500,600
MPDATA,HF,1,10,10,10,10,10
但是运行出现错误这是为什么,我是个初学者,麻烦大家帮我看看,到底是怎么回事。非常感谢 |