Self-sustaining advanced wastewater purification and simultaneous in situ nutrient recovery in a novel bioelectrochemical system