Endoreversible Thermodynamics of Solar Energy Conversion