The distinction between heat and work: an approach based on a classical mechanical model