A theoretical analysis of heat transfer in regions of separated flow