The Mechanical Theory of Heat