非均匀热流的多域几何热传导
本例展示了如何对由三层不同材料构成的空心球进行三维瞬态热传导分析。
球体受到不均匀的外部热流的影响。
在Singh, Jain, and Rizwan-uddin(参见参考文献)中描述了这个问题的物理性质和几何性质,其中也有这个问题的解析解。球体的内表面在任何时候都是零温度。带正电的外半球 值具有由定义的非均匀热流
而且 为球内各点的方位角和仰角。最初,球体上所有点的温度都是零。
创建瞬态热分析的热模型。
Thermalmodel = createpde(“热”,“瞬态”);
创建一个多层球体使用multisphere
函数。将生成的几何图形分配给热模型。球体有三层材料,内芯是中空的。
Gm = multisphere([1,2,4,6],“空白”,真的,假的,假的,假的);thermalmodel。几何= gm;
绘制几何图形并显示单元格标签和面标签。使用一个FaceAlpha
0.25,使内层的标签可见。
图(“位置”[10800400]);次要情节(1、2、1)pdegplot (thermalmodel,“FaceAlpha”, 0.25,“CellLabel”,“上”)标题(“单元格标签几何”) subplot(1,2,2) pdegplot(热模型,“FaceAlpha”, 0.25,“FaceLabel”,“上”)标题(“面标几何”)
为几何体生成一个网格。选择一个粗到足以加快解决方案,但细到足以合理地准确地表示几何尺寸的网格尺寸。
generateMesh (thermalmodel“Hmax”1);
指定热导率,质量密度,和比热球的每一层。材料属性是无量纲值,不是由现实的材料属性给出的。
thermalProperties (thermalmodel“细胞”,1,“ThermalConductivity”,1,...“MassDensity”,1,...“SpecificHeat”1);thermalProperties (thermalmodel“细胞”2,“ThermalConductivity”2,...“MassDensity”,1,...“SpecificHeat”, 0.5);thermalProperties (thermalmodel“细胞”3,“ThermalConductivity”4...“MassDensity”,1,...“SpecificHeat”, 4/9);
指定边界条件。最里面的表面在任何时候都是零温度。
thermalBC (thermalmodel“面子”,1,“温度”, 0);
球体的外表面有一个外部热流。使用热边界条件的函数形式来定义热通量。
函数Qflux = externalHeatFlux(区域,~)
[phi,theta,~] = cart2sph(region.x,region.y,region.z);
= /2 -;%变换到0 <= theta <= PI
id = > 0;
Qflux = 0 (size(region.x));
Qflux(ids) = (ids) ^2。*(- (ids)) ^2 *(ids) ^2。*(pi - (ids)).^2;
结束
在表面画出通量。
[phi,theta,r] = meshgrid(linspace(0,2*pi),linspace(-pi/2,pi/2),6);[x,y,z] = sph2cart(phi,theta,r);地区。X = X;地区。Y = Y;地区。Z = Z;flux = externalHeatFlux(区域,[]);图冲浪(x, y, z,通量,“线型”,“没有”)轴平等的查看colorbar xlabel(“x”) ylabel (“y”) zlabel (“z”)标题(“外部流量”)
在模型中包含这个边界条件。
thermalBC (thermalmodel“面子”4...“HeatFlux”@externalHeatFlux,...“矢量”,“上”);
定义初始温度在所有点上都为零。
thermalIC (thermalmodel 0);
定义一个时间步向量并求解瞬态热问题。
Tlist = [0,2,5:5:50];R = solve(热模型,tlist);
要绘制几次等高线,在所有图的等高线水平相同的情况下,确定溶液中的温度范围。最小温度为零,因为它是球体内表面的边界条件。
Tmin = 0;
从最后的时间步解中求出最高温度。
Tmax = max(R.Temperature(:,end));
在范围内绘制等高线Tmin
来达峰时间
在《泰晤士报》tlist
.
H =数字;为i = 1:numel(tlist) pdeplot3D(热模型,“ColorMapData”,R.Temperature(:,i)) caxis([Tmin,Tmax]) view(130,10) title([“当时的温度”num2str (tlist (i))));M(i) = getframe;结束
当在你的电脑上运行这个例子时,要查看轮廓的电影,执行下面的行:
电影(M, 2)
可视化横截面上的温度等高线。首先,定义一个矩形网格上的点 飞机在哪里 .
[YG, ZG] = meshgrid (linspace (6100), linspace (6100);XG = 0 (size(YG));
插值网格点上的温度。进行几个时间步的插值,观察温度轮廓的演变。
tIndex = [2,3,5,7,9,11];varNames = {“Time_index”,“Time_step”};index_step = table(tIndex.',tlist(tIndex).',“VariableNames”, varNames);disp (index_step);
Time_index Time_step __________ _________ 2 2 3 5 5 15 7 25 9 35 11 45
TG = interpolateTemperature(R,XG,YG,ZG,tIndex);
在横截面上定义几何球面层。
T = linspace(0,2*pi);Ylayer1 = cost;Zlayer1 = sin(t);Ylayer2 = 2*cos(t);Zlayer2 = 2*sin(t);Ylayer3 = 4*cos(t);Zlayer3 = 4*sin(t);Ylayer4 = 6*cos(t);Zlayer4 = 6*sin(t);
在范围内画等高线Tmin
来达峰时间
对应于时间指标的时间步长tIndex
.
图(“位置”, 10、10、1000、550);为i = 1:数字(tIndex) subplot(2,3,i)等高线(YG,ZG,重塑(TG(:,i),大小(YG)),“ShowText”,“上”)色条标题([“当时的温度”num2str (tlist (tIndex (i)))));持有在caxis ([Tmin,达峰时间])轴平等的绘制球体层的边界以供参考。情节(ylayer1 zlayer1,“k”,“线宽”1.5)情节(ylayer2 zlayer2,“k”,“线宽”1.5)情节(ylayer3 zlayer3,“k”,“线宽”1.5)情节(ylayer4 zlayer4,“k”,“线宽”, 1.5)结束
参考
[1]辛格,Suneet, P. K. Jain和Rizwan-uddin。多层球体中三维非稳态热传导的解析解。ASME。J.热传导学报,138(10),2016,pp. 101301-101301-11。