Reverse electrodialysis is a relatively new technology for non-carbon based and renewable energy harvesting from river and sea water. Because of the existing salinity gradients between those two types of water, selective transport of counter-ions from the sea to the river water through an ion-exchange membrane generates a voltage drop across it, which can drive electricity through an external electric device. The decrease in power density caused by the presence of divalent ions in the solutions because of the uphill transport of these ions against their concentration gradient can be mitigated by treating the river water in order to remove such type of ions. In this work, the effects of the fraction of salt with divalent cation in the dilute solution on the energy harvesting process in a permeable cation-exchange membrane system with well-stirred bathing solutions under reverse electrodialysis conditions, are theoretically investigate on the basis of the Nernst-Planck transport equations. Interesting results, which are related to the uphill transport of the cations against their concentration gradient, emerge from the asymmetric distribution of the cationic concentrations in the inner boundaries of the membrane because of the ionic partitioning in permeable membranes.