Long-run operation of a reverse electrodialysis system fed with wastewaters