Effect of thermal load and mechanical load on the residual stress of a machined workpiece