Residual stress fields can cause creep damage in thermally aged components, even in the absence of working loads. In order to study this issue, the authors present a numerical study on the development of triaxial residual stresses in stainless steel specimens. A mechanical model dedicated to the analysis of heat treatment problems is described. The presented formulations are implemented incrementally with a non-linear constitutive model, adequate to the simulation of a wide range of thermal processes. The flow rule is a function of the equivalent stress and the deviatoric stress tensor, of the temperature field and of a set of internal state variables. The thermomechanical coupled problem is solved with a staggered approach. Spray water quenching was used to generate residual stress fields in solid cylinders and spheres made from 316H stainless steel. Finite element simulations were performed to find out how process conditions and specimen geometry influence the resulting residual stress distributions. The results show that compressive residual stresses are developed near the surfaces of the cylinders and spheres while tensile residual stresses occur near the centre. The level of residual stresses was found to be dependent on the heat transfer coefficient.