The Titfield Thunderbolt runs on an engine that slightly resembles the Rankine cycle.
The amount of work obtainable from an engine depends on the amount of the working substance and on the temperature. Internal combustion Otto and Diesel engines work at high temperatures, so they can be small. The steam engine is bulky but does not require high temperatures. The steam engine has a boiler (which, naturally, boils water into steam) and a condenser (which, naturally, condenses the steam back again to water).
Steam from the boiler is drawn into a cylinder at constant pressure (A to B), at which point the intake valve is closed and the remaining expansion (B to C) is adiabatic, taking the temperature down to the temperature of the condenser. The section C to D corresponds to the condensation of the steam. From D to A the condensed water is transferred to the boiler, and the cycle starts again.