# [120] Classical density functional theory in the canonical ensemble

James F. Lutsko "Classical density functional theory in the canonical ensemble", *Phys. Rev. E*, 105, 034120 (2022); doi:10.1103/PhysRevE.105.034120 __http://jimlutsko.github.io/files/Lutsko_2022_PRE_1_.pdf__

## Abstract

Classical density functional theory for finite temperatures is usually formulated in the grand-canonical ensemble where arbitrary variations of the local density are possible. However, in many cases the systems of interest are closed with respect to mass, e.g., canonical systems with fixed temperature and particle number. Although the tools of standard, grand-canonical density functional theory are often used in an ad hoc manner to study closed systems, their formulation directly in the canonical ensemble has so far not been known. In this work, the fundamental theorems underlying classical DFT are revisited and carefully compared in the two ensembles showing that there are only trivial formal differences. The practicality of DFT in the canonical ensemble is then illustrated by deriving the exact Helmholtz functional for several systems: the ideal gas, certain restricted geometries in arbitrary numbers of dimensions, and, finally, a system of two hard spheres in one dimension (hard rods) in a small cavity. Some remarkable similarities between the ensembles are apparent even for small systems with the latter showing strong echoes of the famous exact of result of Percus in the grand-canonical ensemble.