Olav
Galteland
*a,
Eivind
Bering
b,
Kim
Kristiansen
a,
Dick
Bedeaux
a and
Signe
Kjelstrup
a
aPoreLab, Department of Chemistry, Norwegian University of Science and Technology, 7491 Trondheim, Norway. E-mail: olav.galteland@ntnu.no
bPoreLab, Department of Physics, Norwegian University of Science and Technology, 7491 Trondheim, Norway
First published on 11th May 2022
We have investigated the state of a nanoconfined fluid in a slit pore in the canonical and isobaric ensembles. The systems were simulated with molecular dynamics simulations. The fluid has a transition to a close-packed structure when the height of the slit approaches the particle diameter. The Helmholtz energy is a non-convex function of the slit height if the number of particles does not exceed that of one monolayer. As a consequence, the Legendre transform cannot be applied to obtain the Gibbs energy. The Gibbs energy of a non-deformable slit pore can be transformed into the Helmholtz energy of a deformable slit pore using the Legendre-Fenchel transform. The Legendre-Fenchel transform corresponds to the Maxwell construction of equal areas.
A systematic way to address these problems was given by Hill7,8 already 50 years ago. We have argued that the problems are best addressed by his method,3,12–14 because the method provides a general description of small systems. In this work, we investigate a slit pore of large surface area and small height. The system has periodic boundary conditions in the directions tangential to the slit pore wall. In this way, the system is confined, but the number of particles is large. We have for instance been able to write scaling laws for small system variables,15 and a new equilibrium criterion for pressure was developed for two-phase equilibria in slit pores.15 Hill's method is therefore our first choice when the aim is to learn more about structural transitions in confined fluids or how variables change. A first-order phase transition is defined as a discontinuity in the relation between the normal pressure and the slit pore height. In confinement a phase transition is no longer sharp, the transition is smooth,8 this is by definition not a first-order phase transition. We shall find here that a transforming procedure exists in terms of the Legendre-Fenchel transform. This is a more general transform than the Legendre transform and can be used for large as well as small systems. It will enable us to compute the Gibbs energy from the Helmholtz energy and vice versa.
We have recently reported the changes in free energy during polymer stretching. The free energy depends on the conditions used, whether the polymer is stretched at controlled length or force.16,17 For sufficiently short polymers, the Helmholtz energy is a non-convex function of the controlled length of the polymer. A convex function has a non-negative second derivative everywhere. To transform from the Helmholtz to the Gibbs energy the Legendre-Fenchel transform could be applied. Similarly, we observed that the grand potential of a fluid in a slit pore is a non-convex function of the distance between the parallel plates at constant chemical potential and temperature.3 Also, the Helmholtz energy of solid colloids in solution is non-convex as a function of the controlled distance between the colloids, keeping the temperature, volume, and the number of particles constant.18 Both cases can be explained by a disjoining pressure (also known as the solvation pressure),19 which is the excess normal pressure relative to the bulk pressure due to the packing of fluid particles between the solids. The observations mentioned all stem from size effects. To obtain the free energy of the corresponding constant pressure ensemble the Legendre-Fenchel transform must be applied, and not the Legendre transform.
The three pillars that science progresses from are theory, experiments, and simulations. The theory part is lacking in nanotechnology. Energy converting devices are abundant, but there is little available general theory of energy conversion for the nanoscale. The laws of energy conversion are the laws of thermodynamics, and the question we are asking is which form these take. Nanothermodynamics has been constructed, mostly by adding terms to Gibbs's classical formulation for large-scale systems. While this mending procedure may serve the purpose in some special cases, it does not present us with a systematic procedure to be used as a general tool. Here we argue that the theory of Hill presented more than 50 years ago, presents an underused opportunity for a systematic procedure. To show the advantage of this approach, we study a transition between two structural regimes in a molecular fluid in a porous media model and document the applicability of an important tool, namely the Legendre-Fenchel transform.
Several problems arise for systems dependent on size and shape. To which extent can we still use the thermodynamic tools on nanoscale systems that apply to macroscale systems? When additional independent variables are needed in the Gibbs equation, from which pool do we draw them and how?
The free energies of a molecular fluid in a slit pore will be investigated at two conditions; at constant volume and constant normal pressure. In the first case, the system is in the canonical ensemble, and in the second case, the system is in the isobaric ensemble. In the thermodynamic limit, where the free energy is convex, we can transform the free energy from one ensemble to another using the Legendre transform. For small systems, this is not always the case. However, in the case of polymer stretching, we have recently found that the Legendre-Fenchel transform can be used.17 This experience has led us to wonder whether Legendre-Fenchel transforms can be used also for fluids confined to the slit pore, thereby motivating this paper. In the isochoric ensemble, the volume of the slit pore is controlled, and we will consider this as a simple model of a non-deformable porous medium. In the isobaric ensemble, the pore normal pressure is controlled, and the pore volume can fluctuate. We will consider this as a simple model of a deformable porous medium.
The paper is outlined as follows. We give the theoretical background in Section 2, including the Legendre-Fenchel transform in Section 2.1. We proceed to present the simulation technique in Section 3 and show in Section 4, that the Helmholtz energy of an isochoric slit pore can be transformed into the Gibbs energy of an isobaric slit pore using the Legendre-Fenchel transform. The findings are discussed and perspectives are pointed out. In short, we shall see that systems that are small in Hill's sense have additional transitions than the bulk systems have. The system is more restricted when we control the fluid height than when we control the normal pressure.
In the canonical ensemble the volume of the system is controlled, and the normal pressure P fluctuates. In the isobaric ensemble, the normal pressure P is controlled, and the volume V = L2h = Ah fluctuates, where A = L2 is the fluid-solid surface area of one of the walls. The side lengths in the y- and z-directions are fixed equal to L, and it is only the distance between the walls h (height) that fluctuates. The side lengths L are much larger than the height such that the system may be considered to be independent of the surface area A.
dF(N,h,A,T) = −SdT − PAdh + 2γdA + μdN, | (1) |
dG(N,P,A,T) = −SdT + AhdP + 2γdA + μdN. | (2) |
The normal pressure and height are defined in terms of the free energies as
(3) |
The difference in the specific Helmholtz energy Δf = F/M, where M is the total mass of the fluid, is calculated by integrating the mean normal pressure as a function of the volume in the canonical ensemble
(4) |
(5) |
(6) |
(7) |
F(N,h,A,T) = −kBTlnZ(N,h,A,T) | (8) |
(9) |
respectively. From the three equations above it follows that the Gibbs energy can be obtained from the Helmholtz energy,
(10) |
For sufficiently high surface number densities Γ = N/A, the system is large and the Helmholtz energy F is a differentiable and convex function of the height, and the above expression reduces to the Legendre transform of the Helmholtz energy to the Gibbs energy,
GL(N,P,A,T) = F(N,h,A,T) + PhA. | (11) |
For low surface number densities Γ, the system is small, and the Helmholtz energy is non-convex and the integral in eqn (10) does not reduce to the Legendre transform. If the distribution of the normal pressure is sharply peaked it can however be calculated with a saddlepoint approximation,17,20,21
(12) |
This is the Legendre-Fenchel (LF) transform of the Helmholtz energy F to the Gibbs energy GLF. The LF transform returns only convex functions. If we apply it again,
(13) |
we obtain the convex envelope of the Helmholtz energy F**. The convex envelope is the largest function satisfying F** ≤ F, which is only equal to the original Helmholtz energy F if it is a convex function. In other words, the LF transform is not self-inverse if the function is non-convex.20,21 The LF transform can be defined as either the maximum or minimum. Since GLF must be convex, we can also obtain F** from a Legendre transform of GLF.
The Maxwell construction of equal areas for liquid-vapor coexistence is equivalent to the convex envelope of the Helmholtz energy F**. The equal area rule states that for a liquid-vapor coexistence the system follows a constant pressure Peq from volume Vl to Vg when the system evaporates, and conversely for condensation. The two volumes Vl and Vg at the pressure Peq are the binodal points of the pressure-volume curve. The equal area rule states
(14) |
The walls were made up of solid particles in a face-centered cubic lattice with a number density corresponding to a lattice constant a = 22/3σ, where σ is the fluid particle diameter. Each wall had Np = 5 × 104 solid particles and side lengths L = 100a ≈ 159σ. Each solid particle had a mass equal to the fluid particle mass, implying that the mass of the top solid wall (piston) was 5 × 104 times greater than a fluid particle. The mass of each particle were equal to m, which in reduced units is equal to one. The total mass of the fluid particles were M = Nm. In the canonical ensemble, the solid particles were fixed in space and could not move. In the isobaric ensemble, the solid particles in the lower wall were fixed in space, while the solid particles in the piston were free to move as a single rigid body in the x-direction. The piston could not rotate or move in the y- or z-directions. The fluid particles were placed between the walls. The system is visualized in Fig. 2 using OVITO.25 The fluid particles are drawn in red and the solid particles are drawn in blue. The simulation box had periodic boundary conditions in the y- and z-directions.
The fluid–fluid and fluid–solid particles interacted with the Lennard–Jones/spline potential,24
(15) |
The system was initialized by creating one slab of fluid particles between two slabs of solid particles, all in a face-centered cubic lattice. The fluid particles were initialized with a velocity such that the temperature was equal to T = 2ε/kB, and they were free to move for 104 timesteps to melt the face-centered cubic lattice of the fluid. In the canonical ensemble, the piston was moved with a constant velocity for 105 timesteps to reach the desired height h, from here on defined as the minimum distance between the center of a solid particle in the bottom solid wall and the center of a solid particle in the piston. The controlled height was in the range h ∈ [1.7, 110]σ. Then the position of the piston was fixed, and the system was run for 106 timesteps to calculate the mean normal pressure, 〈P〉.
The mean normal pressure was calculated as the arithmetic mean of the instantaneous forces of the particles in the piston at time t at time intervals Δt = 0.2
(16) |
In the isobaric ensemble, an external force was added to the piston after melting the face-centered cubic lattice of the fluid. The simulations with controlled normal pressures were run sequentially from low to high normal pressure to obtain the compression curve, and from high to low normal pressure to obtain the expansion curve. This was done to reach all available states of the system in the isobaric ensemble. The controlled normal pressures were in the range P ∈ [0.0045, 25]ε/σ3. Each of the simulations was run for 106 timesteps to calculate the mean height 〈h〉.
An external force fx in the x-direction was applied to each solid particle in the piston,
(17) |
(18) |
The mean of the specific internal energy was calculated as the mean potential energy plus the mean kinetic energy of the fluid particles,
(19) |
Fig. 3 Normal pressure as a function of the height in isochoric conditions for varying surface number densities. The insert is an enlargement of the region where structural transitions occur. |
Fig. 4 Specific internal energy as a function of the height in isochoric conditions for varying surface number densities. |
The impact of the choice of environmental control variables on the normal pressure-height relationship, the basis of the findings reported, is illustrated in Fig. 8. This provides a basis for examination of Legendre and the Legendre-Fenchel transforms, see Fig. 9 and 10. The various results will now be explained and discussed.
For smaller heights or surface number densities, the normal pressure goes through a local minimum and maximum as the height changes. This implies that the Helmholtz energy is non-convex. The specific internal energy has also a minimum, see Fig. 4. The entropy is monotonically increasing, except for the case Γ = 1.18 which has a local minimum, see Fig. 5. The Helmholtz energy in Fig. 6 captures the trade-off between the internal energy and the entropy. The Helmholtz energy as a function of height is non-convex for surface densities Γ < 1.18, which entails that the Legendre transform can not be applied. The insert in Fig. 6 magnifies the interesting region. The emerging structures are stabilized by the ability of the system to go to lower energy and higher entropy. The curves indicate a smooth structural transition.
Fig. 5 Difference in specific entropy as a function of the height in isochoric conditions for varying surface number densities. |
Fig. 6 Difference in specific Helmholtz energy as a function of height for isochoric conditions for varying surface number densities. |
Fig. 7 Top down view of fluid particles in isochoric conditions at height h = 22/3σ ≈ 1.59σ and surface number densities (top) Γ = 0.22 and (bottom) Γ = 0.79. In the bottom case the particles form a monolayer without defects. The solid particles are not shown. The mean normal pressure is 〈P〉 = (9.4 ± 0.1)ε/σ3, specific internal energy 〈u〉 = (−4.39 ± 0.03)ε/m, difference in the specific entropy 〈Δs〉 = −9.7kB/m, and difference in specific Helmholtz energy is 〈Δf〉 = 11.4ε/m.25 |
For the system to change from a fluid to a close-packing structure (face-centered cubic or hexagonal close-packed) without defects, the surface number density Γ must be
(20) |
In the extreme case of a monolayer, we assume that the fluid is packed in such a way that each fluid particle lies on average at a distance r0 = 21/6σ away from eight solid particles and four fluid particles. In addition, there are two solid particle neighbours and four fluid particle neighbours each at a distance ra = 22/3σ. All other particles lie beyond the cutoff distance rc and do not contribute to the potential energy.
The minimum specific potential energy of a monolayer is then
ep,0 = 10uLJ/s(r0) + 4uLJ/s(ra) ≈ −10.39ε/m, | (21) |
〈ep〉 = ep,0 + a〈r2〉 | (22) |
(23) |
The expected minimum mean specific internal energy is the sum of the mean specific potential and kinetic energies
〈u〉min = 〈ep〉 + 〈ek〉 ≈ −4.39ε/m | (24) |
The observed minimum of the specific internal energy for Γ = 0.79 is indeed 〈u〉 = (−4.39 ± 0.03)ε/m at h = 22/3σ ≈ 1.59σ, see Fig. 4. The simulated structure is visualised in the bottom panel of Fig. 7. The figure shows that the fluid particles have formed a hexagonal monolayer layer. The mean normal pressure is 〈P〉 = (9.4 ± 0.1)ε/σ3, difference in the specific entropy 〈Δs〉 = −9.7kB/m, and difference in specific Helmholtz energy is 〈Δf〉 = 11.4ε/m. The specific internal energy is at a minimum at this height, however, the Helmholtz energy is not.
A transition from a fluid to a close-packed structure under stress does not imply a first-order phase transition, a continuous transition from a fluid to a close-packed structure packing may occur. In other words, the free energy can be smooth and continuous during the transition.
Consider for comparison the familiar pressure-volume isotherms of cubic equations of state, for example, the van der Waals equation, for temperatures below the critical point. The Helmholtz energy is a non-convex function of volume. The binodal curve intersects the pressure-volume isotherms at two points a = (peq, Vl) and b = (peq, Vg) for T < Tc. The part of the isotherm between point a and b is known as the van der Waals loop. The Helmholtz energy is a non-convex function in this region. The line between the points a and b corresponds to the Maxwell construction of equal areas. See eqn (14). The double Legendre-Fenchel transform of the specific Helmholtz energy f gives its convex envelope f**, which corresponds to the Maxwell construction of equal areas. The spinodal curve intersects the isotherm at the local minimum and maximum, the spinodal region is a subset of the binodal region. The binodal region is metastable, while the spinodal region is unstable. Experimentally it is observed that fluids do not necessarily follow the van der Waals loop, but rather the straight line connecting points a and b. This is a first-order phase transition, as the pressure is non-smooth at the points a and b. The system is free to decompose in the binodal and spinodal region, which is energetically more favorable. During liquid-vapor phase decomposition the pressure is constant and equal to Peq. The constant pressure corresponds to the double tangent line in the free energy. This double tangent line is the largest convex curve that satisfies f** ≤ f, which is exactly its convex envelope.
The states in the binodal and spinodal regions can be stable due to the restrictions that the confinement imposes on the system. The coexistence of fluid and close-packed structures is not possible in these simulations, as this would imply that there would be regions with differing heights. This could be possible if the walls were free to rotate or deform, however, the system is restricted such that the height is everywhere the same. In isochoric conditions, there is a smooth transition from a fluid to a close-packed structure. In isobaric conditions, the system is less restricted, and the system undergoes a first-order phase transition when it enters the spinodal region, see Fig. 8 (center). This is because the spinodal region is unstable. The set of control variables provide different stable states with their different restrictions on the system.
(25) |
(26) |
The function gLF(N,P,A,T) presents two non-smooth points, indicating a first-order phase transition. The isothermal compressibility in isochoric conditions is negative, and is well defined in all available states. In isobaric conditions, the isothermal compressibility is undefined when the free energy is non-smooth. It is well defined and non-negative for all other states. The reason for this is that the normal pressure is increased by applying a directed force that seeks to compress the system. If the system was to increase its volume in response to this compression force, the fluid center of mass would have to move in the direction opposite to the applied force, thus violating conservation of linear momentum.
The specific Gibbs energy is presented in Fig. 9 and 10 as a function of normal pressure and height, respectively. For the large thermodynamic system, i.e. the bottom panels where Γ = 1.18, the specific Gibbs energy of compression (orange curve) coincides with the Legendre transform (blue curve), and the Legendre-Fenchel transform (black dotted curve) of the specific Helmholtz energy. This is the expected behavior of large systems.
Fig. 9 Specific Gibbs energy as a function of normal pressure. The surface number densities from top to bottom are Γ = 0.22, Γ = 0.81, and Γ = 1.18, respectively. |
Fig. 10 Specific Gibbs energy as a function of height. The surface number density in the figures from top to bottom are Γ = 0.22, Γ = 0.81, and Γ = 1.18, respectively. |
At lower surface number densities, the Legendre transform ceases to apply. But we can still understand the system in terms of its thermodynamic properties. The normal pressure-height curves form a van der Waals loop for isochoric conditions. The specific Gibbs energy from compression differs from that of expansion for isobaric conditions. The Legendre-Fenchel transform (dotted curve) follows the Legendre transform (blue curve), except in the van der Waals loop, which is cut out by the Legendre-Fenchel transform.
The underlying distribution of normal pressures in the isochoric conditions is highly peaked, implying that the conditions for the saddlepoint approximation, necessary for the Legendre-Fenchel transform, are obeyed. The small error bar in the normal pressure, which is the standard deviation, testifies to this, see Fig. 8. The mean relative standard deviation is 1.1%, 0.4%, 0.09% for Γ = 0.22, Γ = 0.81, and Γ = 1.18, respectively.
The results of the slit pore simulations show that structural changes are more restricted when in isochoric conditions than in isobaric conditions. The findings are similar to observations of polymer stretching.16 Also here a transition was found between states. But then the different regimes referred to the type of degrees of freedom of the molecule (active or frozen rotational or stretching degrees of freedom).16,17 We have seen that the Legendre-Fenchel transforms apply to two widely different cases, so we may pose the question: Does the transform apply in general to energy conversion in small systems? From the mathematics point of view, this seems likely.28,29 More data is needed before we may conclude, but this study brings out an interesting perspective. If the answer is yes, we may have a new tool for energy conversion in small systems.
When the Helmholtz energy is non-convex in the isochoric ensemble the system exhibits hysteresis in the isobaric ensemble. Hysteresis means that the state of the system depends on the system's history. The specific Gibbs energy depends on whether the system comes from a compressed or expanded state. In the isobaric ensemble, available states can be explored by first compressing and then expanding the system. One of the two available states at the same controlled normal pressure in the compression and expansion curves are metastable, the other state is stable. The Legendre-Fenchel transform gives the stable states. Since the piston cannot deform the energy barrier to go from a metastable state to a stable state is high, which is the reason for the pronounced hysteresis in this system. The loop created in the specific Gibbs energy profile in isobaric conditions is interesting. The existence of a loop means in principle, that work can be extracted from the loop by only two steps, namely compression, and expansion. The slit pore may serve as a very first model for deformable porous media in this context.
In isochoric conditions, there is a smooth transition from a fluid to a close-packed structure. The Helmholtz energy of this smooth transition is non-convex for small surface number densities. The system is restricted in such a way that there must be a smooth transition. It is not possible for the system to have coexistence of a fluid and a close-packed structure because that would imply that the system could have two different heights at the same time. A possible future generalization of this work could be to allow the solid walls to deform in a less restricted manner such that it would be possible for the system to have varying heights. In this way the system might allow for coexistence of a fluid and a close-packed structure. We hypothesize that the hysteresis in such a system will be less pronounced. Vapor-liquid coexistence is not restricted in this way, the vapor and liquid can have two different volumes. Since the height is controlled, the system is restricted to that height. However, the normal pressure is controlled in isobaric conditions. As a result, there is a first-order phase transition from a fluid to a close-packed structure for small surface number densities. There is no coexistence of fluid and close-packed structure for the same reason as for isochoric conditions. The Legendre transform does not apply to non-convex free energies, and we have shown the Legendre-Fenchel transform must be applied.
Small systems in Hill's sense are not extensive. The system is large in the surface area A, and small in the height h. They are characterized by giving different responses to their ensemble of control. In the present case, we have studied and compared two small systems, i.e. isochoric and isobaric fluids confined to slit pores. Despite their smallness, we have found that they are perfectly well describable by thermodynamics when the theory is adjusted to deal with smallness. One such adjustment means to use Legendre-Fenchel transforms, rather than Legendre transforms. Doing that, we have shown that the specific Helmholtz energy can be transformed into the specific Gibbs energy. The findings are general, and support the systematic approach of Hill for descriptions of other small systems.
This journal is © The Royal Society of Chemistry 2022 |