A method and apparatus for converting thermal energy to mechanical energy which can use a wide range of fuels and perform with a high efficiency. Operating on a little utilized thermodynamic cycle of isentropic compression, isothermal expansion, isentropic expansion and finally constant pressure cooling and contraction. The external heat engine utilizes a heat exchanger carrying heat from the external energy source to the working parts of the engine. Pistons and cylinders are activated by appropriate means to adiabatically compress the working fluid, for example ambient air, to transfer the entire mass of the air through the heat exchanger to accomplish isothermal expansion followed by adiabatic expansion and, finally, exhaust the air to ambient to allow for constant pressure cooling and contraction. Valve pistons in conjunction with the cylinders form valves that allow for the exchange of working fluid with ambient. Energy is added to the engine during isothermal expansion, whereby the energy of compression is added by a flywheel or other appropriate energy storage means, said flywheel stores energy recovered during adiabatic expansion. The thermodynamic cycle described and the engine embodiments disclosed, when run in reverse, perform as a heat pump or refrigeration device.