Modeling the Thermodynamic State of a Coronal Mass Ejection (CME) Using Its Kinematics in the Heliosphere