Thermodynamics and weight loss