I guess Biofuels is the best subforum for this:
US researchers build 'waste water generator' - BBC News
Researchers in the US have built a prototype device which they say can generate electricity from waste water.
The team at Pennsylvania State University says the technology would simultaneously treat the water.
The Penn State team says RED technology is problematic because of the large number of membranes required, and because power plants have to be located by the sea.
They claim the number of membranes can be reduced and the power output boosted by combining the technology with what are called microbial fuel cells (MFCs). These use organic matter in solution to create an electric current - in this instance waste water.
[...] the process could potentially be used anywhere, but could provide both clean water and power to communities in developing countries.
"The main application right now is in waste water treatment where you could effectively treat the water, but also gain some extra energy from waste heat.
"Instead of having a net drain, we have a net gain."