Rainwater harvesting, purification, storage and  energy recovery