Carnot engine and heat transfer