Modelling Residual Stresses And Deformation In Metal At Different Scales