One could say that the thermodynamic cycle is an ideal case of the mechanical engine. One could equally say that the model does not quite perfectly match the mechanical engine. However, much benefit is gained from the simplified models, and ideal cases they may represent.