The Generalized Stochastic Smoluchowski Equation

We study the dynamics of a system of overdamped Brownian particles governed by the generalized stochastic Smoluchowski equation associated with a generalized form of entropy and involving a long-range potential of interaction [P.H. Chavanis, Entropy 17, 3205 (2015)]. We first neglect fluctuations and provide a macroscopic description of the system based on the deterministic mean field Smoluchowski equation. We then take fluctuations into account and provide a mesoscopic description of the system based on the stochastic mean field Smoluchowski equation. We establish the main properties of this equation and derive the Kramers escape rate formula, giving the lifetime of a metastable state, from the theory of instantons. We relate the properties of the generalized stochastic Smoluchowski equation to a principle of maximum dissipation of free energy. We also discuss the connection with the dynamical density functional theory of simple liquids.


Introduction
The theory of Brownian motion started with the pioneering work of Einstein [1,2] (as noted in [3], the premices of the theory of Brownian motion may be traced back to the beautiful paper of Lord Rayleigh [4] on the dynamics of massive particles bombared by numerous small projectiles). He showed that the probabilistic motion of a free Brownian particle in the overdamped limit can be described by the ordinary diffusion equation where ρ(r, t) denotes the probability density of finding the particle in r at time t. He also established the following relation between the diffusion coefficient, the mobility χ/m = 1/ξm of the Brownian particle (m is the mass of the particle and ξ is the friction coefficient) and the temperature T. The same relation was obtained independently by Sutherland [5]. It was also re-derived by Langevin [6] in a different manner. The Einstein relation from Equation (2) is a simple example of the fluctuation-dissipation theorem in statistical mechanics. Smoluchowski [7] considered an overdamped Brownian particle in a fixed external potential Φ ext (r) and showed that the probability density ρ(r, t) satisfies the drift-diffusion equation The Smoluchowski Equation (3) is a particular example of Fokker-Planck equations [8][9][10][11]. It describes the diffusive motion of a Brownian particle (or an ensemble of non-interacting Brownian particles) in an external potential. Since the particles are coupled to a thermal bath fixing the temperature, the relevant statistical ensemble is the canonical ensemble. If we identify the equilibrium state of the Smoluchowski equation with the Boltzmann distribution ρ eq (r) = A e −βmΦ ext (r) , where β = 1/k B T is the inverse temperature, we immediately obtain the Einstein relation, Equation (2). The Smoluchowski equation satisfies an H-theorem for the Boltzmann free energy and relaxes towards the Boltzmann distribution from Equation (4). The Boltzmann distribution minimizes the Boltzmann free energy under the normalization condition. We now consider an ensemble of Brownian particles interacting via a binary potential u(|r − r |). For simplicity, we consider a potential with long-range interactions. For such potentials the mean field approximation becomes exact in a proper thermodynamic limit N → +∞ (see reviews in [12,13]). This is the situation considered in [14]. Starting from the N-body Smoluchowski equation, writing the first equation of the canonical BBGKY hierarchy and implementing the mean field approximation, which amounts to neglecting correlations, we find that the evolution of the average density of particles ρ(r, t) is governed by the nonlinear mean field Smoluchowski equation [14]: where the potential Φ(r, t) is given by Contrary to systems described by the ordinary Smoluchowski Equation (3) where the Brownian particles move in a fixed external potential Φ ext (r), in the present situation the Brownian particles move in a mean field potential Φ(r, t) that they create themselves. The equilibrium states of the mean field Smoluchowski equation are given by the mean field Boltzmann distribution [14]: ρ eq (r) = A e −βmΦ eq (r) , where Φ eq (r) is related to ρ eq (r) through Equation (6). This leads to the self-consistency relation ρ eq (r) = A e −βm ρ eq (r )u(|r−r |) dr .
This integral equation may have several solutions. Therefore, different equilibrium states (stable, unstable and metastable) are possible. The mean field Smoluchowski Equation (5) satisfies an H-theorem for the mean field Boltzmann free energy and relaxes towards a stable equilibrium state, given by the mean field Boltzmann distribution from Equation (7), which is a (local) minimum of the Boltzmann free energy at fixed mass. When several stable solutions exist, their selection depends on a notion of basin of attraction [14]. The mean field Smoluchowski Equation (5) appeared in different domains of physics such as electrolytes [15][16][17][18], systems with long-range interactions [14,[19][20][21][22][23], bacterial populations undergoing chemotaxis [24], kinetic theory of adsorbates [25], superconductors [26,27], self-gravitating Brownian particles [28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43], directed self-assembly of nanoparticles [44], 2D Brownian vortices [45,46], colloids at a fluid interface [47], nucleation [48], the Brownian mean field (BMF) model [49], etc. These models are reviewed in [50]. The Smoluchowski Equation (5) also describes the dynamics of simple liquids, for which correlations must be taken into account, provided that the potential of interaction u(|r − r |) is replaced by an effective potential of interaction u eff (|r − r |) = − k B T m 2 c(|r − r |) related to the direct correlation function c(|r − r |) [51][52][53][54][55][56][57][58][59][60][61][62][63] (for ultrasoft particles the mean field approximation applies and u eff (|r − r |) = u(|r − r |) [64]). In this context, the self-consistency relation from Equation (8) was first established by Kirkwood and Monroe [65,66]. The Smoluchowski equation is valid in the strong friction limit ξ → +∞. More general equations taking inertial effects into account are considered in [14,23,63,67,68]. The mean field Smoluchowski Equation (5) is a deterministic equation that ignores fluctuations. If we now take fluctuations into account and use the theory of fluctuating hydrodynamics developed by Landau and Lifshitz [69], we obtain the stochastic mean field Smoluchowski equation [14]: Φ(r, t) = ρ(r , t)u(|r − r |)dr , where R(r, t) is a Gaussian white noise satisfying R(r, t) = 0 and R i (r, t)R j (r , t ) = δ ij δ(r − r )δ(t − t ). The stochastic mean field Smoluchowski Equation (9), which is a partial differential stochastic equation, may be interpreted as a Langevin equation for the density field ρ(r, t). As we have previously indicated, the deterministic mean field Smoluchowski Equation (5) may have several stable equilibrium states. In the absence of fluctuations, the system relaxes towards one of these states and stays there permanently. In the presence of fluctuations, the system undergoes random transitions from one stable state to the other. Such switches can be described in terms of the stochastic mean field Smoluchowski Equation (9) including a random forcing due to fluctuations [14]. The stochastic term allows the system to jump from one equilibrium state to another. These properties have been illustrated numerically by Chavanis and Delfini [70] for a model of self-gravitating Brownian particles and bacterial populations presenting two symmetric metastable states. In that case, the system experiences random transitions from one state to the other. The lifetime of the metastable states is related to the Kramers escape rate formula which can be derived from the theory of instantons [70].
To the best of our knowledge, the stochastic Smoluchowski Equation (9) was first written down in van Kampen's book [71] (p. 349) referring to the papers of van Vliet [72,73] in 1971; this is the oldest reference to that equation that we have found. It then appeared in different domains of physics such as the theory of simple liquids [63,[74][75][76][77][78], the kinetic theory of adsorbates [25], systems with long-range interactions [14], 2D Brownian vortices [45], bacterial populations undergoing chemotaxis [79], nucleation [48], self-gravitating Brownian particles [70], the BMF model [49], etc. It can also be exported to other systems (electrolytes, superconductors, directed self-assembly of nanoparticles, colloids at a fluid interface, etc.) as discussed in [50]. More general stochastic partial differential equations taking inertial effects into account are considered in [14,63,79]. An important topic in statistical mechanics and kinetic theory that emerged over the last decades concerns the notion of generalized thermodynamics pioneered by Tsallis [80]. It has been observed in many occasions that the Boltzmann entropy does not provide a correct description of the system under consideration and that other forms of entropies may be more relevant. In the context of Brownian motion, the Boltzmann distribution emerges naturally from the Smoluchowski equation when the particles have a constant diffusion coefficient and a constant mobility. This corresponds to an "ideal" situation where the particles do not experience microscopic constraints. However, one may encounter "complex" situations in which the particles are hampered in their motion by some small-scale constraints (due to short-range interactions) so that the diffusion coefficient and the mobility depend on the local density. In that case, the motion of the particles is biased, resulting in anomalous diffusion or anomalous mobility. The corresponding generalized Smoluchowski equation satisfies a canonical H-theorem for a generalized free energy and relaxes towards an equilibrium state, different from the Boltzmann distribution, which minimizes the generalized free energy at fixed mass. Initially, generalized thermodynamics and generalized Fokker-Planck equations were introduced in relation to the Fermi-Dirac [81,82], Bose-Einstein [82][83][84] and Tsallis [85][86][87][88][89][90] entropies. This gave the impression that these entropies were special and that a generalized thermodynamical formalism could be developed only for these functionals. However, it was shown later by [50,[91][92][93][94][95][96][97][98][99][100][101][102][103][104][105][106][107] that generalized thermodynamics and nonlinear Fokker-Planck equations could be extended to arbitrary forms of entropic functionals (see reviews in [50,106,108,109]). In the situations described above, generalized entropies arise because the system experiences small-scale constraints so that some of the microstates are forbidden [50]. (As far as we know, the first "generalized entropy" was introduced in 1908 by Ornstein [110] in relation to the van der Waals' equation of state (see van Kampen [111]). This entropy can be obtained from a combinatorial analysis taking into account excluded volume effects. On the other hand, as discussed in [112], a functional equivalent to the Tsallis entropy was introduced long ago in astrophysics by Ipser [113] in a dynamical (Vlasov) context in relation to Eddington's stellar polytropes [114]. Ipser [113] also introduced functionals of the form S = − C( f ) drdv (where C( f ) is an arbitrary convex function of the distribution function f (r, v)) that we now call "generalized entropies" [106]. Similar functionals (for the coarse-grained distribution function f (r, v)) were introduced by Antonov [115] who called them "quasi-entropies" (see reference [116]) and, independently, by Tremaine et al. [117] who called them "H-functions".) If we combine generalized thermodynamics [109], long-range interactions [12,13] and fluctuating hydrodynamics [69], we obtain a generalized stochastic mean field Smoluchowski equation [50] given by Equation (83) having a source of nonlinearity arising from the self-consistent mean field potential (long-range interactions), a source of nonlinearity arising from the fact that the diffusion coefficient and the mobility of the particles depend on the density itself (generalized thermodynamics) and a stochastic (noise) term taking fluctuations into account (fluctuating hydrodynamics). In this paper, we present a brief overview of this important equation stressing its main properties.
The paper is organized as follows. In Section 2, we consider a system of overdamped Brownian particles with long-range interactions and show how a notion of generalized thermodynamics emerges in the case where these particles experience small-scale constraints. In Section 3, we neglect fluctuations and consider the generalized deterministic mean field Smoluchowski equation describing the macroscopic dynamics of these systems. In Section 4, we take fluctuations into account and consider the generalized stochastic mean field Smoluchowski equation describing the mesoscopic dynamics of these systems. We derive the Kramers escape rate formula, giving the lifetime of a metastable state, from the theory of instantons and make the connection with the maximum free energy dissipation principle.

Generalized Free Energy
We consider a system of N overdamped Brownian particles in interaction in contact with a heat bath fixing the temperature T. Such a dissipative system is described in statistical mechanics by the canonical ensemble. We assume that the binary potential of interaction u(|r − r |) is long-ranged so that a mean field approximation can be implemented when N 1. We also assume that the particles experience microscopic constraints that affect their dynamics. Under these conditions, the relevant thermodynamical potential is the generalized free energy (see reference [50] for a justification of the generalized free energy functional F[ρ] from a microscopic approach. Note that we have ignored additional constant terms depending on the temperature in the expression of F, E and S; see [50] for more details) where is the mean field energy of interaction and is a generalized entropy which takes into account the microscopic constraints acting on the particles (short-range interactions). Because of these microscopic constraints the entropy S may differ from the ideal Boltzmann entropy corresponding to C(ρ) = ρ ln(ρ/ρ * ). This leads to a notion of generalized thermodynamics. For reasons that will become clear below we assume that C > 0 so that C(ρ) is a convex function. The generalized free energy can be written as or, more explicitly, as When the particles are submitted to an external potential Φ ext (r) we must include the contribution of the external energy in the expression of the free energy.

Minimum Free Energy Principle
The canonical probability density of the distribution ρ(r) at statistical equilibrium is where is the partition function determined by the normalization condition P[ρ] Dρ = 1. The free energy is F(T) = −k B T ln Z(T). In the limit N → +∞, the density ρ(r) of the system is strongly peaked around the "most probable state" which is the global minimum of the free energy F[ρ] at fixed mass M = ρ dr. Therefore, the equilibrium state of the system in the canonical ensemble is the solution of the minimization problem: This is the canonical version of the maximum entropy principle (Boltzmann principle) that holds in the microcanonical ensemble for isolated systems evolving at fixed mass and energy. For N 1, the partition function and the free energy can be approximated by where ρ * (r) is the solution of Equation (19). This formula can be interpreted as a large deviation result. The extrema of the generalized free energy at fixed mass are determined by the variational principle where µ is a Lagrange multiplier taking into account the mass constraint. It can be identified with the chemical potential in thermodynamics. The variational principle from Equation (21) leads to the Gibbs relation An extremum of free energy at fixed mass ρ(r) is a (local) minimum of free energy at fixed mass if, and only if, for all perturbations δρ that conserve mass. This is the condition of thermodynamical stability in the canonical ensemble.
The statistical equilibrium state of the system is dominated by the global minimum of free energy at fixed mass. It corresponds to a fully stable state. Local minima of free energy at fixed mass are metastable states. We will see that metastable states may be very relevant for systems with long-range interactions because they have very long lifetimes scaling as e N , where N is the number of particles in the system [118]. By contrast, maxima or saddle points of free energy at fixed mass are unstable equilibrium states and must be discarded.

Thermodynamical Equilibrium States
For a generalized free energy of the form of Equation (14), the thermodynamical equilibrium states determined by Equation (22) are given by or, equivalently, by where is a constant. Since C is a convex function, this equation can be reversed to give where is a monotonically decreasing function. Therefore, at statistical equilibrium, the density is a monotonically decreasing function ρ = ρ(Φ) of the potential (we assume T > 0). (We note that Equation (27) determines the equilibrium density-potential relation ρ(Φ) = F(βmΦ − α) in terms of the generalized entropy C(ρ) through Equation (28). Inversely, the generalized entropy is determined by the equilibrium density-potential relation through the relation where F −1 is the reciprocal of F.) We have the identity Substituting Equation (6) into Equation (25), we find that the equilibrium density ρ(r) is determined by an integral equation of the form The Lagrange multiplier α is obtained from the condition ρ dr = M. Alternatively, substituting Equation (27) into Equation (6), we find that the equilibrium potential Φ(r) is determined by an equation of the form which is the standard Hammerstein form of nonlinear integral equations. Bibliographic note: The integral Equation (31) was introduced in full generality in [97]. However, a particular form of this equation associated with the van der Waals equation of state appears in a paper of van Kampen [111].

Thermodynamical Stability
For a generalized free energy of the form of Equation (14), the condition of thermodynamical stability from Equation (23) takes the form for all perturbations δρ that conserve mass. Using Equation (30), the condition of thermodynamical stability can also be written as for all perturbations δρ that conserve mass. Remark: In the presence of a fixed external potential Φ ext (r), the foregoing equations remain valid provided that Φ is replaced by Φ + Φ ext . In the absence of self-interaction (Φ = 0), there is a unique equilibrium state given by ρ(r) = F(βmΦ ext (r) − α). Since the second variations of the free energy δ 2 F = −Tδ 2 S = (k B T/2m) C (ρ)(δρ) 2 are always positive when C is convex, this equilibrium state is the global minimum of F[ρ] at fixed mass. Therefore, it is always thermodynamically stable. In the presence of self-interaction, the term 1 2 δρδΦ dr in Equation (33) may be negative so that the stability of the equilibrium state is not granted. It may be either stable or unstable. This demands a specific study depending on the potential of interaction.

Generalized Deterministic Mean Field Smoluchowski Equation
We consider the mean field Smoluchowski Equation (5) but we allow the diffusion coefficient D and the mobility χ to depend on the local density ρ(r, t). This leads to the generalized mean field Smoluchowski equation where the potential Φ(r, t) is given by Equation (6). The generalized mean field Smoluchowski equation can be written more explicitly as Here, h(ρ) and g(ρ) are positive functions of the density. These notations are chosen so that the usual Smoluchowski equation with a constant diffusion D and a constant mobility χ is recovered for h(ρ) = 1 and g(ρ) = ρ. The functions h(ρ) and g(ρ) take into account microscopic constraints (excluded volume effects, steric hindrance, lattice, crowded environments, etc.) that act on the particles at small scales and modify their dynamics. As we shall see, these functions are related to the generalized entropy introduced in Section 2 (or inversely). When the particles are submitted to an external potential Φ ext (r) we must add its contribution in Equation (35) by making the substitution Φ(r, t) → Φ(r, t) + Φ ext (r). The generalized mean field Smoluchowski Equation (35) can be written under the conservative form where is the diffusion current. The structure of Equation (37) expresses the local conservation of mass. It guarantees the conservation of the total mass M = ρ dr provided that the normal component of the current at the boundary vanishes. Bibliographic note: The generalized deterministic mean field Smoluchowski Equation (35) was introduced in full generality in [97,102] (see reviews in [50,106]). However, particular forms of this equation (associated with the Fermi-Dirac entropy in configuration space) appeared earlier in the context of 2D turbulence [119][120][121], lattice gases with long-range interactions [21], kinetic theory of adsorbates [25] and bacterial populations undergoing chemotaxis [122]. The generalized deterministic mean field Smoluchowski Equation (35) can be applied to various systems (electrolytes, chemotaxis, superconductors, self-gravitating Brownian particles, 2D vortices, directed self-assembly of nanoparticles, colloids at a fluid interface, nucleation, BMF model, etc.) as discussed in [50,106,[123][124][125]. For example, the generalized deterministic mean field Smoluchowski Equation (35) has been studied in the context of self-gravitating Brownian particles and bacterial populations [34,126,127] (it has been studied specifically with the Tsallis entropy in [128][129][130][131] and with the Fermi-Dirac entropy in [102,123,132]), 2D vortices [133][134][135] and colloids at a fluid interface [47]. More general equations taking inertial effects into account are considered in [35,63,[97][98][99][100][101]106,136,137].

Generalized Langevin Equation
The generalized mean field Smoluchowski Equation (35) can be rewritten as where D(ρ) is a density-dependent diffusion coefficient and χ(ρ) is a density-dependent mobility defined by The generalized mean field Smoluchowski Equation (39) can be obtained from the generalized mean field Langevin equation where R(t) is a Gaussian white noise satisfying R(t) = 0 and R i (t)R j (t ) = δ ij δ(t − t ). We note that the noise is multiplicative since it depends on the position r through the function D(ρ(r, t)).
To obtain the generalized mean field Smoluchowski Equation (39) from the generalized mean field Langevin Equation (41), we must use the Ito prescription for the noise (if we use the Stratonovich prescription we must account for a spurious drift term).

Generalized Einstein Relation
An equilibrium state of the generalized mean field Smoluchowski Equation (35) satisfies the condition J = 0 (a stationary solution ∂ t ρ = 0 of the generalized mean field Smoluchowski equation satisfies the condition ∇ · J = 0. An equilibrium state satisfies the stronger condition J = 0. In this paper, we consider boundary conditions such that ∇ · J = 0 implies J = 0. As a result, a stationary solution is an equilibrium solution), leading to We require that an equilibrium state of the generalized mean field Smoluchowski equation is a thermodynamical equilibrium state as defined in Section 2. Taking the gradient of Equation (25) we get Comparing Equations (42) and (43), we obtain the generalized Einstein relation We can always define the parameters D and χ in the generalized mean field Smoluchowski Equation (35) so that the following relations and are satisfied individually. In this manner, the ordinary Einstein relation from Equation (2) is preserved in the generalized thermodynamical framework. On the other hand, Equation (46) determines the generalized entropy from Equation (13) in terms of the functions h(ρ) and g(ρ) appearing in the generalized Smoluchowski Equation (35). (Inversely, the generalized entropy C(ρ) does not determine h(ρ) and g(ρ) individually, but only their ratio h(ρ)/g(ρ). This means that we can construct an infinity of generalized Smoluchowski equations associated with the same entropy. For example, the two equations of Section 3.4 are different but they are associated with the same entropy.) For ideal systems for which h(ρ) = 1 and g(ρ) = ρ, we find that C (ρ) = 1/ρ, returning the Boltzmann entropy C(ρ) = ρ ln(ρ/ρ * ). Examples of generalized entropies are given in Appendix A and in [50,106,108,109].

Particular Forms of the Generalized Smoluchowski Equation
If we take h(ρ) = 1 and g(ρ) = 1/C (ρ), the generalized Smoluchowski Equation (35) can be expressed in terms of the generalized entropy under the form In that case, we have a constant diffusion D(ρ) = D and a density-dependent mobility χ(ρ) = χ/(ρC (ρ)).
If we take g(ρ) = ρ and h(ρ) = ρC (ρ), the generalized Smoluchowski Equation (35) can be expressed in terms of the generalized entropy under the form In that case, we have a constant mobility χ(ρ) = χ and a density-dependent diffusion D(ρ) = Dρ[C(ρ)/ρ] . Note that the condition D(ρ) ≥ 0 requires that [C(ρ)/ρ] ≥ 0 (this condition, which corresponds to a positive pressure -see Appendix A -is not strictly compulsory). This gives a constraint on the possible forms of C(ρ).

Gradient Flow
The connection between the generalized mean field Smoluchowski Equation (35) and the generalized free energy from Equation (14) is made clear by writing the Smoluchowski equation as a gradient flow. Taking the functional derivative of the generalized free energy from Equation (14) with respect to the density, we get Its gradient is On the other hand, the Smoluchowski current from Equation (38) can be written as Using the generalized Einstein relation from Equation (44), we get Comparing Equations (50) and (52), we observe that This equation shows that the Smoluchowski current is proportional to the gradient of the functional derivative of the free energy (see Section 3.8). This is called a gradient flow. Substituting Equation (53) into Equation (37), we find that the generalized mean field Smoluchowski equation can be written as This gradient flow formulation is very general. In particular, the properties derived below are valid for an arbitrary form of free energy functional F[ρ] which is not necessarily of the form of Equation (14).

Equilibrium States
An equilibrium state of the gradient flow Equation (54) satisfies the condition J = 0, leading to where µ is a constant of integration. Comparing Equation (55) with Equation (22), we see that an equilibrium state of the gradient flow equation is an extremum of free energy at fixed mass (thermodynamical equilibrium state). When the free energy is given by Equation (14), Equation (55) reduces to Equation (24) and we can directly check that it is an equilibrium solution of Equation (35) by using the generalized Einstein relation from Equation (44).

H-Theorem
The gradient flow Equation (54) implies that the free energy decreases monotonically with time provided that χg(ρ) is positive. Indeed, the rate of dissipation of free energy is given bẏ To get the last equality, we have integrated by parts and assumed that the normal component of the current vanishes on the boundary. Substituting Equation (53) into Equation (56) we obtaiṅ ThereforeḞ ≤ 0 andḞ = 0 if, and only if, J = 0. This is the canonical ensemble version of the H-theorem. We have therefore established thaṫ A functional that satisfies these properties is called a Lyapunov functional. Using Lyapunov's direct method, one can show that an equilibrium state ρ(r) of Equation (54) is (linearly) dynamically stable if, and only if, it is a (local) minimum of F at fixed mass. Maxima and saddle points of F at fixed mass are linearly unstable. Furthermore, if F is bounded from below, the H-theorem implies that the system converges towards a stable equilibrium state for t → +∞. If the free energy possesses several local minima, the choice of the equilibrium state depends on a complicated notion of basin of attraction (for self-gravitating Brownian particles [28,29] the free energy is not bounded from below. In that case, the system can either relax towards a local minimum of free energy F at fixed mass -when it exists -or collapse to a Dirac peak [30], leading to a divergence of the free energy F(t) → −∞). According to the preceding results, we conclude that dynamical stability with respect to the generalized mean field Smoluchowski equation and generalized thermodynamical stability in the canonical ensemble coincide. Remark: As discussed in [106,135] the generalized mean field Smoluchowski Equation (35) can provide a numerical algorithm to construct dynamically stable steady states of the mean field barotropic Euler equation, mean field Kramers equation, Vlasov equation and 2D Euler-Poisson equations. This numerical algorithm may be useful because it is not always easy to compute steady states of these equations and make sure that they are dynamically stable.

Onsager's Linear Thermodynamics
If we define a time-dependent chemical potential by the relation we find that µ(r, t) is uniform at equilibrium. Indeed, the Gibbs relation from Equation (22) can be written as On the other hand, the current from Equation (53) associated with the gradient flow Equation (54) can be written as It is proportional to the gradient of the chemical potential. The coefficient of proportionality is a density-dependent mobility. Since the chemical potential is uniform at equilibrium, the current vanishes: J = 0. A linear relation of the form J = −λ∇µ between the current and the chemical potential is the simplest relation that we can imagine in order to have J = 0 at equilibrium. Such a linear relationship is expected to be always valid close to equilibrium where the gradient of µ is small. This relation is similar to Ohm's law for electrical condition, Fourier's law for heat conduction and Fick's law for diffusion. These relations correspond to Onsager's linear thermodynamics [138,139]. This is a phenomenological approach saying that, close to equilibrium, the currents are proportional to the "thermodynamic forces" that cause them. The thermodynamic forces (or "restoring forces") are equal to the derivative of the "thermodynamic potential" so that they vanish at equilibrium where the thermodynamic potential is extremum. In the present case, the thermodynamic potential is the free energy F and the thermodynamic force is ∇(δF/δρ). This formulation implies the H-theorem. Indeed, the rate of free energy is (see Equation (56) If we relate the current J linearly to the thermodynamic force ∇(δF/δρ) so that we get the H-theoremḞ ≤ 0 provided that χ > 0. Note that Onsager's linear thermodynamics does not give the expression of χ(r, t). In the present situation, Equation (53)

Maximum Free Energy Dissipation Principle
The current from Equation (53) can be obtained from a variational principle called the maximum free energy dissipation principle. At equilibrium, the density ρ(r) minimizes the free energy F[ρ] at fixed mass M (see Section 2). This minimum free energy principle is the canonical ensemble version of the maximum entropy principle introduced by Boltzmann. It characterizes the most probable state of a system at statistical equilibrium. In a similar manner, out-of-equilibrium, the current J maximizes the rate of free energy dissipation −Ḟ[J] − E d [J]. This maximum free energy dissipation principle is the canonical ensemble version of the maximum entropy production principle (for isolated systems described by the microcanonical ensemble, the increase of entropy during the evolution must be the highest while conserving the energy:Ṡ maximum at fixed energy. For dissipative systems described by the canonical ensemble, the decrease of free energy during the evolution must be the highest: -Ḟ maximum). It describes the most probable course of an irreversible process. It can be viewed as a variational formulation of Onsager's linear thermodynamics (see Section 3.8).
The rate of dissipation of free energy is given by (see Equation (56)) We introduce the dissipation function Let us determine the current J which maximizes the rate of free energy dissipation −Ḟ with the convention that the density ρ(r, t) is prescribed. Therefore, we consider the maximization problem The extrema of free energy dissipation are determined by the variational principle There is a single extremum given by corresponding to the Smoluchowski current from Equation (53). Since we find that the Smoluchowski current from Equation (68) maximizes the dissipation of free energy. Using Equation (68) we obtain the relationḞ which is equivalent to Equation (57). Therefore, the dissipation function equals half the rate of dissipation of free energy. We also introduce the dual dissipation function We is a functional of the current J. Using Equation (68) we obtain the relatioṅ Bibliographic note: the maximum entropy production principle was introduced by Onsager [138,139] to derive his famous reciprocal relations in irreversible processes. It finds its origin in the work of Lord Rayleigh [140,141]. It was used in the context of 2D turbulence and stellar dynamics to derive relaxation equations associated with the theory of violent relaxation [119,120,[133][134][135]. It was also used in the context of generalized thermodynamics to derive generalized Fokker-Planck equations [97,102,106].

Equivalence between Dynamical and Thermodynamical Stability
In this section, we derive a simple relation that establishes a direct equivalence between dynamical and thermodynamical stability for the generalized Smoluchowski equation. Let us consider a small perturbation δρ around an equilibrium state of the generalized Smoluchowski Equation (54). We write the time dependence of the perturbation as δρ ∼ e λt . The perturbation is damped exponentially when λ < 0 (stable equilibrium) or increases exponentially when λ > 0 (unstable equilibrium). The linearized Smoluchowski equation can be written as with The second variations of free energy are given by Substituting Equation (73) into Equation (75) we get Integrating by parts, we find that where we have used Equation (74) to obtain the second equality. On the other hand, the second variations of the rate of free energy dissipation from Equation (57) around the equilibrium are and they are clearly negative. Combining Equations (77) and (78), we finally obtain the following relation (this relation was first obtained in Appendix B of [106] for a free energy of the form of Equation (15). The present calculation extends its domain of validity to an arbitrary functional F[ρ].) This relation shows that a steady state of the generalized Smoluchowski Equation (54) is linearly dynamically stable (λ < 0) if, and only if, it is a (local) minimum of free energy at fixed mass (δ 2 F > 0). Therefore, dynamical and generalized thermodynamical stability coincide. Remark: If we repeat the above calculation by using instead of Equation (73), we obtain instead of Equation (79). On the other hand, if we take the derivative of δ 2 F and use ∂ t δρ = λδρ, we get From Equations (81) and (82) we recover Equation (79).

Generalized Stochastic Mean Field Smoluchowski Equation
The generalized mean field Smoluchowski Equation (54) is a deterministic equation that ignores fluctuations. It describes the macroscopic evolution of the system through the ensemble average density ρ(r, t). In practice, there are fluctuations around the average dynamics. They arise from the thermal noise and from finite N effects. In reference [50] (see also [14]), we have derived a generalized stochastic Smoluchowski equation from the theory of fluctuations developed by Landau and Lifshitz (see [69], chapter XVII). It describes the mesoscopic evolution of the system through the coarse-grained density ρ(r, t) (in the following, we drop the bar on ρ to simplify the notations). It can be written as where R(r, t) is a Gaussian white noise satisfying R(r, t) = 0 and R i (r, t)R j (r , t ) = δ ij δ(r − r )δ(t − t ). We note that, in general, the noise term is multiplicative since it depends on the density through the function g(ρ). This is the case, in particular, for ideal systems for which g(ρ) = ρ. On the other hand, the function h(ρ) does not appear in the noise term. (The noise term is independent of ρ when g(ρ) = 1. For h(ρ) = ρ, corresponding to a normal diffusion, the condition g(ρ) = 1 leads to C(ρ) = ρ 2 /2, i.e., S = − 1 2 ρ 2 dr. This is a Tsallis entropy of index γ = 2.) We also note that Equation (83) relies on a mean field approximation, valid for N 1, since it involves the mean field free energy from Equation (15). However, the noise keeps track of finite N effects since it scales as 1/ √ N after a proper normalization (see Appendix A of [70] and Appendix B of [63]). The generalized stochastic Smoluchowski Equation (83) can be interpreted as a stochastic Langevin equation for the density ρ(r, t). The corresponding Fokker-Planck equation for the probability density P[ρ, t] of observing the density ρ(r, t) at time t is This functional Fokker-Planck equation relaxes towards the canonical distribution from Equation (17) provided that we use the Ito prescription for the noise (see Appendix B). Actually, the form of the noise can be determined precisely in order to recover the canonical distribution at equilibrium. (As discussed in Section 2, we are considering a notion of "generalized thermodynamics" in the sense that the entropy S[ρ] may be different from the ideal Boltzmann entropy S[ρ] = ρ ln(ρ/ρ * ). However, we still assume that the equilibrium distribution P eq [ρ] is given by an exponential (Boltzmann) function of the free energy as in Equation (17 [77] (see Appendix C). The Dean Equation (A96) is an exact equation satisfied by the discrete density ρ d (r, t) = ∑ i mδ(r − r i (t)) which is a sum of Dirac distributions. It involves the exact free energy  [63] for a more complete discussion). This mesoscopic equation can be obtained from the Landau-Lifshitz theory of fluctuating hydrodynamics as shown in [14,50]. On the other hand, for "complex" systems (described by a generalized entropy) for which g(ρ) = ρ, it does not seem feasible to derive a stochastic equation of the form of Equation (83) directly from Dean's microscopic approach while this remains possible from the theory of fluctuating hydrodynamics [50]. This clearly shows that the generalized stochastic mean field Smoluchowski Equation (83) is fundamentally different from the Dean equation.
Bibliographic note: The generalized stochastic mean field Smoluchowski Equation (83) was introduced in full generality in [50]. However, a particular form of this equation (associated with the Fermi-Dirac entropy in configuration space) appeared earlier in the context of the kinetic theory of adsorbates [25]. The generalized stochastic mean field Smoluchowski Equation (83) can be applied to other systems (electrolytes, chemotaxis, superconductors, self-gravitating Brownian particles, 2D vortices, directed self-assembly of nanoparticles, colloids at a fluid interface, nucleation, BMF model, etc.) as discussed in [50]. More general equations taking inertial effects into account are considered in [63].

Derivation of the Kramers Formula from the Instanton Theory
In this section, we calculate the escape rate Γ of a system of Brownian particles in interaction across a barrier of free energy by using the instanton theory. This provides a justification of the Kramers formula giving the typical lifetime of a metastable state. We assume that the free energy functional F[ρ] has a local minimum ρ M (r) (metastable state) and a global minimum ρ S (r) (stable state) separated by a maximum or a saddle point ρ U (r) (unstable state). We have seen that Equation (83) can be interpreted as a Langevin equation. In the absence of noise, the evolution is deterministic and the density relaxes to one of the minima of the potential as implied by the H-theorem (see Section 3.7). In the presence of noise, the density switches back and forth between the two minima (attractors). When the noise is weak (the weak noise limit corresponds to T → 0 and/or N → +∞ [70]), the transition between the two minima is a rare event. One important problem is to determine the rate Γ for the density profile, initially located in the metastable state ρ M (r), to cross the barrier of free energy and reach the stable state ρ S (r).

The probability of the path ρ(r, t) is
where S is a generalized Onsager-Machlup functional [142]. In the weak noise limit, using Equation (83), it is given by The functional S may be called an action by analogy with the path-integrals formulation of quantum mechanics (the temperature T plays the role of the Planck constanth in quantum mechanics) [143]. It can be written as S = L dt where L is the corresponding Lagrangian. The probability density to observe the system with the profile ρ 2 (r) at time t 2 given that it had the profile ρ 1 (r) at time t 1 is where the integral runs over all paths satisfying ρ(r, t 1 ) = ρ 1 (r) and ρ(r, t 2 ) = ρ 2 (r). For a given initial condition ρ 0 (r) at t = t 0 , the probability density P[ρ(r), t] ≡ P[ρ(r), t|ρ 0 (r), t 0 ] to observe the system with the profile ρ(r) at time t satisfies the functional Fokker-Planck Equation (84). In the weak noise limit, the typical paths explored by the system are concentrated close to the most probable path. In that case, a steepest-descent evaluation of the path integral is possible. The path integral is dominated by the most probable path. To determine the most probable path, we have to minimize the Onsager-Machlup functional S[ρ(r, t)], i.e., we have to solve the minimization problem min ρ(r,t) The equation for the most probable path ρ c (r, t) that connects two attractors is called an "instanton" [144]. It is obtained by cancelling the first order variations of the action: In the weak noise limit, the transition probability from one state to the other is dominated by the most probable path: This formula can be interpreted as a large deviation result (we note the analogies between Equations (85), (87), (88) and (90) and Equations (17)- (20)). It provides an approximate solution of the functional Fokker-Planck Equation (84). On the other hand, it can be shown that the escape rate of the system over the barrier of free energy is given by where S[ρ c ] is the action of the most probable path (instanton) that connects the metastable state to the stable state. In the limit of weak noise, and for a stochastic process that obeys a fluctuation-dissipation relation, it can be shown that the most probable path between the metastable state and the stable state must necessarily pass through the saddle point (playing the role of a "critical droplet" in problems of nucleation). Once the system reaches the saddle point it may either return to the initial metastable state or reach the stable state. In the latter case, it has crossed the barrier of free energy. One can show that the instanton satisfies the equation ∂ρ ∂t = ±∇ · χg(ρ)∇ δF δρ (92) with the boundary conditions ρ(r, −∞) = ρ M (r) and ρ(r, +∞) = ρ S (r). We note that the most probable path corresponds to the deterministic gradient driven dynamics, Equation (54), with a sign ± (considering the solution with the sign +, which corresponds to the downhill solution -see below -we see that the most probable path coincides with the ensemble average path). The physical interpretation of Equation (92) (92) with the sign −) is non zero. This is to be expected since the descent from the saddle point to the stable state is a "free" descent that does not require thermal noise; it thus gives the smallest possible value of zero of the action. By contrast, the rise from the metastable state to the saddle point is a rare event that requires thermal noise. The action for the uphill solution is where is the barrier of free energy between the metastable state and the unstable state. The total action for the most probable path connecting the attractors is therefore S c = S[ρ − c ] + S[ρ + c ] = ∆F + 0 = ∆F. It is determined solely by the uphill path. The instanton solution gives the dominant contribution to the transition rate for a weak noise. Therefore, the rate for the system to pass from the metastable state to the stable state (escape rate) is This is the celebrated Arrhenius (or Kramers) formula stating that the transition rate is inversely proportional to the exponential of the barrier of free energy divided by k B T. (This formula can be simply obtained as follows. The probability of observing the density ρ(r) is ∝ e −βF [ρ] . Therefore, the probability for the system initially prepared in the metastable state to form a "critical droplet" (unstable state ρ U ) and then reach the stable state Therefore, for systems with long-range interactions, the metastable states are very relevant since their lifetime scales as e N with N 1 [70,118]. Therefore, metastable states are stable in practice. Only very close to the critical point where ∆ f → 0 does their lifetime decrease substantially.
Bibliographic note: A general path-integrals formalism determining the escape rate of a particle moving in a potential V(x) in the weak noise limit has been developed by Bray et al. [145]. Their theory accounts for white noises for which S[x c ] = ∆V (Kramers) and for exponentially correlated noises for which S[x c ] = ∆V. The instanton theory has been formalized by Freidlin and Wetzel [146] in relation to the theory of large deviations [147]. It has been applied to various systems such as scalar fields described by the Ginzburg-Landau equation [145,148], interacting magnetic moments [149], nucleation [48], two-dimensional fluid flows [150] and Brownian particles with long-range interactions [70].

Relation to the Principle of Maximum Dissipation of Free Energy
It is interesting to discuss the relation between the instanton theory (see Section 4.2) and the principle of maximum dissipation of free energy (see Section 3.9). The Onsager-Machlup functional defined by Equation (86) can be expanded under the form where are the dissipative functions and the rate of free energy introduced in Section 3.9. Equation (96) is the counterpart of Equation (4-18) of Onsager and Machlup [142].

Boltzmann and Onsager-Machlup Principles
Let us recapitulate the different variational principles considered in this paper. We have seen in Section 2.2 that the probability of the density ρ(r) at statistical equilibrium is given by where F[ρ(r)] is the free energy functional. On the other hand, we have seen in Section 4.2 that, out-of-equilibrium, the probability of the path ρ(r, t) is given by where S[ρ(r, t)] is the Onsager-Machlup functional (action) which can be expressed in terms of the rate of free energy and dissipation functions (see Section 4.3). The Onsager-Machlup theorem, Equation (101), is analogous to the Boltzmann principle, Equation (100). (The Boltzmann formula -which was actually formulated by Planck -is usually expressed in the form S = k B ln W, where W is the number of complexions. The reversed expression W ∝ e S/k B , interpreted as the probability of a fluctuation, was formulated by Einstein [151].) The Boltzmann principle tells the probability of an equilibrium state in terms of its entropy (or free energy in the canonical ensemble); the Onsager-Machlup theorem tells the probability of a temporal succession of states in terms of the rate of entropy (or free energy in the canonical ensemble) and dissipation functions. The most probable equilibrium state ρ(r) is obtained by minimizing the free energy F[ρ] at fixed mass. This leads to the generalized Boltzmann distribution from Equation (22). The most probable path is obtained by minimizing the Onsager-Machlup functional S or equivalently by maximizing the rate of production of free energy −Ḟ − E d with respect to variations on J (at fixed ρ). This leads to the generalized deterministic Smoluchowski Equation (54). Therefore, the Onsager-Machlup principle can be viewed as the out-of-equilibrium version of the Boltzmann principle of statistical equilibrium.

Conclusions
In this paper, we have discussed the main properties of the generalized stochastic Smoluchowski Equation (83). This equation describes the mesoscopic dynamics of a system of overdamped Brownian particles in interaction. For short times, we can neglect the fluctuations and use the deterministic Smoluchowski Equation (54). In that case, the system relaxes towards a stable equilibrium state which is a (local) minimum of free energy at fixed mass. On longer times, or close to the critical point, the fluctuations have to be taken into account. If the equilibrium state achieved by the system is metastable (local but not global minimum of free energy), the fluctuations can allow the system to overcome a barrier of free energy and reach the fully stable state. More generally, if the system possesses several equilibrium states, the fluctuations can allow it to switch between these different equilibrium states and explore the free energy landscape. Such random transitions have been illustrated numerically by Chavanis and Delfini [70] for a model of self-gravitating Brownian particles and bacterial populations presenting two symmetric metastable states. They are expected to be generic of many other systems. We have derived the Kramers formula giving the typical lifetime of a metastable state from the theory of instantons and we have mentioned that this lifetime is extremely long for systems with long-range interactions as is scale as e N [118]. A transition from an equilibrium state to another is therefore a rare event.
In our approach, we have assumed that the Brownian particles experience long-range and short-range interactions. The long-range interactions have been treated in a mean field approximation which becomes exact when N → +∞. The short-range interactions have been treated heuristically with the help of a generalized entropy C(ρ). For "ideal" systems without short-range interactions, the correct entropy is the Boltzmann entropy. It can be obtained from a combinatorial analysis assuming that all the accessible microstates are equiprobable. For "complex" systems, the short-range interactions and the correlations between the particles may forbid some microstates and, therefore, modify the form of the entropy. This type of arguments leads, for example, to the van der Waals entropy given by Equation (A24) [110,111] or to the Fermi-Dirac entropy in position space given by Equation (A29) [81,82,102,132], which take into account excluded volume effects. More generally, the microscopic constraints can generate various forms of entropies characterized by a convex function C(ρ) [50].
We have shown in Appendix C that the generalized entropy C(ρ) appropriate to a given system can be derived in principle from the density functional theory developed in the physics of simple liquids [152]. In that case, it corresponds to the so-called "excess entropy" which arises from the development of correlations due to short-range interactions. In many models of liquids, the correlations can be taken into account by replacing the bare potential of interaction u(|r − r |) by an effective potential of interaction u eff (|r − r |) = − k B T m 2 c(|r − r |) proportional to the direct correlation function c(|r − r |). Many methods have been developed in the physics of simple liquids to determine the direct correlation function and the excess free energy for a given potential of short-range interactions [152]. The density functional theory developed in the physics of simple liquids allows us to demystify the notion of "generalized" thermodynamics [109] by showing that "generalized" entropies can be obtained from first principles. They are determined by the potential of short-range interactions u SR (|r − r |) in a nontrivial manner explained in [152]. In that sense, what we call "generalized" thermodynamics is just "ordinary" thermodynamics with a "generalized" (excess) form of entropy taking into account microscopic constraints and correlations among the particles. (This correspondance between generalized thermodynamics [109] and density functional theory [152] is obtained when the microscopic constraints act in configuration space as in [50], so that the velocity distribution function remains maxwellian. When the microscopic constraints act in phase space as in [97], implying non-maxwellian velocity distributions, the situation is more complicated. The passage from the generalized Kramers equation to the generalized Smoluchowski equation in the strong friction limit ξ → +∞ is treated in detail in [100,106]. ) We hope that one virtue of our paper is to have made a first connection between different communities, generalized thermodynamics [108,109], systems with long-range interactions [12,13] and the physics of simple liquids [152], by showing that their methods are complementary to each other. On the other hand, many results can be extended to the quantum regime as shown in recent papers (see, e.g., [3] and references therein).
Funding: This research received no external funding.

Conflicts of Interest:
The author declares no conflict of interest.

Appendix A. The Generalized Pressure
Appendix A. 1

. Equation of State
In this Appendix, we take g(ρ) = ρ (constant mobility). In that case, the generalized mean field Smoluchowski Equation (35) can be written as If we define the pressure P(ρ) such that we get This generalized Smoluchowski equation, involving a generalized pressure P(ρ) instead of the ideal pressure P id = ρk B T/m, was introduced in [97]. The square of the velocity of sound is c 2 s = P (ρ) and it reduces to k B T/m in the ideal case. Comparing Equation (A3) with Equation (39), we see that P(ρ) = D(ρ)ρ/χ. At equilibrium, we obtain the equation which can be interpreted as the condition of hydrostatic equilibrium stating that the pressure gradient equilibrates the mean field force. This equation can also be written as which is equivalent to Equation (30) if we make use of Equation (A2). We have It is convenient to introduce the density of free energy so that the free energy functional from Equation (14) takes the form Equation (A2) then yields If we define the enthalpy h(ρ) by dh = dP/ρ, we get h(ρ) = f (ρ) = [P (ρ)/ρ] dρ. The equation of state P(ρ) is determined by the density of free energy from Equation (A7) according to This relation, which can be rewritten as P = −d/d(1/ρ)( f /ρ), is the local version of the general thermodynamic relation P = −∂F/∂V defining the pressure. Inversely, the density of free energy is determined by the equation of state P(ρ) according to Using Equation (A11), the free energy from Equation (14) can be written as According to Equations (A7) and (A10) we note that the pressure can be written as where σ(ρ) = C (ρ)ρ − C(ρ) is a function that depends only on the density.

Appendix A.2. Weakly Inhomogeneous Systems
If the density varies weakly with the position, we find from Equation (6) that where a = − u(r) dr.
(If we go to the next order in the expansion, yielding Φ −aρ − K∆ρ, we obtain a generalized Cahn-Hilliard equation associated with a square gradient free energy functional -see [50] for details and discussion.) In that case, the free energy functional from Equation (14) becomes The total density of free energy is If we introduce an external potential Φ ext , the free energy functional is given by On the other hand, the generalized Smoluchowski Equation (A1) takes the form It can be rewritten as where is the total pressure. It takes into account the contribution of the pressure P arising from short-range interactions (through the generalized entropy C(ρ)) and the contribution of the pressure − 1 2 aρ 2 arising from long-range interactions [through the potential of interaction u(|r − r |)]. In particular, when corresponding to a generalized entropy of the form [110,111] taking excluded volume effects into account (this entropy can be obtained from a combinatorial analysis [110,111]), we recover the celebrated van der Waals [153] equation of state We note that Equation (A22) is exact for hard rods in one dimension [154], while it is only approximate for hard spheres in 3D. Other examples of generalized entropies and their corresponding equations of state (or the converse) are given in the following section and in [50,106].

Appendix A.3. Examples of Generalized Entropies
For a given generalized entropy C(ρ), the equation of state P(ρ) can be obtained from Equation (A10) and the density-potential relation ρ(Φ) can be obtained from Equation (27). Inversely, for a given equation of state P(ρ), the generalized entropy C(ρ) can be obtained from Equation (A11) and the density-potential relation ρ(Φ) can be obtained from Equation (A6). For a given density-potential relation ρ(Φ), the generalized entropy can be obtained from Equation (29) and the equation of state can be obtained from Equation (A6).
(i) For the Boltzmann entropy we get an isothermal equation of state and an exponential density-potential relation The Boltzmann entropy can be obtained from a standard combinatorial analysis.
(ii) For the Tsallis entropy [80] C(ρ) = 1 we get a polytropic equation of state and a power-law density-potential relation The Boltzmann entropy from Equation (A25) is recovered for γ → 1.
(iii) For the entropy [106] we get This entropy includes the Fermi-Dirac entropy (K = +1) [81,82,102,132] and the Bose-Einstein entropy (K = −1) [82,84]. These entropies can be obtained from a combinatorial analysis taking into account exclusion or inclusion constraints in position space. For ρ ρ * we recover the Boltzmann entropy from Equation (A25).
(iv) For the entropy we get For ρ ρ * we recover the Boltzmann entropy from Equation (A25). (v) For the entropy of the logotropic gas [129] we get The logotropic equation of state, Equation (A34), has been used in a cosmological model [155].
(vi) For the entropy we get where W(z) is the Lambert function defined by We W = z. For δ = 1, we recover the logotropic gas (see Equation (A33)).
(vii) For the entropy we get For γ = 1 we recover the Boltzmann gas and for γ = 0 we recover the logotropic gas. The entropy from Equation (A38) yields the Anton-Schmidt equation of state (see Equation (A50)).
(viii) For the entropy we get For δ = 1 we recover the Boltzmann gas. The entropy from Equation (A41) has been applied to black hole physics [156].
(ix) For the entropy we get This entropy contains all the particular cases described previously. (x) For the Carnahan-Starling equation of state [157] where η = ρ/ρ * , we get we get This equation of state has been used in a model of supernovae [158]. For ρ ρ * we obtain the isothermal equation of state P = ρk B T/m (Boltzmann) and for ρ ρ * we obtain the polytropic equation of state P = 1 we get This corresponds to the entropy from Equation (A38). For γ = 0 we recover the logotropic gas.
(xiii) For the equation of state we get This corresponds to the entropy from Equation (A41). For δ = 0 we recover the Boltzmann gas.
(xiv) For the equation of state we get where Γ(a, x) = +∞ x e −t t a−1 dt is the incomplete Gamma function. This equation of state contains all the particular cases described previously.
(xv) For a stretched exponential density-potential relation we get

Appendix B.1. Derivation of the Functional Fokker-Planck Equation
The generalized stochastic Smoluchowski Equation (83) can be written as where is a Gaussian white noise with zero mean and correlation function Equation (A58) can be interpreted as a Langevin equation for ρ(r, t). We now turn to the derivation of the Fokker-Planck equation for the density distribution functional P[ρ, t]. Since the noise in Equation (A58) is multiplicative (it depends on ρ), we must specify the meaning of the stochastic integral associated with the random noise ζ(r, t). From the requirement that the Fokker-Planck equation should have the stationary distribution function P eq ∝ exp(−βF[ρ]) the integral will be treated as an Ito type one. If we express the increment of density ρ(r) between t and t + ∆t by ∆ρ(r) we see from Equations (A58) and (A60) that and ∆ρ(r)∆ρ(r ) 2∆t = χk B T(∇ · ∇ )g(ρ)δ(r − r ).
which is Equation (84). It can be written as where is the functional Fokker-Planck current. The equilibrium solution of Equation (84) is given by Equation (17) This yields the H-theorem:Ḟ Therefore F decreases in time monotonically until P[ρ, t] takes the form of Equation (17). If we consider the average free energy we find that The first term in the right hand side of the last line of Equation (A72) is the rate of dissipation of free energy from Equation (57) without fluctuations; it is always negative. The second term arises from the effect of fluctuations; it may be of any sign. Therefore, we do not have d dt F ≤ 0 for the average free energy in the presence of fluctuations (noise). This is expected since the fluctuations can allow the free energy to increase. In this manner the system can cross the barrier of free energy played by the "critical nucleus" and trigger the transition from the metastable state to the stable state. This corresponds to the uphill path in the instanton theory (see Section 4.2). In conclusion, the fluctuations prevent the density field ρ(r, t) from being trapped in a local minimum of free energy F[ρ] and allow it to explore the complete free energy landscape.

Appendix B.3. Onsager's Linear Thermodynamics and Maximum Free Energy Dissipation Principle
The rate of dissipation of free energy is (see Equation (A69)) Using arguments of linear thermodynamics similar to those of Section 3.8, the foregoing equation induces us to introduce a current of the form with χ(ρ, t) ≥ 0, in order to get the H-theoremḞ ≤ 0. Equation (A74) coincides with the current from Equation (A67) with χ(ρ, t) = χg(ρ). Therefore, the functional Fokker-Planck Equation (A65) is consistent with Onsager's linear thermodynamics. We can also obtain the Fokker-Planck current from Equation (A67) by a maximum free energy dissipation principle like in Section 3.9. To that purpose, we introduce the dissipation function We can then check that the maximization problem yields the Fokker-Planck current from Equation (A67).

Appendix C. Density Functional Theory for Simple Liquids
In this Appendix, we review the main results obtained in the density functional theory of simple liquids and discuss the connection with our approach.

Appendix C.1. The N-body Smoluchowski Equation
Let us consider a system of N Brownian particles in interaction in the strong friction limit ξ → +∞. In this Appendix, small-scale (microscopic) constraints are taken into account in the potential of interaction. The dynamics of the particles is described by the stochastic Langevin equations [23,62,77] where U(r 1 , ..., r N ) is the potential of interaction and R i (t) is a Gaussian white noise satisfying R i (t) = 0 and R a i (t)R b j (t ) = δ ij δ ab δ(t − t ). The evolution of the N-body distribution function P N (r 1 , ..., r N , t) is governed by the N-body Smoluchowski equation [22,23,59,62,160] Using the Einstein relation from Equation (2), we find that the equilibrium solution of the N-body Smoluchowski equation is the canonical distribution [62,161] P N (r 1 , ..., where Z(β) is the partition function determined by the normalization condition I ≡ P N dr 1 ...dr N = 1.
The N-body distribution from Equation (A79) corresponds to the statistical equilibrium state of the Brownian particles in the canonical ensemble. It gives the probability density of the microstate {r 1 , ..., r N }. The proper thermodynamical potential in the canonical ensemble is the free energy where the energy and the entropy of the N-body system are given by [23,161] E[P N ] = 3 2 Nk B T + P N U dr 1 ...dr N , (A81) The free energy is explicitly given by The The preceding results are completely general. From now on, we assume that the particles interact via a binary potential so that U(r 1 , ..., r N ) = ∑ i<j m 2 u ij where u ij = u(|r i − r j |). Starting from the N-body Smoluchowski Equation (A78) and writing down the equivalent of the Bogoliubov-Born-Green-Kirkwood-Yvon (BBGKY) hierarchy for the reduced probability distributions P j (r 1 , ..., r j , t), we find that the equation for the average density (or one-body distribution function) of Brownian particles ρ(r, t) = NmP 1 (r, t) is [22,23,59,62,160] ∂ρ ∂t = ∇ · D∇ρ + χ ρ 2 (r, r , t)∇u(|r − r |) dr , where ρ 2 (r, r , t) = N(N − 1)m 2 P 2 (r, r , t) is the two-body distribution function. At equilibrium, we get the Yvon-Born-Green (YBG) equation [162,163] k B T m ∇ρ + ρ 2 (r, r )∇u(|r − r |) dr = 0.
This equation can be obtained either as the equilibrium solution of Equation (A85) or by considering the first equation in the hierarchy for the reduced probability distributions P j (r 1 , ..., r j ) obtained from the canonical distribution from Equation (A79) [23,62,161]. On the other hand, it can be shown [55] that the equilibrium density ρ(r) minimizes a certain free energy functional F[ρ] at fixed mass, i.e., This free energy functional can be written as where is the ideal Bolzmann free energy (where λ = h/ √ 2πmk B T is the de Broglie wavelength) and F ex [ρ] is the excess free energy which takes the correlations into account. The equilibrium states are given by the condition where µ is a Lagrange multiplier interpreted as a chemical potential. Using Equation (A89), Equation (A90) can be written as Taking the gradient of this relation, we get [164,165] k B T m ∇ρ + ρ∇ δF ex δρ = 0.
This equation is exact at equilibrium. The idea of the dynamical density functional theory is to extend this relation out-of-equilibrium, i.e., to make the approximation [60,61] ρ 2 (r, r , t)∇u(|r − r |) dr = ρ(r, t)∇ · δF ex δρ [ρ(r, t)], where F ex [ρ] is the equilibrium excess free energy. This closure is equivalent to assuming that the two-body dynamic correlations are the same as those in an equilibrium fluid with the same one-body density profile. Substituting this relation into Equation (A85), we obtain the gradient flow equation [60,61] ∂ρ ∂t = ∇ · χρ∇ δF δρ . (A95) We note that the mobility is proportional to the density ρ(r, t).

Appendix C.3. The Stochastic Dynamical Density Functional Theory
Starting from the Langevin Equation (A77), Dean [77] has shown that the discrete density ρ d (r, t) = ∑ i mδ(r − r i (t)) of the Brownian particles, which is a sum of Dirac distributions, is governed by a stochastic equation of the form where R(r, t) is a Gaussian white noise satisfying R(r, t) = 0 and R a (r, t)R b (r , t ) = δ ab δ(r − r )δ(t − t ), and F d [ρ d ] is the discrete free energy The Dean equation can be written explicitly as This equation is exact in the sense that it is equivalent to the Langevin Equation (A77) or to the N-body Smoluchowski Equation (A78). If we take the ensemble average of the Dean Equation (A98), we obtain [60,61] ∂ρ ∂t = ∇ · D∇ρ + χ ρ d (r, t)ρ d (r , t) ∇u(|r − r |) dr , which coincides with Equation (A85) after noting that ρ d (r, t)ρ d (r , t) = ρ(r, t)mδ(r − r ) + ρ 2 (r, r , t).
The first term is the effective potential of interaction u eff (|r − r |) taking into account correlations due to short-range interactions as described in this Appendix and the second term takes into account long-range interactions in a mean field approximation. To determine the direct correlation function c(|r − r |) one can use, for example, the Percus-Yevick [175] integral equation. Its solution is known exactly for the special case of a fluid of hard spheres [176][177][178] but approximate expressions can be obtained in more general situations.

Appendix C.5. Weakly Inhomogeneous Systems
In this Appendix, we first assume that the potential of interaction is short-ranged. If the density varies weakly with the position we can write the excess free energy as The excess free energy density f ex (ρ) can be obtained from the model discussed in Appendix C.4 as follows. First, we have to realize that, in general, the direct correlation function c(|r − r |; ρ) depends explicitly on the density, even though we ignore this dependence when we take functional derivatives. The excess free energy can then be written as Therefore, the excess free energy density is given by For short-range interactions, the excess free energy is usually proportional to the temperature T so that where ϕ ex (ρ) is a function that depends only on the density. In that case, the total free energy F = F id + F ex can be written as where C(ρ) = ρ ln λ 3 ρ m − 1 + ϕ ex (ρ).
Correspondingly, the pressure is given by where σ ex (ρ) = ϕ ex (ρ)ρ − ϕ ex (ρ) and σ(ρ) = ρ + σ ex (ρ) (see Appendix A). This is a manner to justify from a microscopic model the generalized free energy introduced in Section 2. If we now add a potential of long-range interactions (using a mean field approximation) we recover the model treated in this paper with g(ρ) = ρ.