---
abstract: 'Phase field crystal (PFC) theory is extensively used for modelling the phase behaviour, structure, thermodynamics and other related properties of solids. PFC theory can be derived from dynamical density functional theory (DDFT) via a sequence of approximations. Here, we carefully identify all of these approximations and explain the consequences of each. One approximation that is made in standard derivations is to neglect a term of form $\nabla\cdot[n\nabla{{\cal L}}n]$, where $n$ is the scaled density profile and ${{\cal L}}$ is a linear operator. We show that this term makes a significant contribution to the stability of the crystal, and that dropping this term from the theory forces another approximation, that of replacing the logarithmic term from the ideal gas contribution to the free energy with its truncated Taylor expansion, to yield a polynomial in $n$. However, the consequences of doing this are: (i) the presence of an additional spinodal in the phase diagram, so the liquid is predicted first to freeze and then to melt again as the density is increased; and (ii) other periodic structures, such as stripes, are erroneously predicted to be thermodynamic equilibrium structures. In general, ${{\cal L}}$ consists of a non-local convolution involving the pair direct correlation function. A second approximation sometimes made in deriving PFC theory is to replace ${{\cal L}}$ by a gradient expansion involving derivatives. We show that this leads to the possibility of the density going to zero, with its logarithm going to $-\infty$ whilst being balanced by the fourth derivative of the density going to $+\infty$. This subtle singularity leads to solutions failing to exist above a certain value of the average density. We illustrate all of these conclusions with results for a particularly simple model two-dimensional fluid, the generalised exponential model of index 4 (GEM-4), chosen because a DDFT is known to be accurate for this model. The consequences of the subsequent PFC approximations can then be examined. These include the phase diagram being both qualitatively incorrect, in that it has a stripe phase, and quantitatively incorrect (by orders of magnitude) regarding the properties of the crystal phase. Thus, although PFC models are very successful as phenomenological models of crystallisation, we find it impossible to derive the PFC as a theory for the (scaled) density distribution when starting from an accurate DDFT, without introducing spurious artefacts. However, we find that making a simple one-mode approximation for the *logarithm* of the density distribution $\log\rho({{\bm x}})$ (rather than for $\rho({{\bm x}})$), is surprisingly accurate. This approach gives a tantalising hint that accurate PFC-type theories may instead be derived as theories for the field $\log\rho({{\bm x}})$, rather than for the density profile itself.'
author:
- 'Andrew J. Archer'
- 'Daniel J. Ratliff'
- 'Alastair M. Rucklidge'
- Priya Subramanian
title: 'Deriving phase field crystal theory from dynamical density functional theory: consequences of the approximations'
---

Introduction
============

The phase field crystal (PFC) theory for matter is widely used and has been successfully applied to describe a broad range of phenomena, including, for example, grain boundary dynamics [@Elder2002; @Elder2004], crystal nucleation [@Backofen2010; @Toth2010], crystal growth [@Archer2012], glass formation [@Berry2008a], crack propagation [@Elder2004] and many other properties of condensed matter. For more background and examples of situations to which the PFC theory has been applied, see the excellent review [@Emmerich2012]. The PFC theory was originally proposed, in the spirit of ‘regular’ phase field theory (PFT), as a diffuse-interface theory for the time evolution of an order parameter field [@Elder2002]. The equations of PFT are obtained via symmetry, thermodynamic and other arguments and the result is a theory that is widely used in materials science and other disciplines to model the structure of materials. For more background on PFT see for example Ref. [@Boettinger2002] and references therein.

The central and original idea in extending PFT to arrive at PFC theory is to incorporate aspects of the microscopic structure of the material into the model [@Elder2002]. The result is a theory that operates on atomic length scales and diffusive time scales [@Emmerich2012]. By this we mean that PFC theory is a theory for a field that exhibits numerous maxima, each of which is identified as the average location of the atoms (or more generally ‘particles’) in the system. This idea is powerful because, by building into the theory more information about the underlying material structure, it enables the inclusion of much more of the physics coming from particle correlations to be incorporated. Over the years several variants of PFC theory have been developed that are able to describe a range different crystalline (and even quasicrystalline) structures [@Jaatinen2009; @Pisutha-Arnond2013b; @Wu2010; @Barkan2011; @Achim2014; @Subramanian2016; @Jiang2017; @Savitz2018].

Thus, the original PFC [@Elder2002] may be viewed as the simplest partial differential equation model one can conceive of for a conserved order parameter exhibiting peaks arranged with crystalline ordering. It is obtained from a (scaled) free energy ${{\cal F_{\text{$\alpha$}}}}$ that is a functional of the dimensionless order parameter $n$: $${{\cal F_{\text{$\alpha$}}}}[n] = \int \left(\frac{1}{2}n\left((k_s^2+\nabla^2)^2 - r\right)n
                    + \frac{1}{4}n^4\right){{{\rm d}}{{\bm x}}},
 \label{eq:PFCFalpha}$$ where $n({{\bm x}},t)$ is a field that depends on position in space ${{\bm x}}$ and on time $t$, and $k_s$ is an inverse length scale that determines the lattice spacing of the crystal. The parameter $r$ defines how near the system is to freezing. The time evolution of the conserved field $n$ is given by the dynamics $$\frac{\partial n}{\partial t} = \nabla^2 \left(\frac{{{\delta{\mkern-1mu}{{\cal F_{\text{$\alpha$}}}}}}}{{{\delta{\mkern-1mu}n}}}\right)
                               = - \nabla^2 \left(rn - (k_s^2+\nabla^2)^2n - n^3\right),
 \label{eq:PFCalphadynamics}$$ where $\frac{{{\delta{\mkern-1mu}{{\cal F_{\text{$\alpha$}}}}}}}{{{\delta{\mkern-1mu}n}}}$ is the functional derivative of ${{\cal F_{\text{$\alpha$}}}}$ with respect to $n({{\bm x}})$.

Given the ingredients in the model, it is therefore no surprise that PFC theory is closely related to the Swift–Hohenberg equation [@Swift1977]: $$\frac{\partial n}{\partial t} = - \frac{{{\delta{\mkern-1mu}{{\cal F_{\text{$\alpha$}}}}}}}{{{\delta{\mkern-1mu}n}}}
                               = rn - (k_s^2+\nabla^2)^2n - n^3,
 \label{eq:SwiftHohenberg}$$ which is one of the archetypal equations in pattern formation theory. As one can see above, both the Swift–Hohenberg equation and PFC theory can be expressed as a different type of dynamics based on the same free energy functional [@Emmerich2012]. The Swift–Hohenberg equation (\[eq:SwiftHohenberg\]) is based on an underlying dynamics that seeks to minimise the free energy over time, whilst the PFC dynamics (\[eq:PFCalphadynamics\]), which also decreases the free energy over time, in addition enforces a conservation of the average value of the order parameter in the system. Thus, the PFC equation (\[eq:PFCalphadynamics\]) is sometimes referred to as the conserved Swift–Hohenberg equation [@Thiele2013; @Sagui1994; @Knobloch2015; @Matthews2000; @Emmerich2012].

In the years after PFC theory was originally proposed it was realised that it could be derived from classical dynamical density functional theory (DDFT) [@Elder2007; @Teeffelen2009; @Huang2010a; @Emmerich2012; @Archer2012], via a sequence of several different approximations. Below, we say much more on what these approximations are. DDFT is a theory for the time evolution of the ensemble average one-body (number) density profile $\rho({{\bm x}},t)$, for a non-equilibrium system of interacting classical particles. DDFT is based on equilibrium density functional theory (DFT) [@Evans1979a; @Evans1992; @Hansen2013] and for an equilibrium system, DDFT is equivalent to DFT. DDFT was originally developed as a theory for Brownian particles with over-damped stochastic equations of motion [@Marconi1999; @Marconi2000; @Archer2004; @Archer2004a], but it has also been extended to describe the dynamics of under-damped systems and atomic or molecular systems where the particle dynamics is governed by Newton’s equations of motion [@Archer2006; @Archer2009; @Goddard2012; @Goddard2013; @DuranOlivencia2017; @Schmidt2018]. This body of work shows that when such systems are not too far from equilibrium, then the dynamics predicted by the original DDFT is still often correct in the long-time limit where the particle dynamics is dominated by diffusive processes. This is because DDFT corresponds to a dynamics given by the continuity equation $$\frac{\partial \rho}{\partial t} = -\nabla \cdot \mathbf{j},
 \label{eq:continuity}$$ where the current $\mathbf{j}\propto-\nabla \mu({{\bm x}},t)$, with $\mu({{\bm x}},t)$ a local (non-equilibrium) chemical potential [@Marconi1999; @Marconi2000; @Archer2004; @Archer2004a]. Eq. (\[eq:continuity\]) is of course expected since the total number of particles in the system $N=\int \rho({{\bm x}},t){{{\rm d}}{{\bm x}}}$ is a conserved quantity.

Refs. [@Elder2007; @Teeffelen2009; @Huang2010a; @Emmerich2012; @Archer2012] give various different derivations of the PFC model, starting from DFT and/or DDFT. Here, starting from DDFT, we systematically show how all the various different theories are related and we identify and highlight the significance of each of the approximations that are made in the derivation of PFC theory. We show that there is a particular term of the form $\nabla\cdot[n\nabla{{\cal L}}n]$, where ${{\cal L}}$ is a linear operator, that is almost universally neglected because it is ‘of higher order’ [@Huang2010a], but this term is actually important for stabilizing crystalline structures: its contribution is of the same order as some of the terms that are retained. As we explain in detail, neglecting this term essentially forces one to make the Taylor expansion of the ideal gas logarithmic term in the free energy in order to recover something physically reasonable. We show that neglecting this term, as is done in PFC theory, [and the subsequent replacement of the logarithm by its Taylor series,]{} leads to the spurious appearance in the phase diagram of an extra spinodal and also alters the relative stabilities of the crystal state compared to a stripe phase and also other phases, leading in two dimensions (2D) to the stripe phase becoming the global free energy minimum state for certain parameter values. Essentially, all this behaviour originates because the function $\log(1+n)$ has one root, but when it is replaced by a truncated Taylor expansion, the resulting polynomial generally has two roots. Our arguments also directly apply in three dimensions to explain why lamellar phases occur as equilibrium phases in PFC theory. Recall that most PFC theories predict that as one moves in the phase diagram away from the region where there is coexistence between the liquid and the crystal, moving deeper into the crystalline portion of the phase diagram, such stripe/lamellar phases appear as equilibrium structures and are global minima of the free energy [@Emmerich2012]. Of course, particles with isotropic pair interactions generally never ‘freeze’ to form striped phases, unless they have an unusual and special form for the pair potential between the particles [@Imperio2004; @Imperio2006; @Archer2007]. DDFT, taken together with a reliable approximation for the Helmholtz free energy functional of course does not predict such stripe phases for crystallisation from simple liquids.

The linear operator ${{\cal L}}$ has the form of a non-local convolution involving the pair direct correlation function plus another simpler term (see Eq.  below). Another approximation that is often made in deriving PFC theories is to approximate ${{\cal L}}$ by a gradient expansion involving derivatives. We show below that if one makes this approximation whilst simultaneously retaining the logarithmic term from the ideal gas free energy, this results in a theory that still predicts reasonably accurately the freezing transition, but as one increases the average density, moving deeper into the region of the phase diagram where the crystal phase occurs, there is a point where $\rho({{\bm x}})\to0$ at the points in space ${{\bm x}}$ between the density peaks, where the density is a minimum. On increasing the average density beyond this point in the phase diagram, there is no solution to the theory. We analyse in detail this singular behaviour. As $\rho({{\bm x}})\to0$ we have $\log\rho({{\bm x}})\to-\infty$, of course. In the equation for the equilibrium density profile this divergence is initially balanced by the term involving the fourth derivative, $\partial^4\rho/\partial x^4\to+\infty$. However, when the average density in the system is increased beyond the value at which this divergence occurs, we find there is no solution.

We illustrate these conclusions by finding the predicted structures and phase diagram for the 2D version of the GEM-4 (Generalised Exponential Model of index 4) [@Mladek2006; @Prestipino2014], chosen because DDFT based on a simple approximation (the so-called random phase approximation (RPA) [@Likos2001]) for the Helmholtz free energy functional can be very accurate for predicting the equilibrium structures formed in this model and also the thermodynamics [@Mladek2007; @Prestipino2014; @Archer2014]. At higher temperatures, the 2D GEM-4 system exhibits just a single fluid phase and at higher densities a single crystal phase. At lower temperatures, where the RPA DDFT is no longer accurate, there is a hexatic phase and multiple crystalline phases as the density is increased [@Prestipino2014]. Here we do not consider this regime, restricting ourselves to the regime where there is just one fluid and one crystal phase, which are predicted accurately by the RPA DDFT. This enables us to investigate the effect of making subsequent approximations to the DDFT, including those made to derive PFC theory. We find that the PFC type theories spuriously predict three additional phases that are in reality not present in the phase diagram (i.e., are not thermodynamically stable). These are (i) a stripe phase, (ii) what we refer to as ‘down hexagons’ (in contrast to the true crystal structure, which we refer to as ‘up hexagons’) and then at even higher densities a melting to form (iii) another uniform liquid phase. We show how the approximations made in deriving the PFC result in these structures being predicted.

The final contribution of this paper is to show that there is a very simple and accurate ansatz one can make for the form of the equilibrium crystal density profile in DDFT (and so also for DFT, of course). The ansatz is $\rho({{\bm x}})=\rho_0e^{\phi({{\bm x}})}$, where $\rho_0$ is a constant and the field $\phi({{\bm x}})$ is approximated by a sinusoid of the form $\phi({{\bm x}})\approx\phi_0+\phi_1e^{i{{\bm k}}\cdot{{\bm x}}}+$complex conjugate (in one dimension), plus other similar terms (in higher dimensions), where $\phi_0$ and $\phi_1$ are constants. The results presented here are for the GEM-4 model and show why this approximation is unexpectedly accurate: the approximation is able to replicate almost exactly the numerical solution to the DDFT problem, from small to arbitrarily large amplitude density variations. We expect this ansatz also to be reliable for other systems. This form of one-mode theory gives a hint for future directions to develop accurate PFC-type theories, since using a one-mode approximation in PFC is often fairly accurate.

This paper is structured as follows: In Sec. \[sec:2\] we present our systematic step-by-step derivation of PFC, starting from DDFT. After each approximation, we carefully state the model, i.e., we give the corresponding free energy functional and also the expression for the chemical potential, which is a quantity that is a constant at all points in space for equilibrium states. In order to keep track of the different orders in which the approximations can be made, we give each model a name, starting with  for the original PFC model in Eq. (\[eq:PFCalphadynamics\]) above, and with DDFT-0 for the original formulation of DDFT below. The different DDFT approximations result in five different versions, DDFT-1 to DDFT-5. Similarly, we explain the various different approximations that can be made to each of these, leading to a corresponding PFC theory, which we name  to . Note that the criterion we use here for distinguishing between whether we refer to a theory as a DDFT or a PFC is based on whether the free energy which is minimised by the dynamical equations (i.e., the Lyapunov functional) has the logarithmic ideal gas term or not: if it does not have the logarithm, we refer to it as a . [Table \[tab:DDFTvsPFC\] below is there to help the reader navigate the various models and the approximations made in each one.]{} Sec. \[sec:2\] concludes with a summarising discussion. In Sec. \[sec:3\] we present results for the GEM-4 system comparing predictions for the density profiles and thermodynamics of equilibria for two of the different DDFT theories and also two of the PFC theories. In this section we also present the phase diagrams for the GEM-4 system predicted by these different DDFT and PFC theories. By comparing all of these we are able to assess the accuracy of the different theories and the validity of the various approximations. In Sec. \[sec:4\] we discuss the implications of the main two approximations and analyse the singular behaviour displayed by some models. In Sec. \[sec:5\] we introduce the ansatz $\rho({{\bm x}})=\rho_0e^{\phi({{\bm x}})}$ and derive the new one-mode approximation for . We draw our conclusions in Sec. \[sec:6\]. The paper includes two appendices in which we describe the numerical (continuation) methods we use to calculate the density profiles.

