Main Content

thermalBC

(To be removed) Specify boundary conditions for a thermal model

thermalBC will be removed. Use edgeBC and faceBC instead. (since R2023a) For more information on updating your code, see Version History.

Description

thermalBC(thermalmodel,RegionType,RegionID,"Temperature",Tval) adds a temperature boundary condition to thermalmodel. The boundary condition applies to regions of type RegionType with ID numbers in RegionID.

example

thermalBC(thermalmodel,RegionType,RegionID,"HeatFlux",HFval) adds a heat flux boundary condition to thermalmodel. The boundary condition applies to regions of type RegionType with ID numbers in RegionID.

Note

Use thermalBC with the HeatFlux parameter to specify a heat flux to or from an external source. To specify internal heat generation, that is, heat sources that belong to the geometry of the model, use internalHeatSource.

thermalBC(thermalmodel,RegionType,RegionID,"ConvectionCoefficient",CCval,"AmbientTemperature",ATval) adds a convection boundary condition to thermalmodel. The boundary condition applies to regions of type RegionType with ID numbers in RegionID.

thermalBC(thermalmodel,RegionType,RegionID,"Emissivity",REval,"AmbientTemperature",ATval) adds a radiation boundary condition to thermalmodel. The boundary condition applies to regions of type RegionType with ID numbers in RegionID.

thermalBC(___,InternalBC=intBCFlag) applies boundary conditions on internal edges. Use this syntax with any of the input argument combinations in the previous syntaxes.

thermalBC(___,"Label",labeltext) adds a label for the thermal boundary condition to be used by the linearizeInput function. This function lets you pass thermal boundary conditions to the linearize function that extracts sparse linear models for use with Control System Toolbox™.

thermalBC = thermalBC(___) returns the thermal boundary condition object.

Examples

collapse all

Apply temperature boundary condition on two edges of a square.

thermalmodel = createpde("thermal");
geometryFromEdges(thermalmodel,@squareg);
thermalBC(thermalmodel,"Edge",[1,3],"Temperature",100)
ans = 
  ThermalBC with properties:

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

Input Arguments

collapse all

Thermal model, specified as a ThermalModel object. The model contains the geometry, mesh, thermal properties of the material, internal heat source, boundary conditions, and initial conditions.

Example: thermalmodel = createpde("thermal","steadystate")

Geometric region type, specified as "Edge" or "Face".

Example: thermalBC(thermalmodel,"Face",1,"Temperature",72)

Data Types: char

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

Example: thermalBC(thermalmodel,"Edge",2:5,"Temperature",72)

Data Types: double

Temperature boundary condition, specified as a number or a function handle. Use a function handle to specify the temperature that depends on space and time. For details, see More About.

Example: thermalBC(thermalmodel,"Face",1,"Temperature",72)

Data Types: double | function_handle

Heat flux boundary condition, specified as a number or a function handle. Use a function handle to specify the heat flux that depends on space and time. For details, see More About.

Example: thermalBC(thermalmodel,"Face",[1,3],"HeatFlux",20)

Data Types: double | function_handle

Convection to ambient boundary condition, specified as a number or a function handle. Use a function handle to specify the convection coefficient that depends on space and time. For details, see More About.

Specify ambient temperature using the AmbientTemperature argument. The value of ConvectionCoefficient is positive for heat convection into the ambient environment.

Example: thermalBC(thermalmodel,"Edge",[2,4],"ConvectionCoefficient",5,"AmbientTemperature",60)

Data Types: double | function_handle

Radiation emissivity coefficient, specified as a number in the range (0,1). Use a function handle to specify the radiation emissivity that depends on space and time. For details, see More About.

Specify ambient temperature using the AmbientTemperature argument and the Stefan-Boltzmann constant using the thermal model properties. The value of Emissivity is positive for heat radiation into the ambient environment.

Example: thermalmodel.StefanBoltzmannConstant = 5.670373E-8; thermalBC(thermalmodel,"Edge",[2,4,5,6],"Emissivity",0.1,"AmbientTemperature",300)

Data Types: double | function_handle

Ambient temperature, specified as a number. The ambient temperature value is required for specifying convection and radiation boundary conditions.

Example: thermalBC(thermalmodel,"Edge",[2,4],"ConvectionCoefficient",5,"AmbientTemperature",60)

Data Types: double

Label for the thermal boundary condition, specified as a character vector or a string.

Data Types: char | string

Apply boundary conditions on internal edges in 2-D geometries for all models, specified as true or false.

There are two types of edges in 2-D geometries:

  • External boundary edges. These edges separate the geometry from the rest of the 2-D space.

  • Internal boundary edges. These edges separate faces of the geometry.

Data Types: logical

Output Arguments

collapse all

Handle to thermal boundary condition, returned as a ThermalBC object. See ThermalBC Properties.

thermalBC associates the thermal boundary condition with the geometric region.

More About

collapse all

Version History

Introduced in R2017a

expand all