The bar's cross-section is split into concentric radial rings and cooled by explicit finite-difference conduction — the axisymmetric heat equation with a convective surface boundary:
Interior: ∂T/∂t = a·[ ∂²T/∂r² + (1/r)·∂T/∂r ]
Center: ∂T/∂t = 4a·(T₁-T₀)/Δr² (symmetry, r→0)
Surface: ρc(Δr/2)·∂T/∂t = k(T_{N-2}-T_{N-1})/Δr − h(T_{N-1}-T∞)
a = k/(ρc) ≈ 1.17×10⁻⁵ m²/s (plain-carbon steel)
Each ring tracks the coldest temperature it has reached, Tmin. Once Tmin drops below the martensite-start temperature Ms, the diffusionless austenite→martensite transformation follows the Koistinen-Marburger relation:
Ms(°C) ≈ 539 − 423·(%C) (Andrews' relation, carbon term)
f_M(T) = 1 − exp[ −0.011·(Ms − T) ] for T < Ms, else 0
Because Ms falls as carbon content rises, a higher-carbon steel needs to be chilled further before martensite starts forming — but it ends up harder. Hardness is estimated per ring by blending a soft, untransformed baseline with a carbon-dependent maximum:
HRC_max(%C) ≈ min(66, 20 + 58·%C)
HRC(ring) ≈ 10·(1 − f_M) + HRC_max·f_M
- Carbon content — sets Ms and the achievable hardness ceiling.
- Quenching medium — sets the surface heat-transfer coefficient h: water quenches fast and hard but risks cracking; oil is gentler; still air barely hardens a thick bar at all.
- Bar radius — a thicker bar has a longer conduction path, so its core cools far more slowly than its surface — the classic "mass effect" that limits how deep a quench can harden a real part.
- The colour front sweeping inward is the actual computed transformation boundary, not a canned animation — slow the quenchant or thicken the bar and you can watch the core stay soft, unhardened austenite while the skin turns to hard martensite.