The effects of X-ray illumination of the secondary star in a CV or a LMXB can be accounted for by a modification of the Stefan-Boltzmann law which we give in a tabular form. This approximation is quite accurate in CVs, but may lead to a significant underestimate of the effects of illumination in LMXBs, when the luminosity is close to the Eddington limit. This modified boundary condition can be used in bi-polytropic codes, which are much faster than full stellar codes, and hence allow the exploration of a larger parameter space.