Thermodynamics applied to heat engines and refrigeration.