Publication Cover
Molecular Physics
An International Journal at the Interface Between Chemistry and Physics
Volume 119, 2021 - Issue 8
798
Views
1
CrossRef citations to date
0
Altmetric
Research Articles

Density functional study of non-isothermal hard sphere fluids

& ORCID Icon
Article: e1875077 | Received 28 Sep 2020, Accepted 01 Jan 2021, Published online: 21 Jan 2021

ABSTRACT

Using a version of dynamical density functional theory, we explore a microscopic structure of hard-sphere fluids in the presence of a temperature gradient. When combined with the assumption of local equilibrium, this approach predicts the density profile in confinement and in bulk both in very good overall agreement with the results from the reverse non-equilibrium molecular dynamics simulation, which we used to impose a temperature gradient. Thus, the assumption of local equilibrium is found to be surprisingly accurate down to a microscopic scale even under a large temperature gradient. An oscillatory density profile, indicating the layering of particles, was observed in bulk as well as in confinement. This behaviour in the latter is well known and results from packing of hard spheres next to a wall. In the former, the oscillation is seen to emanate from the point of sharp change in temperature. However, our theoretical predictions greatly exaggerate the amplitude of oscillation when the temperature exhibits a sharp change over a very small distance.

GRAPHICAL ABSTRACT

1. Introduction

Since its inception, statistical mechanical density functional theory (DFT) [Citation1] has been applied successfully to probe phase behaviour and microscopic structures of fluids [Citation2] from a molecular level perspective while requiring a fraction of a typical computational cost of molecular-level simulations. DFT provides much easier access to an activated state (in unstable equilibrium) involved in a rare event such as nucleation [Citation3,Citation4]. It can also offer deep insights that are otherwise unavailable into physics of inhomogeneous systems.

While the original DFT is applicable only to systems in equilibrium, a considerable progress has been made in recent years to extend DFT to non-equilibrium systems. The earliest of such attempts focused on the time evolution of the density profile, [Citation5,Citation6] resulting in a dynamical density functional theory (DDFT) suitable for describing diffusion processes only. The scope of DDFT has since been expanded by including additional fields in its formulation.

Broadly speaking, DDFT has been developed following two distinct approaches. The starting point for the first approach [Citation7–17] is the lowest order equation in the Bogoliubov–Born–Green–Kirkwood–Yvon hierarchy [Citation18], which dictates the time evolution of the single particle distribution function f1(r,v,t), expressing the probability density of finding a particle at r with velocity v at time t. The equations of motion for the density, momentum, and energy (or temperature) fields are obtained by averaging proper microscopic expressions for these quantities with respect to f1(r,v,t). This is essentially the Irving–Kirkwood procedure [Citation19] and gives rise to integrals involving the pair distribution function f2(r,v,r,v,t), the probability density of finding a pair of particles, one at (r,v) and the other at (r,v) at time t. To evaluate these integrals, one must introduce various approximations typically informed by recent techniques from the kinetic theory [Citation20–23].

The second approach [Citation24–26] is based on the time-dependent projection operator method [Citation27]. Here, one must first specify a set of relevant macrovariables based on physics. For transport phenomena, they are particle number (or mass) density, velocity, and energy density fields. Specification of these fields does not uniquely determine the actual phase-space distribution ϱ(rN,pN,t) for a system in a non-equilibrium state. Nevertheless, the least biased distribution ϱ¯(rN,pN,t) compatible with the given fields can be determined by maximising the Gibbs entropy associated with ϱ¯ under the constraint that ϱ¯(rN,pN,t) gives rise to the specified fields [Citation28]. The end result is a time-dependent generalised canonical distribution, from which one obtains the entropy functional and the transport equations that dictate the time evolution of the fields. The difference between ϱ¯ and ϱ is reflected in the equations of motion for fluctuations of the fields. This method also yields molecular level expressions for transport coefficients in the form of the Green–Kubo formula. These results are formally exact.

The explicit connection to the entropy functional established in the second formulation may allow for a wealth of knowledge accumulated in the equilibrium DFT to be most easily incorporated into DDFT, thus leading to a systematic generalisation of DDFT to complex fluids. In this scenario, hard-sphere fluids will serve almost exclusively as a reference system. Thus, it is important that DDFT be capable of describing their properties and microstructure accurately under various non-equilibrium conditions.

As with the equilibrium DFT, the generalised DDFT showed its ability to predict accurately the density profiles in confined fluids for isothermal systems [Citation6,Citation10]. To our knowledge, however, a similar verification is lacking for non-isothermal systems. As an initial step toward DDFT of complex fluids, we explored microstructures of non-isothermal hard-sphere fluids using a version of DDFT put forward by Anero et al. [Citation26].

