Solar energy is one of the cleanest sources of renewable energy that is easily accessible in vast geographical areas. As the efficiency of the common solar collectors is very low and is limited by the absorption properties of working fluid, enhancing the thermal performance of these collectors is one of the major challenges of developing parabolic solar thermal power plants. In recent decades, researches revealed that utilizing nanofluid as a novel working fluid has a dramatic effect on the thermophysical and optical properties of the fluid. In this study, the flow and temperature fields of water/magnetite and water/aluminum nanofluids are evaluated by solving the steady form of governing equations including conservation laws of mass, volume fraction transport equation, momentum equation, energy equation, and radiation transfer equation. Moreover, the two-phase Buongiorno model is utilized and Brownian motion, thermophoresis effects, and magnetophoresis movement are taken into account in the nanofluid simulation. The numerical results demonstrate that increasing nanofluid volume fraction and flow rate can increase the thermal performance of the collector tube. It is found that the thermal efficiencies reach maximum values of 151.03% and 158.58% for water/aluminum and water/magnetite nanofluids, respectively. Furthermore, increasing the volume fraction from 0 to 0.3% leads to rise of 24.41% and 21.36% in the maximum temperature of the collector. The effects of different parameters such as nanoparticle volume fraction, flow rate, and nanoparticle kind on the collector thermal and electrical efficiencies, thermal distribution, and entropy production have been studied.