findHeatSource
Find heat source assigned to a geometric region
Domain-specific heat transfer workflow is not recommended. New features might not be compatible with this workflow. For help migrating your existing code to the unified finite element workflow, see Migration from Domain-Specific to Unified Workflow.
Description
returns the heat source value hsa
= findHeatSource(heatSources
,RegionType
,RegionID
)hsa
assigned to the specified
region.
Examples
Find Heat Sources for Faces of 2-D Geometry
Create a thermal model that has three faces.
thermalmodel = createpde("thermal"); geometryFromEdges(thermalmodel,@lshapeg); pdegplot(thermalmodel,"FaceLabels","on") ylim([-1.1 1.1]) axis equal
Specify that face 1 generates heat at 10 W/m^3, face 2 generates heat at 20 W/m^3, and face 3 generates heat at 30 W/m^3.
internalHeatSource(thermalmodel,10,"Face",1); internalHeatSource(thermalmodel,20,"Face",2); internalHeatSource(thermalmodel,30,"Face",3);
Check the heat source specification for face 1.
hsaFace1 = findHeatSource(thermalmodel.HeatSources,"Face",1)
hsaFace1 = HeatSourceAssignment with properties: RegionType: 'face' RegionID: 1 HeatSource: 10 Label: []
Check the heat source specification for faces 2 and 3.
hsa = findHeatSource(thermalmodel.HeatSources,"Face",[2 3]);
hsaFace2 = hsa(1)
hsaFace2 = HeatSourceAssignment with properties: RegionType: 'face' RegionID: 2 HeatSource: 20 Label: []
hsaFace3 = hsa(2)
hsaFace3 = HeatSourceAssignment with properties: RegionType: 'face' RegionID: 3 HeatSource: 30 Label: []
Find Heat Sources for Cells of 3-D Geometry
Create a geometry that consists of three stacked cylinders and include the geometry in a thermal model.
gm = multicylinder(10,[1 2 3],"ZOffset",[0 1 3])
gm = DiscreteGeometry with properties: NumCells: 3 NumFaces: 7 NumEdges: 4 NumVertices: 4 Vertices: [4x3 double]
thermalmodel = createpde("thermal"); thermalmodel.Geometry = gm; pdegplot(thermalmodel,"CellLabels","on","FaceAlpha",0.5)
Specify that the cylinder C1
generates heat at , the cylinder C2
generates heat at , and the cylinder C3
generates heat at .
internalHeatSource(thermalmodel,10,"Cell",1); internalHeatSource(thermalmodel,20,"Cell",2); internalHeatSource(thermalmodel,30,"Cell",3);
Check the heat source specification for cell 1.
hsaCell1 = findHeatSource(thermalmodel.HeatSources,"Cell",1)
hsaCell1 = HeatSourceAssignment with properties: RegionType: 'cell' RegionID: 1 HeatSource: 10 Label: []
Check the heat source specification for cells 2 and 3.
hsa = findHeatSource(thermalmodel.HeatSources,"Cell",2:3);
hsaCell2 = hsa(1)
hsaCell2 = HeatSourceAssignment with properties: RegionType: 'cell' RegionID: 2 HeatSource: 20 Label: []
hsaCell3 = hsa(2)
hsaCell3 = HeatSourceAssignment with properties: RegionType: 'cell' RegionID: 3 HeatSource: 30 Label: []
Input Arguments
heatSources
— Internal heat source of the model
HeatSources
property of a thermal model
Internal heat source of the model, specified as the
HeatSources
property of a
ThermalModel
object.
Example: thermalmodel.HeatSources
RegionType
— Geometric region type
"Face"
| "Cell"
Geometric region type, specified as "Face"
for a 2-D
model or "Cell"
for a 3-D model.
Data Types: char
| string
RegionID
— Geometric region ID
vector of positive integers
Geometric region ID, specified as a vector of positive integers. Find the
region IDs by using the pdegplot
function.
Data Types: double
Output Arguments
hsa
— Heat source assignment
HeatSourceAssignment
object
Heat source assignment, returned as a HeatSourceAssignment Properties object.
Version History
Introduced in R2017a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)