Important aspects in the formulation of solid–fluid debris-flow models. Part I. Thermodynamic implications