Main Content

findThermalIC

(To be removed) Find thermal initial conditions assigned to a geometric region

findThermalIC will be removed. Use the CellIC, FaceIC, EdgeIC, and VertexIC properties of femodel instead. (since R2023a) For more information on updating your code, see Version History.

Description

tica = findThermalIC(initialConditions,RegionType,RegionID) returns the thermal initial condition assigned to the specified region.

example

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])
axis equal

Figure contains an axes object. The axes object contains 4 objects of type line, text.

Set initial temperatures for each face.

thermalIC(thermalmodel,10,"Face",1);
thermalIC(thermalmodel,20,"Face",2);
thermalIC(thermalmodel,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 = 
  GeometricThermalICs with properties:

            RegionType: 'face'
              RegionID: 2
    InitialTemperature: 20

ticaFace3 = tica(2)
ticaFace3 = 
  GeometricThermalICs with properties:

            RegionType: 'face'
              RegionID: 3
    InitialTemperature: 30

Input Arguments

collapse all

Initial conditions of a thermal model, specified as the InitialConditions property of a ThermalModel object.

Example: thermalmodel.InitialConditions

Geometric region type, specified as "Edge", "Face", or "Vertex" for a 2-D model or 3-D model, or "Cell" for a 3-D model.

Data Types: char | string

Geometric region ID, specified as a vector of positive integers. Find the region IDs using the pdegplot function with the "FaceLabels" (3-D) or "EdgeLabels" (2-D) value set to "on".

Data Types: double

Output Arguments

collapse all

Thermal initial condition for a particular region, returned as a GeometricThermalICs Properties or NodalThermalICs Properties object.

Version History

Introduced in R2017a

collapse all