Magnetohydrodynamic effects on natural convection flow of a nanofluid in the presence of heat source due to solar energy