Predicting and measuring residual stresses in additively manufactured components