This is actually a well proven and mature technology, relatively easy and cost effective to do........well it is in some countries who have the foresight AND political will to do it......NOT looking at You Britain
.
This video gives a rough outline of what is what. https://www.youtube.com/watch?v=aWgkl7W9xU0
Imagine how much energy there is stored in, say out canal network - shallow, slow flowing, "dark",( have you ever seen clean canal water) soaking up all that free sunlight. Through the use of heat pumps and thermal mass storage there could be a whole new technology just waiting to be developed. Store up enough heat and couple it to say a Stirling Engine, or some other method of transfer you'd be be able to generate electricity.
It is however, like I said all a matter of the will to do it.......except in my case where its the lack of money