All heat engines have the common property of turning internal energy into useful macroscopic energy.
They extract internal energy from a high temperature reservoir, convert part of this energy to useful work, and transfer the rest to a low temperature reservoir. The second law of thermodynamics imposes a firm limit on the fraction of the initial internal energy which can be converted to macroscopic energy. Almost all heat engines work by means of expansions and contractions of a gas. A simple theoretical model called the ideal gas model quite accurately predicts the behavior of the gases in most heat engines of this type. Our first task is to build the ideal gas model using the techniques learned in the previous section.