Abstract
We investigate the equilibrium state of a one-dimensional fluid of hard-core particles subject to a given external periodic potential. Starting from Percus’s exact theory we obtain accurate numerical results for the density profiles and the free energy. These are used for a quantitative test of an approximate free-energy functional frequently used in classical density-functional theories. We show that the density-functional approach works well in a rather broad range of physically interesting parameters. Limits of its applicability are also discussed.