Combining the entropy functional of hard spheres derived in [Citation26] with the assumption of local equilibrium, which is routinely invoked in arriving at the governing equations of macroscopic hydrodynamics [Citation29,Citation30], we predict the density profile across a hard-sphere fluid both in a confined space defined by two parallel plates and in bulk in the presence of a temperature gradient. As expected, packing of hard spheres in strong confinement produces an oscillatory density profile (indicating a layering of the particles). When temperature gradient is generated by the method called the reverse non-equilibrium molecular dynamics (RNEMD) [Citation31], a strongly oscillatory density profile was observed in the bulk system without any confinement. In a separate simulation, we used RNEMD to impose a simple shear flow, which resulted in a non-uniform temperature profile. In all cases, our theoretical predictions are in very good overall agreement with the results of molecular simulation, thus providing a strong indication in favour of the local equilibrium assumption at the microscopic length scale. However, DDFT was seen to greatly exaggerate the oscillatory behaviour when the temperature exhibits a sharp change over a very small distance.

The remainder of this article is structured as follows. Section 2 summarises the relevant results from  [Citation26]. The equation for the density profile is derived in Section 3, while details of RNEMD simulation is given in Section 4. The results of our computations are reported in Section 5 and the article concludes with a brief summary in Section 6. Appendix 1 records a set of key equations from Rosenfeld's fundamental measure theory [Citation32–34], which we used to estimate the excess Helmholtz free energy of a hard-sphere fluid. Appendix 2 establishes the formula we used to construct the temperature profile from a simulation in the presence of a convective motion.

2. Dynamical density functional theory

Assuming that density and energy density profiles, to be denoted by ρ(r,t) and e(r,t), respectively, are the only relevant fields, Anero et al. developed a version of DDFT [Citation26] by means of the time-dependent projection operator method [Citation27]. Their key results pertaining to the current work are as follows.

The entropy of a system consisting of hard spheres of radius σ and mass m is given as a functional of ρ(r,t) and e(r,t) by (1) S/kB[ρ,e]=ρ(r)[52lnρ(r,t)32lne(r,t)+lnα352]drΦ[ρ;r,t)dr,(1) where α is related to the thermal wavelength Λ by (2) α:=(3h24πm)1/2=(32kBT(r,t))1/2Λ(r,t),(2) in which h and kB denote the Planck and Boltzmann constants, respectively, and Φ[ρ;r,t) is the excess Helmholtz free energy per unit volume of the hard-sphere fluid in kBT units.

As the notation suggests, Φ is a functional of the density profile ρ(r,t) and a function of r and t. This functional dependence arises when we use (r and t dependent) weighted densities to compute Φ.

The time evolution of ρ and e are governed by the following transport equations [Citation26]: (3) ρ(r,t)t+Jρ=0,e(r,t)t+Je=0.(3) where Jρ and Je are given by (4) Jρ:=D(r,t)δS/kBδρ(r,t)+C(r,t)δS/kBδe(r,t),Je:=C(r,t)δS/kBδρ(r,t)+K(r,t)δS/kBδe(r,t)(4) and represent particle and energy flux vectors, respectively. The functions C, D, and K are transport coefficients that need to be determined by molecular dynamics (MD) simulations.

As shown in [Citation26], (5) δS/kBδe(r,t)=β(r,t):=1kBT(r)(5) in general. For the entropy functional given by Equation (Equation1), this leads to (6) 3ρ(r,t)2e(r,t)=β(r,t),(6) which is expected since the internal energy of a hard-sphere fluid consists only of the kinetic energy. Carrying out the functional derivative with respect to ρ(r,t), (7) δS/kBδρ(r,t)=52lnρ(r,t)32lne(r,t)+lnα3+δδρ(r,t)Φ[ρ;r,t)dr=ln[Λ3(r,t)ρ(r,t)]+δδρ(r,t)Φ[ρ;r,t)dr=λ(r,t),(7) where we defined λ by the expression preceding it. More accurately, λ arises as a field conjugate to ρ when one employs the generalised canonical ensemble for the relevant phase distribution of a non-equilibrium system [Citation26,Citation27]. The same comment applies to the pair of fields β and e. We observe that λ(r,t) reduces to βμ (a constant) with μ denoting the chemical potential if the system is in equilibrium.

3. One-dimensional problems

