A thermodynamic internal variable model for the partition of plastic work into heat and stored energy in metals