General formalism for calculating the thermal efficiency of thermodynamic cycles defined in a
p−V diagram
This paper presents a general method for computing the thermal efficiency of any thermodynamic cycle drawn in the $p-V$ diagram. The method works for any gas model, including ideal and van der Waals gases, and determines which segments of the cycle absorb or release heat. It is demonstrated on non-trivial shapes such as a circle, heart, cycloid of Ceva, and star, all using an ideal gas as the working substance.