refrigerator is best understood by using a temperature–entropy diagram (T–S diagram), in which the thermodynamic state is specified by a point on a graph with entropy (S) as the horizontal axis and temperature (T) as the vertical axis (). For a simple closed system (control mass analysis), any point on the graph represents a particular state of the system. A thermodynamic process is represented by a curve connecting an initial state (A) and a final state (B). The area under the curve is: which is the amount heat transferred in the process. If the process moves the system to greater entropy, the area under the curve is the amount of heat absorbed by the system in that process; otherwise, it is the amount of heat removed from or leaving from the system. For any cyclic process, there is an upper portion of the cycle and a lower portion. In T-S diagrams for a clockwise cycle, the area under the upper portion will be the energy absorbed by the system during the cycle, while the area under the lower portion will be the energy removed from the system during the cycle. The area inside the cycle is then the difference between the two (the absorbed net heat energy), but since the internal energy of the system must have returned to its initial value, this difference must be the amount of work done by the system per cycle. Referring to , mathematically, for a reversible process, we may write the amount of work done over a cyclic process as: Since dU is an exact differential, its integral over any closed loop is zero and it follows that the area inside the loop on a T–S diagram is equal to the total work performed by the system on the surroundings if the loop is traversed in a clockwise direction, and is equal to the total work done on the system by the surroundings as the loop is traversed in a counterclockwise direction. The Carnot cycle Evaluation of the above integral is particularly simple for a Carnot cycle. The amount of energy transferred as work is The total amount of heat transferred from the hot reservoir to the system (in the isothermal expansion) will be and the total amount of heat transferred from the system to the cold reservoir (in the isothermal compression) will be Due to energy conservation, the net heat transferred, ,