Main Content

findThermalBC

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

findThermalBC will be removed. Use the EdgeBC and FaceBC properties of femodel instead. (since R2023a) For more information on updating your code, see Version History.

Description

tbca = findThermalBC(boundaryConditions,RegionType,RegionID) returns the thermal boundary condition assigned to the specified region.

example

Examples

collapse all

Create a thermal model and include a square geometry.

thermalmodel = createpde("thermal");
geometryFromEdges(thermalmodel,@squareg);
pdegplot(thermalmodel,"EdgeLabels","on")
ylim([-1.1 1.1])
axis equal

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

Apply temperature boundary conditions on edges 1 and 3 of the square.

thermalBC(thermalmodel,"Edge",[1 3],"Temperature",100);

Apply a heat flux boundary condition on edge 4 of the square.

thermalBC(thermalmodel,"Edge",4,"HeatFlux",20);

Check the boundary condition specification on edge 1.

tbcaEdge1 = findThermalBC(thermalmodel.BoundaryConditions,"Edge",1)
tbcaEdge1 = 
  ThermalBC with properties:

               RegionType: 'Edge'
                 RegionID: [1 3]
              Temperature: 100
                 HeatFlux: []
    ConvectionCoefficient: []
               Emissivity: []
       AmbientTemperature: []
               Vectorized: 'off'
                    Label: []
               InternalBC: []

Check the boundary condition specifications on edges 3 and 4.

tbca = findThermalBC(thermalmodel.BoundaryConditions,"Edge",3:4);
tbcaEdge3 = tbca(1)
tbcaEdge3 = 
  ThermalBC with properties:

               RegionType: 'Edge'
                 RegionID: [1 3]
              Temperature: 100
                 HeatFlux: []
    ConvectionCoefficient: []
               Emissivity: []
       AmbientTemperature: []
               Vectorized: 'off'
                    Label: []
               InternalBC: []

tbcaEdge4 = tbca(2)
tbcaEdge4 = 
  ThermalBC with properties:

               RegionType: 'Edge'
                 RegionID: 4
              Temperature: []
                 HeatFlux: 20
    ConvectionCoefficient: []
               Emissivity: []
       AmbientTemperature: []
               Vectorized: 'off'
                    Label: []
               InternalBC: []

Input Arguments

collapse all

Boundary conditions of a thermal model, specified as the BoundaryConditions property of a ThermalModel object.

Example: thermalmodel.BoundaryConditions

Geometric region type, specified as "Face" for 3-D geometry or "Edge" for 2-D geometry.

Data Types: char | string

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

Data Types: double

Output Arguments

collapse all

Thermal boundary condition for a particular region, returned as a ThermalBC object.

Version History

Introduced in R2017a

collapse all