A method to draw the thermal energy from essentially limitless heat sources, such as the ocean or the atmosphere and limited heat sources such as the combustion of fossil fuels, is provided for the production of mechanical work. The fluid from the heat sources gives heat to the working medium of the prime mover of the power plant through a first heat exchanger. The effluent cooled fluid from the first heat exchanger is used for removing the exhaust heat from the prime mover through a second heat exchanger either directly or indirectly through a heat pump and can also be used for the conversion of saline water into fresh water.