Abstract: The invention relates to a machine for converting heat into mechanical energy comprising an expansion device producing mechanical energy from a flow of vapor of a fluid; an evaporator heated by a heat source to a high temperature and configured to supply the expansion device with vapor; a condenser cooled by a heat sink to a low temperature and configured to condense the vapor discharged by the expansion device; a liquid circuit configured to transfer fluid in liquid phase from the condenser to the evaporator; a vapor circuit configured to transfer fluid in vapor phase from the evaporator to the condenser; and valves configured to, in a first, active stroke, close the liquid and vapor circuits, and, in a second, inactive stroke, open the liquid and vapor circuits.