Abstract
It is demonstrated that the minimization of the free energy functional for hard spheres and hard disks yields the result that excited granular materials under gravity segregate not only in the widely known "Brazil nut" fashion, i.e., with the larger particles rising to the top, but also in reverse "Brazil nut" fashion. Specifically, the local density approximation is used to investigate the crossover between the two types of segregation occurring in the liquid state, and the results are found to agree qualitatively with previously published results of simulation and of a simple model based on condensation.