附上APDL命令流:
/config,nproc,3!多核并行运算
/config,nres,100000!将载荷步最大设置为100000
/prep7
l1=0.2
l2=4.5
l3=2.3
h1=0.1553
h2=0.0032
h3=0.0465
c=1.1
ftime=300
tinc=5
time=0
delt=1
!建立模型
et,1,fluid141!2D
et,2,fluid141!2D
rect,,l1,,h1
rect,,l1,h1,h1+h2
rect,,l1,h1+h2,h1+h2+h3
rect,l1,l1+l2,,h1
rect,l1,l1+l2,h1,h1+h2
rect,l1,l1+l2,h1+h2,h1+h2+h3
rect,l1+l2,l1+l2+l3,,h1
rect,l1+l2,l1+l2+l3,h1,h1+h2
rect,l1+l2,l1+l2+l3,h1+h2,h1+h2+h3
allsel
aglue,all
!建模完毕
asel,s,loc,y,h1,h1+h2
cm,glass,area
aatt,2,1,2
allsel
cmsel,u,glass
aglue,all
cm,fluid,area
aatt,1,1,1
allsel
nummrg,all!!合并关键点
numcmp,all!压缩编号
!定义固体材料属性
mp,dens,2,2700
mp,c,2,790
mp,kxx,2,0.75
mptemp,1,260,400,420,460,480,600
mpdata,emis,2,1,1,1,0.95,0.85,0.77,0.8
!定义材料属性完毕
lsel,,loc,y,1e-8,h1-1e-8
lesize,all,,,16,-10
lsel,,loc,y,h1+1e-8,h1+h2-1e-8
lesize,all,,,3,-2
lsel,,loc,y,h1+h2+1e-8,h1+h2+h3-1e-8
lesize,all,,,10,-5
lsel,,loc,x,1e-8,l1-1e-8
lesize,all,,,20,-2
lsel,,loc,x,l1+1e-8,l1+l2-1e-8
lesize,all,,,450,-2
lsel,,loc,x,l1+l2+1e-8,l1+l2+l3-1e-8
lesize,all,,,230,-2
!分区域划分网格
cmsel,s,fluid
mat,1
amesh,all
cmsel,s,glass
mat,2
amesh,all
!加载玻璃初始条件
cmsel,s,glass
LSEL,S,EXT
nsll,s,1
d,all,vx,0
d,all,vy,0
cmsel,s,glass
ALLSEL,BELOW,AREA
ic,all,temp,20
!加载匀流板边界条件
lsel,s,loc,y,0
lsel,r,loc,x,l1+l2,l1+l2+l3
nsll,s,1
d,all,vx,0
d,all,vy,c
d,all,temp,600
lsel,s,loc,y,h1+h2+h3
lsel,r,loc,x,l1+l2,l1+l2+l3
nsll,s,1
d,all,vx,0
d,all,vy,-c
d,all,temp,600
!加载腔体边界条件
lsel,s,loc,x,0
lsel,a,loc,x,l1+l2+l3
lsel,u,loc,y,h1,h1+h2
nsll,s,1
d,all,vx,0
d,all,vy,0
lsel,s,loc,x,l1,l1+l2
lsel,u,loc,x,l1
lsel,u,loc,x,l1+l2
lsel,u,loc,y,h1,h1+h2
nsll,s,1
d,all,vx,0
d,all,vy,0
lsel,s,loc,x,,l1
lsel,u,loc,x,0
lsel,u,loc,x,l1
lsel,u,loc,y,h1,h1+h2
nsll,s,1
d,all,pres,0
allsel
!求解
et,2,0!流体场计算不计算加热板和玻璃板
/solu
fldata1,solu,temp,1
fldata1,solu,tran,1
fldata4,time,numb,5
fldata7,prot,dens,air-si
fldata7,prot,visc,air-si
fldata7,prot,cond,air-si
fldata7,prot,spht,air-si
TOFFST,273
physics,write,fluid!write fluid physics file
physics,clear
finish
/prep7!重新进入前处理,编写热场环境文件
et,1,55
et,2,55
mp,dens,1,1.29!重新定义流体的属性
mp,c,1,1400
mp,kxx,1,0.03
mp,dens,2,2700!重新定义固体材料属性
mp,c,2,790
mp,kxx,2,0.75
mptemp,1,260,400,420,460,480,600
mpdata,emis,2,1,1,1,0.95,0.85,0.77,0.8
lsclear,all!清除所有的流体场载荷,重新加载
lsel,s,loc,x,l1+l2,l1+l2+l3
lsel,u,loc,x,l1+l2
lsel,u,loc,x,l1+l2+l3
lsel,u,loc,y,h1,h1+h2
nsll,s,1
d,all,temp,600!加载布气口温度
cmsel,s,glass
ALLSEL,BELOW,AREA
ic,all,temp,20!加载玻璃初始温度
cmsel,s,fluid
ALLSEL,BELOW,AREA
ic,all,temp,20!加载气流初始温度
allsel
/solu
antype,trans!定义为瞬态分析
kbc,1! step loads
trnopt,full!定义瞬态分析为全分析
autos,on! auto time-stepping
deltim,1e-5,1e-6,delt,on!
outres,,all!将每部结果全部输
TOFFST,273
allsel
physics,write,thermal!写热环境文件
physics,clear
save
finish
!开始求解循环
*do,i,1,ftime/tinc! solution *do loop
time=time+tinc! increment time
physics,read,fluid
/solu
*if,i,gt,1,then
fldata32,rest,time,0!流体场重启动分析
fldata32,rest,wfil,t!写入重启动数据库文件(改变边界条件)
*endif
*if,i,gt,1,then!第一次循环加载初始温度边界条件
allsel
ldread,temp,last,,,2,,rth!后面的循环开始从热场计算的结果文件中读取温度条件
*endif
fldata4,time,tend,time!定义每一个循环的分析时间
solve
finish
physics,read,thermal!重新开始进行热场分析
/assign,esav,therm,esav! redirect files for use in thermal restart
/assign,emat,therm,emat
/solu
*if,i,gt,1,then
antype,trans,rest!热场重启动分析
*endif
*if,i,eq,1,then
cmsel,s,glass
ALLSEL,BELOW,AREA
ic,all,temp,20!加载玻璃初始温度
cmsel,s,fluid
ALLSEL,BELOW,AREA
ic,all,temp,20!加载气流初始温度
cmsel,s,glass
LSEL,S,EXT
nsll,s,1
ldread,hflm,last,,,,,rfl!从流体计算的结果文件中读取对流换热系数作为载荷,注意在加载对流传热系数之前必须先加载表面温度载荷作为对流传热系数的环境温度
*else
cmsel,s,glass
ALLSEL,BELOW,AREA
ldread,temp,last,,,2,,rth!将上一步的热场计算结果作为下一步加载对流系数载荷的环境温度
cmsel,s,glass
LSEL,S,EXT
nsll,s,1
ldread,hflm,last,,,,,rfl
*endif
time,time
allsel
solve
finish
/assign,esav! reassign files to default
/assign,emat
*enddo! end of solution looping
finish |