A numerical analysis of the thermal performance of a flat solar collector