In what follows, we shall limit ourselves to a steady-state one-dimensional problem in a rectangular coordinate system and consider, initially, a stationary fluid. Taking the z-axis in the direction of the temperature gradient, ρ and e are now functions only of z. In this case, Equation (Equation3) indicates that the z-components Jzρ and Jze are both constant. Even then, the solution of the resulting equations requires knowledge of the transport coefficients C, D, and K, which are in general functions of position and their evaluation even by a computer simulation is possible only with further simplifying assumptions. In the problem under consideration, however, the issue can be circumvented as we now discuss.

First, in the formulation of [Citation26], the velocity profile is not included in the list of relevant variables. In the case of a stationary fluid, however, the velocity field being identically zero carries an important information, which a more general formulation of DDFT is expected to provide. For the problems under consideration here, we shall take it for granted that the lack of convective motion implies the uniformity of the pressure field p(r): (8) p0.(8) Note that this identity is certainly violated if a spherical interface separates two fluid phases as is evident from the Laplace equation.

Second, we assume that the local equilibrium prevails everywhere in the system. This implies that λ(r,t) defined by Equation (Equation7) may be identified as βμ at position r and that the Gibbs–Duhem relation may be applied at every r even though the system under consideration is not in equilibrium. Thus, (9) edβdz+d(βp)dzρdλdz=0.(9) Using Equation (Equation8), (10) χdβdzρdλdz=0.(10) where χ:=e+p is the enthalpy density. By means of this equation, we rewrite Equation (Equation4) as (11) Jzρ=(CDχρ)dβdz,Jze=(KCχρ)dβdz,(11) Finally, Jzρ0 in a stationary single component system. In the presence of non-zero temperature gradient, dβ/dz0 and hence (12) CDχρ=0.(12) This can be used in Equation (Equation11) to give (13) jze=1kBT2[KD(χρ)2]dTdz,(13) in which we recognise (14) κ:=1kBT2[KD(χρ)2](14) as the thermal conductivity.

In many situations, κ may be regarded as constant and Equation (Equation13) can be integrated to give a linear temperature profile. As we shall see below, our simulation indicates that the temperature profile is indeed linear over a large section of the system even though the system as a whole is inhomogeneous.

In any event, let us now proceed under the assumption that T(z) is known. From Equation (Equation10), (15) dλdz=χρdβdz=χρkBT2dTdz,(15) Upon integration from z = 0, which we shall take at the centre of the system, we arrive at (16) λ(z)=λ(0)T(0)T(z)χρkBT2dT,(16) Using Equation (Equation7), we may rewrite (Equation16) as (17) ρ(z)=[T(z)T(0)]3/2ρ0eB[ρ;z),(17) which may be solved by iteration. Here, we defined (18) B[ρ;z):=[δδρ(z)Φ[ρ;z)dz]0z+T(0)T(z)χρkBT2dT.(18) Equation (Equation1) implies the interpretation of the quantity (19) (s/kB)[ρ;r,t)=ρ(r,t)[52lnρ(r,t)32lne(r,t)+lnα352]Φ[ρ;r,t)(19) as the entropy density. Using Equations (Equation7) and (Equation19), and the Euler relation, (20) βχ=s/kB+λρ=ρ[52+δδρ(z)Φ[ρ;z)dz]Φ[ρ;z).(20) To capture the microstructure of hard-sphere fluids as accurately as possible, we evaluate Φ and the functional derivative of its integral using the dimensional interpolation version [Citation33] of the fundamental measure theory [Citation32] specialised to one-dimensional problems. Key formulas are listed in Appendix 1.

The notion of local equilibrium is distinct from that of the local density approximation. In the latter, the entropy density at r is given as a function of density evaluated at the same position r. In the fundamental measure theory, Φ is expressed as a function of three weighted densities, making Φ at r dependent on the density profile within the sphere of radius σ centred around r. Oscillatory density profiles shown in Section 5 could not be predicted with the local density approximation.

4. Simulation

In what follows, we adopt a system of units in which m = 1 and σ=0.5. As is customary in MD simulations, the total linear momentum of the system is set to zero. Motivated by the equipartition theorem for an isothermal system in equilibrium, we define the overall system temperature kBT¯ by (21) i=1N12||vi||2=32(N1)kBT¯,(21) where N is the number of particles in the system and vi is the velocity of the ith particle. Since a hard-sphere fluid does not have potential energy, the total kinetic energy is conserved exactly in molecular dynamics. Accordingly, we have written Equation (Equation21) without time or ensemble averaging. We set kBT¯=1 and this determines the energy scale.

