A thermodynamic framework to model thixotropic materials