/prep7
/unit,si
et,1,13,4
et,2,13,4
mptemp,1,20,500,800,1200,1500
mpdata,ex,1,,2.09e11,1.72e11,1.33e11,0.84e11,0.45e11
mpdata,ex,2,,2.16e11,1.78e11,1.42e11,1.04e11,0.68e11
mpdata,ex,3,,2.12e11,1.75e11,1.39e11,1.07e11,0.83e11
tb,bkin,1,5
tbtemp,20,1
tbdata,1,315e6,0.209e11
tbtemp,500,2
tbdata,1,212e6,0.172e11
tbtemp,800,3
tbdata,1,153e6,0.133e11
tbtemp,1200,4
tbdata,1,93e6,0.084e11
tbtemp,1500,5
tbdata,1,33e6,0.045e11
tb,bkin,2,5
tbtemp,20,1
tbdata,1,314e6,0.216e11
tbtemp,500,2
tbdata,1,203e6,0.178e11
tbtemp,800,3
tbdata,1,153e6,0.142e11
tbtemp,1200,4
tbdata,1,63e6,0.104e11
tbtemp,1500,5
tbdata,1,13e6,0.068e11
tb,bkin,3,5
tbtemp,20,1
tbdata,1,330e6,0.212e11
tbtemp,500,2
tbdata,1,213e6,0.175e11
tbtemp,800,3
tbdata,1,153e6,0.139e11
tbtemp,1200,4
tbdata,1,73e6,0.107e11
tbtemp,1500,5
tbdata,1,13e6,0.083e11
mp,dens,1,7850
mp,dens,2,7770
mp,dens,3,7860
mp,alpx,1,1.23e-5
mp,alpx,2,1.38e-5
mp,alpx,3,1.48e-5
mp,nuxy,1,0.30
mp,nuxy,2,0.29
mp,nuxy,3,0.29
mp,kxx,1,33
mp,kxx,2,32
mp,kxx,3,34
mp,c,1,561
mp,c,2,683
mp,c,3,983
mp,murx,1,1
mp,murx,2,1
mp,murx,3,1
mp,reft,1,20
mp,reft,2,1500
mp,reft,3,20
!*******************以下建立分析模型和网格*******************
*afun,deg
csys,0
width=1
height=0.3
ar=0.14*tan(30)
ex=0.01*tan(60)
df=ar+ex
cf=df/cos(60)
k,1,
k,2,width/2-0.01-ar,0,0
k,3,width/2+0.01+ar,0,0
k,4,width,0,0
k,5,width/2-0.01,height/2-0.01,0
k,6,width/2+0.01,height/2-0.01,0
k,7,width/2-0.01,height/2+0.01,0
k,8,width/2+0.01,height/2+0.01,0
k,9,0,height,0
k,10,width/2-0.01-ar,height,0
k,11,width/2+0.01+ar,height,0
k,12,width,height,0
n,1,width/2+0.01+ar,height,0
n,2,width,height,0
n,3,width/2+0.01+ar,0,0
larc,10,11,7,cf
larc,2,3,5,cf
a,1,2,5,7,10,9
a,10,7,5,2,3,6,8,11
a,3,4,12,11,8,6
/triad,off
/plots,info,0
/devices,vector,1
esize,0.02
type,2
mat,2
amesh,2
esize,0.03
type,1
mat,1
amesh,1
mat,3
amesh,3
nummrg,all,,,,low
numcmp,all
eplot
!/image,save,vmesh,jpeg
/devices,vector,1
finish
!*************************施加约束***************************
/solu
antype,4
trnopt,full
nsel,all
*get,minx,node,,mnloc,x
nsel,s,loc,x,minx
d,all,ux,0
*get,miny,node,,mnloc,y
nsel,r,loc,y,miny
d,all,uy,0
nsel,all
*get,minx,node,,mnloc,x
nsel,s,loc,x,minx
d,all,temp,20
nsel,all
*get,maxx,node,,mxloc,x
nsel,s,loc,x,maxx
d,all,temp,20
alls
!**********************************************************
nna=2
esel,all
*get,emax,elem,,num,max
asel,s,area,,nna
esla
*get,nse,elem,,count
*dim,ne,,nse
*dim,n1,,nse
*dim,n2,,nse
*dim,nex,,nse
*dim,ney,,nse
*dim,neorder,,nse
ii=0
*do,i,1,emax
*if,esel(i),eq,1,then
ii=ii+1
ne(ii)=i
*endif
*enddo
*do,i,1,nse
*get,ney(i),elem,ne(i),cent,y
*get,nex(i),elem,ne(i),cent,x
*enddo
d=0
*do,i,1,nse
*if,ney(i),ge,height/2,then
d=d+1
n2(d)=ne(i)
*endif
*enddo
c=0
*do,i,1,nse
*if,ney(i),lt,height/2,then
c=c+1
n1(c)=ne(i)
*endif
*enddo
esel,none
*do,i,1,d
*if,n2(i),ne,0,then
esel,a,elem,,n2(i)
*endif
*enddo
eplot
!*****************对焊缝区上部分的单元按质心Y坐标进行排序*******************
mine=0
*dim,ne2,,d
*dim,nex2,,d
*dim,ney2,,d
*do,i1,1,d
esel,u,elem,,mine
*get,nse2,elem,,count
ii=0
*do,i,1,emax
*if,esel(i),eq,1,then
ii=ii+1
ne2(ii)=i
*endif
*enddo
*do,i,1,nse2
*get,ney2(i),elem,ne2(i),cent,y
*get,nex2(i),elem,ne2(i),cent,x
*enddo
miny=1e20
minx=1e20
*do,i,1,nse2
*if,ney2(i),lt,miny,then
miny=ney2(i)
minx=nex2(i)
mine=ne2(i)
*else
*if,ney2(i),eq,miny,then
*if,nex2(i),lt,minx,then
miny=ney2(i)
minx=nex2(i)
mine=ne2(i)
*endif
*endif
*endif
*enddo
neorder(i1)=mine
*enddo
!******对焊缝区下部分的单元按质心Y坐标进行排序,与其上部分的过程相类似************
maxe=0
esel,none
*do,j,1,c
*if,n1(j),ne,0,then !非零的全选
esel,a,elem,,n1(j)
*endif
*enddo
eplot
*dim,ne1,,c
*dim,nex1,,c
*dim,ney1,,c
*do,j1,1,c
esel,u,elem,,maxe
*get,nse3,elem,,count
jj=0
*do,j,1,emax
*if,esel(j),eq,1,then
jj=jj+1
ne1(jj)=j
*endif
*enddo
*do,j,1,nse3
*get,ney1(j),elem,ne1(j),cent,y
*get,nex1(j),elem,ne1(j),cent,x
*enddo
maxy=-1e10
maxx=-1e10
*do,j,1,nse3
*if,ney1(j),gt,maxy,then
maxy=ney1(j)
maxx=nex1(j)
maxe=ne1(j)
*else
*if,ney1(j),eq,maxy,then
*if,nex1(j),lt,maxx,then
maxy=ney1(j)
maxx=nex1(j)
maxe=ne1(j)
*endif
*endif
*endif
*enddo
neorder(j1+d)=maxe
*enddo
/eof
!******************************************************************
max_tem=1500
delt=1e-3
dt=5
t=0
esel,all
eplot
/auto,1
/replot
*do,i,1,nse
ekill,neorder(i)
esel,s,live
eplot
*enddo
alls
outres,all,all
ic,all,temp,20
kbc,1
timint,0,struct
timint,0,mag
timint,1,therm
tintp,0.005,,,1,0.5,0.2
nsub1=2
nsub2=40
*do,i,1,nse
ealive,neorder(i)
esel,s,live
eplot
esel,all
t=t+delt
time,t
nsubst,1
*do,j,1,4
d,nelem(neorder(i),j),temp,max_tem
*enddo
solve
t=t+delt
time,t
solve ! 求解
*do,j,1,4
ddele,nelem(neorder(i),j),temp
*enddo
t=t+dt-2*delt
time,t
nsubst,nsub1
solve
*enddo
t=t+50000
time,t
nsubst,nsub2
solve
finish
|