找回密码
 注册
Simdroid-非首页
查看: 150|回复: 3

[电磁与结构流体等的耦合] 磁流体磁-热耦合分析【求救】

[复制链接]
发表于 2012-11-20 20:03:22 | 显示全部楼层 |阅读模式 来自 浙江杭州
本帖最后由 hgzcomnet 于 2012-11-20 20:19 编辑

纳米磁流体仿真,磁场计算结果经过运算后加入温度场节点。
(1)时谐场分析为何虚部数值不存在?
(2)温度场计算不了,错误时“节点温度数值超过软件限定数值了”
 楼主| 发表于 2012-11-20 20:20:10 | 显示全部楼层 来自 浙江杭州
Simdroid开发平台
啥意思啊,怎么附件上传不了的?
回复 不支持

使用道具 举报

 楼主| 发表于 2012-11-20 20:21:07 | 显示全部楼层 来自 浙江杭州
/prep7
!Input the scalar which determine the shape of the equipment
I1=1000
I2=500
myfreq=450e3                                         !频率
myPI=3.14159265358979                                !圆周率
myMuro=4*myPI*1e-7                                   !真空相对磁导率
myKB=1.38e-23                                        !波尔兹曼常数
myEta=0.00235                                        !液体的粘度系数
myR=7e-9                                             !粒子的平均半径
myTao0=10e-9                                         !奈尔弛豫时间常数,典型值10e(-9~-10)
myDelta=2e-9                                         !表面活性剂厚度
myYX=0.2                                             !材料的奈尔各向异性系数
myFI=0.071                                           !磁流体的体积百分数
myMd=414e3                                           !材料畴磁化率
!下面参数应随计算而变,现作为常量计算
myT=310                                              !组织温度
!以下为导出数据
!以下参数为随着温度而变化的各个参数,本程序把温度当做常数
myVm=4*myPI*myR**3/3                                 !离子体积
myVh=myVm*(1+myDelta/myR)**3                         !流体力学体积
myTb=3*myEta*myVh/myKB/myT                           !布朗弛豫时间
myG=myYX*myVm/myKB/myT                               !奈尔弛豫时间中间变量计算
myTn=sqrt(myPI)*myTao0*exp(myG)/sqrt(myG)/2          !奈尔弛豫时间(与论文大致对应)
!
myXi=myMuro*myFI*myVm*myMd**2/myKB/myT/3             !实际磁化率系数(实际上它应该随着温度而变化);另外,还有一个值myKxi须与H结合才能算出
myTao=1/(1/myTb+1/myTn)                              !弛豫时间
!
!The size of main coils
!
L1=0.2                                               !The length of the main coil(constant)
W1=0.05                                              !The width of the main coil(constant)
!
!The size of correcting coils
!
L2=0.1                                               !The length of the correcting coil(constant)
W2=0.025                                             !The width of the correcting coil(constant)
!
!The size of the cancer lesions
!
Rx=0.1                                               !the radius of tumor in liver
Lx=0.1                                               !the length of tumor in liver
Ry=0.15                                              !the radius of liver
Ly=0.2                                               !the length of liver
!
!The controlled size
!
r1=0.25     !the min radius value of mail coil(variable,[0.25,0.5])
z1=0.15     !the distance of the main coil from the axis(variable,[0.15,0.4])
dr=0.05     !the gap betreen main and correcting coil(constant,[0.05])
dz=0.45     !the shift distance of the correcting coil with respect the main one(variable,[-0.05,0.45])
!
csys,0
/pnum,area,1
p1=z1+dz+L2
p2=r1+W1+dr+W2
p3=sqrt(p1*p1+p2*p2)
temp_scale=2.0                            !air element's area factor
infin_scale=1.2                           !infinte element's area factor
cyl4,0,0,0,0,temp_scale*p3,90
cyl4,0,0,0,0,infin_scale*temp_scale*p3,90
aovlap,all
numcmp,all
rectng,0,Lx/2,0,Rx
rectng,0,Ly/2,0,Ry
rectng,z1,z1+L1,r1,r1+W1
rectng,z1+dz,z1+dz+L2,r1+W1+dr,r1+W1+dr+W2
aovlap,all
numcmp,all
!AGEN, ITIME, NA1, NA2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE
asel,all
csys,1
agen,2,all,,,,90,,,0,1
csys,0
arsym,x,all,,,,0,1
!
/replot
!mat assignment
et,1,110,0,,1       !the infinite area
et,2,13,4,,1        !the main coil
et,3,13,4,,1        !the correcting coil
et,4,13,4,,1        !the cancer full of ferromagnetic fliud
et,5,13,4,,1        !the liver
et,6,53,0,,1        !the air
!
mp,murx,1,1
mp,murx,2,1
mp,rsvz,3,1.7e-8    !the correcting coil's Electrical resistivities
mp,murx,3,1
mp,rsvz,3,1.7e-8    !the correcting coil's Electrical resistivities
mp,murx,4,1         !ferromagnetic(the material is air now)
mp,murx,5,1         !human body's material characteristic:murx
mp,murx,6,1         !the air


