  Diffusion induced by a thermal gradient in a granular binary mixture is
analyzed in the context of the (inelastic) Enskog equation. Although the Enskog
equation neglects velocity correlations among particles which are about to
collide, it retains spatial correlations arising from volume exclusion effects
and thus it is expected to apply to moderate densities. In the steady state
with gradients only along a given direction, a segregation criterion is
obtained from the thermal diffusion factor $\Lambda$ measuring the amount of
segregation parallel to the thermal gradient. As expected, the sign of the
factor $\Lambda$ provides a criterion for the transition between the Brazil-nut
effect (BNE) and the reverse Brazil-nut effect (RBNE) by varying the parameters
of the mixture (masses, sizes, concentration, solid volume fraction, and
coefficients of restitution). The form of the phase diagrams for the BNE/RBNE
transition is illustrated in detail for several systems, with special emphasis
on the significant role played by the inelasticity of collisions. In
particular, an effect already found in dilute gases (segregation in a binary
mixture of identical masses and sizes {\em but} different coefficients of
restitution) is extended to dense systems. A comparison with recent computer
simulation results shows a good qualitative agreement at the level of the
thermal diffusion factor. The present analysis generalizes to arbitrary
concentration previous theoretical results derived in the tracer limit case.
