a method for transferring heat includes flowing a wastewater through a tank and flowing a fluid through a heat exchanger having an outer surface . the method further includes aerating the wastewater to produce a convective flow , contacting the outer surface of the heat exchanger with the convective flow to exchange heat , and cleaning the outer surface of the heat exchanger with the convective flow . a system for transferring heat includes a tank , a heat exchanger with an outer surface disposed in the tank , and a fluid flowing through the heat exchanger . wastewater located in the tank flows over the outer surface of the heat exchanger , and a diffusion pipe disposed in the tank provides air into the tank to produce a convective flow in the wastewater .