asel,s,area,,1
aatt,1,,1
asel,s,area,,2
aatt,2,2,2
asel,s,area,,3
aatt,3,3,3
asel,s,area,,4
aatt,4,4,4
asel,s,area,,5
aatt,5,5,5
asel,s,area,,6
aatt,6,,6
!
allsel,all
lsel,all
lsel,u,line,,1,4,1
lsel,u,line,,21,22
lesize,all,0.01
!
lsel,s,line,,1,2
lsel,a,line,,21,22
lesize,all,,,30
!
lsel,s,line,,3,4
lesize,all,,,1             !LESIZE, NL1, SIZE, ANGSIZ, NDIV, SPACE, KFORC, LAYER1, LAYER2, KYNDIV
!
allsel,all
!mshape,0,2d
!mshkey,2
smartsize,2
amesh,all
!
csys,1
allsel,all
lsel,s,loc,x,infin_scale*temp_scale*p3
nsll,s,1
sf,all,inf
!
lsel,s,loc,y,90
nsll,s,1
d,all,az,0
csys,0
!
asel,s,area,,2
asum
*get,areaOfmain,area,2,area
asel,s,area,,3
asum
*get,areaOfcorr,area,3,area
densOfmain=I1/areaOfmain
densOfcorr=I2/areaOfcorr
!
!
allsel,all
asel,s,area,,2
esla
bfe,all,JS,1,,,densOfmain
asel,s,area,,3
esla
bfe,all,JS,1,,,densOfcorr

allsel,all
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!以上建立磁场分析模型!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
physics,write,myMagnetics              !写物理环境文件
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!以下建立热场分析模型
physics,clear                          !清除边界条件
et,1,0                                 !磁场计算中的材料1不参与热计算,以下定义材料为零的相同
et,2,0
et,3,0
et,4,77,,,1
et,5,77,,,1
et,6,0
!R, NSET, R1, R2, R3, R4, R5, R6
!MP, Lab, MAT, C0, C1, C2, C3, C4
/units,si
mp,dens,4,1e3
mp,kxx,4,57
mp,c,4,3500
mp,dens,5,1e3
mp,kxx,5,512
mp,c,5,3816
allsel,all
save
finish
physics,write,myTemp
!求解磁场
/solu
physics,read,myMagnetics
antype,harmic,new
allsel,all
hmagsolv,myfreq
finish
!
/post1
set,last,1,,0
plf2d
!以下为抓图命令,还可以用/ui或者/image抓图,但清晰度比较差
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
PLVECT,H, , , ,VECT,ELEM,ON,0
!以下为抓图命令,还可以用/ui或者/image抓图,但清晰度比较差
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
PLVECT,B, , , ,VECT,ELEM,ON,0
!以下为抓图命令,还可以用/ui或者/image抓图,但清晰度比较差
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
!以下得到单元标号及其计算结果(Hsum)
!
asel,s,area,,4
esla,s
etable,myelem,h,sum
!
*get,NumMin,elem,0,num,min              !得到区域中最小单元编号
*get,NumCount,elem,0,count              !得到被选中的全部单元总数
*dim,p1Elem,,NumCount,2                 !NumCount行2列数组,分别储存单元编号,场计算值
p1Elem(1,1)=NumMin
*do,i,2,NumCount
    p1Elem(i,1)=elnext(p1Elem(i-1,1))
*enddo
!
*do,i,1,NumCount
    *get,p1Elem(i,2),etab,1,elem,p1Elem(i,1)
*enddo
!
*dim,temp_H,,NumCount
*do,i,1,NumCount
    temp_H(i)=p1Elem(i,2)
*enddo
!以下得到Hsum平均值
*VSCFUN,meanOfH,mean,temp_H
*VSCFUN,elemOfMaxH,max,temp_H
*VSCFUN,elemOfMinH,min,temp_H
JunYunDu=(elemOfMaxH-elemOfMinH)/meanOfH      !磁场不均匀度
!以下计算各个单元的热流率P
*dim,densRateOfHF,,NumCount
*do,i,1,NumCount
    myKxi=myMuro*myMd*p1Elem(i,2)*myVm/myKB/myT
    myKi0=myXi*3/myKxi*(1/tanh(myKxi)-1/myKxi)
    myKidd=2*myPI*myfreq*myTao/(1+(2*myPI*myfreq*myTao)**2)*myKi0
    densOfHF=myMuro*myPI*myKidd*myfreq*p1Elem(i,2)**2
    *get,areaOfElem,elem,p1Elem(i,1),area
    densRateOfHF(i)=densOfHF/areaOfElem
*enddo
!
finish
/solu
antype,static
physics,read,myTemp
nsel,all
tunif,myT                              !定义所有节点初始温度(K)
lsel,s,loc,y,Ly/2
lsel,a,loc,x,Ry
nsll,s,1
d,all,temp,myT                         !定义体温边界条件(K)
allsel,all
nropt,auto
autots,on
kbc,0
nsubst,50
allsel,all
*do,i,1,NumCount
    esel,s,elem,,p1Elem(i,1)
    sfe,all,,hflux,,densRateOfHF(i)
*enddo
allsel,all
outpr,nsol,last
solve
finish
/post1
PLNSOL, TEMP,, 0
!
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
PLNSOL, TG,SUM, 0  
!
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
PLVECT,TF, , , ,VECT,ELEM,ON,1                                 
!
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
PLVECT,TG, , , ,VECT,NODE,ON,1
!
/UI,COPY,SAVE,BMP,GRAPH,COLOR,NORM,PORTRAIT,no,100
!
finish
回复 不支持

使用道具 举报

 楼主| 发表于 2012-11-21 22:04:18 | 显示全部楼层 来自 浙江杭州
没人回复的啊
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-20 11:35 , Processed in 0.028244 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表