Analysis of prior strain history effect on mechanical properties and residual stresses in beams