主要内容

Findthermalic

Find thermal initial conditions assigned to a geometric region

Description

example

tica= findThermalIC(thermalmodel。在itialConditions,RegionType,区域)returns the thermal initial condition assigned to the specified region.

Examples

collapse all

Create a transient thermal model that has three faces.

thermalmodel = createpde('thermal','transient');geometryFromEdges(thermalmodel,@lshapeg); pdegplot(thermalmodel,'FaceLabels','on')Ylim([-1.1 1.1])轴equal

图包含一个轴对象。轴对象包含4个类型行的对象,文本。

Set initial temperatures for each face.

thermalIC(thermalmodel,10,'Face',1);热模型,20,'Face',2);热模型,30,,'Face',3);

Check the initial condition specification for face 1.

ticaFace1 = findThermalIC(thermalmodel.InitialConditions,'Face',1)
ticaFace1 = GeometricThermalICs with properties: RegionType: 'face' RegionID: 1 InitialTemperature: 10

Check the initial temperature specifications for faces 2 and 3.

tica= findThermalIC(thermalmodel.InitialConditions,'Face',[2 3]); ticaFace2 = tica(1)
ticaface2 =具有属性的几何感应:区域类型:'face'regionid:2初始植物:20
ticaFace3 = tica(2)
ticaFace3 = GeometricThermalICs with properties: RegionType: 'face' RegionID: 3 InitialTemperature: 30

创建一个由三个嵌套圆柱体组成的几何形状,并将几何形状包括在瞬态热模型中。

gm =多环状([5 10 15],2)
gm =带有属性的离散地体学:数字:3个数字:9个数字:6个数字:6个顶点:[6x3 double]
thermalmodel = createpde('thermal','transient');hytermodel.几何= gm;PDEGPLOT(ThermalModel,“牢房”,'on','FaceAlpha',0.5)

图包含一个轴对象。The axes object contains 3 objects of type quiver, patch, line.

为每个单元设置初始温度。

thermalIC(thermalmodel,0,'细胞',1);thermalIC(thermalmodel,100,'细胞',2);thermalIC(thermalmodel,0,'细胞',3);

Check the initial condition specification for cell 1.

ticaCell1 = findThermalIC(thermalmodel.InitialConditions,'细胞',1)
ticaCell1 = GeometricThermalICs with properties: RegionType: 'cell' RegionID: 1 InitialTemperature: 0

Check the initial condition specification for cells 2 and 3.

tica= findThermalIC(thermalmodel.InitialConditions,'细胞',[2:3]);ticacell2 = tica(1)
ticacell2 =具有特性的几何感应:区域类型:'cell'''''''''''
ticaCell3 = tica(2)
ticaCell3 = GeometricThermalICs with properties: RegionType: 'cell' RegionID: 3 InitialTemperature: 0

Create a thermal model and include a square geometry.

thermalmodel = createpde('thermal','transient');gm = @squareg; geometryFromEdges(thermalmodel,gm); pdegplot(thermalmodel,'FaceLabels','on')Ylim([-1.1 1.1])轴equal

图包含一个轴对象。The axes object contains 2 objects of type line, text.

Specify material properties, heat source, set initial and boundary conditions.

Thermalproperties(热模型,'ThermalConductivity',500,...'MassDensity',200,...'femificheat',100);InternalHootSource(ThermalModel,2);ThermalBC(ThermalModel,'Edge',[1 3],,'Temperature',100);thermalIC(thermalmodel,0);

Generate a mesh and solve the problem.

generateMesh(thermalmodel); tlist = 0:0.5:10; result1 = solve(thermalmodel,tlist)
结果1 =具有性质的瞬时速度:温度:[1541x21 double]解决方案时间:[0 0.5000 1 1.5000 2 2.5000 2 2.5000 3 3.5000 4 4.5000 5 ...] XGRADIANTS:[1541x21 double] yGradients:[1541x21 double] Zgradiationt女性]

检查当前活跃的初始温度规范。

tica= findThermalIC(thermalmodel.InitialConditions,'Face',1)
tica= GeometricThermalICs with properties: RegionType: 'face' RegionID: 1 InitialTemperature: 0

Now, resume the analysis and solve the problem for times from 10 to 15 seconds. Use the previously obtained solution for 10 seconds as an initial condition. Since 10 seconds is the last element intlist, you do not need to specify the solution time index. By default,thermalICuses the last solution index.

ic = thermalIC(thermalmodel,result1);

Solve the problem

tlist= 10:0.5:15; result2 = solve(thermalmodel,tlist);

检查当前活跃的初始温度规范。

tica= findThermalIC(thermalmodel.InitialConditions,'Face',1)
tica= NodalThermalICs with properties: InitialTemperature: [1541x1 double]
pdeplot(thermalmodel,'XYData',tica.InitialTemperature)

图包含一个轴对象。The axes object contains an object of type patch.

在put Arguments

collapse all

热模型的初始条件,指定为在itialConditions财产的ThermalModel目的。

几何区域类型,指定为'Edge','Face', or'顶点'for a 2-D model or 3-D model, or'细胞'对于3-D模型.

Data Types:char|string

Geometric region ID, specified as a vector of positive integers. Find the region IDs using thePDEGPLOT功能'FaceLabels'(3-D)或'edgelabels'(2-D) value set to'on'.

Data Types:double

Output Arguments

collapse all

特定区域的热初始条件,返回几何感应Properties或者结节性能目的。

Version History

在troduced in R2017a