非均匀热流多域几何中的热传导
这个例子展示了如何对由三层不同材料构成的空心球进行三维瞬态热传导分析。
球体受到非均匀的外部热流的影响。
这个问题的物理性质和几何性质在Singh, Jain和Rizwan-uddin(见参考文献)中有描述,其中也有这个问题的解析解。球体内表面的温度始终为零。外半球带正极 值具有定义为的非均匀热流密度
而且 为球内各点的方位角和仰角。最初,球面上所有点的温度都是零。
为瞬态热分析创建一个热模型。
热模型= 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(thermalmodel,“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
Ids = phi > 0;
Qflux = 0 (size(region.x));
Qflux(ids) = (ids) ^2。*(- (ids)) ^2 *(ids) ^2。*(- (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;通量= externalHeatFlux(区域,[]);图冲浪(x, y, z,通量,“线型”,“没有”)轴平等的查看(130,10)colorbar xlabel(“x”) ylabel (“y”) zlabel (“z”)标题(“外部流量”)
在模型中包含这个边界条件。
thermalBC (thermalmodel“面子”4...“HeatFlux”@externalHeatFlux,...“矢量”,“上”);
定义初始温度在所有点上都为零。
thermalIC (thermalmodel 0);
定义一个时间步向量,解决瞬态热问题。
Tlist = [0,2,5:5:50];R = solve(thermalmodel,tlist);
若要多次绘制等高线,且所有等高线的水平相同,则确定溶液中的温度范围。最小温度是零,因为它是球体内表面的边界条件。
Tmin = 0;
从最后的时间步解中求出最高温度。
Tmax = max(R.Temperature(:,end));
在范围内绘制等高线Tmin
来达峰时间
时代周刊tlist
.
H =图;为i = 1:numel(tlist) pdeployt3d (thermalmodel,“ColorMapData”,R.Temperature(:,i)) cacis ([Tmin,Tmax]) view(130,10) title([Tmin,Tmax])“时间温度”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 = cos(t);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:numel(tIndex) subplot(2,3,i) contour(YG,ZG, remodeling (TG(:,i),size(YG)),“ShowText”,“上”) colorbar title([“时间温度”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] Singh, Suneet, P. K. Jain和Rizwan-uddin。多层球体中三维非稳态热传导的解析解。ASME。中国机械工程学报(自然科学版),2016,36(5):557 - 557。