Main Content

SteadyStateThermalResults

Steady-state thermal solution and derived quantities

Description

A SteadyStateThermalResults object contains the temperature and temperature gradient values in a form convenient for plotting and postprocessing.

The temperature and its gradients are calculated at the nodes of the triangular or tetrahedral mesh generated by generateMesh. Temperature values at the nodes appear in the Temperature property. The three components of the temperature gradient at the nodes appear in the XGradients, YGradients, and ZGradients properties.

To interpolate the temperature or its gradients to a custom grid (for example, specified by meshgrid), use interpolateTemperature or evaluateTemperatureGradient.

To evaluate heat flux of a thermal solution at nodal or arbitrary spatial locations, use evaluateHeatFlux. To evaluate integrated heat flow rate normal to a specified boundary, use evaluateHeatRate.

Creation

Solve a steady-state thermal problem using the solve function. This function returns a steady-state thermal solution as a SteadyStateThermalResults object.

Properties

expand all

All Steady-State Thermal Models

This property is read-only.

Finite element mesh, returned as an FEMesh object.

This property is read-only.

Temperature values at nodes, returned as a vector.

Data Types: double

Non-Axisymmetric Steady-State Thermal Models

This property is read-only.

x-component of the temperature gradient at nodes, returned as a vector.

Data Types: double

This property is read-only.

y-component of the temperature gradient at nodes, returned as a vector.

Data Types: double

This property is read-only.

z-component of the temperature gradient at nodes, returned as a vector.

Data Types: double

Axisymmetric Steady-State Thermal Models

This property is read-only.

r-component of the temperature gradient at nodes, returned as a vector.

Data Types: double

This property is read-only.

z-component of the temperature gradient at nodes, returned as a vector.

Data Types: double

Object Functions

evaluateHeatFluxEvaluate heat flux of thermal solution at nodal or arbitrary spatial locations
evaluateHeatRateEvaluate integrated heat flow rate normal to specified boundary
evaluateTemperatureGradientEvaluate temperature gradient of thermal solution at arbitrary spatial locations
interpolateTemperatureInterpolate temperature in thermal result at arbitrary spatial locations

Examples

collapse all

Solve a 3-D steady-state thermal problem.

Create an femodel object for a steady-state thermal problem and include a geometry representing a block.

model = femodel(AnalysisType="thermalSteady", ...
                Geometry="Block.stl");

Plot the block geometry.

pdegplot(model.Geometry, ...
         FaceLabels="on", ...
         FaceAlpha=0.5)
axis equal

Figure contains an axes object. The axes object contains 6 objects of type quiver, text, patch, line.

Assign material properties.

model.MaterialProperties = ...
    materialProperties(ThermalConductivity=80);

Apply a constant temperature of 100 °C to the left side of the block (face 1) and a constant temperature of 300 °C to the right side of the block (face 3). All other faces are insulated by default.

model.FaceBC(1) = faceBC(Temperature=100);
model.FaceBC(3) = faceBC(Temperature=300);

Mesh the geometry and solve the problem.

model = generateMesh(model);
thermalresults = solve(model)
thermalresults = 
  SteadyStateThermalResults with properties:

    Temperature: [12822x1 double]
     XGradients: [12822x1 double]
     YGradients: [12822x1 double]
     ZGradients: [12822x1 double]
           Mesh: [1x1 FEMesh]

The solver finds the temperatures and temperature gradients at the nodal locations. To access these values, use thermalresults.Temperature, thermalresults.XGradients, and so on. For example, plot temperatures at the nodal locations.

pdeplot3D(thermalresults.Mesh,ColorMapData=thermalresults.Temperature)

Figure contains an axes object. The hidden axes object contains 5 objects of type patch, quiver, text.

Analyze heat transfer in a rod with a circular cross-section and internal heat generation by simplifying a 3-D axisymmetric model to a 2-D model.

The 2-D model is a rectangular strip whose x-dimension extends from the axis of symmetry to the outer surface and whose y-dimension extends over the actual length of the rod (from -1.5 m to 1.5 m). Create the geometry by specifying the coordinates of its four corners. For axisymmetric models, the toolbox assumes that the axis of rotation is the vertical axis passing through r = 0.

g = decsg([3 4 0 0 .2 .2 -1.5 1.5 1.5 -1.5]');

Plot the geometry with the edge labels.

pdegplot(g,EdgeLabels="on")
axis equal

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

Create an femodel object for steady-state thermal analysis and include the geometry.

model = femodel(AnalysisType="thermalSteady", ...
                Geometry=g);

Switch the type of the problem to axisymmetric.

model.PlanarType = "axisymmetric";

The rod is composed of a material with these thermal properties.

k = 40; % thermal conductivity, W/(m*C)
q = 20000; % heat source, W/m^3

For a steady-state analysis, specify the thermal conductivity of the material.

model.MaterialProperties = ...
    materialProperties(ThermalConductivity=k);

Specify the internal heat source.

model.FaceLoad = faceLoad(Heat=q);

Define the boundary conditions. There is no heat transferred in the direction normal to the axis of symmetry (edge 1). You do not need to change the default boundary condition for this edge. Edge 2 is kept at a constant temperature T = 100 °C.

model.EdgeBC(2) = edgeBC(Temperature=100);

Specify the convection boundary load on the outer boundary (edge 3). The surrounding temperature at the outer boundary is 100 °C, and the heat transfer coefficient is 50W/(mC).

model.EdgeLoad(3) = edgeLoad(ConvectionCoefficient=50,...
                         AmbientTemperature=100);

The heat flux at the bottom of the rod (edge 4) is 5000W/m2.

model.EdgeLoad(4) = edgeLoad(Heat=5000);

Generate the mesh.

model = generateMesh(model);
figure
pdemesh(model)
axis equal

Figure contains an axes object. The axes object contains 2 objects of type line.

Solve the problem.

thermalresults = solve(model);

The solver finds the temperatures and temperature gradients at the nodal locations. To access these values, use thermalresults.Temperature, thermalresults.RGradients, and thermalresults.ZGradients. For example, plot temperatures at the nodal locations.

T = thermalresults.Temperature;
figure
pdeplot(thermalresults.Mesh,XYData=T,Contour="on")
axis equal
title("Steady-State Temperature")

Figure contains an axes object. The axes object with title Steady-State Temperature contains 12 objects of type patch, line.

Version History

Introduced in R2017a

expand all