On the Thermodynamic Theory of Detonation