A cyclic process is a
thermodynamic process which begins from and finishes at the same thermostatic state.
It is a closed loop on a P-V diagram. The area enclosed by the loop is the work done by
the process:

Equation (1) makes a cyclic process similar to an
isothermal process: even though the internal energy changes during the course of the cyclic process,
when the cyclic process finishes the system's energy is the same as the energy it had when the process began.

Carnot cycle

TOP and BOTTOM of the loop: a pair of quasi-parallel isothermal processes

LEFT and RIGHT of the loop: a pair of quasi-parallel adiabatic processes

The adiabatic processes are described by Q=0
so they are impermeable to heat. Heat flows into the loop through the top isotherm and some
of that heat leaves the loop through the bottom isotherm. The heat which remains is equal to the
work done by the process, which equals the area enclosed by the loop.

Otto cycle

TOP and BOTTOM of the loop: a pair of quasi-parallel adiabatic processes

LEFT and RIGHT sides of the loop: a pair of parallel isochoric processes

The adiabatic processes are impermeable to heat: heat flows into the loop through the left pressurizing process and some of it flows back out through the right depressurizing process, and the heat which remains does the work.

Stirling cycle

A Stirling cycle is like an Otto cycle,
except that the adiabats are replaced by isotherms.

TOP and BOTTOM of the loop: a pair of quasi-parallel isothermal processes

LEFT and RIGHT sides of the loop: a pair of parallel isochoric processes

Heat flows into the loop through the top isotherm and the left isochore, and some of this heat flows back out through the bottom isotherm and the right isochore, but most of the heat flow is through the pair of isotherms. This makes sense since all the work done by the cycle is done by the pair of isothermal processes, which are described by Q=W. This suggests that all the net heat comes in through the top isotherm. In fact, all of the heat which comes in through the left isochore comes out through the right isochore: since the top isotherm is all at the same warmer temperature TH and the bottom isotherm is all at the same cooler temperature TC, and since change in energy for an isochore is proportional to change in temperature, then all of the heat coming in through the left isochore is cancelled out exactly by the heat going out the right isochore.

State Functions and Entropy

Demonstration

Part 1

Draw a rectangle on a P-V diagram, such that the top and bottom are horizontal isobaric processes and the left and right are vertical isochoric processes. Such a rectangle should be made really small, so that change in temperature can be averaged out, and so that the cycle will enclose an area Δarea.

Let the top left corner be labeled A, then label the rest of the corners clockwise starting from A as ABCD.

Part 2

Any loop can be broken up into a rectangular grid of differential areas.
The line integral of the entire loop is equal to the sum of the line integrals of each of the constituent differential areas.
Let all these integrals be done clockwise. Then any pair of adjacent differential areas will be sharing a
process as a common border, but one area will add that process in one direction while the adjacent area adds
that process in the reverse direction, so that process is cancelled out.
Therefore all processes internal to the loop cancel each other out
(see Green's theorem),
and the result of the summation is equal to the line integral of the contour of the loop: