Energy generation using reverse electrodialysis : principles, implementation, and applications