Main Content

internalHeatSource

(To be removed) Specify internal heat source for a thermal model

internalHeatSource will be removed. Use the Heat name-value argument of cellLoad and faceLoad instead. (since R2023a) For more information on updating your code, see Version History.

Description

internalHeatSource(thermalmodel,heatSourceValue) specifies an internal heat source for the thermal model. This syntax declares that the entire geometry is a heat source.

Note

Use internalHeatSource for specifying internal heat generators, that is, for specifying heat sources that belong to the geometry of the model. To specify a heat influx from an external source, use the thermalBC function with the HeatFlux parameter.

example

internalHeatSource(thermalmodel,heatSourceValue,RegionType,RegionID) specifies geometry regions of type RegionType with ID numbers in RegionID as heat sources. Always specify heatSourceValue first, then specify RegionType and RegionID.

internalHeatSource(___,"Label",labeltext) adds a label for the internal heat source to be used by the linearizeInput function. This function lets you pass internal heat sources to the linearize function that extracts sparse linear models for use with Control System Toolbox™.

heatSource = internalHeatSource(___) returns the heat source object.

Examples

collapse all

Create a transient thermal model.

thermalmodel = createpde("thermal","transient");

Import the geometry.

gm = importGeometry(thermalmodel,"SquareBeam.stl");

Set thermal conductivity to 0.2, mass density to 2700e-9, and specific heat to 920.

thermalProperties(thermalmodel,"ThermalConductivity",0.2, ...
                               "MassDensity",2700e-9, ...
                               "SpecificHeat",920)
ans = 
  ThermalMaterialAssignment with properties:

             RegionType: 'cell'
               RegionID: 1
    ThermalConductivity: 0.2000
            MassDensity: 2.7000e-06
           SpecificHeat: 920

Specify that the entire geometry generates heat at the rate 2e-4.

internalHeatSource(thermalmodel,2e-4)
ans = 
  HeatSourceAssignment with properties:

    RegionType: 'cell'
      RegionID: 1
    HeatSource: 2.0000e-04
         Label: []

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 "Face" for a 2-D model or "Cell" for a 3-D model.

Example: internalHeatSource(thermalmodel,25,"Cell",1)

Data Types: char | string

Geometric region ID, specified as a vector of positive integers. Find the region IDs by using pdegplot.

Example: internalHeatSource(thermalmodel,25,"Cell",1:3)

Data Types: double

Heat source value, specified as a number or a function handle. Use a function handle to specify the internal heat source that depends on space, time, or temperature. For details, see More About.

Example: internalHeatSource(thermalmodel,25)

Data Types: double | function_handle

Label for the internal heat source, specified as a character vector or a string.

Data Types: char | string

Output Arguments

collapse all

Handle to heat source, returned as a HeatSourceAssignment object. See HeatSourceAssignment Properties.

heatSourceValue associates the heat source value with the geometric region.

More About

collapse all

Version History

Introduced in R2017a

expand all