Basic classical density functional theory

Classical density functional theory (cDFT) describes an inhomogeneous fluid using the one-body number-density profile \(\rho(\mathbf{r})\). Instead of tracking the position of every molecule, cDFT determines the most probable equilibrium density by minimizing a thermodynamic potential.

Density profile

For a mixture, the density is a vector containing the density of each species:

\[\rho(\mathbf{r}) = \left\{ \rho_1(\mathbf{r}),\rho_2(\mathbf{r}),\ldots,\rho_s(\mathbf{r}) \right\},\]

where \(s\) is the number of species. The average number of particles of species \(i\) is

\[N_i = \int \rho_i(\mathbf{r})\,\mathrm{d}\mathbf{r}.\]

For a single-component fluid, the species index can be omitted.

Grand potential

CmmDFT uses the grand-canonical ensemble, in which the temperature, chemical potential, and volume are fixed. The grand-potential functional is

\[\Omega[\rho] = F[\rho] + \sum_i\int \rho_i(\mathbf{r}) \left[ V_{\mathrm{ext},i}(\mathbf{r})-\mu_i \right] \,\mathrm{d}\mathbf{r},\]

where \(F\) is the intrinsic Helmholtz free-energy functional, \(V_{\mathrm{ext},i}\) is the external potential acting on species \(i\), and \(\mu_i\) is its chemical potential.

For a system without an external potential, this reduces to

\[\Omega[\rho] = F[\rho] - \sum_i\mu_iN_i.\]

The equilibrium density profiles minimize the grand potential:

\[\Omega[\rho] = \min_{\rho}\Omega[\rho].\]

Euler–Lagrange equation

The equilibrium profiles satisfy the Euler–Lagrange equations

\[\frac{\delta\Omega}{\delta\rho(\mathbf{r})}=0.\]

Substitution of the grand-potential functional gives

\[\frac{\delta F}{\delta\rho(\mathbf{r})} + V_{\mathrm{ext}}(\mathbf{r}) - \mu = 0.\]

Equivalently, the chemical potential at equilibrium is

\[\mu = \frac{\delta F}{\delta\rho(\mathbf{r})} + V_{\mathrm{ext}}(\mathbf{r}).\]

This equation is solved numerically to obtain the equilibrium density profile.

Free-energy decomposition

The intrinsic Helmholtz free-energy functional is decomposed into an ideal and an excess contribution:

\[F[\rho] = F_{\mathrm{id}}[\rho] + F_{\mathrm{ex}}[\rho].\]

The excess contribution describes intermolecular interactions and is discussed in Approximations to the excess functional.

Ideal-gas contribution

The ideal-gas contribution is known exactly:

\[F_{\mathrm{id}}[\rho] = k_{\mathrm{B}}T \sum_i\int \rho_i(\mathbf{r}) \left[ \ln\left(\Lambda_i^3\rho_i(\mathbf{r})\right)-1 \right] \,\mathrm{d}\mathbf{r},\]

where \(k_{\mathrm{B}}\) is the Boltzmann constant, \(T\) is the temperature, and \(\Lambda_i\) is the thermal de Broglie wavelength of species \(i\).

Its functional derivative is

\[\frac{\delta F_{\mathrm{id}}} {\delta\rho_i(\mathbf{r})} = k_{\mathrm{B}}T \ln\left(\Lambda_i^3\rho_i(\mathbf{r})\right).\]

Using the ideal and excess contributions, the Euler–Lagrange equation becomes

\[\rho_i(\mathbf{r}) = \Lambda_i^{-3} \exp\left[ \beta\mu_i - \beta V_{\mathrm{ext},i}(\mathbf{r}) - \beta \frac{\delta F_{\mathrm{ex}}} {\delta\rho_i(\mathbf{r})} \right],\]

where

\[\beta=\frac{1}{k_{\mathrm{B}}T}.\]

This expression forms the basis of the iterative solvers used by CmmDFT.

External potentials

The external potential represents interactions between the fluid and its surroundings, such as a solid framework, wall, or confining surface. It can also include imposed fields. Regions where the external potential is very large are inaccessible to the fluid, causing the corresponding density to approach zero.

Bulk limit

For a homogeneous system, the density is independent of position:

\[\rho_i(\mathbf{r})=\rho_i^{\mathrm{bulk}}.\]

The external potential is constant or zero, and the functional equations reduce to the bulk thermodynamic relations used by the equation of state. These bulk properties provide the chemical potentials and reference densities required for inhomogeneous calculations.