

A heat engine is a system that transfers heat from a hot to a cold body, and uses some of the heat to do useful work. Not all of the heat can be converted into useful work, and in fact there is a theoretical limit to the efficiency of a heat engine in per cent, given by As energy is transferred the entropy of each body changes, with the entropy change given by
As energy is transferred the entropy of each body changes, with the entropy change given by The entropy change is positive if a body gains energy because
The entropy change is positive if a body gains energy because is positive, and negative if a body loses energy because
is positive, and negative if a body loses energy because is negative.
is negative.
In the above machine and
and The efficiency of the above machine is the maximum possible at 40%. The entropy change of the machine is
The efficiency of the above machine is the maximum possible at 40%. The entropy change of the machine is
 The over entropy change is not zero however because 160J is transferred to the surroundings, and will increase the entropy of the surroundings because
The over entropy change is not zero however because 160J is transferred to the surroundings, and will increase the entropy of the surroundings because is positive for the surroundings. If the machine is less efficient that the perfect heat machine, the entropy of the machine itself will increase since more heat will be transferred to the cold reservoir, so it's entropy will in crease by more and energy will still be transferred to the surroundings, so increasing their entropy.
 is positive for the surroundings. If the machine is less efficient that the perfect heat machine, the entropy of the machine itself will increase since more heat will be transferred to the cold reservoir, so it's entropy will in crease by more and energy will still be transferred to the surroundings, so increasing their entropy.