Derivation of the Phase Field Crystal model from DDFT {#sec:2}
=====================================================

In this section we progress from the original formulation of DDFT (which we call DDFT-0) through a series of approximations (DDFT-1, …, DDFT-5), as listed in Table \[tab:DDFTvsPFC\]. Our main starting point is DDFT-2. From this point, there are three main approximations that can be made (or not made): (i) the Ramakrishan–Yussouff (RY) or the random phase approximation (RPA) for the free energy; (ii) the gradient expansion of the convolution term; and (iii) the Taylor expansion of the logarithmic term. Making (or not making) the first two of these approximations results in DDFT-3, DDFT-4 and DDFT-5. Then, making the third approximation from DDFT-2 results in , from DDFT-3 results in , and so on up to . The  model can be rescaled to recover the original version of , , see Eqs.  and . The various models are summarised in Table \[tab:DDFTvsPFC\]. Amongst the models we present below, DDFT-5 is equivalent to the model derived by Huang  [@Huang2010a] and advocated by van Teeffelen  [@Teeffelen2009] (named PFC1 in that paper), and DDFT-3 and  are equivalent to the models named DDFT and PFC2 by van Teeffelen  [@Teeffelen2009].

  ---------------- ----- ----- ----- ----- ----- ------------------------------------------------ --------------------------- -------------------------------------- -------------------
  Name                                                               Dynamics                                                                                           $Q$, $C$, $R$
  \[2pt\]           Yes   N/A   Yes   Yes   Yes             (\[eq:PFCalphadynamics\])                 (\[eq:PFCFalpha\])                        —                    
  \[4pt\] DDFT-0                                              (\[eq:DDFT0dynamics\])                  (\[eq:separatedF\])              (\[eq:chempotdefn\])                   —
  \[4pt\] DDFT-1    Yes                            (\[eq:DDFT1dynamics\]), (\[eq:DDFT1deltaF\])         (\[eq:DDFTF1\])        (\[eq:ChemPot\]), (\[eq:betadFdn1\])           —
  \[4pt\] DDFT-2    Yes   Yes                                 (\[eq:DDFT2dynamics\])                    (\[eq:DDFTF2\])                 (\[eq:betadFdn2\])             (\[eq:qandc\])
  \[4pt\] DDFT-3    Yes   N/A   Yes                           (\[eq:DDFT3dynamics\])                    (\[eq:DDFTF3\])                 (\[eq:betadFdn3\])           
  \[4pt\] DDFT-4    Yes   N/A         Yes                     (\[eq:DDFT4dynamics\])                  as (\[eq:DDFTF2\])              as (\[eq:betadFdn2\])            (\[eq:qandc\])
  \[4pt\] DDFT-5    Yes   N/A   Yes   Yes                     (\[eq:DDFT5dynamics\])                    (\[eq:DDFTF5\])                 (\[eq:betadFdn5\])           
  \[4pt\]           Yes   Yes               Yes   (\[eq:PFCdynamics\]), (\[eq:PFCbetadynamics\])     (\[eq:DDFTFPFCbeta\])            (\[eq:betadFdnbeta\])           (\[eq:PFCqandc\])
  \[4pt\]           Yes   N/A   Yes         Yes             (\[eq:PFCgammadynamics\])               (\[eq:DDFTFPFCgamma\])            (\[eq:betadFdngamma\])         
  \[4pt\]           Yes   N/A         Yes   Yes            as (\[eq:PFCbetadynamics\])             as (\[eq:DDFTFPFCbeta\])          as (\[eq:betadFdnbeta\])         (\[eq:PFCqandc\])
  \[4pt\]           Yes   N/A   Yes   Yes   Yes            (\[eq:PFCepsilondynamics\])             as (\[eq:DDFTFPFCgamma\])        as (\[eq:betadFdngamma\])        
  \[4pt\]                                                                                                                                                            
  ---------------- ----- ----- ----- ----- ----- ------------------------------------------------ --------------------------- -------------------------------------- -------------------

Dynamic Density Functional Theory: DDFT-0
-----------------------------------------

The starting point for all of our derivations is the key DDFT equation [@Marconi1999; @Marconi2000; @Archer2004; @Archer2004a]: $$\frac{\partial \rho}{\partial t} = \nabla \cdot \left[ \beta M(\rho) \nabla \frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{{{\delta{\mkern-2mu}\rho}}} \right],
 \label{eq:DDFT0dynamics}$$ where $\beta=(k_BT)^{-1}$ (with $k_B$ being Boltzmann’s constant and $T$ being temperature), $M(\rho)$ is the positive $\rho$-dependent mobility. The Helmholtz free energy ${{\cal F}}[\rho]$ depends on the density profile $\rho({{\bm x}},t)$ integrated over space; hence ${{\cal F}}[\rho]$ depends on time but not on position [@Archer2004]. The expression ${{{\delta{\mkern-1mu}{{\cal F}}}}}/{{{\delta{\mkern-2mu}\rho}}}$ is the functional derivative of ${{\cal F}}$ with respect to $\rho({{\bm x}},t)$, which therefore depends on both time and on position. DDFT usually takes $M(\rho)=D \rho$, i.e., the mobility is proportional to density [@Marconi1999; @Marconi2000; @Archer2004; @Archer2004a], where $D$ is the diffusion coefficient. We henceforth scale time so that $D=1$. With boundary conditions that do not allow material to enter or leave the system, $N=\int\!\rho({{\bm x}}){{{\rm d}}{{\bm x}}}$ (or equivalently, the mean density) is a constant of the motion and is the total number of particles in the system.

With suitable boundary conditions, one can readily show that the Helmholtz free energy decreases monotonically with time: $$\frac{{{\rm d}}{{\cal F}}}{{{{\rm d}}{t}}} = - \int \! \beta M(\rho)
         \left| \nabla \frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{{{\delta{\mkern-2mu}\rho}}} \right|^2 {{{\rm d}}{{\bm x}}}\leq 0,
 \label{eq:Fdecreases}$$ so (assuming that ${{\cal F}}[\rho]$ is bounded below) the system typically evolves to a (local) minimum of ${{\cal F}}$, which is a dynamically stable equilibrium of (\[eq:DDFT0dynamics\]). Here, ‘dynamically stable’ means that small perturbations away from the equilibrium decay, and ‘equilibrium’ means that ${\partial \rho}/{\partial t} =0$ and ${{{\rm d}}{{\cal F}}}/{{{{\rm d}}{t}}}=0$. Owing to the dynamics being governed by a continuity equation , such perturbations cannot change the mean density. Local minima of ${{\cal F}}$ that are not the global minimum are thermodynamically metastable. The system can also have dynamically unstable equilibria, for which ${{\cal F}}$ is a saddle or maximum. From (\[eq:Fdecreases\]), we see that all equilibria of (\[eq:DDFT0dynamics\]) satisfy $\nabla({{\delta{\mkern-1mu}{{\cal F}}}}/{{\delta{\mkern-2mu}\rho}})=0$, so $$\frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{{{\delta{\mkern-2mu}\rho}}} = \text{constant} = \mu,
 \label{eq:chempotdefn}$$ where $\mu$ is the chemical potential of the equilibrium. This is of course the Euler–Lagrange equation for the problem of finding stationary points of the functional ${{\cal F}}[\rho]$, subject to the constraint of fixed mean density. Note however that when evolving (\[eq:DDFT0dynamics\]) forward in time from an arbitrary initial condition, $\mu$ is not necessarily known *a priori*.

The theory can also be cast in terms of the grand potential (also called the Landau free energy) functional [@Evans1979a; @Evans1992; @Hansen2013]: $$\Omega[\rho] = {{\cal F}}[\rho] - \mu N = {{\cal F}}[\rho] - \mu \int \! \rho({{\bm x}}){{{\rm d}}{{\bm x}}}.
 \label{eq:omegadefn}$$ From this it follows that the functional derivative of $\Omega$ is $$\frac{{{\delta{\mkern-1mu}\Omega}}}{{{\delta{\mkern-2mu}\rho}}} = \frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{{{\delta{\mkern-2mu}\rho}}} - \mu,
 \label{eq:dOmega}$$ and that this is zero at equilibrium: equilibria are extreme values of $\Omega$. Like the Helmholtz free energy, the grand potential decreases monotonically with time, since Eq.  is also true if one replaces ${{\cal F}}$ by $\Omega$. Therefore, for two phases to coexist, they must have the same specific grand potential (i.e., the same pressure) and the same chemical potential. Thus, the global minimum of $\Omega$ for a given $\mu$ and $T$ is the thermodynamic equilibrium state of the system [@Evans1979a; @Evans1992; @Hansen2013].

Following the usual approach in DFT, we separate the Helmholtz free energy into three parts: the ‘ideal gas’ contribution, which is proportional to the temperature but takes no account of particle interactions, an excess (${{\cal F_{\text{ex}}}}$) over the ideal gas contribution arising from the particle interactions, and the contribution due to an external potential ${U_{\text{ext}}}({{\bm x}})$, as follows [@Evans1979a; @Evans1992; @Hansen2013]: $${{\cal F}}[\rho] = k_BT \int \rho\left(\log(\Lambda^d\rho) - 1\right){{{\rm d}}{{\bm x}}}+ {{\cal F_{\text{ex}}}}[\rho] + \int\rho{U_{\text{ext}}}{{{\rm d}}{{\bm x}}},
 \label{eq:separatedF}$$ where the integral is taken over the volume $V$ in three dimensions ($d=3$) (or the area in 2D, $d=2$) and where $\Lambda$ is the thermal de Broglie wavelength. Since for our purposes here the value of $\Lambda$ is irrelevant (changing $\Lambda$ will shift the values of ${{\cal F}}$ and $\mu$ by constants), we henceforth set $\Lambda=1$. We also consider bulk systems and so we assume that ${U_{\text{ext}}}=0$. With the separation in Eq. (\[eq:separatedF\]), we have $$\beta\frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{{{\delta{\mkern-2mu}\rho}}} = \log\rho +
                                   \beta\frac{{{\delta{\mkern-1mu}{{\cal F_{\text{ex}}}}}}}{{{\delta{\mkern-2mu}\rho}}},
 \label{eq:separatedFdrho}$$ which gives $$\beta\nabla\frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{{{\delta{\mkern-2mu}\rho}}}=\frac{1}{\rho}\nabla\rho+\dots,
 \label{eq:rhoinverse}$$ where on the right hand side we only explicitly write the contribution from the ideal gas part of the free energy. Inserting this into Eq. (\[eq:DDFT0dynamics\]) with $M=D\rho$ we obtain $$\frac{\partial \rho}{\partial t} = \nabla^2 \rho+\dots,
 \label{eq:rhodiffusion}$$ in which the coefficient in front of the term $\nabla^2 \rho$ is $D$, but our choice of time scaling has $D=1$. Note that this term is *linear* in $\rho$, in spite of it originating from a *nonlinear* logarithmic contribution to the free energy.

We refer to the model up to this point as DDFT-0.

Expansion of ${{\cal F_{\text{ex}}}}$: DDFT-1
---------------------------------------------

To proceed, we must have an expression for the excess Helmholtz free energy functional ${{\cal F_{\text{ex}}}}[\rho]$. We use a functional Taylor expansion, which is also that used in all derivations of PFC theory. This gives the free energy functional of the system of interest in terms of properties of a reference system, which are assumed to be known. The reference system that is chosen is a uniform liquid, with constant density $\rho_0$. The density profile of the system of interest may be varying in space and with an average density that may be different from $\rho_0$. The functional Taylor series expansion of the excess free energy can be written in terms of the density difference ${{\Delta{\mkern-1.0mu}\rho}}({{\bm x}},t)=\rho({{\bm x}},t)-\rho_0$ as follows [@Evans1992; @Hansen2013]: $$\begin{split}
 {{\cal F_{\text{ex}}}}[\rho] &= {{\cal F_{\text{ex}}}}[\rho_0]
   - k_BT \!\! \int \! c^{(1)}({{\bm x}}_1){{\Delta{\mkern-1.0mu}\rho}}({{\bm x}}_1){{{\rm d}}{{\bm x}}}_1 \\
 & \quad{}-\frac{k_BT}{2!} \!\! \int \!
                          c^{(2)}({{\bm x}}_1,{{\bm x}}_2)
                          {{\Delta{\mkern-1.0mu}\rho}}({{\bm x}}_1)
                          {{\Delta{\mkern-1.0mu}\rho}}({{\bm x}}_2)
                          {{{\rm d}}{{\bm x}}}_1{{{\rm d}}{{\bm x}}}_2 \\
 & \quad{}-\frac{k_BT}{3!} \!\! \int \!
                          c^{(3)}({{\bm x}}_1,{{\bm x}}_2,{{\bm x}}_3) \times{}\\
 &\qquad\qquad\qquad      {{\Delta{\mkern-1.0mu}\rho}}({{\bm x}}_1)
                          {{\Delta{\mkern-1.0mu}\rho}}({{\bm x}}_2)
                          {{\Delta{\mkern-1.0mu}\rho}}({{\bm x}}_3)
                          {{{\rm d}}{{\bm x}}}_1{{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3\\
 & \quad{} + \text{similar fourth order term} + \dots.
 \end{split}
 \label{eq:expandFex}$$ The expressions $c^{(n)}$ in the equation above are proportional to the first and higher functional derivatives of ${{\cal F_{\text{ex}}}}$ with respect to density, all evaluated at $\rho=\rho_0$: $$c^{(n)}({{\bm x}}_1,\dots,{{\bm x}}_n) = -\beta
    \frac{\delta^n\!{{\cal F_{\text{ex}}}}}{{{\delta{\mkern-2mu}\rho}}({{\bm x}}_1)\dots{{\delta{\mkern-2mu}\rho}}({{\bm x}}_n)}[\rho_0].
 \label{eq:defncn}$$ These functions $c^{(n)}$ are known as [*direct correlation functions*]{} [@Evans1979a; @Evans1992; @Hansen2013], and are related to $n$-point density correlation functions. In the two-point case, $c^{(2)}$ is the pair direct correlation function and is related to the pair correlation function (i.e., the radial distribution function) through the Ornstein–Zernike equation [@Evans1979a; @Evans1992; @Hansen2013]. These direct correlation functions depend on our choice of $\rho_0$ and depend directly on temperature through the linear factor of $\beta$ in the definition and also indirectly via the fact that the correlations in a liquid change with temperature. Note also that $c^{(1)}[\rho_0]$ is a constant when $\rho_0$ is a constant.

For a homogeneous liquid with distant (or periodic) boundaries, these functions depend on displacements but not on absolute position, so (through a slight abuse of notation) we also write $$c^{(n)}({{\bm x}}_1,\dots,{{\bm x}}_n) = c^{(n)}({{\Delta{\mkern-1.0mu}{{\bm x}}}}_2,{{\Delta{\mkern-1.0mu}{{\bm x}}}}_3\dots,{{\Delta{\mkern-1.0mu}{{\bm x}}}}_n),
 \label{eq:shiftorigin}$$ where ${{\Delta{\mkern-1.0mu}{{\bm x}}}}_j={{\bm x}}_j-{{\bm x}}_1$ [@Hansen2013]. We also take the liquid to be isotropic.

We are considering density perturbations away from the liquid state, so it is convenient to write $$\label{eq:rho_sub}
 \rho({{\bm x}},t)=\rho_0 (1+n({{\bm x}},t)).$$ We do not assume that $n$ is small, but it is often the case that the average of $n({{\bm x}},t)$ over the whole system is small. Note also that $\rho({{\bm x}},t)=\rho_0$ is a stationary solution of (\[eq:DDFT0dynamics\]). Substituting Eq. (\[eq:expandFex\]) into Eq. (\[eq:DDFT0dynamics\]) and writing only the terms up to $c^{(1)}$, we get: $$\frac{\partial n}{\partial t} = \nabla^2 n
   - \nabla^2 c^{(1)} - \nabla \cdot \left[ n \nabla c^{(1)} \right]
+ \dots \\
 \label{eq:DDFT1dynamicsc1}$$ That the uniform liquid state is an equilibrium of (\[eq:DDFT0dynamics\]) implies that $n=0$ is a solution of equation (\[eq:DDFT1dynamicsc1\]): all terms not written down involve ${{\Delta{\mkern-1.0mu}\rho}}$ and so are zero for the uniform liquid with density $\rho_0$. Recall that $c^{(1)}[\rho_0]$ is a constant, which means terms involving gradients of this can be dropped. [Whilst this constant term does not influence the structure (density profile) both in and out of equilibrium, it does affect the thermodynamics (i.e., free energy value) and so also mechanical properties [@Wang2018b].]{} With this, we can write the equation for the time evolution of $n({{\bm x}},t)$ (up to ${{\cal O}}(c^{(4)})$) as: $$\begin{split}
 \frac{\partial n}{\partial t} =& \nabla^2 n
   - \rho_0 \nabla^2  \!\!\int\! c^{(2)}({{\bm x}},{{\bm x}}_2)n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_2 \\
   &{}- \rho_0 \nabla \cdot \left[ n \nabla
                               \!\!\int\! c^{(2)}({{\bm x}},{{\bm x}}_2)n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_2
                         \right]\\
   &{}- \frac{\rho_0^2}{2} \nabla^2 \!\!\int\! c^{(3)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3)n({{\bm x}}_2)n({{\bm x}}_3){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3\\
   &{}- \frac{\rho_0^2}{2} \nabla \cdot \left[ n \nabla
                               \!\!\int\! c^{(3)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3)n({{\bm x}}_2)n({{\bm x}}_3){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3
                         \right]\\
   &{}- \frac{\rho_0^3}{6} \nabla^2 \!\!\int\! c^{(4)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4) \times{}\\
   & \qquad\qquad\qquad n({{\bm x}}_2)n({{\bm x}}_3)n({{\bm x}}_4){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3{{{\rm d}}{{\bm x}}}_4 \\
   &{}- \frac{\rho_0^3}{6} \nabla \cdot \bigg[ n \nabla
                               \!\!\int\! c^{(4)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4) \times{}\\
   & \qquad\qquad\qquad n({{\bm x}}_2)n({{\bm x}}_3)n({{\bm x}}_4){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3{{{\rm d}}{{\bm x}}}_4
                         \bigg] + \dots\\
 \end{split}
 \label{eq:DDFT1dynamicspretruncate}$$ where we have suppressed writing the time dependence of $n$ throughout and the ${{\bm x}}$ dependence of $n$ when it is not inside an integral. We have written this equation so that the first line is linear in $n$, the next two lines are quadratic in $n$, the fourth and fifth lines are cubic in $n$, and the last line is quartic in $n$.

Since the first line is linear in $n$, and both terms involve a Laplacian, we can write the linearised version of (\[eq:DDFT1dynamicspretruncate\]) in terms of the negative Laplacian of a linear operator ${{\cal L}}$: $$\frac{\partial n}{\partial t} = - \nabla^2 {{\cal L}}n,
 \label{eq:DDFTlinear}$$ where $${{\cal L}}n({{\bm x}}) = - n({{\bm x}}) + \rho_0 \!\!\int\! c^{(2)}({{\bm x}},{{\bm x}}_2)n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_2.
 \label{eq:defnL}$$ The non-local operator ${{\cal L}}$ is most conveniently considered in terms of its Fourier transform, or equivalently, in terms of how it acts on modes of the form $\exp(i{{\bm k}}\cdot{{\bm x}})$. If $${{\cal L}}e^{i{{\bm k}}\cdot{{\bm x}}} = \sigma({{\bm k}}) e^{i{{\bm k}}\cdot{{\bm x}}},
 \label{eq:defnsigma}$$ then $\sigma({{\bm k}})$ is the eigenvalue of ${{\cal L}}$ with eigenfunction $\exp(i{{\bm k}}\cdot{{\bm x}})$. With this, the linear equation (\[eq:DDFTlinear\]) can readily be solved in terms of linear combinations of functions like $\exp\left({k^2\sigma({{\bm k}}) t + i{{\bm k}}\cdot{{\bm x}}}\right)$, where $k^2\sigma({{\bm k}})$ is the growth rate for a mode with wavevector ${{\bm k}}$, and $k=|{{\bm k}}|$. If $\sigma({{\bm k}})$ is negative for all ${{\bm k}}$, all small amplitude density modulations decay to zero, and the liquid state is dynamically stable.

![Illustrative example of the growth rate $k^2\sigma(k)$ as a function of wavenumber $k$. Small amplitude modes with $k^2\sigma(k)<0$ decay exponentially in time, while those with $k^2\sigma(k)>0$ grow exponentially. Throughout we scale lengths so that the maximum growth rate occurs at $k=1$.[]{data-label="fig:growthrate"}](fig_growthrate)

Recall that for a bulk liquid, $c^{(2)}({{\bm x}},{{\bm x}}_2)=c^{(2)}({{\Delta{\mkern-1.0mu}{{\bm x}}}}_2)$, with ${{\Delta{\mkern-1.0mu}{{\bm x}}}}_2={{\bm x}}_2-{{\bm x}}$, and for spherically symmetric (isotropic) particles, $c^{(2)}({{\bm x}},{{\bm x}}_2)=c^{(2)}(|{{\Delta{\mkern-1.0mu}{{\bm x}}}}_2|)$. Therefore, in this case $\sigma({{\bm k}})=\sigma(k)$, i.e., $\sigma$ depends only on the wavenumber $k=|{{\bm k}}|$. The eigenvalue $\sigma(k)$ can be expressed as: $$\begin{split}
 \sigma(k) &= - 1 + \rho_0 \!\!\int\! c^{(2)}(|{{\bm x}}_2-{{\bm x}}|) e^{i{{\bm k}}\cdot({{\bm x}}_2-{{\bm x}})}{{{\rm d}}{{\bm x}}}_2\\
           &= -1 + \rho_0 {\hat c}^{(2)}(k),
 \label{eq:sigmactwo}
 \end{split}$$ where ${\hat c}^{(2)}$ is the Fourier transform of $c^{(2)}$. Recall from (\[eq:defncn\]) that $c^{(2)}$ is proportional to $\beta$, so if ${\hat c}^{(2)}$ has any positive Fourier components, decreasing the temperature (increasing $\beta$) can be expected to lead to a range of wavenumbers with positive growth rates, and the liquid being dynamically unstable to modes with wavenumbers centered around the maximum of $k^2\sigma(k)$, see Fig. \[fig:growthrate\]. We have scaled lengths so that the maximum growth rate occurs at wavenumber $k=1$. This argument, of course, assumes that the product $\beta^{-1}c^{(2)}$ is independent of temperature. This is not true in general, but for some systems it is a good approximation (at least over a limited range of temperatures) – see Ref. [@Somerville2018] for a recent discussion on this for a particular colloidal system. Recall too that for an equilibrium liquid the static structure factor $S(k)=[1-\rho_0{\hat c}^{(2)}(k)]^{-1}$. $S(k)$ is proportional to the Fourier transform of the radial distribution function [@Hansen2013]. So, for the stable uniform liquid, we have $\sigma(k)=-1/S(k)$.

We refer to the state point at which the uniform liquid becomes linearly unstable to density modulations with wavenumber $k\neq0$ as the *spinodal point*, in keeping with the terminology of [@Trudu2006]. The more common usage of the term ‘spinodal’ relates to the onset of the zero-wavenumber phase separation instability of liquid–liquid or gas–liquid phase separation [@Hansen2013; @Archer2004]. At the spinodal point, the density and temperature are such that the liquid is dynamically marginally stable, that is, the maximum of $k^2\sigma(k)$ is zero. Therefore, at higher temperatures, small amplitude density modulations decay, and at lower temperatures, small amplitude density modulations grow. For a given fixed value of $\rho_0$, the spinodal temperature is $T_s$, with a corresponding $\beta_s=(k_BT_s)^{-1}$. Similarly, either increasing the density $\rho_0$ of the liquid or increasing the chemical potential $\mu$ can also lead to crossing the spinodal.

With (\[eq:defnL\]), we can eliminate $c^{(2)}$ in favour of ${{\cal L}}$ in (\[eq:DDFT1dynamicspretruncate\]), and obtain (truncating at ${{{\cal O}}}(c^{(4)})$): $$\begin{split}
 \frac{\partial n}{\partial t} =& - \nabla^2 \left({{\cal L}}n + \tfrac{1}{2}n^2\right)
                                  - \nabla \cdot \left[ n \nabla {{\cal L}}n \right]\\
   &{}- \frac{\rho_0^2}{2} \nabla^2 \!\!\int\! c^{(3)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3)n({{\bm x}}_2)n({{\bm x}}_3){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3\\
   &{}- \frac{\rho_0^2}{2} \nabla \cdot \left[ n \nabla
                               \!\!\int\! c^{(3)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3)n({{\bm x}}_2)n({{\bm x}}_3){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3
                         \right]\\
   &{}- \frac{\rho_0^3}{6} \nabla^2 \!\!\int\! c^{(4)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4)\times{}\\
   &\qquad\qquad\qquad n({{\bm x}}_2)n({{\bm x}}_3)n({{\bm x}}_4){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3{{{\rm d}}{{\bm x}}}_4\\
   &{}- \frac{\rho_0^3}{6} \nabla \cdot \bigg[ n \nabla
                               \!\!\int\! c^{(4)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4) \times{}\\
   & \qquad\qquad\qquad n({{\bm x}}_2)n({{\bm x}}_3)n({{\bm x}}_4){{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3{{{\rm d}}{{\bm x}}}_4
                         \bigg]\\\
 \end{split}
 \label{eq:DDFT1dynamics}$$ where we have used the result $\nabla \cdot \left[n \nabla n\right] = \frac{1}{2}\nabla^2n^2$. [For an ideal gas, with ${{\cal L}}n=-n$ and $c^{(2)}=c^{(3)}=c^{(4)}=0$, the first line of the equation above reduces to the diffusion equation, $\frac{\partial n}{\partial t}=\nabla^2n$, similar to (\[eq:rhodiffusion\]).]{}

At this point, we have made no approximations beyond expanding the free energy in Eq. (\[eq:expandFex\]) and truncating at ${{{\cal O}}}(c^{(4)})$. We refer to the model at this stage, truncated in this way, as . In the new variables, and incorporating $c^{(2)}$ into ${{\cal L}}$, the Helmholtz free energy ${{\cal F}}$ can be expressed (up to fourth order) in terms of a scaled free energy ${{{\cal F}_{1}}}={{\cal F}}/\rho_0$, where $$\begin{split}
 \beta{{{\cal F}_{1}}}[n] &=
     \int \! \big([1+n({{\bm x}}_1)] \log [1+n({{\bm x}}_1)] - n({{\bm x}}_1)\big){{{\rm d}}{{\bm x}}}_1\\
 & \quad{}- \frac{1}{2} \! \int \!
       \left(n^2({{\bm x}}_1) + n({{\bm x}}_1){{\cal L}}n({{\bm x}}_1) \right){{{\rm d}}{{\bm x}}}_1 \\
 & \quad{}-\frac{\rho_0^2}{6} \!\! \int \!
                          c^{(3)}({{\bm x}}_1,{{\bm x}}_2,{{\bm x}}_3) \times{}\\
 &\qquad\qquad\quad       n ({{\bm x}}_1)
                           n ({{\bm x}}_2)
                           n ({{\bm x}}_3)
                          {{{\rm d}}{{\bm x}}}_1{{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3\\
 & \quad{}-\frac{\rho_0^3}{24} \! \int \!
                          c^{(4)}({{\bm x}}_1,{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4) \times{}\\
 &\qquad\qquad\quad       n ({{\bm x}}_1)
                           n ({{\bm x}}_2)
                           n ({{\bm x}}_3)
                           n ({{\bm x}}_4)
                          {{{\rm d}}{{\bm x}}}_1{{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3{{{\rm d}}{{\bm x}}}_4,
 \end{split}
 \label{eq:DDFTF1}$$ and where we have also dropped terms that do not contribute to (\[eq:DDFT1dynamics\]). In these variables, the DDFT that leads to the dynamics (\[eq:DDFT1dynamics\]) is $$\frac{\partial n}{\partial t} = \nabla \cdot \left[ \beta (1+n) \nabla \frac{{{\delta{\mkern-1mu}{{{\cal F}_{1}}}}}}{{{\delta{\mkern-1mu}n}}} \right].
 \label{eq:DDFT1deltaF}$$ Note that, because of the $\log(1+n)$ term in (\[eq:DDFTF1\]), $n$ is constrained so that $1+n$ is always non-negative. Also, because of Eq. , we have $$\frac{{{\delta{\mkern-1mu}{{\cal F}}}}}{\delta\rho}=\frac{{{\delta{\mkern-1mu}{{{\cal F}_{1}}}}}}{{{\delta{\mkern-1mu}n}}}.
 \label{eq:derivs_eq}$$ Moreover, states that satisfy $$\frac{{{\delta{\mkern-1mu}{{{\cal F}_{1}}}}}}{{{\delta{\mkern-1mu}n}}} = {{\Delta{\mkern-0.5mu}\mu}},
 \label{eq:ChemPot}$$ where ${{\Delta{\mkern-0.5mu}\mu}}=\mu-\mu_0$ and where \[see (\[eq:chempotdefn\]), (\[eq:separatedF\]) and (\[eq:expandFex\])\] $$\mu_0=k_BT\log\Lambda^d\rho_0-k_BTc^{(1)}[\rho_0],
  \label{eq:mu_rho_0}$$ are equilibrium solutions of (\[eq:DDFT1dynamics\]), or equivalently, extrema of ${{{\cal F}_{1}}}$. Henceforth, we redefine $\mu$ to be $\beta{{\Delta{\mkern-0.5mu}\mu}}/\rho_0$, which is a shifted and rescaled chemical potential. For the free energy in (\[eq:DDFTF1\]), we have $$\begin{split}
 \beta\frac{{{\delta{\mkern-1mu}{{{\cal F}_{1}}}}}}{{{\delta{\mkern-1mu}n}}} &=
    \log\left(1+n({{\bm x}})\right)
    - n({{\bm x}}) - {{\cal L}}n({{\bm x}}) \\
 & \quad{}-\frac{\rho_0^2}{2} \!\! \int \!
                          c^{(3)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3)
                           n ({{\bm x}}_2)
                           n ({{\bm x}}_3)
                          {{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3\\
 & \quad{}-\frac{\rho_0^3}{6} \! \int \!
                          c^{(4)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4) \times{}\\
 &\qquad\qquad\quad
                           n ({{\bm x}}_2)
                           n ({{\bm x}}_3)
                           n ({{\bm x}}_4)
                          {{{\rm d}}{{\bm x}}}_2{{{\rm d}}{{\bm x}}}_3{{{\rm d}}{{\bm x}}}_4.
 \end{split}
 \label{eq:betadFdn1}$$ At equilibrium, this expression (the rescaled chemical potential $\mu$) does not vary in space. The reference liquid $n=0$ has ${{{\cal F}_{1}}}=0$ and $\mu=0$. The zero value for ${{{\cal F}_{1}}}$ arises (in part) from dropping ${{\cal F_{\text{ex}}}}[\rho_0]$ from (\[eq:expandFex\]), while the zero value for the rescaled chemical potential is a consequence of , which is equivalent to dropping $c^{(1)}$ from (\[eq:expandFex\]) and setting $\Lambda=1$ in .

Simplification of $c^{(3)}$ and $c^{(4)}$: DDFT-2
-------------------------------------------------

As the next step, Huang  [@Huang2010a] kept only the zero-wavenumber components of $c^{(3)}$ and $c^{(4)}$, or equivalently, they took $$\begin{split}
 c^{(3)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3)&=c^{(3)}_0 \delta({{\bm x}}-{{\bm x}}_2)\delta({{\bm x}}-{{\bm x}}_3),\\
 c^{(4)}({{\bm x}},{{\bm x}}_2,{{\bm x}}_3,{{\bm x}}_4)&=c^{(4)}_0 \delta({{\bm x}}-{{\bm x}}_2)\delta({{\bm x}}-{{\bm x}}_3)\delta({{\bm x}}-{{\bm x}}_4),
 \label{eq:definecs}
 \end{split}$$ where $c^{(3)}_0$ and $c^{(4)}_0$ are constants (our sign convention is opposite to that of [@Huang2010a]). This is equivalent to making a local density approximation (LDA) [@Evans1992] for these terms in the free energy. We could in principle include terms involving $c^{(5)}$ and higher as well, treated in the same way: these would contribute a more general function of $n$ in the free energy, treated with the . However, since we are investigating the effect of approximations that have not yet been discussed, we keep as simple a free energy as possible at this point, consistent with truncating at ${{\cal O}}(c^{(4)})$. With this, the free energy in (\[eq:DDFTF1\]) becomes $$\begin{split}
 \beta{{{\cal F}_{2}}}[n] &=
     \int \! \big([1+n({{\bm x}})] \log [1+n({{\bm x}})] - n({{\bm x}})\big){{{\rm d}}{{\bm x}}}\\
 & \quad{}+ \! \int \! \bigg(
           - \frac{1}{2} \left(n^2({{\bm x}}) + n{{\cal L}}n({{\bm x}}) \right) \\
 & \qquad\qquad{}-\frac{\rho_0^2}{6}c^{(3)}_0 n^3 ({{\bm x}})
                 -\frac{\rho_0^3}{24}c^{(4)}_0 n^4 ({{\bm x}})
          \bigg){{{\rm d}}{{\bm x}}},\\
 \end{split}
 \label{eq:DDFTF2}$$ and the four terms involving $c^{(3)}$ and $c^{(4)}$ in (\[eq:DDFT1dynamics\]) become $$\begin{split}
   &- \frac{\rho_0^2}{2}c^{(3)}_0 \nabla^2 n^2,\quad
   - \frac{\rho_0^2}{2}c^{(3)}_0 \nabla \cdot \left[ n \nabla n^2
                         \right],\\
   &- \frac{\rho_0^3}{6}c^{(4)}_0 \nabla^2 n^3
   \quad\text{and}\quad
    - \frac{\rho_0^3}{6}c^{(4)}_0 \nabla \cdot \left[ n \nabla n^3
                         \right].
 \end{split}
 \label{eq:cthreedelta}$$ Using $\nabla \cdot \left[ n \nabla n^2\right]=\frac{2}{3}\nabla^2n^3$ and $\nabla \cdot \left[ n \nabla n^3\right]=\frac{3}{4}\nabla^2n^4$, Huang  [@Huang2010a] combined (\[eq:cthreedelta\]) and (\[eq:DDFT1dynamics\]) to get $$\frac{\partial n}{\partial t} = - \nabla^2 \left({{\cal L}}n + Qn^2 + Cn^3 + Rn^4\right)
                                  - \nabla \cdot \left[ n \nabla {{\cal L}}n \right]
 \label{eq:DDFT2dynamics}$$ where $$Q = \frac{1}{2} + \frac{\rho_0^2}{2}c^{(3)}_0 ,\quad
 C =  \frac{\rho_0^2}{3}c^{(3)}_0 + \frac{\rho_0^3}{6}c^{(4)}_0
 \quad\text{and}\quad
 R =  \frac{\rho_0^3}{8}c^{(4)}_0.
 \label{eq:qandc}$$ We also have a chemical potential $$\begin{split}
 \mu=\beta\frac{{{\delta{\mkern-1mu}{{{\cal F}_{2}}}}}}{{{\delta{\mkern-1mu}n}}} &=
    \log\left(1+n({{\bm x}})\right)
    - n({{\bm x}}) - {{\cal L}}n({{\bm x}})\\
 & \quad\quad{}- \frac{\rho_0^2}{2} c^{(3)}_0 n^2 ({{\bm x}}) - \frac{\rho_0^3}{6} c^{(4)}_0 n^3 ({{\bm x}}),
 \end{split}
 \label{eq:betadFdn2}$$ which does not vary in space at equilibrium. Up to this point, we refer to the model as .

Here, we retain the $n^4$ term (as did Huang  [@Huang2010a]), because otherwise the dynamics in (\[eq:DDFT2dynamics\]) would not be consistent with the free energy (\[eq:DDFTF2\]) and the DDFT dynamics (\[eq:DDFT1deltaF\]) (with ${{\cal F}}_2$ instead of ${{\cal F}}_1$).

The next three models involve making (or not making) two approximations: (i) assuming the Ramakrishan–Yussouff or random phase approximation, which leads to a quadratic excess Helmholtz free energy functional, and (ii) making a gradient expansion of the linear operator ${{\cal L}}$.

Quadratic excess free energy: DDFT-3
------------------------------------

Often, the free energy functional in (\[eq:expandFex\]) is truncated at ${{\cal O}}({{\Delta{\mkern-1.0mu}\rho}}^2)$. This is known as the Ramakrishan–Yussouff (RY) approximation [@Ramakrishnan1979; @Teeffelen2009; @Emmerich2012], which effectively sets $c^{(3)}=c^{(4)}=0$. A mathematically equivalent approximation arises in the treatment of soft purely repulsive particles modelling soft matter, namely the RPA [@Likos2001]. Here, two soft isotropic particles at ${{\bm x}}_1$ and ${{\bm x}}_2$ separated by a distance $x_{12}=|{{\bm x}}_1-{{\bm x}}_2|$ interact through a potential energy $u(x_{12})$, which depends only on the magnitude of the distance and is finite for all values of $x_{12}$. The excess free energy \[c.f. Eq. (\[eq:expandFex\])\] is then $${{\cal F_{\text{ex}}}}[\rho] = \frac{1}{2} \! \int \!
               u(|{{\bm x}}_1-{{\bm x}}_2|) \rho({{\bm x}}_1) \rho({{\bm x}}_2) {{{\rm d}}{{\bm x}}}_1{{{\rm d}}{{\bm x}}}_2.
 \label{eq:RPAfreeenergy}$$ This amounts to setting $c^{(3)}=c^{(4)}=0$ and $$c^{(2)}({{\bm x}}_1,{{\bm x}}_2) = - \beta  u(|{{\bm x}}_1-{{\bm x}}_2|)
 \label{eq:RPAc2u}$$ in . The eigenvalues $\sigma(k)$ can thus be related to the Fourier transform of $u$ through (\[eq:sigmactwo\]) [@Likos2001; @Archer2012]: $$\begin{split}
 \sigma(k) &= - 1 - \rho_0 \beta \!\!\int\! u(|{{\bm x}}-{{\bm x}}_2|) e^{i{{\bm k}}\cdot({{\bm x}}_2-{{\bm x}})}{{{\rm d}}{{\bm x}}}_2\\
           &= - 1 - \rho_0 \beta {\hat u}(k).
 \label{eq:sigmauhat}
 \end{split}$$ Setting $c^{(3)}=c^{(4)}=0$ implies from (\[eq:qandc\]) that $Q=\frac{1}{2}$, $C=0$ and $R=0$, and results in a free energy $$\begin{split}
 \beta{{{\cal F}_{3}}}[n] &=
     \int \! \big((1+n({{\bm x}}_1)) \log (1+n({{\bm x}}_1)) - n({{\bm x}}_1)\big){{{\rm d}}{{\bm x}}}_1\\
 & \quad{}- \frac{1}{2} \! \int \!
       \left(n^2({{\bm x}}_1) + n({{\bm x}}_1){{\cal L}}n({{\bm x}}_1) \right){{{\rm d}}{{\bm x}}}_1.
 \end{split}
 \label{eq:DDFTF3}$$ With this choice of free energy, the dynamics in (\[eq:DDFT2dynamics\]) becomes: $$\frac{\partial n}{\partial t} = - \nabla^2 \left({{\cal L}}n + \tfrac{1}{2}n^2\right)
                                 - \nabla \cdot \left[ n \nabla {{\cal L}}n \right],
 \label{eq:DDFT3dynamics}$$ along with an analogous version of (\[eq:betadFdn2\]), for the chemical potential: $$\mu=\beta\frac{{{\delta{\mkern-1mu}{{{\cal F}_{3}}}}}}{{{\delta{\mkern-1mu}n}}} =
    \log\left(1+n({{\bm x}})\right)
    - n({{\bm x}}) - {{\cal L}}n({{\bm x}})
 \label{eq:betadFdn3}$$ We refer to this model as ; it is equivalent to DDFT-1 with the RY approximation, and to DDFT-0 with ${{\cal F_{\text{ex}}}}$ given by the RPA approximation.

Before moving on to make further approximations, it is worth noting a useful property that DDFT-3 and the subsequent theories derived from it possess. If the pair potential $u(x_{12})$ in Eq.  can be written as $u(x_{12})=\epsilon\psi(x_{12})$, where $\epsilon$ is a parameter that controls the overall strength of the potential, then from Eqs. , and  we obtain: $$\mu=
    \log\left(1+n({{\bm x}})\right)
    +\rho_0\beta\epsilon \!\!\int\! \psi(|{{\bm x}}-{{\bm x}}_2|) n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_2.
 \label{eq:convol_form}$$ The consequence of this is that for a given $\psi$, the behaviour of the model depends only on the combination of parameters $\rho_0\beta\epsilon$ and the value of $\mu$. If one changes the value of the reference density $\rho_0$ to some other value, then this is entirely equivalent to solving the system with the original reference density $\rho_0$ at a different value of $\beta\epsilon$. We should emphasize that this is only true if $\psi$ does not change with density, which in general is not true, but is approximately the case for some systems.

Gradient expansion of the linear term: DDFT-4
---------------------------------------------

Returning to DDFT-2, Huang  [@Huang2010a] (following [@Elder2004]) expanded ${{\cal L}}$ in powers of the gradient operator $\nabla$, replacing ${{\cal L}}$ by the simplest linear operator that allows a positive growth rate for modes with a wavenumber $k_s$. Scaling lengths so that $k_s=1$ results in: $${{{\cal L}_{\text{grad}}}}n = r n - \gamma(1+\nabla^2)^2 n,
 \label{eq:cLgraddefn}$$ so $\sigma(k)=r - \gamma(1-k^2)^2$ from (\[eq:defnsigma\]). This approximation is equivalent (within scaling) to a local gradient expansion of (\[eq:defnL\]), expanding the Fourier transform of $c^{(2)}$ about its maximum: $$\rho_0 {\hat c}^{(2)}(k) = 1 + r - \gamma(1-k^2)^2,
 \label{eq:defnGradientExpansion}$$ where the function $\rho_0{\hat c}^{(2)}(k)$ and its second derivative evaluated at $k=1$ are $1+r$ and $-8\gamma$, respectively. Here, $r$ is a parameter, notionally increasing with $\beta$ (and with $\rho_0$) and equal to zero at the spinodal point, when $\beta=\beta_s$. This parameter controls the growth rate of waves with wavenumber $1$: effectively, $r$ is the height of the maximum at $k=1$ in the growth rate curve in Fig. \[fig:growthrate\]. The second parameter $\gamma$ can be used to fit the curvature of ${\hat c}^{(2)}(k)$ at $k=1$.

With this gradient expansion, the dynamics is $$\begin{split}
 \frac{\partial n}{\partial t} &= - \nabla^2 \left({{{\cal L}_{\text{grad}}}}n + Qn^2 + Cn^3 + Rn^4\right) \\
                               &\qquad {} - \nabla \cdot \left[ n \nabla {{{\cal L}_{\text{grad}}}}n \right].
 \end{split}
 \label{eq:DDFT4dynamics}$$ We refer to this model as : ${{{\cal L}_{\text{grad}}}}$ is now a (local) partial differential operator and (\[eq:DDFT4dynamics\]) is a partial differential equation. The free energy and chemical potential can be found from (\[eq:DDFTF2\]) and (\[eq:betadFdn2\]), setting ${{\cal L}}={{{\cal L}_{\text{grad}}}}$. The lower bound $n\geq-1$ is still respected. This model is equivalent to that written down by [@Huang2010a].

Higher powers (or other functions) of the Laplacian can be retained in ${{{\cal L}_{\text{grad}}}}$, to improve the accuracy of the match between the eigenvalues of ${{\cal L}}$ and ${{{\cal L}_{\text{grad}}}}$, as done for example by [@Jaatinen2009; @Pisutha-Arnond2013b], or to introduce additional unstable length scales, as done for example by [@Wu2010; @Barkan2011; @Achim2014; @Subramanian2016] and others. See also Eq.  below and the associated discussion.

RY and gradient expansion: DDFT-5
---------------------------------

Finally, we can make both the RY/RPA approximation ($c^{(3)}_0=c^{(4)}=0$) and replace the linear operator ${{\cal L}}$ by ${{{\cal L}_{\text{grad}}}}$ to get the model advocated in Ref. [@Teeffelen2009]. The free energy and evolution equation are $$\begin{split}
 \beta{{{\cal F}_{5}}}[n] &=
     \int \! \big((1+n({{\bm x}}_1)) \log (1+n({{\bm x}}_1)) - n({{\bm x}}_1)\big){{{\rm d}}{{\bm x}}}_1\\
 & \quad{}- \frac{1}{2} \! \int \!
       \left(n^2({{\bm x}}_1) + n({{\bm x}}_1){{{\cal L}_{\text{grad}}}}n({{\bm x}}_1) \right){{{\rm d}}{{\bm x}}}_1,
 \end{split}
 \label{eq:DDFTF5}$$ and $$\frac{\partial n}{\partial t} = - \nabla^2 \left({{{\cal L}_{\text{grad}}}}n + \tfrac{1}{2}n^2\right)
                                 - \nabla \cdot \left[ n \nabla {{{\cal L}_{\text{grad}}}}n \right],
 \label{eq:DDFT5dynamics}$$ along with an analogous version of Eq. (\[eq:betadFdn3\]) for the chemical potential: $$\mu=\beta\frac{{{\delta{\mkern-1mu}{{{\cal F}_{5}}}}}}{{{\delta{\mkern-1mu}n}}} =
    \log\left(1+n({{\bm x}})\right)
    - n({{\bm x}}) - {{{\cal L}_{\text{grad}}}}n({{\bm x}})
 \label{eq:betadFdn5}$$ This model is named PFC1 in [@Teeffelen2009], but here we call it DDFT-5 for consistency.

[PFC models]{}
--------------

The final simplification that can be made (or not made) is to discard the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ (or $\nabla\cdot\left[n\nabla{{{\cal L}_{\text{grad}}}}{n}\right]$) term from the dynamical equations for the four DDFT models DDFT-2, …, DDFT-5, resulting in four PFC models , …, . Huang  [@Huang2010a] justify making this simplification on the grounds that this term is not truly quadratic in $n$: the presence of ${{\cal L}}{n}$ in the expression means that it is effectively of higher order. However, we show below that this term does in fact make an important contribution to the free energy: at least as important as the $c^{(3)}$ term.

In addition, dropping this term implies significant changes to the DDFT dynamics, the mobility and the nonlinear terms in the free energy. In fact, the $(1+n)$ factor in the mobility in (\[eq:DDFT1deltaF\]), the logarithm in the ideal gas free energy in (\[eq:separatedF\]) and the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term in (\[eq:DDFT1dynamics\]) are inextricably linked. This can be seen in the progression from (\[eq:separatedF\]) to (\[eq:rhodiffusion\]): the functional derivative of the ideal gas term in (\[eq:separatedF\]) (the first term on the right hand side) leads to the $\log\rho$ term in (\[eq:separatedFdrho\]), the gradient of this leads to $\rho^{-1}\nabla\rho$ in (\[eq:rhoinverse\]), and the mobility being $M=D\rho$ cancels the $\rho^{-1}$, leading to a diffusion equation in (\[eq:rhodiffusion\]). [If the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term is dropped from (\[eq:DDFT2dynamics\]), the equation for $n$ becomes of the form $\frac{\partial n}{\partial t} = 
\nabla^2\frac{{{\delta{\mkern-1mu}{{\cal G}}}}}{{{\delta{\mkern-1mu}n}}}$ for some functional ${{\cal G}}[n]$. We can see the implications of this by returning to (\[eq:DDFT0dynamics\]) and taking the steps needed to get to this modified version of (\[eq:DDFT2dynamics\]). Clearly the mobility in (\[eq:DDFT0dynamics\]) has been taken to be constant. If we now think of the ideal gas part of the free energy in (\[eq:separatedF\]) and (\[eq:separatedFdrho\]), but with a constant mobility in the dynamical equation, we end up with the ideal gas term contribution to the equation for $\rho$ being the form $$\frac{\partial\rho}{\partial t} = \frac{1}{\rho}\nabla^2\rho - 
                     \frac{1}{\rho^2}\left|\nabla\rho\right|^2$$ instead of the diffusion equation (\[eq:rhodiffusion\]). This unlikely equation can be avoided, and the diffusion equation recovered at leading order, by expanding the logarithm in (\[eq:DDFTF2\]) in a Taylor series. Thus, dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term is equivalent to taking constant mobility and expanding the logarithm.]{}

It is because of these substantial changes that we opt to use the term ‘DDFT’ for all models based on free energies that have the logarithmic ideal gas term, the non-constant mobility and the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term retained. In contrast, we use the term ‘PFC’ for models based on expanding the logarithm, having a constant mobility and the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term dropped. One consequence of expanding the logarithm [up to ${{\cal O}}(n^4)$, as is done in most PFC derivations [@Emmerich2012], is that the ideal gas part of the free energy contributes cubic and quartic (as well as quadratic) terms to the free energy,]{} so going from DDFT-2 to  turns out not to be just a matter of dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term.

So, a consistent free energy–dynamics derivation [@Elder2004; @Teeffelen2009] involves going back to DDFT-2 and replacing the logarithm in (\[eq:DDFTF2\]) by: $$(1+n)\log(1+n)={n}+\tfrac{1}{2}n^2-\tfrac{1}{6}n^3+\tfrac{1}{12}n^4,
 \label{eq:expandlogarithm}$$ resulting in a free energy $$\begin{split}
 \beta{{\cal F_{\text{$\beta$}}}}[n] &=
     \int \! \Big( - \tfrac{1}{2}n{{\cal L}}n
                   - \tfrac{1}{6}n^3
                   + \tfrac{1}{12}n^4\\
     & \qquad\quad  {} - \frac{\rho_0^2}{6}  c^{(3)}_0 n^3
                       - \frac{\rho_0^3}{24} c^{(4)}_0 n^4\Big){{{\rm d}}{{\bm x}}}_1,
 \label{eq:DDFTFPFCbeta}
 \end{split}$$ where we have suppressed writing the ${{\bm x}}_1$ dependency of $n({{\bm x}}_1)$. Taking the mobility $M(\rho)$ in (\[eq:DDFT0dynamics\]) to be a constant ($M=D\rho_0$) implies (after scaling) $$\frac{\partial n}{\partial t} = \nabla^2 \left[\beta\frac{{{\delta{\mkern-1mu}{{\cal F_{\text{$\beta$}}}}}}}{{{\delta{\mkern-1mu}n}}} \right],
 \label{eq:PFCdynamics}$$ similar to (\[eq:PFCalphadynamics\]). This leads to the PFC dynamical equation: $$\frac{\partial n}{\partial t} =
     - \nabla^2 \left[
                {{\cal L}}{n} + Qn^2 + Cn^3
                \right]
 \label{eq:PFCbetadynamics}$$ and to a chemical potential $$\mu=\beta\frac{{{\delta{\mkern-1mu}{{\cal F_{\text{$\beta$}}}}}}}{{{\delta{\mkern-1mu}n}}} =
                - {{\cal L}}{n} - Qn^2 - Cn^3,
 \label{eq:betadFdnbeta}$$ where $Q$ is as in (\[eq:qandc\]) but $C$ is different: $$Q = \frac{1}{2} + \frac{\rho_0^2}{2}c^{(3)}_0
 \quad\text{and}\quad
 C = - \frac{1}{3} + \frac{\rho_0^3}{6}c^{(4)}_0.
 \label{eq:PFCqandc}$$ We refer to this model as , and recall that the factor of $\beta$ in front of ${{\cal F_{\text{$\beta$}}}}$ is the inverse temperature.

The end result here is that  (\[eq:PFCbetadynamics\]) is not the same as DDFT-2 (\[eq:DDFT2dynamics\]) with the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term removed: the cubic coefficient $C$ is different and the quartic contribution $Rn^4$ in (\[eq:DDFT2dynamics\]) is absent. For the cubic coefficient, the contribution proportional to $c^{(3)}_0$ in (\[eq:qandc\]) comes from the non-constant mobility, while the $-\frac{1}{3}$ term in (\[eq:PFCqandc\]) comes from expanding the logarithm. The contribution to $C$ proportional to $c^{(4)}_0$ is the same. Moreover, the $\frac{1}{2}$ in $Q$ in (\[eq:qandc\]) and (\[eq:PFCqandc\]), while having the same numerical value, arises for two different reasons: non-constant mobility versus expanding the logarithm. An additional difference between the DDFT and PFC models is that in the PFC models, the constraint that $n\geq-1$ (i.e., $\rho\geq0$) is not enforced.

As in the DDFT derivations, we can now make (or not make) the RY/RPA approximation and the gradient expansion. We consider first the RY/RPA approximation, setting $c^{(3)}=c^{(4)}=0$ in . The free energy is $$\beta{{\cal F_{\text{$\gamma$}}}}[n] =
     \int \! \left( - \tfrac{1}{2}n{{\cal L}}n
                   - \tfrac{1}{6}n^3
                   + \tfrac{1}{12}n^4
             \right){{{\rm d}}{{\bm x}}}_1,
 \label{eq:DDFTFPFCgamma}$$ the dynamics is $$\frac{\partial n}{\partial t} =
     - \nabla^2 \left[
                {{\cal L}}{n} + \tfrac{1}{2}n^2 - \tfrac{1}{3}n^3
                \right]
 \label{eq:PFCgammadynamics}$$ and the chemical potential is $$\mu=\beta\frac{{{\delta{\mkern-1mu}{{\cal F_{\text{$\gamma$}}}}}}}{{{\delta{\mkern-1mu}n}}} =
                - {{\cal L}}{n} - \tfrac{1}{2}n^2 + \tfrac{1}{3}n^3.
 \label{eq:betadFdngamma}$$ We refer to this model as , and it is effectively the same as  but with $Q=\frac{1}{2}$ and $C=-\frac{1}{3}$.

Finally, the gradient expansion can be made, replacing ${{\cal L}}$ by ${{{\cal L}_{\text{grad}}}}$ in all expressions in this subsection, resulting in  (without RY/RPA) and  (with RY/RPA).

We refer to these models collectively as the PFC models, and have chosen the names   to distinguish these from the PFC1 and PFC2 models of Ref. [@Teeffelen2009]. The quadratic term in the dynamics ($Qn^2$) can be removed (provided $C\neq0$) by adding a constant to $n({{\bm x}})$, but we choose not to do this as it implies a change to what was meant by $\rho_0$ in the reference liquid. In addition, a negative $C$ can be scaled to $-1$. With these changes,  is equivalent to the original model (\[eq:PFCalphadynamics\]) of [@Elder2002; @Elder2004]: $$\frac{\partial n}{\partial t} = - \nabla^2 \left(r n - \gamma(1+\nabla^2)^2n + Qn^2 + Cn^3\right),
 \label{eq:PFCepsilondynamics}$$ where we have written out ${{{\cal L}_{\text{grad}}}}$ explicitly, and $Q=\frac{1}{2}$ and $C=-\frac{1}{3}$ (or $Q=0$ and $C=-1$ after scaling and adding a constant to $n$ – returning to the conserved Swift–Hohenberg equation).

The implication of dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term in the dynamics (\[eq:DDFT3dynamics\]) for DDFT-3 is now apparent: without this term, Eq. (\[eq:DDFT3dynamics\]) reduces to (\[eq:PFCgammadynamics\]) but with the cubic term removed. The absence of the cubic term here implies a free energy as in (\[eq:DDFTFPFCgamma\]) that is not bounded below, i.e., a free energy that is non-physical, and so the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term can have the effect of stabilizing patterns. In addition, dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term is consistent only with a theory with a constant mobility.

Summary
-------

To summarise, we have carefully laid out the various approximations made in the progression from the DDFT-0 starting point (\[eq:DDFT0dynamics\]) to the final PFC (\[eq:PFCalphadynamics\],\[eq:PFCgammadynamics\]) written down in [@Elder2002; @Elder2004]. We have largely followed earlier derivations [@Teeffelen2009; @Huang2010a; @Emmerich2012], seeking to clarify the approximations that are made. Along the way, we have identified four intermediate versions of DDFT, listed for clarity in Table \[tab:DDFTvsPFC\]. The change in name from DDFT to PFC could be made at any point in this progression, but we prefer to make the name change at the point where the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term is dropped (along with all the other changes that are implied by this), since removing this term marks a considerable alteration to the free energy expression and to the dynamics.

The PFC model (\[eq:PFCbetadynamics\]) is appealing in its simplicity, and it gives insight into a variety of crystallisation phenomena, but the derivations of the model from DDFT presented here, as well as the derivation from Ref. [@Huang2010a], are both problematic. Just dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term, as done by Huang  [@Huang2010a], means that the dynamics is not equivalent to a DDFT with mobility proportional to $\rho$. On the other hand, the alternative is to expand the logarithm up to ${{\cal O}}(n^4)$ in (\[eq:expandlogarithm\]) in order to provide a *nonlinear* stabilizing term ($\frac{1}{12}n^4$) in the free energy (\[eq:DDFTFPFCgamma\]). However, in the original formulation, the logarithm comes from the ideal gas term in (\[eq:separatedF\]), and leads to a *linear* diffusive term in the dynamics. The stabilizing nonlinear terms in (\[eq:DDFT2dynamics\]) are provided by $c^{(3)}_0$, $c^{(4)}_0$ (in DDFT-2) and by the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term – these are all absent in .

Indeed, all these models only make physical sense if their free energies are bounded below. The free energies for DDFT-0 and DDFT-1 are too general to make any comment, but that for DDFT-2 (\[eq:DDFTF2\]) can be discussed. The $(1+n) \log (1+n) - n$ term is bounded below by zero, and the $-\tfrac{1}{2}\int{n}{{\cal L}}{n}{{{\rm d}}{{\bm x}}}$ term is bounded below because the eigenvalues of ${{\cal L}}$ are bounded above: $$- \int \! n({{\bm x}}){{\cal L}}n({{\bm x}}) {{{\rm d}}{{\bm x}}}\geq - {\sigma_{\text{max}}}\int \! n^2({{\bm x}}) {{{\rm d}}{{\bm x}}},$$ where ${\sigma_{\text{max}}}$ is the maximum over $k$ of $\sigma(k)$ (we have in mind a $\sigma(k)$ as in Fig. \[fig:growthrate\]). In any case, this term, along with the other quadratic and cubic terms, is dominated by the quartic in $n$, which is bounded below provided $c^{(4)}_0<0$. If $c^{(4)}_0=0$, then $c^{(3)}_0<0$ will do, recalling that $n\geq-1$. For DDFT-3, with the RY/RPA approximation $c^{(3)}_0=c^{(4)}=0$, the boundedness of the free energy (\[eq:DDFTF3\]) depends on the $n^2 + n{{\cal L}}{n}$ combination. From (\[eq:defnL\]), the relevant term is $$\begin{split}
  -\int \! &
       \left(n^2({{\bm x}}_1) + n({{\bm x}}_1){{\cal L}}n({{\bm x}}_1) \right){{{\rm d}}{{\bm x}}}_1 = \\
  & \qquad - \rho_0 \!\!\int\! n({{\bm x}}_1)c^{(2)}({{\bm x}}_1,{{\bm x}}_2)n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_1{{{\rm d}}{{\bm x}}}_2.
 \end{split}$$ In general, this is not bounded below, but it is in certain circumstances. For example, it is if ${\sigma_{\text{max}}}<-1$, and it is if $c^{(2)}({{\bm x}}_1,{{\bm x}}_2)\leq0$ (or $u(|{{\bm x}}_1-{{\bm x}}_2|)\geq0$ for RPA) for all ${{\bm x}}_1$ and ${{\bm x}}_2$, which is the case in the numerical examples below. The PFC models are not constrained to have $n\geq-1$, but ${{\cal F_{\text{$\beta$}}}}$ (\[eq:DDFTFPFCbeta\]) is bounded by the $n^4$ term as long as its coefficient is positive; ${{\cal F_{\text{$\gamma$}}}}$ (\[eq:DDFTFPFCgamma\]) is always bounded below, because the expansion of the logarithm in (\[eq:expandlogarithm\]) was truncated after an even powered term.

Throughout we have made the simplest choices in the approximations, but other authors have made many other choices. For example, the original PFC paper [@Elder2002], as well as later papers [@Elder2007; @Huang2010a; @Robbins2012a; @Alster2017a; @Elder2017a], included a two-component (binary) version of the PFC model. Recently, Wang  [@Wang2018c] took a much closer look at $c^{(3)}$ and $c^{(4)}$, expressing these in terms of isotropic tensors and so allowing these functions to introduce bond angle dependence into the free energy. Some choices of $c^{(3)}$ and $c^{(4)}$ lead to nonlinear terms that include gradients, which can affect the selection of the final stable crystal [@Wu2010a]. The gradient expansion approach has been generalised in two ways: (i) higher order terms or rational functions were considered by [@Jaatinen2009; @Pisutha-Arnond2013b] in order to improve the fit between the functional form and the Fourier transform of $c^{(2)}$, and (ii) PFC models with two unstable length scales have been put forward by several authors [@Pisutha-Arnond2013b; @Wu2010; @Barkan2011; @Achim2014; @Subramanian2016; @Jiang2017], since these allow more complex crystals (face-centered cubic, icosahedral quasicrystals, …) to be stabilized. We discuss the model of [@Jaatinen2009] in more detail below. Alternative approaches involving weighted densities are also possible [@Jaatinen2010a].

Comparison of DDFT and PFC {#sec:3}
==========================

We are interested in the effects of the approximations made in going from DDFT to . A full assessment of the validity of the RY/RPA approximation for ${{\cal F_{\text{ex}}}}$, which in itself constitutes a major simplification, is beyond the scope of the present study. The general conclusion on the validity of the RY/RPA approximation is that it depends on the nature of the interactions between the particles; there are examples in the literature where this approximation is reliable and others where it works badly – see for example the discussion in Refs [@Evans2009; @Lowen2009] and references therein.

Here, we consider one particular system where the RPA is accurate and then we focus on the effects of approximating ${{\cal L}}$ by ${{{\cal L}_{\text{grad}}}}$ and of making the suite of other approximations inherent in going from DDFT to PFC: expanding the logarithm, assuming constant mobility and dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term. To this end, we start with DDFT-3 and solve (\[eq:betadFdn3\]), rewritten here as: $$\text{DDFT-3:}\quad
    \log\left(1+n({{\bm x}})\right)
    - n({{\bm x}}) - {{\cal L}}n({{\bm x}}) = \mu.
 \label{eq:betadFdn3_rewritten}$$ The system that we consider is particles interacting via the GEM-4 [@Mladek2006; @Prestipino2014] potential: this is a model for soft-matter particles and in particular for dendrimers and other polymers in suspension, treating the polymers via an effective pair potential between their centers of mass. This potential is soft, i.e., finite for all values of $x_{12}$ [@Mladek2006; @Prestipino2014; @Likos2001; @Likos2006; @Lenz2012], and is $$u(x_{12}) = \epsilon e^{-\left(x_{12}/R\right)^4},
 \label{eq:GEM4Potential}$$ where the parameter $\epsilon$ controls the strength of the potential and $R$ controls its spatial range. We consider here the system in 2D [@Prestipino2014; @Archer2014]. As long as the temperature and density are high enough that the particle cores regularly overlap (the regime in which the system freezes), the RPA approximation is known to be rather accurate for the GEM-4 system and gives a good account of the phase diagram and the structure of the liquid and solid phases [@Mladek2007; @Prestipino2014; @Archer2014].

From Eqs. (\[eq:defnL\]), (\[eq:RPAc2u\]) and we obtain the linear operator ${{\cal L}}$: $${{\cal L}}n({{\bm x}}) = - n({{\bm x}}) - \rho_0\beta\epsilon \!\!\int\! 
                         e^{-|{{\bm x}}-{{\bm x}}_2|^4/R^4} n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_2.
 \label{eq:defnL_GEM4}$$ Recall from (\[eq:defnsigma\]) that ${{\cal L}}$ has eigenvalues $\sigma(k)$ with eigenfunctions $e^{i{{\bm k}}\cdot{{\bm x}}}$. We can choose the combined parameter $\rho_0\beta\epsilon$ and soft-particle radius $R$ so that the maximum in $\sigma(k)$ occurs at $k=1$ when the system is at the linear stability threshold, i.e., this is a maximum with $\sigma(1)=0$, similar to Fig. \[fig:growthrate\]. In 2D, to satisfy this condition we must have $\rho_0\beta\epsilon=0.2455$ and $R=5.0962$ – see Appendix \[app:LinearGEM4\] for details.

![The eigenvalue $\sigma(k)$ of ${{\cal L}}$ plotted as a function of wavenumber $k$ for the GEM-4 potential (solid line) for $R=5.0962$ and $\rho_0\beta\epsilon=0.2455$, which is at the threshold where the system becomes linearly unstable. This has $\sigma(0)=-18.75$. We also display $\sigma(k)$ from the gradient expansion of ${{\cal L}}$ (dashed line), i.e., a Taylor expansion in Fourier space around $k=1$, which is the PFC relation for ${{{\cal L}_{\text{grad}}}}$, $\sigma(k)=-\gamma(1-k^2)^2$, with $\gamma=4.37$. Recall that the growth rate of Fourier modes with wavenumber $k$ is is $k^2\sigma(k)$. The dotted line labelled ${{{\cal L}_{\text{grad-8}}}}$ (EOF) is the curve for (\[eq:cLgradJaatinen\]), the eighth-order fitting proposed in [@Jaatinen2009]: it nearly coincides with the GEM-4 curve for $k\leq1$.[]{data-label="fig:dispersionGEM4"}](dispersion_relation){width="8.6truecm"}

With this choice of parameters, the eigenvalue $\sigma(k)$ is shown as a solid line in Fig. \[fig:dispersionGEM4\]. The figure also shows (dashed line) the eigenvalue for the gradient expansion of ${{\cal L}}$ around $k=1$: $${{{\cal L}_{\text{grad}}}}n({{\bm x}}) = - \gamma(1+\nabla^2)^2 n({{\bm x}}),
 \label{eq:cLgradGEM4}$$ where $\gamma=4.37$ is chosen to match the second derivative $\frac{{{\rm d}}^2\sigma}{{{\rm d}}{k}^2}$ at $k=1$, as done for example in Refs. [@Elder2004; @Wu2007; @Jaatinen2009]. The dotted line in Fig. \[fig:dispersionGEM4\] is the eigenvalue for (\[eq:cLgradJaatinen\]), the eighth-order fitting model proposed in [@Jaatinen2009] and discussed in more detail below.

![(a) Liquid density ($1+{n_{\text{liq}}}$) and (b) specific grand potential ${\Omega_{\text{liq}}}/A$ as a function of the scaled chemical potential $\mu$, for DDFT-3 (solid black line), DDFT-5 (dashed black line),  (indistinguishable from DDFT-3) and  (dashed magenta line). []{data-label="fig:liquiddensity"}](liquid_density){width="8.6truecm"}

![(a) Liquid density ($1+{n_{\text{liq}}}$) and (b) specific grand potential ${\Omega_{\text{liq}}}/A$ as a function of the scaled chemical potential $\mu$, for DDFT-3 (solid black line), DDFT-5 (dashed black line),  (indistinguishable from DDFT-3) and  (dashed magenta line). []{data-label="fig:liquiddensity"}](liquid_omega){width="8.6truecm"}

In what follows we compare solutions of (\[eq:betadFdn3\_rewritten\]) for DDFT-3 with solutions of the analogous equations for DDFT-5,  and : $$\begin{aligned}
 &\text{DDFT-5:}&
    \log\left(1+n\right)
    - n - {{{\cal L}_{\text{grad}}}}n &= \mu,
 \label{eq:betadFdn5_rewritten}\\
 &\text{{\hbox{PFC-$\gamma$}}:}&
    -\tfrac{1}{2}n^2 + \tfrac{1}{3} n^3 - {{\cal L}}n &= \mu,
 \label{eq:betadFdngamma_rewritten}\\
 &\text{{\hbox{PFC-$\epsilon$}}:}&
    -\tfrac{1}{2}n^2 + \tfrac{1}{3} n^3 - {{{\cal L}_{\text{grad}}}}n &= \mu.
 \label{eq:betadFdnepsilon_rewritten}
 \end{aligned}$$ See Appendix \[app:continuation\] for details of the pseudo-arclength continuation numerical method we use for solving these equations. Also, in the supplementary material we include a <span style="font-variant:small-caps;">Matlab</span> code for solving DDFT-3. Note that throughout what follows, we refer to the quantity $1+n({{\bm x}})$ as the ‘density’.

Since the DDFT-5,  and  represent different forms of Taylor expansion around the reference state with density $\rho_0$, there are a variety of ways comparison between solutions can be made. Here, we opt to fix ${{\cal L}}$ and ${{{\cal L}_{\text{grad}}}}$ as in (\[eq:defnL\_GEM4\]) and (\[eq:cLgradGEM4\]) with the specified values of $\rho_0\beta\epsilon$, $R$ and $\gamma$. This implies that at $\mu=0$ the reference state with $n=0$ is at the spinodal point and is marginally unstable to modes with wavenumber $k=1$. We then vary $\mu$ starting from $\mu=0$ and follow the liquid, stripe and hexagonal solutions of (\[eq:betadFdn3\_rewritten\]) and (\[eq:betadFdn5\_rewritten\])–(\[eq:betadFdnepsilon\_rewritten\]) in appropriately sized two-dimensional domains. For a given value of $\mu$ the different solutions have different values for the mean density $1+\bar{n}=1+\frac{1}{A}\!\!\int\! n({{\bm x}}){{{\rm d}}{{\bm x}}}$, where $A$ is the area of the domain. For each state we calculate the specific grand potential: $$\frac{\Omega[n]}{A} = \frac{{{\cal F}}[n]}{A} - \mu (1+\bar{n}),
 \label{eq:specificgrandpotential}$$ where ${{\cal F}}$ is ${{{\cal F}_{3}}}$, ${{{\cal F}_{5}}}$, ${{\cal F_{\text{$\gamma$}}}}$ or ${{\cal F_{\text{$\epsilon$}}}}$, as appropriate. We also minimise $\Omega/A$ with respect to the domain size $A$ by applying the approach described in Appendix \[app:continuation\]. For a given value of the chemical potential $\mu$ and the combined parameter $\rho_0\beta\epsilon$, the thermodynamic equilibrium state is that with the minimum value of $\Omega/A$. Note that equilibria with the same $\mu$ do not necessarily have the same value of $\bar n$, which is important when considering which equilibria might result from initial conditions via the dynamics.

to to

The solution corresponding to the uniform density liquid state with $n({{\bm x}})={n_{\text{liq}}}$ can readily be found. In this case we have ${{\cal L}}{{n_{\text{liq}}}}=\sigma(0){n_{\text{liq}}}$, and so we must solve the following algebraic equations for ${n_{\text{liq}}}$: $$\begin{aligned}
 &\text{DDFT-3,5:}&
    \log\left(1+{n_{\text{liq}}}\right)
    - {n_{\text{liq}}}- \sigma(0) {n_{\text{liq}}}&= \mu,
 \label{eq:DDFTnliq}\\
 &\text{{\hbox{PFC-$\gamma$}},$\epsilon$:}&
    -\tfrac{1}{2}{n_{\text{liq}}}^2 + \tfrac{1}{3}{n_{\text{liq}}}^3 - \sigma(0){n_{\text{liq}}}&= \mu,
 \label{eq:PFCnliq}
 \end{aligned}$$ recalling that the value of $\sigma(0)$ depends on whether or not the gradient expansion is carried out (see Fig. \[fig:dispersionGEM4\]). Finding ${n_{\text{liq}}}$ for a given value of $\mu$ is done easily using Newton’s method, and the resulting ${n_{\text{liq}}}$ and specific ${\Omega_{\text{liq}}}$ are shown in Fig. \[fig:liquiddensity\]. In all cases, we see that ${n_{\text{liq}}}$ is an increasing function of $\mu$, while ${\Omega_{\text{liq}}}/A$ is a decreasing function of $\mu$. The figure shows that the specific grand potential for the liquid state predicted by all four models are similar close to $\mu=0$, but the predicted liquid state densities are rather different away from $\mu=0$. This difference originates from the different values of $\sigma(0)$ ($-18.75$ for DDFT-3 and , in contrast to $-4.37$ for DDFT-5 and ). We see from Fig. \[fig:liquiddensity\] that the density of the liquid is erroneously predicted to increase too rapidly as $\mu$ is increased by the gradient expansion theories (DDFT-5 and ). This is because these get the value of the isothermal compressibility $\chi_T$ to be too large [@Jaatinen2009]. This compressibility is related to $\sigma(0)$ via $\chi_T=-\beta/[\sigma(0)\rho_0(1+{n_{\text{liq}}})]$ [@Hansen2013]: see Eq.  and following discussion. Expanding the logarithm makes relatively little difference over this range of densities.

Since crystallisation occurs at higher densities, we expect a transition from the liquid to the crystal to occur as $\mu$ increases. At the spinodal the uniform liquid becomes linearly unstable and the patterned state solution branches bifurcate from the liquid at this point. To find these states, we seek a solution of the form $$n({{\bm x}}) = {n_{\text{liq}}}+ {{\delta{\mkern-1mu}n}}({{\bm x}}),$$ where near the bifurcation point ${{\delta{\mkern-1mu}n}}\ll1$, and ${{\delta{\mkern-1mu}n}}$ is of the form $e^{i{{\bm k}}\cdot{{\bm x}}}$, so that ${{\cal L}}{{\delta{\mkern-1mu}n}}=\sigma(k){{\delta{\mkern-1mu}n}}$. Expanding Eqs. (\[eq:betadFdn3\_rewritten\]) and (\[eq:betadFdn5\_rewritten\]–\[eq:betadFdnepsilon\_rewritten\]) in powers of ${{\delta{\mkern-1mu}n}}$ we find that the ${{\cal O}}(1)$ equations to solve are just those for finding the liquid state density, Eqs. (\[eq:DDFTnliq\])–(\[eq:PFCnliq\]). The ${{\cal O}}({{\delta{\mkern-1mu}n}})$ equations are $$\begin{aligned}
 &\text{DDFT-3,5:}&
    \left(\frac{1}{1+{n_{\text{liq}}}} - 1 - \sigma(k)\right){{\delta{\mkern-1mu}n}}&= 0,
 \label{eq:DDFTdeltan}\\
 &\text{{\hbox{PFC-$\gamma$}},$\epsilon$:}&
    \left(-{n_{\text{liq}}}+ {n_{\text{liq}}}^2 - \sigma(k)\right){{\delta{\mkern-1mu}n}}&= 0.
 \label{eq:PFCdeltan}
 \end{aligned}$$ The spinodal point for DDFT-3,5 or for ,$\epsilon$ is where there are solutions of the equation with ${{\delta{\mkern-1mu}n}}\neq0$.

Since we are looking for a change in stability, we take the extreme value of $\sigma(k)$, i.e., $\sigma(k)=0$ (see Fig. \[fig:dispersionGEM4\]). Then, Eq. (\[eq:DDFTdeltan\]) is solved (with ${{\delta{\mkern-1mu}n}}\neq0$) only for ${n_{\text{liq}}}=0$, which leads to $\mu=0$ from (\[eq:DDFTnliq\]). In contrast, Eq. (\[eq:PFCdeltan\]) with $\sigma(k)=0$ has two solutions, ${n_{\text{liq}}}=0$ and ${n_{\text{liq}}}=1$, leading to $\mu=0$ and $\mu=-\tfrac{1}{6}-\sigma(0)$ from (\[eq:PFCnliq\]). The implication of this is that the PFC has two spinodal points: the liquid loses stability at ${n_{\text{liq}}}=0$ as $\mu$ increases through $0$, but it regains stability at ${n_{\text{liq}}}=1$, which gives $\mu=18.58$ for  and $\mu=4.20$ for . This prediction that the liquid regains stability for higher $\mu$ is a consequence of expanding the logarithm, or equivalently of Taylor expanding the $1/(1+{n_{\text{liq}}})$ term in (\[eq:DDFTdeltan\]) and is confirmed by direct computation of the crystal solutions below. Of course, this prediction is erroneous, since the simulation results for the GEM-4 system [@Mladek2006; @Prestipino2014] show no sign of a second spinodal point or the associated stable second liquid in the equilibrium system phase diagram.

In Fig. \[fig:DDFT3solutions\] we display examples of the three different types of periodic solutions that can be found for DDFT-3. These are (i) the crystal solution, which we refer to as ‘up hexagons’, which exhibits a triangular array of isolated density maxima surrounded by hexagonal regions where the density is close to zero. There are also (ii) ‘down hexagons’ which are the opposite, with isolated density minima and hexagonal density maxima. Finally, there is (iii) the stripe state. Depending on the state point these solutions are not necessarily linearly stable. Our naming convention to distinguish the two different hexagonal solutions originates in the convection literature [@Bodenschatz2000]. These solutions were initiated at $\mu\approx0$ and then continued numerically (see Appendix \[app:continuation\]) up to $\mu=10$. For DDFT-3 it is possible to go a bit higher in $\mu$, but with increasing $\mu$ (i.e., increasing average density) the peaks in the density profile get narrower and higher and so more and more grid points are required to resolve these peaks correctly. However, as we show below for some of the other models and for different reasons, it is not possible to continue the solutions this far in $\mu$. The domains on which the profiles are calculated have periodic boundary conditions, with 4 wavelengths in each direction (for stripes), or $8\times\tfrac{8}{\sqrt{3}}$ wavelengths (for hexagons). The wavelength is initially equal to $2\pi$ for $\mu=0$ and is then adjusted by up to about 2% in order to minimise the specific grand potential as $\mu$ is varied; i.e., we minimise $\Omega/A$ with respect to variations in the size of the crystal unit cell or, for the stripe phase, we minimise with respect to variations in the spacing between the stripes – see Appendix B for details.

to to to to

In Fig. \[fig:DDFTPFCsummary\] we display a series of plots showing the maximum, minimum and average values of the density profiles $1+n$ for the stripe and hexagonal structures as a function of $\mu$. We also plot the specific grand potential $\Omega/A$ for the different structures. Recall that for a given $\mu$ the thermodynamic equilibrium phase corresponds to the global minimum of $\Omega/A$. The results for DDFT-3 are shown in Fig. \[fig:DDFTPFCsummary\](a–c). The (a) stripes originate in a supercritical pitchfork bifurcation at $\mu=0$, and (b) hexagons originate in a transcritical bifurcation at the same value of $\mu$. The density of the up hexagons ranges from about $2\times10^{-5}$ up to about 50, for $\mu=10$. All of these branches can be continued to larger values of $\mu$.

DDFT-5, in Fig. \[fig:DDFTPFCsummary\](d–f), initially behaves in the same way, but all three branches have their minimum density heading to zero before $\mu$ gets to 10: this happens at $\mu\approx3.37$ for (d) stripes, and for $\mu\approx0.28$ and $\mu\approx2.73$ for (e) the up and down branches of hexagons, respectively. The numerical method cannot continue the branches beyond these points. We argue in Sec. \[sec:4\] that this is not an artefact of the numerical method, rather it is a genuine feature of solutions of Eq. (\[eq:betadFdn5\_rewritten\]) that the density $1+n$ can go to zero. In this limit, $\log(1+n)\rightarrow-\infty$, but this is balanced by a lack of smoothness in $n({{\bm x}})$: the fourth derivative in ${{{\cal L}_{\text{grad}}}}n$ can go to $+\infty$ and so balance the singularity in $\log(1+n)$. Therefore, $\mu\approx0.28$ is the limit of validity of the DDFT-5 model.

The two PFC examples are similar to each other, and it is easier to discuss , in Fig. \[fig:DDFTPFCsummary\](j–l), first. Here, (j) stripes and (k) hexagons bifurcate from the liquid at $\mu=0$, but they rejoin the liquid at $\mu=4.20$ as explained in the discussion following Eqs. (\[eq:DDFTdeltan\]–\[eq:PFCdeltan\]). The maximum and minimum densities for the up and down hexagon cross between the two bifurcations. The behaviour of , in Fig. \[fig:DDFTPFCsummary\](g–i), is similar, though the second bifurcation is at $\mu=18.58$, off the scale of the figure.

to to

Figure \[fig:DDFTPFCsummary\](c,f,i,l) shows that the curves of the specific grand potential $\Omega/A$ as functions of $\mu$ are very close, so in Fig. \[fig:DDFTPFCrelativeOmega\], we plot instead $(\Omega-{\Omega_{\text{liq}}})/A$ versus $\mu$, where ${\Omega_{\text{liq}}}$ is the specific grand potential for the liquid at the same value of $\mu$. In (a) the DDFT-3 case, the up hexagons clearly have the lowest grand potential for $\mu\geq-2.8$ with the uniform liquid being the global minimum for $\mu<-2.8$, and at no point do stripes come anywhere near, as one should expect from the particle simulation results [@Prestipino2014]. For (b) DDFT-5, the two hexagon branches stop before the stripe branch when their minimum densities go to zero (the limit of validity), but otherwise the relative values for the hexagon and stripe grand potentials is qualitatively similar to DDFT-3. For (c,d) the PFC examples, once again it is easiest to discuss first. In Fig. \[fig:DDFTPFCrelativeOmega\](d), the hexagon and stripe branches bifurcate from the liquid at $\mu=0$ and rejoin the liquid at $\mu=4.20$, with stripes having the lowest grand potential for intermediate values of $\mu$, and up or down hexagons being the lowest grand potential state for smaller or larger values of $\mu$. The behaviour of (c)  is similar, but stretched to larger values of $\mu$ (off scale).

The insets in the four panels of Fig. \[fig:DDFTPFCrelativeOmega\] display magnifications that show that the behaviour near the spinodal point at $\mu=0$ is qualitatively similar in all four cases: the up hexagons start with $\Omega>{\Omega_{\text{liq}}}$ for negative $\mu$, but the branch changes direction, forming a cusp, close to which is the thermodynamic coexistence point (Maxwell point), where $\Omega={\Omega_{\text{liq}}}$. The down hexagons start with $\Omega<{\Omega_{\text{liq}}}$ for positive $\mu$, and the stripes, also with $\Omega<{\Omega_{\text{liq}}}$ for positive $\mu$, have a value of the grand potential intermediate between the up and down hexagons. We note that the range of $\mu$ over which this behaviour occurs is about a factor of ten smaller in the DDFT-5 and  cases as compared to DDFT-3, also with a roughly ten-fold drop in the overall range of values of $(\Omega-{\Omega_{\text{liq}}})/A$.

to to

The observation that the bulk phase behaviour of the system depends only on $\mu$ and the value of $\rho_0\beta\epsilon$ if the pair potential can be written as $u(x_{12})=\epsilon\psi(x_{12})$ – see the discussion around Eq.  – is true for the GEM-4 system. As a consequence, having calculated the coexisting densities for a particular value of $\rho_0\beta\epsilon$, the linear stability threshold, these results can be scaled to give the phase diagram in the full average density $1+\bar{n}$ versus dimensionless temperature $k_BT/\epsilon$ plane, which is one of the usual ways the GEM-4 phase diagram is displayed [@Mladek2006; @Mladek2007; @Prestipino2014; @Archer2014; @Archer2016]. The phase diagrams obtained from doing this are in Fig. \[fig:phase\_diagrams\]. In Fig. \[fig:phase\_diagrams\](a) we display the phase diagram obtained from DDFT-3, which is identical (to within the resolution of the calculations) to that previously calculated in Refs. [@Archer2014; @Archer2016]. For example, when $\beta\epsilon=1$, the average densities $\rho_0(1+\bar{n})R^2$ of the coexisting liquid and the crystal are $5.41$ and $5.68$, respectively. As a result of the scaling behaviour, the coexisting densities (binodals) are two straight lines going from the origin and passing through these two points.

In Fig. \[fig:phase\_diagrams\](b) we display the phase diagram obtained for the DDFT-5. The binodals are a little closer to the linear stability threshold line than for DDFT-3, but other than that, it looks similar overall. Note however that the up hexagon branch cannot be continued beyond $\mu\approx0.28$ (where the minimum density goes to zero): this line is indicated as the ‘limit of validity’. Beyond this line, in the bottom right region of the phase diagram, there is no up hexagon solution to the equations, for the reasons discussed in Sec. \[sec:4\].

In Fig. \[fig:phase\_diagrams\](c) we display the phase diagram for  and in (d) for . The binodals almost overlie each other, so the predicted difference between the average densities of the liquid and the crystal at coexistence are much smaller than that predicted by DDFT-3 and DDFT-5. Furthermore, on moving to higher average densities or to lower temperatures $k_BT/\epsilon$ one encounters the stripe phase, followed by the down hexagon phase and then finally the uniform liquid becomes stable again. The prediction of the occurrence of these later phases is of course wrong, signifying a breakdown in the accuracy of the PFC theory at even the qualitative level.

Before finishing this section, we note that it is possible to extend the gradient expansion in (\[eq:cLgradGEM4\]) by including higher powers of the Laplacian. For example, Ref. [@Jaatinen2009] proposed an eighth-order fitting (EOF), which in our notation is $${{{\cal L}_{\text{grad-8}}}}n({{\bm x}}) = - \gamma(1+\nabla^2)^2 n({{\bm x}})
                   - E_B (1+\nabla^2)^4 n({{\bm x}}), 
 \label{eq:cLgradJaatinen}$$ where $\gamma$ fits the curvature of the dispersion relation as before, and $E_B$ allows the eigenvalue $\sigma(0)$ of ${{\cal L}}$ to be matched as well, i.e., allows the model to match correctly the isothermal compressibility $\chi_T$. An example of the dispersion relation for this operator is shown as a dotted line in Fig. \[fig:dispersionGEM4\]. This EOF version of the theory, with ${{{\cal L}_{\text{grad-8}}}}$ in (\[eq:cLgradJaatinen\]), improves over the standard version, with (\[eq:cLgradGEM4\]), since $\sigma(0)$ for ${{\cal L}}$ and ${{{\cal L}_{\text{grad-8}}}}$ are the same. Therefore, the liquid properties of DDFT-5 match those of DDFT-3, and the liquid properties of  match those of , once ${{{\cal L}_{\text{grad}}}}$ is replaced by ${{{\cal L}_{\text{grad-8}}}}$.

However, the drawbacks of the gradient expansion are still present. With ${{{\cal L}_{\text{grad-8}}}}$, the values of $\mu$ at which the DDFT-5 stripe and hexagon densities go to zero are larger, but this undesirable feature is only deferred, not eliminated. The reason is that the singularity in the logarithm is now balanced against an eighth-order derivative. Note too that introducing even higher derivatives does not cure this problem, it just pushes the singularity to higher order. In addition, with ${{{\cal L}_{\text{grad-8}}}}$ the second liquid spinodal in the model is still present, it is just pushed to higher values of $\mu$ (similar to the value for ) and since this second spinodal is present, there is still a range of values of $\mu$ for which stripes have the lowest specific $\Omega$.

Effect of the approximations {#sec:4}
============================

The qualitative change in going from a DDFT to a PFC model (dropping the $\nabla\cdot\left[n\nabla{{\cal L}}{n}\right]$ term, assuming constant mobility and expanding the logarithm) is apparent in the phase diagrams shown in Fig. \[fig:phase\_diagrams\], comparing (a,b) to (c,d). Here we discuss in detail additional effects of the approximations.

Expanding the logarithm
-----------------------

The effect of expanding the logarithm as in Eq. (\[eq:expandlogarithm\]) is very significant. In Sec. \[sec:3\] we demonstrated that this expansion leads to the liquid having a second spinodal point, illustrated in the phase diagrams in Fig. \[fig:phase\_diagrams\](c,d), with the crystal re-melting as the density is increased. The reason for this is that Eq. (\[eq:PFCdeltan\]) can be solved with $n=0$ and $n=1$, while Eq. (\[eq:DDFTdeltan\]) is only solved by $n=0$, with $\sigma(k)=0$ in both cases.

Intimately connected to the existence of this second spinodal is the transition from stable up hexagons at the $\mu=0$ spinodal to stable down hexagons at the higher density spinodal. These connections to the spinodals mean that the free energy of the up hexagons increases again compared to the liquid state free energy as the chemical potential is increased, in order to reconnect to the liquid state at the upper spinodal. An intermediate region of stable stripes is not inevitable, but is evident in both PFC examples in Fig. \[fig:DDFTPFCrelativeOmega\](c,d).

Taking more terms in the expansion in Eq. (\[eq:expandlogarithm\]) does not help. The highest power should be even (otherwise the free energy is not bounded below), and the improved versions of Eq. (\[eq:PFCdeltan\]), which involves the second derivative of Eq. (\[eq:expandlogarithm\]) with respect to $n$, also have $n=0$ and $n=1$ as (the only) real roots, regardless of how many terms are kept in the expansion of the logarithm. [The exception is if only terms up to $n^2$ are kept in (\[eq:expandlogarithm\]); in this case, $c^{(3)}$ and $c^{(4)}$ (if they are non-zero) provide the stabilizing nonlinearities and may also lead to a spurious spinodal.]{}

to to

Gradient expansion of ${{\cal L}}$
----------------------------------

As discussed in Sec. \[sec:3\] above, the results in Fig. \[fig:DDFTPFCsummary\](d,e) suggest that for certain values of $\mu$, the DDFT-5 equation (\[eq:betadFdn5\_rewritten\]) has solutions for the density $1+n$ which go to zero at certain places. In contrast, the density in the PFC models appears to stay away from zero (although there is no reason for it to do so and there would be no singularity if it did), and in DDFT-3, the density minimum gets smaller and smaller as $\mu$ increases, but remains positive, without the sharp cutoff seen in DDFT-5. In this section we argue that the density reaching zero is not an artefact of numerical difficulties, rather it is a feature of the DDFT-5 equation (\[eq:betadFdn5\_rewritten\]). [Here, we focus on singularities in the solution, not on stability. Our discussion in this section is mainly framed in terms of the stripe solution, which is unstable, but the stable up-hexagon branch has similar issues, as is illustrated in Fig. \[fig:DDFTPFCsummary\](e).]{}

Figure \[figApp:DDFT5singularity\](a) shows that even close to the end of the branch of DDFT-5 stripes, the density profile $1+n$ remains smooth, but since its minimum at $x=x_{\rm min}$ is very close to zero ($1+n(x_{\rm min})\approx5\times10^{-7}$), therefore the logarithm $\log(1+n)$ is sharply spiked towards large negative values at $x_{\rm min}$. Writing out the terms in (\[eq:betadFdn5\_rewritten\]) for a density profile only varying in the $x$-direction, we have: $$\log\left(1+n\right)
    + (\gamma-1) n + \gamma n_{xx} + \gamma n_{xxxx} - \mu = 0,
 \label{eq:betadFdn5_rewrittenagain}$$ which suggests that the only way to balance a large negative contribution from $\log(1+n)$ is to have a large positive $\gamma{n_{xxxx}}$. Figure \[figApp:DDFT5singularity\](b) shows that these two terms (solid lines with markers at the grid points) do indeed balance each other. The figure also shows that the other terms in (\[eq:betadFdn5\_rewrittenagain\]) are well behaved and that the equation is satisfied at each grid point. Therefore this singularity is not a numerical artefact, but rather a genuine feature of DDFT-5 stripes: the minimum density goes to zero at a certain finite value of $\mu$. In Fig. \[figApp:DDFT5singularity\](c,d) we show for comparison results from DDFT-3: the stripes have sharply peaked density maxima and density minima just as small as in DDFT-5, but all terms in Eq. (\[eq:betadFdn3\_rewritten\]) (Fig. \[figApp:DDFT5singularity\]d) are well behaved.

As $\mu$ is further increased, the minimum of the density in DDFT-5 gets closer to zero, so the logarithm of the density goes further towards $-\infty$ and correspondingly $\gamma{n_{xxxx}}$ goes towards $+\infty$. Fig. \[fig:DDFTPFCsummary\](d) shows that the density minimum gets to zero at a finite value of $\mu$. We have not been able to develop a consistent asymptotic approximation for this limit in the DDFT-5 equation. However, to illustrate that apparently smooth solutions with logarithmic singularities in their fourth derivatives can easily be found, consider for example taking $\gamma=1$ in (\[eq:betadFdn5\_rewrittenagain\]) and taking a density profile that has a quadratic minimum at $x=x_{\rm min}=0$: $$1 + n(x) = Ax^2 + Bx^4 + Cx^4\log(x^2),
 \label{eqApp:densityexpansion}$$ where $A$, $B$ and $C$ are constants. For small $x$, the largest of these three terms is $Ax^2$, so $\log(1+n)\approx\log(Ax^2)$, which goes to $-\infty$ as $x\rightarrow0$. The other terms are $n_{xx}\approx2A+{{\cal O}}(x^2,x^2\log(x^2))$ and $n_{xxxx}\approx24C\log(x^2) + 24B + 100C$. Adding these three together requires $1+24C=0$ to cancel the logarithmic singularity at $x=0$, and the remaining terms are constants or go to zero as $x\rightarrow0$.

As can be seen from Fig. \[figApp:DDFT5singularity\], having an adequate resolution for our numerical calculations was a challenge but for different reasons for the different models. In DDFT-3, the density maxima can be sharply peaked while the logarithm of the density is smooth, so inadequate resolution in the density field prompts an increase in the number of grid points (we implement automatic regridding, as discussed in Appendix \[app:continuation\]). In contrast, in DDFT-5, the density field can be smooth but with minima very close to zero, so its logarithm has very sharp negative peaks. In this case, inadequate resolution in the logarithm of the density prompts regridding. The difference is that in DDFT-5, the equation involves derivatives so any problem is magnified, while in DDFT-3, the equation involves convolutions that smooth out any problems.

These arguments indicate that a singular solution to the DDFT-5 equation (\[eq:betadFdn5\_rewritten\]) of the type seen in Fig. \[figApp:DDFT5singularity\] is possible, with the density going to zero, and that this is not a problem of inadequate numerical resolution, but rather a consequence of replacing the convolution in DDFT-3 with derivatives. A full asymptotic theory should result in a prediction for the value of $\mu$ at which the branch terminates. The stripe solutions of the DDFT-3 equation (\[eq:betadFdn3\_rewritten\]) can also have small density but without any singularity in the solution.

One mode approximation for DDFT {#sec:5}
===============================

The data displayed in Fig. \[figApp:DDFT5singularity\](a,c) lead to an interesting observation: in (a) DDFT-5, the logarithm of the density is sharply negatively peaked, while the density is smooth (at least up to its second derivative), slowly varying and resembles a cosine. In contrast, in (c) DDFT-3, the density is sharply peaked, while the logarithm of the density is slowly varying and resembles a cosine. One of the attractions of PFC theory is that it has slowly varying solutions that are well represented by a few Fourier modes [@Elder2002; @Elder2004; @Emmerich2012; @Wu2010], and this carries over to some extent to DDFT-5. Such Fourier representations of the density profiles in DDFT-3 are unsatisfactory, apart from for the unstable solutions very close to the spinodal point, since any solution of reasonable amplitude is sharply peaked.

to

However, the data in Fig. \[figApp:DDFT5singularity\] suggest that representing the *logarithm* of the density with a few Fourier modes should work well in DDFT-3. In this section, we elaborate how such a theory can be developed.

The key is to write Eq. (\[eq:betadFdn3\_rewritten\]) in terms of $\phi({{\bm x}})\equiv\log(1+n({{\bm x}}))$, and approximate $\phi$ by a few Fourier modes. As a first step, we write out ${{\cal L}}$ using Eq. (\[eq:defnL\_GEM4\]) and re-write (\[eq:betadFdn3\_rewritten\]) as: $$\log(1+n({{\bm x}}))
    + \rho_0\beta\epsilon \!\!\int\! 
                         \psi(|{{\bm x}}-{{\bm x}}_2|) n({{\bm x}}_2){{{\rm d}}{{\bm x}}}_2
    - \mu = 0,
 \label{eq:betadFdn3_rewrittenagain}$$ where $\psi(|{{\bm x}}-{{\bm x}}_2|)=e^{-|{{\bm x}}-{{\bm x}}_2|^4/R^4}$. The convolution term (including the $\rho_0\beta\epsilon$ prefactor) in this equation is $-n({{\bm x}})-{{\cal L}}n({{\bm x}})$. We know the eigenvalues of ${{\cal L}}$: ${{\cal L}}\exp(ikx)=\sigma(k)\exp(ikx)$, which means that the convolution term acting on a Fourier mode $\exp(ikx)$ has eigenvalue $-(1+\sigma(k))$. We also know that for high wavenumbers, the convolution averages to zero, and indeed $\sigma(k)\rightarrow-1$, as can be seen in Fig. \[fig:dispersionGEM4\].

We focus first on stripes, which have Fourier components only at integer wavenumbers, and notice that $1+\sigma(2)$ is already very small (less than $0.01$), because $\hat{\psi}(2)$ is small. This implies that the Fourier components of the convolution term at $k=2$ and higher will be much smaller than the Fourier components at $k=0$ and $k=1$ – regardless of the spectrum of $n$ itself. The other two terms in Eq. (\[eq:betadFdn3\_rewrittenagain\]) are $\mu$, which is constant ($k=0$ only), and $\log(1+n)$, so $\log(1+n)$ can only have significant Fourier components at $k=0$ and $k=1$: there is nothing to balance modes with $|k|\geq2$. This explains why $\log(1+n)$ in the lower left panel of Fig. \[figApp:DDFT5singularity\] is smooth, and it is also why approximating the logarithm of the density by a few Fourier modes must work regardless of the amplitude of the modulations in the density, or how sharply they are spiked, or of the value of $\mu$.

For the stripe phase we write $$\log(1+n(x)) = \phi(x) = \phi_0 + \phi_1 e^{ix} + {\bar \phi}_1 e^{-ix},
 \label{eq:logdensityFourier}$$ where $\phi_0$ and $\phi_1$ are constants (real and complex, respectively) that we need to find. This can easily be generalised for hexagons and other periodic phases by adding more modes in . The $k=0$ and $k=1$ components of $\exp\left(\phi_1e^{ix}+\text{c.c.}\right)$, where $\text{c.c.}$ denotes the complex conjugate, can be expressed in terms of integrals, defining two functions $f_0(\phi_1)$ and $f_1(\phi_1)$ given by $$\begin{split}
 f_0(\phi_1) &= \frac{1}{2\pi}\int_0^{2\pi} \exp\left(\phi_1e^{ix}+\text{c.c.}\right){{\rm d}}{}x, \\
 f_1(\phi_1) &= \frac{1}{2\pi}\int_0^{2\pi} e^{-ix}\exp\left(\phi_1e^{ix}+\text{c.c.}\right){{\rm d}}{}x,
 \label{eq:f0f1defn}
 \end{split}$$ i.e., $f_0$ is modified Bessel function of the first kind of order zero and $f_1$ is a Fourier transform generalisation of $f_0$. Using these functions, $n(x)=e^{\phi(x)}-1$ can be written in terms of its Fourier components as $$\begin{split}
 e^{\phi(x)}-1 &= e^{\phi_0}f_0(\phi_1) - 1\\
            &\quad{} + \left(e^{\phi_0}f_1(\phi_1)e^{ix} + \text{c.c.}\right)\\
            &\quad{} + \text{modes with $|k|\geq2$.}
 \label{eq:densityFourier}
 \end{split}$$ The modes with $|k|\geq2$ in (\[eq:densityFourier\]) are large in amplitude, but they are reduced in significance in Eq. (\[eq:betadFdn3\_rewrittenagain\]) by the convolution, as explained above. The action of the convolution on modes with $|k|<2$ can be written in terms of $\sigma(k)$. Retaining only these terms, we are left with the $k=0$ and $k=1$ components of (\[eq:betadFdn3\_rewrittenagain\]): $$\begin{split}
 \phi_0 + (1+\sigma(0))\left(1-e^{\phi_0}f_0(\phi_1)\right) - \mu &= 0,\\
 \phi_1 - e^{\phi_0}f_1(\phi_1)(1+\sigma(1)) &= 0.
 \label{eq:DDFT3onewaveeqns}
 \end{split}$$ Notice that the only information remaining from the GEM-4 potential is the values of $\sigma(0)$ and $\sigma(1)$, i.e., the values of $\hat{u}(0)$ and $\hat{u}(1)$. Recall also that if the reference density $\rho_0$ is chosen to be the value at the spinodal, then we have $\sigma(1)=0$. These equations can also be written in terms of the pair potential as $$\begin{split}
 \phi_0 - \rho_0\beta\hat{u}(0)\left(1-e^{\phi_0}f_0(\phi_1)\right) - \mu &= 0,\\
 \phi_1 + e^{\phi_0}f_1(\phi_1)\rho_0\beta\hat{u}(1) &= 0.
 \label{eq:DDFT3onewaveeqns_u}
 \end{split}$$ The two equations in (\[eq:DDFT3onewaveeqns\]) can easily be solved for $\phi_0$ and $\mu$ in terms of $\phi_1$, from which the density can be reconstructed. The agreement between this and the full solutions of DDFT-3 is astonishing. Figure. \[figApp:DDFT3onemodeapprox\](a) shows a 1D example at $\mu=28.9$, with the full solution as a black line and the approximate solution as a dashed line. Even though the density varies by two orders of magnitude, the two are almost indistinguishable. There is similar excellent agreement with the branch of stripe solutions (Fig. \[figApp:DDFT3onemodeapprox\]b) in 2D DDFT-3 (recall that the GEM-4 potential has different values of $\sigma(0)$ in 1D and 2D).

For 2D hexagons, the approach is similar, with the two $e^{\pm{ix}}$ terms in Eq. (\[eq:f0f1defn\]) replaced by six similar terms, with wavenumbers ${{\bm k}}$ that are uniformly spaced around a circle of radius 1 in ${{\bm k}}$-space (c.f. Eq.  in Appendix B). The agreement in this case (Fig. \[figApp:DDFT3onemodeapprox\]c) is also very good. If one adds a further six modes with $|{{\bm k}}|=\sqrt{3}$, then the agreement is as good as that for stripes. These approximate solutions can easily be continued up to $\mu=100$ without difficulties, where we observe very sharply peaked density maxima and extremely small but non-zero values for the density minimum.

Discussion and conclusions {#sec:6}
==========================

In this paper, starting from DDFT, we have presented a step-by-step derivation of PFC theory, at each stage explaining the consequences of the approximations. The approximations can be listed under three main groupings: (i) making a truncated functional Taylor expansion approximation for the excess Helmholtz free energy, and then making the RPA/RY approximation. This leads to DDFT-3 in our classification. (ii) Neglecting the $\nabla\cdot[n\nabla{{\cal L}}n]$ term, which effectively also forces making a Taylor expansion of the logarithmic ideal gas term and assuming constant mobility. (iii) Replacing the nonlocal convolution in ${{\cal L}}$ with a local gradient expansion. The consequence of (ii) is to introduce a second spinodal into the phase diagram and to significantly alter the relative stabilities of the different periodic states, in particular making striped states to become an equilibrium phase for some state points, which is contrary to the physics. The consequence of making (iii) without first making (ii), is to generate a theory (DDFT-5) that has a no-solution region in the phase diagram, such as that displayed for the GEM-4 model in Fig. \[fig:phase\_diagrams\](b). All these consequences have been illustrated for the GEM-4 system, chosen because DDFT-3 is fairly accurate for this model for temperatures $k_BT/\epsilon>0.1$, allowing us to see the influence of the subsequent approximations.

[Throughout, there is good quantitative agreement between DDFT-3,  and the EOF versions of DDFT-5 and  (data not shown) *only* for unstable small amplitude solutions close to the spinodal point. The region of quantitative agreement agreement between DDFT-3 and  is circled in red in Fig. \[fig:DDFTPFCsummary\](b,h). Beyond this region, the agreement between the four theories is at best qualitative.]{}

Given all these problematic consequences for PFC theory, especially the issues related to Taylor expanding the logarithmic ideal gas term, it raises the question of why then is PFC theory so successful? In our view, there are several reasons for this. The first reason is that PFC theory is qualitatively correct near to the spinodal. Therefore, it can satisfactorily describe the coexistence between the liquid and the crystal phase, which is often an important aspect in applications of the theory. Second, despite the approximations, PFC theory still incorporates some very important physics: (i) the free energy satisfies the correct symmetries, (ii) the dynamical equation gives a time evolution that decreases the free energy monotonically over time and (iii) the current is proportional to the gradient of the chemical potential. These are all important features for describing many phenomena. Also, many of the features that PFC theory is used to describe are generic, and the model parameters can be scaled to fit (for example) iron [@Jaatinen2009] and graphene [@Fan2017], but could equally well be scaled to match other materials, with similar good agreement. This universality (having the correct symmetries etc.) underlines the importance of PFC theory as a powerful model of generic features of crystalization, but it means that PFC theory will in general not be able to predict any unusual (non-generic) behaviour.

Our results in Sec. \[sec:5\] for the GEM-4 system showing that one can derive a very accurate one-mode amplitude equation approximation for the field $\phi({{\bm x}})=\log(\rho({{\bm x}})/\rho_0)$, rather than the density itself, gives a tantalising hint as to how PFC-type theories may more properly be derived and what the order parameter field in PFC theory really represents: Should we consider the PFC order parameter to be a scaled logarithm of the density distribution or some other similar function of the density, rather than being proportional to the density profile itself? On the basis of the work presented here, the answer to this question is ‘probably yes’, but clearly more work is required to fully address this.

Returning to theories for the density profile, in our view it is preferable to retain the logarithmic ideal gas term in the approximation used for the Helmholtz free energy functional, since this is required to have physical (i.e., positive) density profiles, and also because with this the DDFT dynamics leads to the (correct physics) linear diffusion equation term – see Eq. . The difficult consequence of retaining this in the free energy is that one then has to deal with terms in the dynamical equation of the form $\nabla\cdot[n\nabla{{\cal L}}n]$, which makes solving numerically far more difficult. However, this term also contributes to making the crystalline phase more stable than the stripe phase, which also makes it important. The crucial contribution of this term can especially be seen in DDFT-3, since in this version of the theory it is clearly required for stabilizing the crystal structure. [In general, we would advocate using one of DDFT-1, DDFT-2 or DDFT-3 (depending on how ${{\cal F_{\text{ex}}}}$ is treated) over all existing PFC theories, for studying the properties of real materials.]{}

It is worth noting that in all the approximations made here, we only consider those that retain the form of a dynamics that decreases the free energy monotonically over time – see Eq. . This is a feature of both DDFT and PFC theory. In our view this structure is important and should not be broken by any approximations made, i.e., any that might be made in future in attempting to avoid any of the above mentioned issues.

It is also worth noting that, while we have not discussed the consequences of the LDA in going from DDFT-1 to DDFT-2 (see Eq. (\[eq:definecs\])), the polynomial terms in the chemical potential (\[eq:betadFdn2\]) can potentially lead to the same problem of having a second spinodal, even while retaining the logarithm term. This applies to DDFT-4 as well.

In this paper we have largely focussed on making our arguments in two dimensions, in order to keep the presentation as simple and comprehensible as possible. However, we should emphasis that all of our arguments apply for three dimensional (3D) systems. For example, at the higher temperatures we have focussed on here, the 3D GEM-4 model exhibits at equilibrium a single fluid phase and two crystalline phases: the body-centered cubic phase at lower densities and the face-centered cubic structure at higher densities. These are all accurately predicted by the 3D version of DDFT-3 [@Mladek2006]. There are no columnar or lamellar phases, which are the 3D equivalents of the stripe phase. On the other hand, the 3D versions of the PFC theories presented here all predict a lamellar phase at some state points [@Thiele2013], the 3D generalisations of the down hexagons and a second spinodal with the uniform liquid becoming the equilibrium phase at higher densities.

[It would be interesting to explore how the dynamics of defects, the elasticity and the plasticity of crystals differs between DDFT and ]{}, and our results are also relevant to binary systems. In the derivation in Ref. [@Huang2010a] of a PFC theory for binary mixtures, the generalisation of the $\nabla\cdot[n\nabla{{\cal L}}n]$ term is retained until the last moment in the derivation, but then dropped for the same reasons that is is neglected for one-component systems. Given the importance of this term for one-component systems, it is surely also important for stabilizing crystal structures in binary systems. [Note also that when determining mechanical properties such as elastic constants, the terms in the free energy that are linear in $n$ can be important [@Wang2018b]. These have been neglected here throughout since such terms do not contribute to determining density profiles.]{}

The singularity observed for DDFT-5 as the chemical potential $\mu$ (or equivalently, the average density $1+\bar{n}$) is increased was found by continuing equilibrium solutions determined at lower values of $\mu$. One aspect that needs further investigation relates to determining the influence of this when DDFT-5 is solved for state points where the final equilibrium crystal (or stripe) solution for the density profile does not exist. For example, a situation we have in mind is that studied by van Teeffelen  [@Teeffelen2009] consisting of a solidification front propagating into the unstable liquid. These authors compared results for this situation between (in our terminology) DDFT-3, DDFT-5 and . Their results are for two-dimensional dipolar colloidal particles. From the DDFT-5 results (PFC1 in their terminology) displayed in Figs. 4 and 5 of Ref. [@Teeffelen2009], it can be seen that they did not consider values of the coupling parameter large enough to encounter any of the singularities; the density profiles stay well away from zero. It would be interesting to quench deeper into the crystal phase to study the evolution of the density distribution towards the singular state. However, the numerics to resolve this accurately would surely be difficult.

One aspect of PFC theory that the derivation from DDFT highlights is that in general one is not free to independently vary the parameters $r$ and $\bar{n}$ in Eqs.  and . For example, for the GEM-4 model there are certain values of $r$ that are not generated by the mapping from DDFT. Of course, by changing the pair potential, different combinations of the PFC model parameters can become accessible. We should also recall that although we have illustrated many of our conclusions by considering the soft-core GEM-4 model, PFC theory can be derived for systems of particles with hard potentials since it is the pair direct correlation function $c^{(2)}({{\bm x}}_1,{{\bm x}}_2)$ that enters the theory; this quantity is finite for all values of ${{\bm x}}_1$ and ${{\bm x}}_2$.

As a final point, we mention that our results will also be of interest to the pure mathematics community. DDFT-3 is also referred to as the McKean–Vlasov equation and in this context there are a number of recent interesting rigorous results [@Carrillo2018; @Gomes2019]. Our results for DDFT-5, showing that for a finite value of $\mu$ there is a singularity with the density profile going to zero, may well be of interest to those who study the mathematics of solutions to partial differential equations with compact support – see for example Ref. [@Bernis1992]. For values of $\mu$ beyond the singular point where $1+n({{\bm x}})\to0$ it may be that the solutions become complex. If one were interested to find these solutions, we believe it might require treating $\mu$ as a complex variable. Of course, all of this is out of the realm where the model represents a theory for matter.

This work was supported in part by a L’Or[é]{}al UK and Ireland Fellowship for Women in Science (PS), by the EPSRC under grants EP/P015689/1 (AJA, DR) and , and by the Leverhulme Trust (RF-2018-449/9, AMR). We are grateful for conversations with Tapio Ala-Nissilä, Daniele Avitabile, Ken Elder, Zhi-Feng Huang, Kai Jiang, Edgar Knobloch, Ron Lifshitz, Chris Malcotte, Daniel Read, Uwe Thiele, Steve Tobias, Gyula Tóth, Laurette Tuckerman and Joanna Tumelty. We are grateful also for constructive comments from two anonymous referees.

Linear theory for GEM-4 {#app:LinearGEM4}
=======================

In this appendix, we discuss how we compute the linear theory for the GEM-4 potential in (\[eq:GEM4Potential\]). To be specific, in a two-dimensional periodic domain, the eigenvalue $\sigma(k)$ is defined by ${{\cal L}}e^{i{{\bm k}}\cdot{{\bm x}}} = \sigma(k) 
e^{i{{\bm k}}\cdot{{\bm x}}}$ and (\[eq:defnL\_GEM4\]), which can be written as $$\sigma(k) = -  1 - \rho_0\beta\epsilon \!\!\int\! 
                         e^{-|{{\bm x}}-{{\bm x}}_2|^4/R^4} e^{i{{\bm k}}\cdot({{\bm x}}_2-{{\bm x}})}{{{\rm d}}{{\bm x}}}_2,
 \label{eqApp:defn_sigmak_GEM4}$$ where the integral is taken over the periodic domain (the GEM-4 potential is replaced by its periodic extension). We set ${{\bm k}}=(k,0)$, we integrate from $[-N\pi/k,N\pi/k]$ in each dimension, and we choose the integer $N$ large enough that the GEM-4 exponential is effectively zero at the boundaries; $N=4$ suffices. We then scale ${{\bm x}}$ by a factor of $k$, replacing ${{\bm x}}_2-{{\bm x}}$ by ${{\bm x}}/k$, so that the integral becomes: $$\sigma(k) = -  1 - \rho_0\beta\epsilon 
                    \!\!\iint_{-N\pi}^{N\pi}\!
                         e^{-|{{\bm x}}|^4/(k^4R^4)} e^{ix}\frac{{{{\rm d}}{{\bm x}}}}{k^2},
 \label{eqApp:defn_sigmak_GEM4_scaled}$$ where $x$ is the first component of ${{\bm x}}$. With this scaling, the limits of the integral do not depend on $k$.

  -------------- -------- ----------------------- ---------- ------------- --------------------
    Dimension      $R$     $\rho_0\beta\epsilon$   $\gamma$   $\sigma(0)$         $E_B$
    \[0.5ex\]                                                              
   \[-1.5ex\] 1   4.5918          1.1629            3.2051     $-10.680$    $\phantom{0}7.475$
        2         5.0962          0.2455            4.3692     $-18.752$         $14.383$
        3         5.5719          0.0455            5.6889     $-31.305$         $25.616$
  -------------- -------- ----------------------- ---------- ------------- --------------------

  : Linear theory for the GEM-4 potential in one, two and three dimensions. Solving $\frac{{{\rm d}}\sigma}{{{\rm d}}{k}}(1)=0$ and $\sigma(1)=0$ gives $R$ and $\rho_0\beta\epsilon$, while $\gamma$ and $\sigma(0)$ are computed from $\frac{{{\rm d}}^2\sigma}{{{\rm d}}{k^2}}(1)$ and (\[eqApp:defn\_sigmak\_GEM4\]) respectively. We also give the values of $E_B$ for the EOF in Eq. .[]{data-label="tabApp:GEM4parameters"}

We choose $R$ and $\rho_0\beta\epsilon$ so that $\sigma(1)=0$ and $\frac{{{\rm d}}\sigma}{{{\rm d}}{k}}(1)=0$. The derivative of $\sigma$ with respect to $k$ is $$\frac{{{\rm d}}\sigma}{{{\rm d}}{k}} = - \rho_0\beta\epsilon 
                    \!\!\iint_{-N\pi}^{N\pi}\! 
                         \left(\frac{4|{{\bm x}}|^4 - 2k^4R^4}{k^7R^4}\right)
                         e^{-|{{\bm x}}|^4/(k^4R^4)} e^{ix}{{{\rm d}}{{\bm x}}}.
 \label{eqApp:defn_sigmak_GEM4_derivative}$$ Evaluating this at $k=1$ and removing the constant factor outside the integral gives a function $F(R)$: $$F(R) =  \iint_{-N\pi}^{N\pi}\! 
                         \left(\frac{4|{{\bm x}}|^4 - 2R^4}{R^4}\right)
                         e^{-|{{\bm x}}|^4/R^4} e^{ix}{{{\rm d}}{{\bm x}}}.
 \label{eqApp:GEM4_FRs}$$ We solve the equation $F(R)=0$ using Newton’s method to give $R$. We then calculate $\rho_0\beta\epsilon$ by requiring that $\sigma(1)=0$ in (\[eqApp:defn\_sigmak\_GEM4\_scaled\]). Values for $R$ and $\rho_0\beta\epsilon$ in one, two and three dimensions are given in table \[tabApp:GEM4parameters\]. We compute the GEM-4 dispersion relation in Fig. \[fig:dispersionGEM4\] in a similar way, and use the second derivative of (\[eqApp:defn\_sigmak\_GEM4\_scaled\]) with respect to $k$, at $k=1$, to find the $\gamma$ parameter (also given in table \[tabApp:GEM4parameters\]) in ${{{\cal L}_{\text{grad}}}}$. The table also gives $\sigma(0)$, since this is useful for computing properties of the liquid, as well as $E_B$, the coefficient in the eighth-order model of [@Jaatinen2009], given in Eq. (\[eq:cLgradJaatinen\]).

Numerical method: continuation {#app:continuation}
==============================

We use numerical continuation to solve the four equations (\[eq:betadFdn3\_rewritten\]) and (\[eq:betadFdn5\_rewritten\])–(\[eq:betadFdnepsilon\_rewritten\]) for $n({{\bm x}})$ as the parameters vary. Our approach is based on [@Doedel1991] for the pseudo-arclength continuation method, and we use the approach advocated by [@Kelley2003] to solve the large linear systems at each Newton step. The main parameters are the chemical potential $\mu$, the parameters in the linear operators ${{\cal L}}$ and ${{{\cal L}_{\text{grad}}}}$, and the domain size. In this discussion, we focus on $\mu$ as the parameter that is varied.

Pseudo-arclength continuation
-----------------------------

The main idea behind pseudo-arclength continuation is to suppose that we are looking to calculate a branch of solutions $n({{\bm x}})$ depending on the parameter $\mu$. The branch may have folds (as in Fig. \[fig:DDFTPFCsummary\]), and the method should be able to go around these. The method defines a parameter (the arclength $s$) that increases or decreases monotonically along the branch (including its folds) such that both $n({{\bm x}})$ and $\mu$ can be regarded as single-valued functions of $s$. Then the equation to be solved is $${{\cal G}}(n(s),\mu(s)) = 0,
 \label{eqApp:equationtosolve}$$ where ${{\cal G}}$ represents the equation we are solving for $n$. Instead of thinking of $n$ as being a function of position ${{\bm x}}$, we represent $n$ as a series of values $n_i$ on $N$ grid points ${{\bm x}}_i$ ($i=1,\dots,N$), so $n$ is now a vector in $\mathbb{R}^N$, and ${{\cal G}}$ is a function from $\mathbb{R}^{N+1}\rightarrow\mathbb{R}^{N}$. Equation (\[eqApp:equationtosolve\]) represents $N$ equations for $N+1$ unknowns, and so it is supplemented by an orthogonality condition, that the next point on a branch should lie in a plane orthogonal to a line connecting the two previous points. It is this that allows the branch following technique to go around folds. If we have two points on the branch $(n(s),\mu(s))$ at $s_0$ and $s_1$, then we take the derivatives of $n$ and $\mu$ with respect to the arclength to be approximately $$\frac{{{\rm d}}{n}}{{{\rm d}}{s}} = S \frac{n(s_1)-n(s_0)}{s_1-s_0},
 \quad
 \frac{{{\rm d}}\mu}{{{\rm d}}{s}} = S \frac{\mu(s_1)-\mu(s_0)}{s_1-s_0},
 \label{eqApp:pseudoarclengthstep}$$ with the scaling factor $S$ chosen so as to satisfy $$\frac{1}{N}\sum_{i=1}^N \left(\frac{{{\rm d}}{n_i}}{{{\rm d}}{s}}\right)^2 + 
 \left(\frac{{{\rm d}}\mu}{{{\rm d}}{s}}\right)^2 = 1.
 \label{eqApp:arclengthnormalization}$$ The $\frac{1}{N}$ prefactor means that the parameterization of the branch by the arclength is essentially independent of the number of grid points.

The method then proceeds in a predictor–corrector fashion. The predictor step, with a target stepsize $\Delta{s}$ provides $(n_2,\mu_2)$: $$n_2 = n(s_1) + \Delta{s}\frac{{{\rm d}}{n}}{{{\rm d}}{s}},
 \quad
 \mu_2 = \mu(s_1) + \Delta{s}\frac{{{\rm d}}\mu}{{{\rm d}}{s}}.
 \label{eqApp:pseudoarclengthpredictor}$$ Then, $(n_2,\mu_2)$ is used as an initial iterate for a Newton solver for equation (\[eqApp:equationtosolve\]), supplemented by the condition that the Newton iterates lie in a plane orthogonal to the line given in (\[eqApp:pseudoarclengthpredictor\]), parameterised by $\Delta{s}$. This means that we are solving ${{\cal H}}(n,\mu)=0$, where ${{\cal H}}$ is $\mathbb{R}^{N+1}\rightarrow\mathbb{R}^{N+1}$, with the first $N$ equations in ${{\cal H}}$ being the same as ${{\cal G}}$, and the last equation being $$(n - n_2) \cdot \frac{{{\rm d}}{n}}{{{\rm d}}{s}} + (\mu - \mu_2) \frac{{{\rm d}}\mu}{{{\rm d}}{s}} = 0.
 \label{eqApp:pseudoarcorthogonality}$$ To be precise, we take $${{\cal H}}(n,\mu)=\begin{pmatrix}
 \frac{1}{\sqrt{N}} P\cdot {{\cal G}}(n,\mu)\\
 \textrm{Eq.~(\ref{eqApp:pseudoarcorthogonality})}
 \end{pmatrix},
 \label{eqApp:fullsystem}$$ where $P$ is a linear preconditioner for ${{\cal G}}$ (see below). The $\sqrt{N}$ scaling means that the norm $\lVert{{\cal H}}(n,\mu)\rVert$ (the square root of the sum of the squares of its components) is independent of the number of grid points $N$, and it also means that the equations in ${{\cal G}}$ and the orthogonality condition (\[eqApp:pseudoarcorthogonality\]) are given a similar weighting by the Newton method.

Solving ${{\cal H}}(n,\mu)=0$ results in a new point on the branch of solutions, $(n(s_2),\mu(s_2))$, where $s_2$ is given by $$s_2 = s_1 + \frac{1}{N}(n(s_2)-n(s_1))\cdot\frac{{{\rm d}}{n}}{{{\rm d}}{s}}
           +            (\mu(s_2)-\mu(s_1))\frac{{{\rm d}}\mu}{{{\rm d}}{s}},
 \label{eqApp:newpseudoarc}$$ with $\frac{{{\rm d}}{n}}{{{\rm d}}{s}}$ and $\frac{{{\rm d}}\mu}{{{\rm d}}{s}}$ given by (\[eqApp:pseudoarclengthstep\]). This last equation comes from replacing $n_2$ by $n(s_2)$ and $\mu_2$ by $\mu(s_2)$ in (\[eqApp:pseudoarclengthpredictor\]) and finding a $\Delta{s}=s_2-s_1$ from $1/N$ times the first equation plus the second equation. This is not quite the actual change to the arclength that was achieved in the step, and the approximation is the reason that the method is called the pseudo-arclength method.

Newton’s method
---------------

For Newton’s method, we define $X=(n,\mu)$ and solve ${{\cal H}}(X)=0$. We start with $X_0$ given by the predictor step above in (\[eqApp:pseudoarclengthpredictor\]), and follow [@Kelley2003], at each step solving the linear equation $$\frac{\partial{{\cal H}}}{\partial{X}} \cdot {{\delta{\mkern-1mu}X}}_n = - {{\cal H}}(X_n),
 \label{eqApp:linearNewtonEqns}$$ where $\frac{\partial{{\cal H}}}{\partial{X}}$ is the $(N+1)\times(N+1)$ matrix of derivatives of ${{\cal H}}$ with respect to $X$, and then improving our estimate of the root by using ${{\delta{\mkern-1mu}X}}$.

The Newton method proceeds until convergence, defined by $$\lVert{{\cal H}}(X_n)\rVert < N_\text{abs} + N_\text{rel}\lVert{{\cal H}}(X_0)\rVert,$$ where $N_\text{abs}$ and $N_\text{rel}$ are the Newton absolute and relative convergence tolerances respectively, typically $10^{-10}$ and $10^{-8}$. We also monitored the maximum of $|{{\cal H}}(n({{\bm x}}),\mu)|$ across the domain, and this was typically no larger than ten times $N_\text{abs}$, so the equations are well satisfied at each point in space as well as in norm.

The linear equations in (\[eqApp:linearNewtonEqns\]) are solved to find ${{\delta{\mkern-1mu}X}}_n$ using <span style="font-variant:small-caps;">Matlab</span>’s biconjugate gradient stabilized (l) (`bicgstabl`) method. This allows the matrix–vector multiplications to be evaluated using a function (rather than by explicitly computing a large matrix). The method is iterative, and proceeds until $$\left\lVert\frac{\partial{{\cal H}}}{\partial{X}} \cdot {{\delta{\mkern-1mu}X}}_n + {{\cal H}}(X_n)\right\rVert <
 L_\text{rel}\lVert{{\cal H}}(X_n)\rVert,$$ where the relative tolerance $L_\text{rel}$ of the linear solver is chosen so as to balance the number of Newton steps against the number of `bicgstabl` iterations. Based on [@Kelley2003], we choose $$L_\text{rel} = 0.1\sqrt{\lVert{{\cal H}}(X_n)\rVert} 
            + \frac{N_\text{abs}}{\lVert{{\cal H}}(X_n)\rVert},$$ subject to the constraint that $L_\text{rel}$ should be no larger than $0.1$. The effect of this is that in the initial first or second of the Newton iterations, when $\lVert{{\cal H}}(X_n)\rVert$ is at its largest, the linear solver is not asked to work too hard to solve (\[eqApp:linearNewtonEqns\]), since any reasonably good approximate solution is likely to improve the estimate of the root, and an absolutely perfect solution isn’t going to do much better. In the middle stages of the Newton iterations, when $\lVert{{\cal H}}(X_n)\rVert$ is about $10^{-6}$, the tolerance $L_\text{rel}$ is about $2\times10^{-4}$, which is not good enough for quadratic convergence of Newton’s method, but is good enough to provide two or three orders of magnitude improvement to the quality of the solution at a considerably lower cost. In the final stages of the Newton iterations, $L_\text{rel}=0.1$, good enough for polishing the solution to the tolerance $N_\text{abs}$ while not attempting to solve the linear problem down to round-off error.

Also based on [@Kelley2003], we implement the Armijo rule, which ensures that each Newton step results in an improvement to the solution. The idea is that the solution of the linear equation (\[eqApp:linearNewtonEqns\]) should give the correct direction for improving the solution of ${{\cal H}}(X)=0$, but taking a full step may not actually result in an improvement, so instead we set $$X_{n+1} = X_n + 2^{-j} {{\delta{\mkern-1mu}X}}_n,
 \label{eqApp:armijo}$$ where $j=0,1,2,\dots$ is chosen to be the smallest such that $$\lVert{{\cal H}}(X_{n+1})\rVert <
 \lVert{{\cal H}}(X_{n})\rVert.
 \label{eqApp:armijocondition}$$ In most cases, the first ($j=0$) Armijo step satisfies (\[eqApp:armijocondition\]), equivalent to the normal Newton method, but when the density is close to zero in the DDFT calculations, and small changes in density lead to large changes in its logarithm, the Armijo rule is helpful.

We do not use a preconditioner in the GEM-4 calculations (so $P$ in (\[eqApp:fullsystem\]) is the identity), but in the gradient expansion calculations, a preconditioner is helpful. In Fourier space, ${{{\cal L}_{\text{grad}}}}$ can easily be inverted, so the preconditioner is ${{{\cal L}_{\text{grad}}^{-1}}}$ when the absolute value of the eigenvalue $\sigma(k)$ is greater than $1$, otherwise the preconditioner is the identity. This has the effect of reducing the number of iterations needed to solve (\[eqApp:linearNewtonEqns\]) by a factor of 10 or even 100.

A sample <span style="font-variant:small-caps;">Matlab</span> code to solve Eq. (\[eq:betadFdn3\_rewritten\]) for DDFT-3 by Newton’s method (without the continuation aspect) is given in the supplementary material.

Additional considerations
-------------------------

We start the computation of each branch close to $n=0$ and $\mu=0$ using an approximate solution derived from weakly nonlinear theory. For example, for hexagons in DDFT-3, we take $$n({{\bm x}}) = \frac{\mu}{\sigma(0)}\left(-1 +
              e^{i{{\bm k}}_1\cdot{{\bm x}}} + e^{i{{\bm k}}_2\cdot{{\bm x}}} + e^{i{{\bm k}}_3\cdot{{\bm x}}} + 
              \text{c.c.}\right),
 \label{eqApp:weaklynonlinearhexagons}$$ where the initial value of $\mu$ is small, $\sigma(0)$ comes from Table \[tabApp:GEM4parameters\], ${{\bm k}}_1=(1,0)$, ${{\bm k}}_2=(-\frac{1}{2},\frac{\sqrt{3}}{2})$, ${{\bm k}}_3=(-\frac{1}{2},-\frac{\sqrt{3}}{2})$, and $\text{c.c.}$ stands for complex conjugate.

The equations are posed on periodic domains and we use $N_x\times{N_y}$ grid points, depending on the number of wavelengths in the domain and the nature of the solution. The GEM-4 hexagonal calculations require $8\times\frac{8}{\sqrt{3}}$ wavelength domains, with resolutions starting at $80\times48$ Fourier modes close to onset. At larger amplitude, $512\times320$ Fourier modes (or even more) are needed, especially if the density maxima are sharply peaked (in DDFT-3) or if the density minima are very close to zero (in DDFT-5). In order to accommodate the changing needs for resolution along a branch, we monitor whether the solutions are well resolved and implemented automatic regridding, so as to maintain enough grid points to resolve the solution well, regardless of what features emerge as $\mu$ is varied. Typically we require that the amplitudes of the highest-wavenumber Fourier modes be no higher than $10^{-10}$ times the largest Fourier amplitude.

We also implement automatic pseudo-arclength stepsize control: $\Delta{s}$ is increased by a factor of 1.1 (up to a maximum of 0.1) if the Newton method converges quickly (in fewer than 5 iterations), or is decreased by a factor of 2 (down to a minimum of $10^{-6}$) if it converges slowly (more than 8 iterations) or fails.

Finally, we adjust the domain size continuously along each branch so as to minimise the specific grand potential $\Omega/A$. This is done by adding an extra parameter (the domain stretch factor $K$), so that the real domain size is $KL_x\times{K}L_y$ instead of an unstretched $L_x\times{L_y}$. The number of grid points is not altered. Then the real GEM-4 potential is proportional to $\psi(|{{\bm x}}|)=\exp\left(-K^4|{{\bm x}}|^4/R^4\right)$, where ${{\bm x}}$ is the unstretched coordinate on the unaltered grid. Quantities like the mean value of $n$ are the sum of the values of $n$ at each grid point divided by the number of grid points, and so are not affected by the stretch factor. The only parts of $\Omega/A$ that are affected are the convolutions (for ${{\cal L}}$ and the GEM-4 potential) and the spatial derivatives (for ${{{\cal L}_{\text{grad}}}}$). In the case of the GEM-4 potential, when considering the specific grand potential $\Omega_3/A$ arising from (\[eq:DDFTF3\]) for example, and ${{\cal L}}$ given by (\[eq:defnL\_GEM4\]), the integrals in $\Omega_3/A$ are proportional to $K^2$, with additional $K$ dependence coming from the GEM-4 potential itself. Therefore, $$\frac{{{\rm d}}(\Omega_3/A)}{{{\rm d}}{K}} \propto
    \int n({{\bm x}}) \left(2 K \psi \otimes n + K^2 \frac{\partial\psi}{\partial K} \otimes n\right)\,{{{\rm d}}{{\bm x}}},$$ where $\otimes$ represents the convolution integral evaluated on the unstretched grid, and the ${{\bm x}}$ integral is also on the unstretched grid. In the case of ${{{\cal L}_{\text{grad}}}}$, Laplacians on the real grid are a factor of $K^{-2}$ times Laplacians on the unstretched grid, so ${{\rm d}}(\Omega/A)/{{\rm d}}{K}$ is evaluated accordingly. In both cases, an extra equation (${{\rm d}}(\Omega/A)/{{\rm d}}{K}=0$) is added to ${{\cal H}}$ in (\[eqApp:fullsystem\]), and this is solved alongside all the other equations. The Jacobian also needs to be evaluated. In practice this made little difference in the cases considered here, and the domain stretch factor largely stayed between $0.98$ and $1.02$.

[68]{}ifxundefined \[1\][ ifx[\#1]{} ]{}ifnum \[1\][ \#1firstoftwo secondoftwo ]{}ifx \[1\][ \#1firstoftwo secondoftwo ]{}““\#1””@noop \[0\][secondoftwo]{}sanitize@url \[0\][‘\
12‘\$12 ‘&12‘\#12‘12‘\_12‘%12]{}@startlink\[1\]@endlink\[0\]@bib@innerbibempty @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****,  ()](\doibase
  {10.1103/PhysRevE.86.031603}) @noop [****,  ()]{} [****,  ()](\doibase
  10.1080/00018732.2012.737555) @noop [****,  ()]{} @noop [****, ()]{} [****,  ()](\doibase {10.1103/PhysRevE.87.013313}) [****,  ()](\doibase 10.1103/PhysRevE.81.061601) @noop [****, ()]{} [****,  ()](\doibase 10.1103/PhysRevLett.112.255501) [****,  ()](\doibase
  10.1103/PhysRevLett.117.075501) @noop [****,  ()]{} [****, ()](\doibase 10.1107/S2052252518001161) @noop [****,  ()]{} [****,  ()](\doibase
  10.1103/PhysRevE.87.042915) [****,  ()](\doibase 10.1103/PhysRevE.49.2225) [****,  ()](\doibase
  10.1146/annurev-conmatphys-031214-014514) @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****,  ()](\doibase 10.1080/00018737900101365) in @noop [**]{},  (, , ) Chap. , pp. @noop [**]{} (, , ) @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****, ()](\doibase 10.1063/1.1778374) @noop [****,  ()]{} @noop [****,  ()]{} @noop [****, ()]{} @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****,  ()](\doibase 10.1103/PhysRevE.76.031501) [****,  ()](\doibase 10.1103/PhysRevLett.96.045701) @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****,  ()](\doibase {10.1103/PhysRevB.97.144112}) @noop [****, ()]{} [****,  ()](\doibase 10.1103/PhysRevLett.97.105701) [****,  ()](\doibase
  10.1103/PhysRevB.19.2775) [****,  ()](\doibase {10.1103/PhysRevE.85.061408}) [****,  ()](\doibase 10.1103/PhysRevE.95.022105) [**** ()](\doibase 10.1098/rsta.2017.0211) [****,  ()](\doibase {10.1103/PhysRevB.97.180102}) [****,  ()](\doibase
  {10.1088/0953-8984/22/36/364102}) [****,  ()](\doibase {10.1103/PhysRevE.82.061602}) in @noop [**]{},  (, , ) Chap. , pp.  in @noop [**]{},  (, , ) Chap. , pp.  @noop [****,  ()]{} [****,  ()](\doibase 10.1103/PhysRevLett.109.228301) @noop [****, ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****,  ()](\doibase {10.1021/acs.nanolett.7b01742}) @noop [ ()]{} @noop [****,  ()]{} @noop [****,  ()]{} [****, ()](\doibase 10.1142/S0218127491000397) @noop [**]{} (, , )
