Density-functional theory of inhomogeneous fluids in the canonical ensemble
We present a density-functional approach for dealing with inhomogeneous fluids in the canonical ensemble. A general relation is proposed between the free-energy functionals in the canonical and the grand canonical ensembles. The minimization of the canonical-ensemble free-energy functional gives rise to Euler-Lagrange equations which involve averaged Ornstein-Zernike equations of second and third order. The theory is especially appropriate for systems with a small, fixed number of particles. As an example of application we obtain accurate results for the density profile of a hard-sphere fluid in a closed spherical cavity that contains only a few particles.