Thermal Stress Simulation
What's on screen
Two panels. Top panel shows two bars side by side: a constrained bar (locked between rigid walls) and a free bar (unconstrained). Drag the temperature slider and watch the constrained bar change color while stress arrows appear inside it, while the free bar simply grows or shrinks with zero stress. Bottom panel shows a Stress vs Temperature chart with the operating point moving along the material line, yield limits marked as dashed red lines.
The core concept, made visual
The entire simulation exists to answer one question: what happens when a hot bar cannot expand?
Free bar: expands by δ = α × ΔT × L. No stress. The bar just gets longer.
Constrained bar: tries to expand the exact same amount but the walls block it. The blocked expansion creates compressive stress σ = E × α × ΔT. No length change but massive internal stress.
You see both simultaneously. Same temperature, same material, completely different outcomes.
Visual details:
Bar color shifts: cool blue when ΔT < 0, warm amber at ΔT = 0, hot red when ΔT > 0. Intensity increases with |ΔT|.
Compression arrows (red, pointing inward) appear inside the constrained bar when heating. Tension arrows (blue, pointing outward) when cooling.
Wall reaction arrows show the forces the rigid walls exert back on the bar.
Free bar expansion shows the dashed original outline and the expanded/contracted bar with δ dimension labeled.
Chart plots σ vs ΔT as a straight line (slope = Eα). All 4 materials drawn simultaneously (active bold, others faded). Yield limits shown as dashed red horizontal lines. When the dot crosses the yield line, the status flips to YIELDED.
Key slider experiments::
Steel at +100°C: σ = 240 MPa, nearly at yield (250 MPa). Free expansion δ = 0.60 mm for a 500mm bar. The constrained bar looks identical to the original but has enough internal stress to permanently deform.
Switch to Copper: Same +100°C gives σ = 199 MPa, but Sy is only 70 MPa. Copper yielded at just +35°C. This is why copper pipes need expansion loops.
Switch to Invar: Same +100°C gives only σ = 17 MPa. The free bar barely moves either (δ = 0.06 mm). Invar was literally invented for this: near-zero thermal expansion.
Cool to -150°C on steel: σ = -360 MPa (tension). The bar wants to shrink but the walls hold it stretched. Tensile thermal stress is more dangerous because metals crack under tension. This is why cold climates cause rail fractures.
Double bar length from 500 to 1000 mm: Stress stays exactly the same (σ = EαΔT, independent of L). But free expansion δ doubles. Length affects expansion, not stress. This surprises most students.
