Energy consumption and salt adsorption in capacitive deionization