How to use solar energy for both photovoltaic and electric power