Residual stresses are often observed when metals are quenched from elevated temperatures. Rapid quenching will, in the absence of phase transformations, produce a residual compressive stress on the surface. An imbalance of the internal forces associated with residual stress within a part (tensile and compressive) causes distortion.
A very simple explanation of the formation of residual stress during quenching can be demonstrated by considering two concentric cylinders (see Fig. 1) of equal cross-sectional area (AS=AC). During quenching, the outer shell will shorten faster than the center as a result of a temperature gradient and thermal contraction. This will place the surface in tension and the center in compression while the center is still hot.