Modelling plastic deformation of metals using irreversible thermodynamics