An Internal Variable Approach to the Formulation of Finite Element Problems in Plasticity