Modeling of machining-induced residual stresses