Our simulation box is a rectangular block of a square base of area A and height 2H. To simulate a confined fluid, we placed hard walls as shown in Figure (a). In the coordinate system with its origin at the centre of the simulation box and the z-axis perpendicular to the opposing square faces of the box, they are at |z|=H, thus restricting the centres of hard spheres to |z|H0.5. The parameter values specifying the simulation condition are listed in Table .

Figure 1. Swap regions (Δh for heating and Δc for cooling) and the sampling regions (Δs) in the simulation box.

Figure 1. Swap regions (Δh for heating and Δc for cooling) and the sampling regions (Δs) in the simulation box.

Table 1. Specification of simulation conditions. Exceptions are noted explicitly in the main text.

Periodic boundary conditions were imposed in all three directions for bulk simulations, while the same conditions were imposed only in x- and y-directions for fluids in confinement.

Particles were placed randomly in the system and the system was equilibrated using Monte Carlo simulation first. To remove any overlap among particles, we replaced the hard sphere interaction by (22) u(r)={109+1/r12if r1,0otherwise.(22) A similar potential was used for interaction between particles and the walls. After we ensured the absence of overlap among particles and with the walls, we equilibrated the system further by MD. A single MD step consists of three elements [Citation35]: (1) Search for the next pair of colliding particles, (2) advance the time and positions of all particles till the collision occurs, (3) assign the post-collision velocity vectors to the colliding particles, which are obtained from conservation laws of energy and momentum. For fluids in confinement, a minor modification was made to include an elastic collision with the hard walls.

A temperature gradient was imposed using RNEMD method [Citation31], which was developed originally to compute viscosity and thermal conductivity. In this method, we choose two thin parallel swap regions Δh and Δc in the simulation box as illustrated in Figure (a ,b). The heating and cooling are achieved not through a contact with thermal baths, but by exchanging, with a fixed frequency fe, the velocity vectors of a suitably chosen pair of particles: one with the lowest kinetic energy in Δh and the other with the highest kinetic energy in Δc. We attempted a single swap move right after the step (3) described above with the probability given by the increment in time during step (2) multiplied by the set frequency fe.

The swap move of RNEMD conserves the system energy exactly. Thus, even with the temperature gradient in the system, the total energy remains unaffected and kBT¯ determined by Equation (Equation21) remains unity.

After a short MD run with the swap moves, the system reached a steady state and we sampled the density and the temperature profiles using the formulas given in Appendix 2. At least within the sampling regions Δs, which we chose to avoid the immediate vicinity of the swap regions, the temperature profile kBTmd from the simulation was well represented by a linear function (23) kBTfit1(z)=a1z+a0(23) for fluid in confinement and (24) kBTfit1(z)=a1|z|+a0(24) for a bulk fluid. We determined a0 and a1 by the least square fit to kBTmd within Δs. The resulting linear profile was extrapolated to all z values and used in Equation (Equation16) to generate the DDFT prediction of the density profile.

Equation (Equation16) is a consequence only of the local equilibrium assumption and p0. It follows that it remains valid even in the presence of a convective flow that does not involve a pressure gradient. To see if this is the case, we considered another type of RNEMD swap move in place of the energy swap move described above. In this case, the x-component vx of the velocity vector was swapped with frequency fp between a pair of particles: one in Δc with the largest vx and the other in Δh with the smallest (i.e. closest to ) vx, resulting in a linear velocity profile (vxz).

This RNEMD move conserves both total energy and linear momentum of the system. However, since it generates a convective motion from the thermal fluctuation of particles, it leads to a loss of thermal energy in the swap regions. As a consequence, a non-uniform temperature field develops with its maximum located in Δs, causing the heat to flow into the swap regions, where it is converted into the convective motion. Because the energy associated with this motion dissipates into thermal energy throughout the system, a non-isothermal steady-state is maintained [Citation31].

Finally, we note that the width of swap regions used in this work (0.2 as shown in Table ) is much smaller than in typical RNEMD. Our choice leads to much more drastic temperature variations near the swap regions, and hence provides a more stringent test for our approach, which invokes local equilibrium assumption.

5. Results

Let us consider hard spheres in confinement first. In Figures  and , we show density profiles from Monte Carlo simulation (ρmc) and isothermal DFT (ρdft), to which DDFT reduces if the temperature is uniform throughout the system. Two overall density values, n = 0.87 and 0.95, were selected since ρmc near the walls (z<−3) are very similar to those observed in MD (ρmd) to be presented below but at n = 0.8 and with a temperature gradient. Except in |z|>3, the DFT predictions are in excellent agreement with the simulation. The discrepancy we do see for |z|>3 is larger for larger n.

Figure 2. Density profiles of a hard-sphere fluid between two parallel hard walls at |z|=5.5. From an isothermal Monte Carlo simulation (ρmc) and an isothermal DFT calculation (ρdft) at kBT¯=1. The system contains N = 870 particles resulting in the overall density n = 0.87 (based on the volume accessible to the centres of the spheres). The inset provides an expanded view of the profiles near z = −5.

Figure 2. Density profiles of a hard-sphere fluid between two parallel hard walls at |z|=5.5. From an isothermal Monte Carlo simulation (ρmc) and an isothermal DFT calculation (ρdft) at kBT¯=1. The system contains N = 870 particles resulting in the overall density n = 0.87 (based on the volume accessible to the centres of the spheres). The inset provides an expanded view of the profiles near z = −5.

Figure 3. Same as Figure but with N = 950 and n = 0.95. kBT¯=1.

Figure 3. Same as Figure 2 but with N = 950 and n = 0.95. kBT¯=1.

Next, we introduced the energy exchange RNEMD moves. The temperature gradient dkBTmd/dz was 0.0613 and 0.123 for the swap rates fe=10 and 40, respectively. In other words, the temperature changes involved are 6 to 12 per cent of kBT¯ within a distance of a single hard-sphere diameter. This is by no means small.

From Figures  and , we see a small discrepancy between ρmd and the DDFT prediction (ρddft) for z<−3 at these swap rates. At fe=40, ρddft in z<−4.2 shows a somewhat larger deviation than the corresponding portion in the isothermal system in Figure . Aside from this, the discrepancy between ρmd and ρddft is similar in magnitude to what we saw in the isothermal systems having similar density values in this region. Thus, very little inaccuracy was incurred when these highly non-isothermal systems are described by assuming local equilibrium.

Figure 4. Density and temperature profiles of a hard-sphere fluid between two parallel hard walls at |z|=5.5. From a RNEMD simulation (ρmd and kBTmd) and DDFT calculation (ρddft). The swap frequency fe=10, the overall temperature kBT¯=1, and the overall density n = 0.8. The inset provides an expanded view of the density profiles near z = −5.

Figure 4. Density and temperature profiles of a hard-sphere fluid between two parallel hard walls at |z|=5.5. From a RNEMD simulation (ρmd and kBTmd) and DDFT calculation (ρddft). The swap frequency fe=10, the overall temperature kBT¯=1, and the overall density n = 0.8. The inset provides an expanded view of the density profiles near z = −5.

Figure 5. Same as Figure but with fe=40. kBT¯=1 and n = 0.8.

Figure 5. Same as Figure 4 but with fe=40. kBT¯=1 and n = 0.8.

As expected, the fluid density is higher in the lower temperature region. With increasing fe, the temperature decreases in the left half (z<0) of the system. Simultaneously, the discrepancy we are discussing is seen to grow. In contrast, ρddft is in good agreement with ρmd in the right half (z>0) of the system except at the immediate vicinity of the wall, where one of the swap region is located and the actual temperature (kBTmd) is noticeably larger than kBTfit1. For swap rates smaller than 10, ρmd and ρddft were nearly indistinguishable.

The results for bulk simulations are shown in Figures  and . Since the system is symmetric about the xy-plane, ρmd(z) and kBTmd(z) in these figures actually represent the arithmetic means of the data obtained from the simulations, i.e. (ρmd(z)+ρmd(z))/2 and (kBTmd(z)+kBTmd(z))/2, respectively. The same remark applies to Figures  and .

Figure 6. Density and temperature profiles of a bulk hard-sphere fluid. The swap frequency fe=10, the overall temperature kBT¯=1, and the overall density n = 0.8.

Figure 6. Density and temperature profiles of a bulk hard-sphere fluid. The swap frequency fe=10, the overall temperature kBT¯=1, and the overall density n = 0.8.

Figure 7. Same as Figure  but with fe=40. kBT¯=1 and n = 0.8.

Figure 7. Same as Figure 7 but with fe=40. kBT¯=1 and n = 0.8.

The temperature gradient dkBT/dz was 0.0216 and 0.0514 for fe=10 and 40, respectively. Interestingly, we observe a noticeable oscillation in the density profile, indicating layering of particles along the planes perpendicular to the heat flux. This is observed in both simulation and in the DDFT calculation. These two methods are in very good agreement except near z = 0 and 12, where the swap regions are located and kBTmd shows a large deviation from kBTfit1 assumed in the DDFT calculation.

We emphasise that these oscillatory profiles are found in a bulk fluid without any walls. Because of the swap regions in the case of RNEMD and the imposed non-uniform temperature profile in the case of DDFT, our bulk system has lost the translational invariance in the z-direction. Thus, the observed behaviour is consistent with the symmetry principle. To understand the origin of this behaviour beyond this general observation, we considered the temperature profile of the form (25) T(z)=T0+(ThT0)|zH|ν,(|z|H)(25) in additional DDFT calculations, where we set kBT0=0.5 and kBTh=1.5. This assumed temperature profile is shown in Figure  for several values of ν. Beyond |z|=H, the system is subject to the periodic boundary condition in the z-direction. Under the assumption of constant κ, only the linear temperature profile is physically sensible at a steady state. Nevertheless, the corresponding density profile can be found for other temperature profiles using Equation (Equation16) since, as mentioned earlier, its validity is based only on the assumptions that p0 and that the local equilibrium prevails.

Figure 8. The temperature profiles across a bulk system as given by Equation (Equation25). The periodic boundary condition is imposed to determine the profile beyond |z|=12.

Figure 8. The temperature profiles across a bulk system as given by Equation (Equation25(25) T(z)=T0+(Th−T0)|zH|ν,(|z|≤H)(25) ). The periodic boundary condition is imposed to determine the profile beyond |z|=12.

The result of this set of calculation is shown in Figure . The oscillatory behaviour is observed near z = 0 for all ν values except ν=2. At z = 0, dT/dz and d2T/dz2 are discontinuous for ν=1 and for 1<ν<2, respectively. The amplitude of oscillation near z = 0 is seen to decrease with increasing ν and the oscillation disappears completely at ν=2. Under the periodic boundary condition, dT/dz is discontinuous at z=±H irrespective of the value of ν and the oscillatory density profile is observed near |z|=H for all ν.

Figure 9. The density profiles corresponding to the temperature profiles shown in Figure . DDFT calculation.

Figure 9. The density profiles corresponding to the temperature profiles shown in Figure 8. DDFT calculation.

In DDFT, the oscillatory density profile arises only from the imposed temperature profile and the assumption of local equilibrium. This strongly indicates that the same behaviour observed in RNEMD simulation is not some artefact of the swap moves, which interfere with the natural evolution of the system governed by Newton's equations of motion. Instead, it is a physical response of the system to the temperature profile generated by the RNEMD moves.

One possible scenario that can lead to the observed layering of particles is as follows. Since the density is higher in the lower temperature region, the particles tend to accumulate near z = 0. For a smooth temperature profile, fluctuations that displace these particles leave the temperature surrounding them relatively unaffected. For less smooth profiles, this is not the case, thus requiring a larger density change. As a result, the accumulation of particles may be sufficiently persistent and this prevents other particles from occupying the nearby space. On the other hand, particles near z = 12, having larger kinetic energies, may also serve to repel other particles from this region.

For the purpose of determining κ by RNEMD, the observed oscillatory density profile is undesirable. However, the issue can be minimised by using a smaller fe or a larger width for the swap regions.

Within and near the swap regions of RNEMD, a discrepancy of varying degree exists between kBTmd and kBTfit1. To see how this discrepancy impacts the DDFT predictions, we used kBTmd directly in Equation (Equation16).

In the case of confined fluids (corresponding to the results shown in Figures and ), this did not noticeably affect the predicted density profiles away from the walls. As seen from Figure , the prediction improved markedly in the vicinity of the cold wall but only between z4.954.85. (Below z4.95, ρmd was between two DDFT predictions, but somewhat closer to ρddft obtained with kBTmd.) The accuracy worsened somewhat at around z4. The situation on the hot wall is also mixed. We see from Figure  that the density at contact (z = 5) is more accurately predicted when kBTmd is used directly. The density profile also captures a small decrease in dρ/dz due to the sudden increase in temperature at the edge of the swap region (at z = 4.8, where dkBTmd/dz=5.0 for fe=40). However, DDFT is seen to over-predict the change in dρ/dz and, as a result, its prediction away from the wall deviates from ρmd, with the latter nearly perfectly interpolating the two separate DDFT predictions.

Figure 10. Density and temperature profiles of a hard-sphere fluid near the cold wall. Swap frequency fe=40, the overall temperature kBT¯=1, and the overall density n = 0.8.

Figure 10. Density and temperature profiles of a hard-sphere fluid near the cold wall. Swap frequency fe=40, the overall temperature kBT¯=1, and the overall density n = 0.8.

Figure 11. Density and temperature profiles of a hard-sphere fluid near the hot wall. Swap frequency fe=40, the overall temperature kBT¯=1, and overall density n = 0.8.

Figure 11. Density and temperature profiles of a hard-sphere fluid near the hot wall. Swap frequency fe=40, the overall temperature kBT¯=1, and overall density n = 0.8.

Figure 12. The temperature profiles across a bulk system with momentum exchanging RNEMD moves. The swap frequency fp=80, the apparent overall temperature kBT¯app=1, and the overall density n = 0.8.

Figure 12. The temperature profiles across a bulk system with momentum exchanging RNEMD moves. The swap frequency fp=80, the apparent overall temperature kBT¯app=1, and the overall density n = 0.8.

Figure 13. A comparison of density profiles corresponding to the temperature profiles shown in Figure .

Figure 13. A comparison of density profiles corresponding to the temperature profiles shown in Figure 12.

In the case of bulk fluids (corresponding to the results in Figures and ), however, the DDFT prediction was much worse when kBTmd was used directly and showed an oscillatory profile with much larger amplitudes than were observed in simulations. In the energy exchange RNEMD, a sharp temperature change occurs at each edge of the swap regions. The largest temperature gradient observed at these edges was 1.8 for fe=10 and 6.6 for fe=40. As a result, kBTmd acquires a very narrow peak or valley within a distance of 0.2 (the thickness of the swap regions in this study), and this leads to the considerable over-prediction by DDFT. In fact, the amplitude of oscillation decreased significantly when the width of the sampling regions was increased to 1.

Introducing the momentum exchange move of RNEMD, we also examined the effect of a shear flow, but focusing only on the bulk system. The frequency fp for the momentum exchange move was set to 80, resulting in the velocity gradient dvx/dz=0.133 . The apparent temperature kBT¯app, as given by Equation (EquationA14), was set to unity. Smaller fp values were also examined, but they do not alter the conclusion to be presented below.

As already mentioned, this RNEMD move also induces a temperature variation in the system. The resulting temperature profile kBTmd was computed using Equations (EquationA16) and (EquationA17), and is shown in Figure .

Within the sampling region Δs, kBTmd is well described by a quadratic function centred around |z|=H/2. However, kBTmd exhibits a very sharp decrease near |z|=0 and H. We recall that kBTmd is symmetric around z = 0 and repeats itself under the periodic boundary conditions. To suppress the over-prediction of the oscillatory behaviour, we replaced this rapidly changing portion of the temperature profile by a quartic equation in our DDFT calculation. That is, we represent kBTmd by (26) kBTfit2={b4|z|4+b2|z|2+b0,if zΔcw,b4(H|z|)4+b2(H|z|)2+b0,if zΔhw,c2(|z|H/2)2+c0,otherwise,(26) where Δcw and Δhw are defined by |z|w and |z|>Hw, respectively. We determined c0 and c2 by fitting the quadratic equation to kBTmd in Δs, while b0, b2, and b4 were determined to ensure continuity of kBTfit2 and its first and second derivatives at |z|=w.

As seen from Figure , ρddft is in good agreement with ρmd. The DDFT prediction can be improved if c0 and c2 are determined using kBTmd from a wider range of z to better represent it near the swap regions. Thus, our approach to supplement DDFT with the local equilibrium assumption remains applicable even in the presence of a shear flow provided that the temperature profile is accurately represented and it has no sharp peak or valley. Consistent with the observation made above, ρddft develops the oscillatory behaviour as valleys of kBTfit2 (at |z|=0 and 12) becomes sharper with decreasing w.

6. Concluding remarks

Using a version of DDFT, we explored microstructure of non-isothermal hard-sphere fluids both in confinement and in bulk. Combined with the assumption of local equilibrium, the entropy functional developed in  [Citation26] led to predictions of the density profiles in very good overall agreement with the simulation results, in which a temperature gradient was created by the RNEMD method.

In formulating DDFT, Anero et al. [Citation26] did not include velocity field in the set of relevant variables, thus focusing on systems without a convective motion. Nevertheless, we showed that their DDFT can be used to predict density profile in the presence of a shear flow at least in the case of a one-dimensional steady-state problem in rectangular coordinates provided that the pressure gradient is zero throughout the system.

Because RNEMD depends on the availability of a suitable pair of particles in the swap regions, there is a limit to the temperature gradient that can be achieved. While a larger temperature gradient can be generated using thicker swap regions, the temperature gradient we considered in this work was by no means trivial, in some cases, leading to the temperature variation comparable to the overall system temperature itself within the distance of 10 times the hard sphere diameter.

Interestingly, the energy exchanging RNEMD moves induces an oscillatory density profile even in bulk, and this behaviour was predicted correctly by our approach. However, DDFT over-predicts the amplitude of oscillation if the temperature exhibits a sharp change over a very small distance. This may point to a breakdown of the local equilibrium assumption under such extreme conditions.

Acknowledgements

Computations reported here were made possible by a resource grant from the Ohio Supercomputer Center [Citation36].

Disclosure statement

No potential conflict of interest was reported by the author(s).

Additional information

Funding

Computations reported here were made possible by a resource grant from the Ohio Supercomputer Center.

Notes

aThis gives overall density n = 0.8 based on the volume accessible to the centres of hard spheres.

References

Appendices

Appendix 1. Key formulas from fundamental measure theory

In this appendix, we summarise the key results of Rosenfeld's fundamental measure theory from  [Citation32,Citation33], which gives Φ as a function of three weighted densities. In one-dimensional problems (of a three-dimensional system and in rectangular coordinates), they are given by [Citation34] (A1) ρk(z):=12σk+1σσρ(z+ζ)ζkdζ(k=0,1,2).(A1) Then, (A2) Φ=i=13ϕi(ρ0,ρ1,ρ2),(A2) in which (A3) ϕ0=ρ0ln(1η),(A3) (A4) ϕ1=4πσ3ρ02ρ121η,(A4) (A5) ϕ2=3π2σ6(ρ0ρ2)(ρ024ρ12+3ρ22)(1η)2,(A5) and (A6) η=2πσ3(ρ0ρ2).(A6) The functional derivative involved in the expressions for λ and βχ can now be evaluated: (A7) δδρ(z)Φ[ρ;z)dz=k=0212σk+1σσΦρk|zζζkdζ.(A7)

Appendix 2. Temperature and convection

In this appendix, we list several key equations pertaining to profiles of density, temperature, and velocity. Corrections to the overall system temperature and the temperature field due to a convective motion will also be considered. As in the main text, m = 1 and no explicit reference will be made to m.

Let u(z)=u(z)ex be the velocity profile of the convective motion in the system, where ex is the unit vector pointing in the positive x-direction. Needless to say, u(z) cannot be determined as a continuous function of z in simulation. Instead, we slice the system into thin layers of thickness δ in the direction perpendicular to the z-axis. In this work, we set δ=0.01. Using a to label the layers, we define the density and the velocity profiles by (A8) ρ(z)=ρa(z):=1AδNa(A8) and (A9) u(z)=ua(z):=1Naiavix,(A9) respectively, where a(z) refers to the layer containing the position z, Na is the instantaneous number of particles in this layer, and vix is the x-component of the velocity vector vi of particle i. As indicated by ia, the sum is only over the ath layer.

Subtracting the contribution from the bulk motion, we define the overall system temperature kBT¯ by (A10) 32(N1)kBT¯=12i=1N||viu(zi)||2=12i=1N[||vi||22uivix+ui2](A10) where ui:=ua(zi).

We can carry out the sum over all particles i in the system in two steps, summing over particles in the ath layer first and summing over all layers next. This gives (A11) iuivix=aiauivix=auaiavix.(A11) Upon averaging, (A12) iuivix=auaiavix=aρaua2Aδ.(A12) A similar process for iui2 leads to the identical result. Thus, (A13) 32(N1)kBT¯=32(N1)kBT¯app12aρaua2Aδ,(A13) where (A14) 32(N1)kBT¯app:=12i||vi||2(A14)

defines the apparent overall system temperature. We dropped the time averaging since the molecular dynamics of hard spheres conserves the total kinetic energy. The second term of Equation (EquationA13) is the correction due to the convective motion.

We now define the temperature profile by (A15) kBT(z)=kBTa(z):=N3(N1)1Naia||viu(zi)||2.(A15) For a reasonably large system, the factor N/(N1) is very nearly equal to unity and it can be omitted. Proceeding as before, we arrive at (A16) kBTa=kBTaappN3(N1)ua2,(A16) in which (A17) kBTaapp:=N3(N1)1Naia||vi||2.(A17) If ua0 for all a, then kBTa=kBTaapp. If in addition kBTa=kBT¯, a constant independent of a, Equation (EquationA17) reduces to (A18) 32(N1)NakBT¯=N2ia||vi||2.(A18) Upon summation over all layers a, we recover Equation (Equation21). This points to the need for the N/(N1) factor at least in principle, if not in practice.