Sun is the ultimate source of energy. Explain how it provides energy for flowing water?