Finite-element analysis
Thermal stress
Find the stress and support force in a clamped steel bar heated by 80 K, from the restrained-bar formula and a thermomechanical finite-element solution in RunMat.
A part that cannot expand freely when its temperature changes develops thermal stress. Pipes between anchors, rails, bolted flanges and electronics on a stiff board all carry it. This page works one example in full: the thermal strain and restrained-bar theory of a strength-of-materials course, the finite-element formulation that carries a temperature field into a structural solve, and the solution in RunMat.
Example 1: A clamped steel bar heated by 80 K
A steel bar is built in between two rigid walls at room temperature, 20 °C. In service it heats uniformly to 100 °C. The walls do not move. The bar must stay elastic, below its 250 MPa yield strength, and the walls must be designed for the force the bar exerts on them.
Given
| Quantity | Value |
|---|---|
| Length | L = 1 m, along x |
| Cross-section | square, 100 mm × 100 mm (A = 0.01 m²) |
| Material | steel, E = 200 GPa, ν = 0.3, α = 12 × 10⁻⁶ K⁻¹ |
| Reference temperature | T_ref = 293.15 K (20 °C), stress-free |
| Service temperature | T = 373.15 K (100 °C), uniform: ΔT = 80 K |
| Supports | both end faces fixed in all directions |
| Yield strength | 250 MPa |
Find
- The axial stress in the bar.
- The force each wall carries.
- Whether the bar stays below yield, and what the result means for the design.
Thermal expansion of a restrained bar
Thermal strain
A material heated by ΔT from a stress-free state expands equally in every direction. The thermal strain is
and stress arises only from the part of the strain that differs from it. In one dimension, Hooke's law becomes
Free and restrained bars
A bar free to expand has no stress: , and its length grows by . Between rigid walls the total strain is zero, so the stress and the axial force are
The stress is compressive and depends on neither the length nor the section: a long rail and a short pin heated by the same amount carry the same stress. For this bar, a free bar would grow by 0.96 mm, and the restrained bar carries σ = −192 MPa and N = −1,920 kN.
Three dimensions
In a solid, the thermal strain is a uniform expansion, , and the stress follows from the elastic part of the strain:
Away from the walls the restrained bar is in uniaxial compression, and its free sides grow sideways by the thermal strain plus the Poisson expansion under the compressive stress, . At the walls, the clamped faces also hold the section's width and depth fixed. The material there is restrained in three directions, which the one-dimensional formula does not see.
Finite-element formulation
Weak form. Substituting the thermoelastic stress into the principle of virtual work moves the thermal strain to the right-hand side:
The temperature acts as a load. No force is applied anywhere, yet the bar is loaded by its own restrained expansion.
Discretization. With ten-node tetrahedra and quadratic shape functions, and , as in the linear static example. The left side gives the usual element stiffness, and the right side gives a thermal load vector:
Assembly and supports. Assembling gives . The clamped faces prescribe zero displacement, and the reactions there are the wall forces, as in a static analysis. Stress is recovered from the elastic strain only, .
Here the temperature is prescribed as a uniform field. When it comes from a heat-conduction solution instead, the same thermal load vector carries the computed temperature into the structural solve; the thermomechanical physics reference covers that coupling.
Solution
Each block below is an excerpt of thermal-stress-static.fea.
Geometry
The bar is imported from a STEP file. Its two end faces carry CAD names, so the study can clamp them by name.
geometry bar {
file = "./geometry/bar.step"
units = mm
region body : solid { select name "Bar"; expect exactly_one }
region end_a : face { select name "End A"; expect exactly_one }
region end_b : face { select name "End B"; expect exactly_one }
}Mesh
Quadratic tetrahedra at a 50 mm target size give 2,692 elements and 4,679 nodes. The stress in the middle of the bar is uniform, but near the clamps it varies across the section, and quadratic elements follow that variation.
mesh bar on geometry.bar {
tetrahedra {
order = quadratic
target_size = 0.05 m
maximum_deviation = 0.001 m
}
}Material
A thermal stress analysis needs the elastic constants and the expansion coefficient. The reference_temperature is the stress-free temperature, and modulus_temperature_coefficient = 0 K^-1 keeps E constant over the 80 K rise. The conductivity and specific heat serve heat-conduction steps and are unused when the temperature is prescribed.
material steel {
mass_density = 7850 kg/m^3
elastic {
youngs_modulus = 200 GPa
poisson_ratio = 0.3
}
thermal {
reference_temperature = 293.15 K
modulus_temperature_coefficient = 0 K^-1
conductivity = 45 W/m/K
specific_heat = 500 J/kg/K
expansion_coefficient = 0.000012 K^-1
}
}Supports and temperature
Both end faces are fixed: the rigid walls of the problem statement. The temperature is applied as a temperature_field load on the whole body, 373.15 K against the 293.15 K reference, which is the in .
model clamped_bar {
thermal { reference_temperature = 293.15 K }
thermomechanical { reference_temperature = 293.15 K }
assign material.steel to geometry.bar.region.body
constraint clamp_a {
structural.fixed { target = geometry.bar.region.end_a }
}
constraint clamp_b {
structural.fixed { target = geometry.bar.region.end_b }
}
load operating_temperature {
temperature_field on geometry.bar.region.body = 373.15 K
}
load_case operating { include load.operating_temperature }
}Study and outputs
The thermomechanical steady procedure assembles and solves it. The outputs publish the displacement and stress fields, the von Mises stress at the center of the bar, the reaction on one wall, and the largest displacement.
study heated_static {
geometry = geometry.bar
mesh = mesh.bar
model = model.clamped_bar
analysis coupled { thermomechanical steady {} }
output displacement = analysis.coupled.field.node.displacement
output stress = analysis.coupled.field.element.stress
output von_mises = analysis.coupled.field.element.von_mises_stress
output mid_von_mises = interpolate(analysis.coupled.field.node.von_mises_stress, at = [500 mm, 50 mm, 50 mm])
output clamp_reaction = resultant(analysis.coupled.field.node.reaction_force, over = geometry.bar.region.end_a)
output largest_displacement = max(magnitude(analysis.coupled.field.node.displacement), over = geometry.bar.region.body)
}Run
From the command line, in the example folder:
runmat check thermal-stress-static.fea
runmat run thermal-stress-static.feaWall force
The reaction on the wall at x = 0 is 1,975.84 kN, pointing in +x: the bar pushes on the wall and the wall pushes back. The other wall carries the same force in the opposite direction, so the bar as a whole is in equilibrium with no applied load. The force is 2.9 % above the 1,920 kN of the one-dimensional formula. The clamped faces also stop the section from growing sideways near the walls, which makes the bar stiffer there; holding the stiffer bar to zero total length takes more force.
Stress
At the center of the bar the von Mises stress is 197.584 MPa. In uniaxial compression the von Mises stress equals the magnitude of the axial stress, and dividing the wall force by the area gives the same 197.6 MPa: the axial force is the same at every section, and at mid-length it is carried uniformly.
Deformation
The largest displacement is 0.0905 mm, at the corners of the sections away from the walls. The bar cannot lengthen, so this is the sideways growth of the section. The lateral strain moves a corner 50 mm from the axis by about 0.062 mm in each of two directions, or 0.088 mm in all.
Answers
- The axial stress is about 197.584 MPa in compression in the body of the bar, against 192 MPa from .
- Each wall carries 1,975.84 kN.
- The stress is 79 % of the 250 MPa yield strength. The bar stays elastic, but with little margin for a modest temperature rise.
Discussion
Design meaning. An 80 K rise uses almost four-fifths of the yield strength of a fully restrained steel bar, whatever its size, and a wall must resist about 2 MN. Restraint, not load, is the problem, so the usual design response removes restraint: a sliding support, an expansion joint or a flexible loop lets the part grow, and the thermal stress falls toward zero. Where restraint cannot be avoided, a material with lower reduces the stress in proportion.
Model limits. The walls are perfectly rigid. Real supports deflect and slip, so the computed force is an upper bound. The temperature is uniform and α and E are constant; a temperature gradient through the section adds bending, which a conduction solve feeding this study would capture. The analysis is linear and assumes the bar stays straight. Compression in a long, slender member can buckle it before it yields. For this stocky bar the fixed–fixed Euler load, MN, needs a temperature rise of over 2,700 K, so buckling is not a concern; for a rail or a thin pipe it often governs.
Refinement. The stress in the body of the bar is uniform and settles on a coarse mesh. The stress near the clamped edges does not: where the clamped face meets the free sides, the restraint produces a singular point, like the clamped edge of the linear static example. Judge the design on the stress in the body, or model the real support.
Try a change
Problem 1.1. Remove clamp_b so the bar can grow from the wall at x = 0. Predict the stress and the movement of the free end before running.
Answer. The bar expands freely: away from the wall the stress is essentially zero, the wall force vanishes, and the free end moves by mm.
Problem 1.2. Change the material to aluminum (E = 68.9 GPa, α = 23 × 10⁻⁶ K⁻¹). Predict the restrained stress.
Answer. MPa: lower than steel, because aluminum's lower modulus outweighs its larger expansion.
Problem 1.3. Heat the bar to 150 °C instead (temperature_field ... = 423.15 K). Is it still elastic? At what temperature rise does the body of the bar reach yield?
Next
- Linear static analysis: the structural analysis this example builds on.
- Thermomechanical physics reference: coupling a heat-conduction solve to a structural one.
- Thermomechanical validation: this bar against the restrained-bar formula.