what theoretical device would generate the maximum possible amount of work from a given amount of heat?