Modeling of residual stresses in milling