# Phase behaviour of fluids in undulated nanopores

Martin Pospíšil  Department of Physical Chemistry, University of Chemical
Technology Prague, Praha 6, 166 28, Czech Republic;
The Czech Academy of Sciences, Institute of Chemical Process Fundamentals,
Department of Molecular Modelling, 165 02 Prague, Czech Republic  Alexandr
Malijevský  Department of Physical Chemistry, University of Chemical
Technology Prague, Praha 6, 166 28, Czech Republic; The Czech Academy of
Sciences, Institute of Chemical Process Fundamentals, Department of Molecular
Modelling, 165 02 Prague, Czech Republic

###### Abstract

The geometry of walls forming a narrow pore may qualitatively affect the phase
behaviour of the confined fluid. Specifically, the nature of condensation in
nanopores formed of sinusoidally-shaped walls (with amplitude $A$ and period
$P$) is governed by the wall mean separation $L$ as follows. For $L>L_{t}$,
where $L_{t}$ increases with $A$, the pores exhibit standard capillary
condensation similar to planar slits. In contrast, for $L<L_{t}$, the
condensation occurs in two steps, such that the fluid first condenses locally
via bridging transition connecting adjacent crests of the walls, before it
condenses globally. For the marginal value of $L=L_{t}$, all the three phases
(gas-like, bridge and liquid-like) may coexist. We show that the locations of
the phase transitions can be described using geometric arguments leading to
modified Kelvin equations. However, for completely wet walls, to which we
focus on, the phase boundaries are shifted significantly due to the presence
of wetting layers. In order to take this into account, mesoscopic corrections
to the macroscopic theory are proposed. The resulting predictions are shown to
be in a very good agreement with a density functional theory even for
molecularly narrow pores. The limits of stability of the bridge phase,
controlled by the pore geometry, is also discussed in some detail.

##  I Introduction

It is well known that fluids which are subjects of narrow confinements exhibit
quite different phase behaviour compared to their bulk counterparts rowlin ;
hend ; nakanishi81 ; nakanishi83 ; gelb . A fundamental example of this is a
phenomenon of capillary condensation occurring in planar slits made of two
identical parallel walls a distance $L$ apart. Macroscopically, the shift in
the chemical potential, relative to its saturation value $\mu_{\rm sat}$, at
which capillary condensation occurs, is given by the Kelvin equation (see,
e.g. Ref.gregg )

$\delta\mu_{\rm cc}^{\parallel}=\frac{2\gamma\cos\theta}{L\Delta\rho}\,,$ (1)

where $\gamma$ is the liquid-gas surface tension, $\theta$ is the contact
angle characterizing wetting properties of the walls,
$\Delta\rho=\rho_{l}-\rho_{g}$ is the difference between the number densities
of coexisting bulk liquid and gas. Here, the Laplace pressure difference
$\delta p$ across the curved interface separating the gas and liquid phases
has been approximated by $\delta p\approx\delta\mu\Delta\rho$, accurate for
small undersaturation evans85 . Microscopic studies of capillary condensation
based on density functional theory (DFT) evans84 ; evans85 ; evans85b ;
evans86 ; evans86b ; evans87 ; evans90  and computer simulation binder05 ;
binder08  have shown that the Kelvin equation is surprisingly accurate even
for microscopically narrow pores. This is particularly so for walls that are
partially wet ($\theta>0$) where the Kelvin equation remains quantitatively
accurate even for slits which are only about ten molecular diameters wide
tar87 . For completely wet pores ($\theta=0$), Eq. (1), which ignores the
presence of thick wetting layers adsorbed at the walls, is somewhat less
accurate but its mesoscopic extension based on Derjaguin’s correction derj
provides excellent predictions for the location of capillary condensation even
at nanoscales.

Capillary condensation in planar slits can be interpreted as a simple finite-
size shift of the bulk liquid-gas transition controlled by a single geometric
parameter $L$, which also determines a shift in the critical temperature
$T_{c}(L)$ beyond which only a single phase in the capillary is present
evans86 . On a mean-field level, the transition can be determined by
constructing adsorption (initiated at a gas-like state) and desorption
(initiated at a liquid-like state) isotherms which form low- and high-density
branches of the van der Waals loop and which have the same free energies right
at the chemical potential $\mu_{\rm cc}^{\parallel}=\mu_{\rm
sat}-\delta\mu_{\rm cc}^{\parallel}$.

However, the situation becomes significantly more sophisticated for pores of
non-planar geometry. In those more general cases the translation symmetry may
be broken not only across but also along the confining walls, which can make
the phenomenon of capillary condensation much more subtle. For example, by
considering a semi-infinite slit made of capping the open slit at one end, the
transition, which occurs at the same value of $\mu_{\rm cc}^{\parallel}$, can
become second-order due to the formation of a single meniscus which
continuously unbinds from the capped end, as the chemical potential is
increased towards $\mu_{\rm cc}^{\parallel}$ darbellay ; evans_cc ; tasin ;
mistura ; mal_groove ; parry_groove ; mistura13 ; our_groove ; bruschi2 ;
fin_groove_prl . If such a capped capillary is not semi-infinite but of a
finite depth $D$ (measuring a distance between the capped and the open end of
the capillary), asymmetric effective forces acting on the meniscus from both
capillary ends round and shift the transition by an amount scaling with
$D^{3}$ for systems with dispersion forces fin_groove .

Another example of the impact of broken translation symmetry on phase
behaviour in narrow slits is when the walls are no longer smooth but are
structured chemically or geometrically. If the width of such slits is
considerably larger than a length characterizing the lateral structure, the
condensation scenario will differ from that for non-structured slits just
quantitatively. For instance, if the walls are formed of two species with
different contact angles, then the location of capillary condensation will be
macroscopically given by Eq. (1), in which Young’s contact angle is replaced
by the effective contact angle given by Cassie’s law cassie ; het_slit_prl .
However, for sufficiently narrow pores the walls structure may play more
significant role and can change the mechanism of the condensation, which
happens in two steps, such that the fluid first condenses only locally by
forming liquid bridges across the pore het_slit_prl ; chmiel ; rocken96 ;
rocken98 ; bock ; swain ; bock2 ; valencia ; hemming ; schoen2 .

Figure 1: A sketch illustrating three possible phases in a nanopore of a mean
width $L$ formed by sinusoidally-shaped walls with an amplitude $A$ and period
$P$: a) gas phase, b) bridge phase, and c) liquid phase.

In this paper, we study phase behaviour of fluids in pores formed of smoothly
undulated and completely wet walls. The particular emphasis is put on model
pores formed by a pair of sinusoidally-shaped walls, where one of the walls is
a reflection symmetry of the other. In this way, the translation symmetry of
the system is broken along two of the Cartesian axes ($x$ and $z$, say) but is
maintained along the remaining one ($y$ axis). Let $P$ be the period and $A$
the amplitude of the walls, whose mean separation is $L$. Hence, the local
width of the pore smoothly varies (as a function of $x$) between $L-2A$ and
$L+2A$. The model, together with a macroscopic illustration of possible
phases, which the confined fluid is anticipated to adopt, is sketched in Fig.
1.

The purpose of this paper is to present a detailed analysis of the phase
behaviour of (simple) fluids in such confinements. To this end, we first
formulate a purely macroscopic theory based on geometric arguments. This
allows us to determine the mean separation of the walls $L_{t}$, which
separates two possible condensation regimes. For $L>L_{t}$, capillary
condensation occurs in one step and macroscopically its location is given by a
trivial modification of Eq. (1), leading to a marriage of the Kelvin equation
with Wenzel’s law wenzel , such that the latter is of the form

$``\cos{\theta^{*}}"=r\cos\theta\,.$ (2)

Here $r$ is the roughness parameter of the wall and the symbol
$``\cos{\theta^{*}}"$ characterizes an enhancement of the wetting properties
of the wall due to its nonplanar geometry.

In contrast, for $L<L_{t}$, when the condensation is a two-step process, the
phase boundaries between gas-like (G) and bridge (B) phases, as well as
between bridge and liquid-like (L) phases are macroscopically determined. This
requires to find how the location of the bridging films varies with the
chemical potential and we also examine the limits of metastable extensions of
B phase due to the pore geometry. Moreover, in order to capture the effect of
adsorbed wetting layers, which the purely macroscopic theory neglects, the
mesoscopic corrections, incorporating the wetting properties of the walls, are
included. The resulting predictions will be shown to be in an excellent
agreement with a microscopic density functional theory (DFT), even on a
molecular scale of the walls parameters.

The rest of the paper is organized as follows. In section II we formulate a
macroscopic theory determining phase boundaries between all the G, B, and L
phases using simple geometric arguments. We start with considering a general
model of a nanopore whose shape is represented by a smooth function $\psi(x)$,
before we focus specifically to sinusoidally-shaped walls. The geometric
considerations are further applied to estimate the range of stability of B
phase. In section III we extend the macroscopic theory by including the
mesoscopic corrections for walls exerting long-range, dispersion potentials.
In section IV we formulate the microscopic DFT model, which we use to test the
aforementioned predictions; the comparison is shown and discussed in section
V. Section VI is the concluding part of the paper where the main results of
this work are summarized and its possible extensions are discussed.

##  II Macroscopic description of capillary condensation and bridging
transition for completely wet walls

###  II.1 General model

We consider a pore of a mean width $L$ formed by a pair of walls each of shape
$\psi(x)$, where $x$ is a horizontal axis placed along the pore, such as in
Fig. 2. More specifically, the vertical heights of the top and bottom walls
measured along the $z$-axis are $z_{w}(x)$ and $-z_{w}(x)$, respectively, with

$z_{w}(x)=\frac{L}{2}-\psi(x)\,,$ (3)

assuming that $\psi(x)$ is a differentiable, even and periodic function of
wavelength $P$ with a global minimum at $x=0$. Furthermore, we assume that the
walls are completely wet which means that their Young contact angle $\theta=0$
and that the pressure of the bulk reservoir, with which the confined fluid is
in equilibrium, is below the saturated vapour pressure, i.e., $p<p_{\rm sat}$.

At low pressures, the pore is filled with a gas-like phase of a low density
$\rho_{g}$ and the corresponding grand potential per unit length over a single
period can be approximated macroscopically as

$\Omega_{g}=-pS+2\gamma_{\rm wg}\ell_{w}\,.$ (4)

Here, $\gamma_{\rm wg}$ is the wall-gas surface tension, $S=PL$ is the area
between the walls in the $x$-$z$ plane over one period and

$\ell_{w}=2\int_{0}^{P/2}\sqrt{1+\psi^{\prime 2}(x)}{\rm d}x\,,$ (5)

is the arc-length of the boundary of each wall in the $x$-$z$ projection over
one period.

At sufficiently high pressures, however, the pore will be filled by a liquid-
like phase of a high density $\rho_{l}$, with the grand potential per unit
length

$\Omega_{l}=-p_{l}S+2\gamma_{\rm wl}\ell_{w}\,,$ (6)

where $p_{l}$ is the pressure of the metastable bulk liquid and $\gamma_{\rm
wl}$ is the liquid-wall surface tension. The system undergoes first-order
capillary condensation from the gas-like to the liquid-like phase when
$\Omega_{g}=\Omega_{l}$. Using Young’s equation it follows that the capillary
condensation occurs when the pressure difference $\delta p=p-p_{l}$ is

$\delta p=\frac{2\gamma\ell_{w}}{S}\,.$ (7)

More conveniently, this can be expressed in terms of the chemical potential

$\delta\mu_{\rm cc}=\frac{2\gamma\ell_{w}}{S\Delta\rho}\,,\;\;\;({\textrm{gas-
liquid}})\,,$ (8)

measuring the shift of the transition from saturation.

Provided the shape of the confining walls is only slowly varying, this can be
approximated by

$\delta\mu_{\rm cc}=\frac{2\gamma}{L\Delta\rho}\left(1+\delta\right)$ (9)

where

$\delta=\frac{1}{P}\int_{0}^{P/2}\psi^{\prime 2}(x){\rm d}x$ (10)

is a dimensionless parameter characterizing the wall undulation, which is
trivially related with the roughness parameter ($r\approx 1+\delta$) appearing
in Eq. (2).

Figure 2: A scheme of a bridge phase inside a nanopore formed by two walls of
the local height $z_{w}(x)$ and $-z_{w}(x)$ relative to the horizontal axis.
The macroscopic picture assumes that the menisci demarcating the liquid bridge
are parts of a circle of the Laplace radius $R$ which meets tangentially the
walls at the points $[\pm x_{0},\pm z_{0}]$.

Apart from the gas-like and the liquid-like phases, the non-planar geometry
may also enable a formation of an intermediate phase (or phases), where the
fluid condenses only locally near the adjacent parts of the walls, giving rise
to a periodic array of liquid bridges (see Fig. 2). For simplicity, we will
further assume that the pore geometry allows only for a single bridge per
period. The points $[\pm x_{0},\pm z_{0}]$ at which the menisci of the bridges
meet the walls are pressure-dependent and, macroscopically, are specified by
two conditions: firstly, the menisci are of a circular shape with the Laplace
radius of curvature $R=\gamma/\delta p$ and, secondly, the menisci meet the
walls tangentially (since the walls are completely wet). This leads to the
implicit equation for $x_{0}$:

$z_{w}^{2}(x_{0})(1+z_{w}^{\prime 2}(x_{0}))=R^{2}\,,$ (11)

which, together with (3), determines the location of the bridge. This, in
turn, allows to obtain a macroscopic approximation for the grand potential per
unit length of the bridge phase

$\Omega_{b}=-pS_{g}-p_{l}S_{l}+2\gamma_{wg}\ell_{w}^{g}+2\gamma_{wl}\ell_{w}^{l}+2\gamma\ell\,,$
(12)

where

$S_{l}=2\left(2\int_{0}^{x_{0}}z_{w}(x){\rm d}x-S_{m}\right)$ (13)

and $S_{g}=S-S_{l}$, are the volumes (per unit length) occupied by liquid and
gas, respectively. Here, the symbol

$S_{m}=R^{2}\sin^{-1}\left(\frac{z_{0}}{R}\right)-z_{0}\sqrt{R^{2}-z_{0}^{2}}$
(14)

represents the area of to the circular segment highlighted by yellow colour in
Fig. 2.

Furthermore,

$\ell_{w}^{l}=2\int_{0}^{x_{0}}\sqrt{1+\psi^{\prime 2}(x)}{\rm d}x$ (15)

and $\ell_{w}^{g}=\ell_{w}-\ell_{w}^{l}$ are the respective arc-lengths of the
wall-liquid and wall-gas interfaces. Finally,

$\ell=2R\sin^{-1}\left(\frac{z_{0}}{R}\right)$ (16)

is an arc-length of each meniscus.

First-order bridging transition from G to B occurs at the chemical potential
$\mu_{\rm gb}=\mu_{\rm sat}-\delta\mu_{\rm gb}$, when its shift from
saturation is

$\delta\mu_{\rm
gb}=\frac{2\gamma(\ell_{w}^{l}-\ell)}{S_{l}\Delta\rho}\,,\;\;\;({\textrm{gas-
bridge}})\,,$ (17)

as obtained by balancing $\Omega_{g}$ and $\Omega_{b}$. If $\delta\mu_{\rm
gb}<\delta\mu_{\rm cc}$, then the bridge state is never the most stable phase
and the bridging transition is preceded by capillary condensation. However, if
$\delta\mu_{\rm gb}>\delta\mu_{\rm cc}$, the condensation is a two-step
process, such that the system first condenses locally, when $\mu=\mu_{\rm
gb}$, and eventually globally when $\Omega_{b}=\Omega_{l}$, which occurs for
the chemical potential $\mu_{\rm bl}=\mu_{\rm sat}-\delta\mu_{\rm bl}$, with

$\delta\mu_{\rm
bl}=\frac{2\gamma(\ell+\ell_{w}^{g})}{S_{g}\Delta\rho}\,,\;\;\;({\textrm{bridge-
liquid}})\,.$ (18)

###  II.2 Sinusoidally shaped walls

We will now be more specific and consider models of sinusoidally shaped walls
by setting

$\psi=A\cos(kx)\,,$ (19)

where $A$ is the amplitude and $k=2\pi/P$ is the wave number of the confining
walls. In this special case, the geometric measures (5), (10), (13), and (15)
become:

$\delta=\frac{A^{2}k^{2}}{2}\,,$ (20)
$S_{l}=2Lx_{0}-\frac{4A}{k}\sin(kx_{0})-2R^{2}\sin^{-1}\left(\frac{z_{0}}{R}\right)+2z_{0}\sqrt{R^{2}-z_{0}^{2}}\,,$
(21) $\ell_{w}^{l}=2E(x_{0},iAk)\,,$ (22)

and

$\ell_{w}=\frac{4E(iAk)}{k}\,,$ (23)

where $E(\cdot)$ and $E(\cdot,\cdot)$ are the complete and incomplete elliptic
integrals of second kind, respectively, and $i$ is the imaginary unit.

####  II.2.1 Capillary condensation

It follows from Eqs. (8) and (23) that the global condensation from capillary
gas to capillary liquid occurs at the chemical potential:

$\delta\mu_{\rm cc}=\frac{4\gamma E(iAk)}{\pi L\Delta\rho}\,,$ (24)

which is a simple modification of the Kelvin equation (1) for planar slits
with completely wet walls ($\theta=0$). This can also be expressed as a series
in the powers of the aspect ratio $a=A/P$:

$\delta\mu_{\rm cc}=\delta\mu_{\rm
cc}^{\parallel}\left(1+\pi^{2}a^{2}+{\cal{O}}(a^{4})\right)\,.$ (25)

From Eq. (25) it follows that the sinusoidal geometry enhances condensation
(as expected), i.e. occurs farther from saturation compared to a planar slit.
Clearly, this is due to the fact that the area of the (hydrophilic) walls
increases with $a$, while the volume of the metastable liquid in the condensed
state remains unchanged. Eq. (25) also implies that the location of the
capillary condensation in sinusoidal slits does not depend on the wall
parameters $A$ and $P$ independently but only on their ratio in a roughly
quadratic manner. The relevance of these macroscopic predictions for
microscopic systems will be tested in section V.

####  II.2.2 Bridging transition

From Eq. (11) it follows that the horizontal distance $\pm x_{0}$ determining
the location of the bridge meniscus of radius $R$ is given implicitly by

$\left(\frac{L}{2}-A\phi\right)^{2}\left[1+k^{2}A^{2}(1-\phi^{2})\right]=R^{2}\,,$
(26)

with $\phi\equiv\cos(kx_{0})$. This is a quartic equation, the solution of
which is thus accessible analytically. However, for slightly undulated walls,
$\delta\ll 1$, it is more transparent to express $\phi$ as a power series in
$\delta$. To this end, we introduce an auxiliary parameter $\epsilon$:

$\left(\frac{L}{2}-A\phi\right)^{2}\left[1+2\epsilon\delta(1-\phi^{2})\right]=R^{2}\,,$
(27)

such that the solution is sought in the form of

$\phi(\epsilon)=\sum_{n=0}^{\infty}\phi_{n}\epsilon^{n}\,.$ (28)

When plugged into (27), the coefficients $\phi_{n}$ are easily determined by
balancing the corresponding powers of $\epsilon$:

$\phi_{0}=\frac{\frac{L}{2}-R}{A}\,,$ (29)
$\phi_{1}=\frac{Rk^{2}A(1-\phi_{0}^{2})}{2}\,,$ (30)

etc. Substituting back to (28) and setting $\epsilon=1$, one obtains:

$\phi=\frac{L-2R}{2A}+\frac{\delta}{2A}\left(1-\frac{(L-2R)^{2}}{4A^{2}}\right)+\mathcal{O}(\delta^{2})\,.$
(31)

This can be further simplified by expanding $\phi\approx 1-k^{2}x_{0}^{2}/2$,
which to the lowest order in $\delta$ allows for this simple approximation:

$x_{0}\approx\sqrt{\frac{2(1-\phi_{0})}{k^{2}}}\,,$ (32)

with $\phi_{0}$ given by (29).

Once $x_{0}$ is known, $S_{l}$ and $\ell_{w}^{l}$ (as well as $S_{g}=S-S_{l}$
and $\ell_{w}^{g}=\ell_{w}-\ell_{w}^{l}$) can be determined from Eqs. (21–23).
These measures are eventually substituted into Eqs. (17) and (18) to solve for
the location of the gas-bridge and the bridge-liquid transitions in terms of
the corresponding Laplace radii, $R_{\rm gb}=\gamma/(\delta\mu_{\rm
gb}\Delta\rho)$ and $R_{\rm bl}=\gamma/(\delta\mu_{\rm bl}\Delta\rho)$.

####  II.2.3 Spinodals of bridging transitions

Figure 3: Illustration of the macroscopic estimation of the lower (a) and
upper (b) spinodals of bridging transition in sinusoidal pores.

In contrast to G and L phases, which, on a macroscopic level, have both
infinite metastable extensions, the stability of bridging films is restricted
by the pore geometry. As is illustrated in Fig. 3, for the given pore
parameters there are lower and upper limits in the values of the Laplace
radius, $R_{s}^{-}$ and $R_{s}^{+}$, allowing for a formation of the bridging
film.

The lower spinodal of B phase corresponds to the smallest Laplace radius,
which still enables a formation of the bridge, such that the menisci just
connect each other, cf. Fig. 3a. In order to determine $R_{s}^{-}$, we will
approximate the shape of the crests by a parabola

$z_{w}(x)\approx c_{1}+c_{2}x^{2}\,,$ (33)

corresponding to an expansion of $z_{w}(x)$ to second order around its
minimum. Specifically for the sinusoidal pores, the coefficients in Eq. (33)
are $c_{1}=L/2-A$ and $c_{2}=Ak^{2}/2$. This approximation seems adequate,
since the menisci are close to the origin.

Assuming a circular shape of the menisci, the contact points must satisfy

$R_{s}^{-}=\frac{x_{0}^{2}+z_{0}^{2}}{2x_{0}}$ (34)

and the continuity condition further implies that

$R_{s}^{-}=x_{0}(2c_{2}z_{0}+1)\,.$ (35)

Eqs. (34) and (35), together with Eq. (33) upon substituting for $x_{0}$, form
a set of three equations for three unknowns, yielding the contact points of
the menisci

$x_{0}=\frac{c_{1}}{\sqrt{2c_{1}c_{2}+1}}\,,$ (36)
$z_{0}=c_{1}\frac{3c_{1}c_{2}+1}{2c_{1}c_{2}+1}$ (37)

and its radius

$R_{s}^{-}=\frac{2c_{1}^{2}c_{2}(3c_{1}c_{2}+2)}{(2c_{1}c_{2}+1)^{\frac{3}{2}}}\,.$
(38)

As for the largest Laplace radius, $R_{s}^{+}$, of a meniscus, which can still
fit into the pore, we simply adopt the approximation:

$R_{s}^{+}=\frac{L}{2}+A\,,$ (39)

which corresponds to the state, at which the meniscus meets the walls at the
widest part of the pore, see Fig. 3b. This estimation of the upper spinodal of
B phase is justified by the assumption that the aspect ratio $a=A/P$ is not
too large.

##  III Mesoscopic corrections

In this section we extend the macroscopic theory by taking into account the
presence of wetting layers adsorbed at the confining walls.

###  III.1 Wide pores

We first consider wide pores experiencing one-step capillary condensation from
G to L. In general, the local thickness $\ell(x)$ of wetting layers is a
functional of the wall shape, $\ell(x)=\ell[\psi](x)$, which, in principle,
could be contructed using, e.g., a sharp-kink approximation for long-range
microscopic forces dietrich  or a non-local interfacial Hamiltonian for short-
range microscopic forces nonlocal . However, even for simple wall geometries,
such as sinusoids as specifically considered here, either approach would lead
to complicated expressions whose solutions would require numerical treatments.
Instead, we propose a simple modification of Derjaguin’s correction for the
Kelvin equation for planar slits evans85 ; evans85b . Thus, specifically for
long-range microscopic forces and for walls of small roughness, we propose the
following Derjaguin’s-like correction for the generalized Kelvin equation (8)

$\delta\mu_{\rm cc}=\frac{2\gamma\ell_{w}}{(L-3\ell_{\pi})\Delta\rho}\,,$ (40)

which for the sinusoidal model becomes

$\delta\mu_{\rm cc}=\frac{4\gamma E(iAk)}{\pi(L-3\ell_{\pi})\Delta\rho}\,.$
(41)

Here, $\ell_{\pi}$ is the thickness of the wetting layer adsorbed at a single
planar wall at the given bulk state. We recall that the factor of $3$ is
associated with the character of the long-range, dispersion forces, which we
will consider in our microscopic model and which would be changed to $2$ for
short-range forces evans85 ; evans85b . Clearly, the approximation
$\ell(x)\approx\ell_{\pi}$ seems plausible only for geometries of small
roughness (aspect ratio) which we focus on and for which we will test Eq. (41)
by comparing with DFT results. Furthermore, taking into account that Eqs. (40)
and (41) refer to wide pores, capillary condensation is expected to occur near
the bulk coexistence where $\ell_{\pi}$ can be described analytically in its
known asymptotic form.

###  III.2 Narrow pores

Figure 4: Illustration of the RP geometric construction of the bridge phase in
a completely wet sinusoidal nanopore by taking into account the wetting layers
nature . a) The walls are first coated by wetting layers, whose normal width
is $\ell_{\pi}$ corresponding to a thickness of the liquid film adsorbed on a
planar wall at the given chemical potential. In the second step, the circular
menisci of the Laplace radius $R=\gamma/(\delta\mu\Delta\rho)$ are drawn, such
that they meet the wetting layers tangentially; b) The construction of the
shape of the interface $\tilde{\psi}(x)$ corresponding to the wetting layers.
The unit vectors $\mathbf{n}$ and $\mathbf{t}$ are normal and tangent to the
wall at a given point $x^{\prime}$, respectively, using which the height of
the wetting layer can be determined at the point $x$, shifted from
$x^{\prime}$ according to Eq. (43).

For narrow pores of widths $L<L_{t}$, condensation occurs via formation of
capillary bridges. To account for wetting layers in this case, we will adopt
the geometric construction due to Rascón and Parry (RP) nature , which is
schematically illustrated in Fig. 4a. The construction consists of two steps:
i) first, each wall is covered by a wetting film whose width measured normally
to the wall is $\ell_{\pi}$, ii) secondly, menisci of the Laplace radius
$R=\gamma/(\delta\mu\Delta\rho)$ are connected tangentially to the _wetting
layers_ (rather than to the walls). By following this rule, we will first show
explicitly what the shape $\tilde{\psi}(x)$ of the wetting film interface is
for a general shape $\psi(x)$ of the wall, before applying this result
specifically for the sinusoidal wall.

Let us consider an arbitrary point $x^{\prime}$ on the horizontal axis, at
which the local height of the wall is $\psi(x^{\prime})$. Thus, the unit
tangential vector at this point is
${\mathbf{t}}=(1,\psi^{\prime}(x^{\prime}))/\sqrt{1+\psi^{\prime
2}(x^{\prime})}$, where the prime denotes a derivative with respect to
$x^{\prime}$; hence, the unit normal at $\psi(x^{\prime})$ is
${\mathbf{n}}=(-\psi^{\prime}(x^{\prime}),1)/\sqrt{1+\psi^{\prime
2}(x^{\prime})}$. According to the RP construction the local height of the
wetting film interface $\tilde{\psi}(x)$ is a distance $\ell_{\pi}$ from
$\psi(x^{\prime})$ along the normal vector, (see Fig. 4b). It follows that

$\tilde{\psi}(x)=\psi(x^{\prime})+\frac{\ell_{\pi}}{\sqrt{1+\psi^{\prime
2}(x^{\prime})}}$ (42)

where

$x=x^{\prime}-\frac{\ell_{\pi}\psi^{\prime}(x^{\prime})}{\sqrt{1+\psi^{\prime
2}(x^{\prime})}}\,.$ (43)

Considering walls of small gradients, the difference $x-x^{\prime}$ is
supposed to be small, thus

$\tilde{\psi}(x)\approx\psi(x^{\prime})+\frac{\ell_{\pi}}{\sqrt{1+\psi^{\prime
2}(x)}}$ (44)

and

$x^{\prime}\approx x+\frac{\ell_{\pi}\psi^{\prime}(x)}{\sqrt{1+\psi^{\prime
2}(x)}}\,,$ (45)

to first order in $x-x^{\prime}$. By substituting (45) into (44), one obtains
that

$\tilde{\psi}(x)\approx\psi\left(x+\frac{\ell_{\pi}\psi^{\prime}(x)}{\sqrt{1+\psi^{\prime
2}(x)}}\right)+\frac{\ell_{\pi}}{\sqrt{1+\psi^{\prime 2}(x)}}\,,$ (46)

which determines $\tilde{\psi}(x)$ explicitly. This can be further simplified
by expanding the first term on the r.h.s. to first order:

$\tilde{\psi}(x)\approx\psi(x)+\ell_{\pi}\sqrt{1+\psi^{\prime 2}(x)}\,.$ (47)

Specifically, for the sinusoidal wall, Eq. (47) becomes:

$\tilde{\psi}(x)\approx
A\cos(kx)+\ell_{\pi}\sqrt{1+A^{2}k^{2}\sin^{2}(kx)}\,.$ (48)

Thus, within the mesoscopic treatment, we proceed in the same manner as in the
previous section, except that $\psi(x)$ is replaced by $\tilde{\psi}(x)$, as
given by Eq. (48).

##  IV Density functional theory

Classical DFT evans79  is a tool of statistical mechanics describing
equilibrium behaviour of inhomogeneous fluids. Based on the variational
principle, the equilibrium one-body density $\rho({\bf r})$ of the fluid
particles is determined by minimizing the grand potential functional:

$\Omega[\rho]={\cal F}[\rho]+\int{\rm d}{\mathbf{r}}\rho({\bf
r})[V({\mathbf{r}})-\mu]\,.$ (49)

Here, ${\cal F}[\rho]$ is the intrinsic free-energy functional, which contains
all the information about the intermolecular interactions between the fluid
particles, $V({\mathbf{r}})$ is the external potential, which, in our case,
represents the influence of the confining walls and $\mu$ is the chemical
potential of the system and the bulk reservoir. The intrinsic free-energy
functional is usually separated into two parts:

${\cal F}[\rho]={\cal F}_{\rm id}[\rho]+{\cal F}_{\rm ex}[\rho]\,.$ (50)

The first, ideal-gas contribution, which is due to purely entropic effects, is
known exactly:

$\beta{\cal F}_{\rm id}[\rho]=\int{\rm d}{\bf
r}\rho({\mathbf{r}})\left[\ln(\rho({\bf r})\Lambda^{3})-1\right]\,,$ (51)

where $\Lambda$ is the thermal de Broglie wavelength and $\beta=1/k_{B}T$ is
the inverse temperature.

The remaining excess part of the intrinsic free energy arising from the fluid-
fluid interaction, ${\cal F}_{\rm ex}$, must be almost always approximated and
its treatment depends on the interaction model. For models involving hard
cores, the excess contribution can be treated in a perturbative manner, such
that it is typically further split into the contribution ${\cal F}_{\rm hs}$
due to hard-sphere repulsion, and the contribution ${\cal F}_{\rm att}$
arising from attractive interactions:

${\cal F}_{\rm ex}[\rho]={\cal F}_{\rm hs}[\rho]+{\cal F}_{\rm att}[\rho]\,.$
(52)

The hard-sphere part of the free-energy is described using Rosenfeld’s
fundamental measure theory ros

${\cal F}_{\rm hs}[\rho]=k_{B}T\int{\rm
d}{\mathbf{r}}\,\Phi(\\{n_{\alpha}\\})\,,$ (53)

where the free energy density $\Phi$ depends on the set of weighted densities
$\\{n_{\alpha}\\}$. Within the original Rosenfeld approach these consist of
four scalar and two vector functions, which are given by convolutions of the
density profile and the corresponding weight function:

$n_{\alpha}({\mathbf{r}})=\int{\rm d}{\bf
r}^{\prime}\rho({\mathbf{r}}^{\prime})w_{\alpha}({\mathbf{r}}-{\mathbf{r}}^{\prime})\;\;\alpha=\\{0,1,2,3,v1,v2\\}\,,$
(54)

where $w_{3}({\mathbf{r}})=\Theta(R-|{\mathbf{r}}|)$,
$w_{2}({\mathbf{r}})=\delta(R-|{\mathbf{r}}|)$,
$w_{1}({\mathbf{r}})=w_{2}({\mathbf{r}})/4\pi R$,
$w_{0}({\mathbf{r}})=w_{2}({\mathbf{r}})/4\pi R^{2}$,
$w_{v2}({\mathbf{r}})={\mathbf{r}}\delta(R-|{\mathbf{r}}|)/R$, and
$w_{v1}({\mathbf{r}})=w_{v2}({\mathbf{r}})/4\pi R$. Here, $\Theta$ is the
Heaviside function, $\delta$ is the Dirac function and $R=\sigma/2$ where
$\sigma$ is the hard-sphere diameter.

The attractive free-energy contribution is treated at a mean-field level:

$F_{\rm att}[\rho]=\frac{1}{2}\int d{\bf{r}}_{1}\rho({\mathbf{r}}_{1})\int
d{\bf{r}}_{2}\rho({\mathbf{r}}_{2})u_{\rm
att}(|{\mathbf{r}}_{1}-{\mathbf{r}}_{2}|)\,,$ (55)

where $u_{\rm att}(r)$ is the attractive part of the Lennard-Jones-like
potential:

$u_{\rm att}(r)=\left\\{\begin{array}[]{cc}0\,;&r<\sigma\,,\\\
-4\varepsilon\left(\frac{\sigma}{r}\right)^{6}\,;&\sigma<r<r_{c}\,,\\\
0\,;&r>r_{c}\,.\end{array}\right.$ (56)

which is truncated at $r_{c}=2.5\,\sigma$. For this model, the critical
temperature corresponds to $k_{B}T_{c}=1.41\,\varepsilon$.

The external potential $V({\mathbf{r}})=V(x,z)$ representing the presence of
the confining walls can be expressed as follows:

$V(x,z)=V_{w}(x,L/2+z)+V_{w}(x,L/2-z)\,,$ (57)

where $L$ is the mean distance between the walls and $V_{w}(x,z)$ describes a
potential of a single, sinusoidally shaped wall with an amplitude $A$ and
period $P=2\pi/k$, formed by the Lennard-Jones atoms distributed uniformly
with a density $\rho_{w}$:

$\displaystyle V_{w}(x,z)$ $\displaystyle=$
$\displaystyle\rho_{w}\int_{-\infty}^{\infty}{\rm
d}x^{\prime}\int_{-\infty}^{\infty}{\rm
d}y^{\prime}\int_{-\infty}^{A\cos(kx^{\prime})}{\rm d}z^{\prime}$ (58)
$\displaystyle u_{w}\left(\sqrt{(x-x^{\prime})^{2}+y^{\prime
2}+(z-z^{\prime})^{2}}\right)\,,$

where

$u_{w}(r)=4\,\varepsilon_{w}\left[\left(\frac{\sigma_{w}}{r}\right)^{12}-\left(\frac{\sigma_{w}}{r}\right)^{6}\right]$
(59)

is the 12-6 Lennard-Jones potential.

Minimization of (49) leads to the Euler–Lagrange equation

$\frac{\delta{\cal
F}[\rho]}{\delta\rho({\mathbf{r}})}+V({\mathbf{r}})-\mu=0\,,$ (60)

which can be recast into the form of a self-consistent equation for the
equilibrium density profile:

$\rho({\mathbf{r}})=\Lambda^{-3}\exp\left[\beta\mu-\beta
V({\mathbf{r}})+c^{(1)}({\mathbf{r}})\right]$ (61)

that can be solved iteratively. Here,
$c^{(1)}({\mathbf{r}})=c^{(1)}_{\mathrm{hs}}({\mathbf{r}})+c^{(1)}_{\mathrm{att}}({\mathbf{r}})$
is the one-body direct correlation function, whose hard-sphere contribution,

$c^{(1)}_{\rm hs}({\mathbf{r}})=-\sum_{\alpha}\int{\rm
d}{\mathbf{r}}^{\prime}\;\frac{\partial\Phi(\\{n_{\alpha}\\})}{\partial
n_{\alpha}}\,w_{\alpha}({\mathbf{r}}^{\prime}-{\mathbf{r}})$ (62)

and the attractive contribution,

$c^{(1)}_{\mathrm{att}}({\mathbf{r}})=-\beta\int{\rm
d}{\mathbf{r}}^{\prime}\;u_{\rm
att}(|{\mathbf{r}}-{\mathbf{r}}^{\prime}|)\,\rho({\mathbf{r}}^{\prime}),$ (63)

are obtained by varying ${\cal F}_{\rm hs}$ and ${\cal F}_{\rm att}$ w.r.t.
$\rho({\mathbf{r}})$, respectively.

Eq. (61) was solved numerically using Picard’s iteration on a 2D rectangular
grid with an equidistant spacing of $0.1\,\sigma$ (except for the calculations
presented in Fig. 8, where the considered wall parameters required reducing of
the grid spacing down to $0.02\,\sigma$). For evaluations of the integrals
(54), (62), and (63), which are in the form of convolutions, we applied the
Fourier transform. To this end, we followed the approach of Salinger and Frink
frink2003 , according to which Fourier transforms of $\rho({\mathbf{r}})$ and
$\partial\Phi(\\{n_{\alpha}\\})/\partial n_{\alpha}$ are evaluated numerically
using the fast Fourier transform, while $\hat{w}_{\alpha}$ are calculated
analytically four_conv :

$\displaystyle\hat{w}_{3}({\mathbf{k}})=4\pi R^{3}\,\frac{\sin(2\pi kR)-2\pi
k\cos(2\pi kR)}{(2\pi kR)^{3}},$ $\displaystyle\hat{w}_{2}({\mathbf{k}})=4\pi
R^{2}\,\frac{\sin(2\pi kR)}{2\pi kR},$
$\displaystyle\hat{w}_{1}({\mathbf{k}})=\frac{\hat{w}_{2}({\mathbf{k}})}{4\pi
R},\hskip
49.79231pt\hat{w}_{0}({\mathbf{k}})=\frac{\hat{w}_{2}({\mathbf{k}})}{4\pi
R^{2}},$
$\displaystyle\hat{w}_{\mathrm{v2}}({\mathbf{k}})=-2\pi{\mathbf{k}}\hat{w}_{3}({\mathbf{k}}),\qquad\hat{w}_{\mathrm{v1}}({\mathbf{k}})=\frac{\hat{w}_{\mathrm{v2}}({\mathbf{k}})}{4\pi
R}\,,$

where ${\mathbf{k}}=(k_{x},k_{z})$ is the vector in the reciprocal space and
$k=|{\mathbf{k}}|$. We applied the analogous approach to evaluate the
attractive contribution to the one-body direct correlation function,
$c^{(1)}_{\mathrm{att}}({\mathbf{r}})$, as given by Eq. (63). To this end, the
Fourier transform of $u_{\rm att}(r)$ has been determined analytically:

$\hat{u}_{\mathrm{att}}(k)=\frac{2\,\varepsilon\sigma^{2}}{3\,kr_{c}^{4}}\left[r_{c}^{4}\,\Psi(k;\sigma)-\sigma^{4}\,\Psi(k;r_{c})\right]\,,$
(64)

where

$\displaystyle\Psi(k;\xi)$ $\displaystyle=$ $\displaystyle 2\pi
k\xi\left(2\pi^{2}k^{2}\xi^{2}-1\right)\cos\left(2\pi k\xi\right)$
$\displaystyle+\left(2\pi^{2}k^{2}\xi^{2}-3\right)\sin\left(2\pi k\xi\right)$
$\displaystyle+8\pi^{4}k^{4}\xi^{4}\operatorname{Si}\left(2\pi k\xi\right)\,,$

where $\operatorname{Si}(x)=\int_{0}^{x}\sin(t)/t{\rm d}t$ is the sine
integral.

Once the equilibrium density is obtained, the phase behaviour of the system
can be studied by determining the grand potential, as given by substituting
$\rho({\bf r})$ back to (49), and the adsorption, defined as

$\Gamma=\frac{1}{LP}\int_{0}^{P}{\rm d}x\int_{-z_{w}(x)}^{z_{w}(x)}{\rm
d}z\;\left[\rho(x,z)-\rho_{b}\right]\,,$ (66)

where $\rho_{b}$ is the density of the bulk gas.

##  V Results and discussion

Figure 5: Adsorption isotherms obtained from DFT for nanopores formed by walls
with $A=2\,\sigma$ and $P=50\,\sigma$. The mean distance between the walls is
a) $L=8\,\sigma$, b) $L=9\,\sigma$, and c) $L=10\,\sigma$.

In this section, we present our DFT results for condensation of simple fluids
confined by two sinusoidally shaped walls using the model presented in the
previous section for the wall parameters $\varepsilon_{w}=0.8\,\varepsilon$
and $\sigma_{w}=\sigma$. The results are compared with the predictions based
on the macroscopic and mesoscopic arguments formulated in sections II and III.
In order to test the quality of the predictions, we will consider two
temperatures. We will first present our results for temperature
$k_{B}T/\varepsilon\doteq 1.28\approx k_{B}T_{w}/\varepsilon$, which is
slightly _below_ the wetting temperature. At this temperature, the contact
angle of the considered walls is very low (about $1^{\circ}$), which means
that macroscopically the walls can be viewed effectively as completely wet,
yet they remain covered by only a microscopically thin wetting films (since
the isolated walls exhibit first-order wetting). The reason behind this choice
is that we, first of all, wish to test the quality of the purely macroscopic
theory, which ignores the presence of wetting layers adsorbed at the walls.
Clearly, if the theory did not work reasonably well even in the absence of
wetting layers, then any attempt of its elaboration by including mesoscopic
corrections accounting for the presence of wetting layers would not be
meaningful. However, we will show that the macroscopic theory is in a close
agreement with the DFT results for all the types of phase transitions the
system experiences, and provides thus quantitatively accurate description of
the phase diagrams for the considered nanopores. In the next step, we will
consider a higher temperature, $k_{B}T/\varepsilon=1.35$, which is well above
the wetting temperature, and compare the DFT results with both the purely
macroscopic theory, as well as its mesoscopic modification. If not stated
otherwise, the comparison will be illustrated by considering walls with a
period $P=50\,\sigma$ and amplitudes $A=2\,\sigma$ or $A=5\,\sigma$. We
deliberately avoid systems with large aspect ratios for the reason discussed
in the concluding section.

###  V.1 $T\approx T_{w}$

Figure 6: Equilibrium 2D density profiles corresponding to a) capillary gas,
b) bridge, and c) capillary liquid phases in the nanopore with $A=2\,\sigma$,
$P=50\,\sigma$ and $L=8\,\sigma$ (cf. Fig. 5a).

We start with presenting adsorption isotherms obtained from DFT for nanopores
with fixed wall parameters but for different mean widths $L$ (see Fig. 5). For
the smallest $L$, the adsorption isotherm exhibits two jumps separating three
capillary phases. As expected, these correspond to G, which is stable
sufficiently far from saturation, B which is stabilized at intermediate
pressures and L, which forms close to saturation. The structure of all the
capillary phases are illustrated in Fig. 6 where the 2D equilibrium density
profiles are plotted. As the mean width of the pore $L$ is increased, the
interval of $\delta\mu$ over which the bridge phase is stable becomes smaller
and smaller, as is illustrated in Fig. 5b . Here, the locations of G-B and B-L
transitions become almost identical, which means that such a value of $L$ is
already very close to $L_{t}$ allowing for G-B-L coexistence. For $L>L_{t}$,
the bridge phase is never the most stable state, so that capillary gas
condenses to capillary liquid directly in a single-step (cf. Fig. 5c).

Figure 7: DFT results (symbols) showing a dependence of $\delta\mu_{\rm cc}$
on the aspect ratio $a=A/P$ for nanopores with $P=50\,\sigma$ and
$L=50\,\sigma$. The solid line represents the solution of the Kelvin equation
(25) and the dashed line shows the value of $\delta\mu_{\rm cc}^{\parallel}$
for capillary condensation in the planar slit obtained from 1D DFT. The inset
shows the log-log plot of the DFT results and the straight line with the slope
of $2$ confirms the prediction (25).  Figure 8: DFT results for a dependence
of $\delta\mu_{\rm cc}$ on $A$ and $P$, such that $a=A/P=0.1$. The horizontal
dotted line indicates the prediction given by Kelvin’s equation (24).

Figure 9: A comparison between DFT results (symbols) and the prediction given
by Kelvin’s equation (24) (line) for a dependence of $\delta\mu_{\rm cc}$ on
$L$ for walls with amplitudes $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b) and
period $P=50\,\sigma$.

Let us first focus on a single-step capillary condensation at wide slits. Fig.
7 displays DFT results showing a dependence of $\delta\mu_{\rm cc}$ on the
wall amplitude up to $A\approx 20\,\sigma$ (with both $P$ and $L$ fixed to
$50\,\sigma$). The agreement between DFT results and the Kelvin equation (24)
is very good, and in particular the inset Fig. 7 confirms that the dependence
$\delta\mu_{\rm cc}(a)$ is approximately quadratic for sufficiently small
amplitudes, in line with the expansion (25). We note that the results include
the case of $A=0$ corresponding to a planar slit (in which case the walls
exert the standard $9$-$3$ Lennard-Jones potential), obtained independently
using 2D, as well as a simple 1D DFT; the resulting values of $\delta\mu_{\rm
cc}$ are essentially identical, which serves as a good test of the numerics.

Figure 10: A dependence of $x_{0}$, specifying the location where the bridging
menisci meet the walls, on $\delta\mu$, for the slits with $A=2\,\sigma$ and
$L=8\,\sigma$ (a) and $A=5\,\sigma$ and $L=14\,\sigma$ (b). The period of the
walls is $P=50\,\sigma$ in both cases. A comparison is made between DFT
results (symbols), the prediction given by the solution of the quartic
equation, (26), (full line)) and its simple approximative solution, (32),
based on the perturbative scheme (dotted line)). The DFT results include
states where the bridges are stable (full circles), as well as the states
where the bridges are metastable (open circles).

Figure 11: Comparison of the location of G-B transition, $\delta\mu_{\rm gb}$,
as a function of $L$ obtained from DFT (symbols) and the macroscopic
prediction given by Eq. (17) (solid line) for nanopores formed by sinusoidally
shaped walls with the amplitude $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b) and
period $P=50\,\sigma$. Also shown are the estimated lower (red dotted line)
and upper (red dashed line) spinodals of B phase, as obtained from Eqs. (38)
and (39), respectively. The DFT results include states where the bridges are
stable (full circles), as well as the states where the bridges are metastable
(open circles).

Figure 12: Comparison of the location of B-L transition, $\delta\mu_{\rm bl}$,
as a function of $L$ obtained from DFT (symbols) and the macroscopic
prediction given by Eq. (18) (line) for nanopores formed by sinusoidally
shaped walls with the amplitude $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b) and
the period $P=50\,\sigma$. The DFT results include states where the bridges
are stable (full circles), as well as the states where the bridges are
metastable (open circles).

Next, instead of varying $a$, the aspect ratio (and $L$) will be kept
constant, such that $A$ and $P$ are varied simultaneously. In Fig. 8 we show
DFT results for $\mu_{\rm cc}$ as a function of $A$ (and $P$) which are
compared with the prediction given by the Kelvin equation (24). Recall that
according to the latter, $\mu_{\rm cc}$ depends on $A$ and $P$ only via their
ratio and should thus be constant. It reveals that although $\mu_{\rm cc}$ is
indeed almost invariable for sufficiently large values of $A$ and $P$ and
approach the limit, which is rather close to the Kelvin prediction (with the
relative difference about $3\%$), we can also detect a microscopic non-
monotonic regime below $A\approx 2\,\sigma$. Here, $\mu_{\rm cc}$ somewhat
contra-intuitively drops well below $\mu_{\rm cc}^{\parallel}$ meaning that
such a microscopically small roughness prevents the fluid from condensation.
However, this result is completely consistent with the recent microscopic
studies which report that molecular-scale roughness may actually worsen
wetting properties of substrates, in a contradiction with the macroscopic
Wenzel law berim ; mal_rough ; zhou ; svoboda . This can be explained by a
growing relevance of repulsive microscopic forces accompanied by strong
packing effects when the surface roughness is molecularly small mal_rough .
The decrease of $\delta\mu_{\rm cc}$ upon reducing $A$ (and $P$) terminates
when the amplitude is only a fraction of a molecular diameter ($A\approx
0.2\sigma$), where it reaches its minimum; for even finer structure of the
wall the roughness becomes essentially irrelevant and $\mu_{\rm cc}$
approaches its planar limit $\mu_{\rm cc}^{\parallel}$, as expected.

Finally, we test the Kelvin equation by examining the dependence of
$\delta\mu_{\rm cc}$ on $L$. In Fig. 9 we compare the Kelvin equation with DFT
for nanopores with $A=2\,\sigma$ and $A=5\,\sigma$. In both cases the
agreement is very good, especially for large $L$. For the smallest values of
$L$ (but still greater than $L_{t}$, such that the condensation occurs within
one step), $\delta\mu_{\rm cc}$ is slightly underestimated by the Kelvin
equation but the agreement is still very reasonable.

Figure 13: Comparison of the threshold mean width $L_{t}$, allowing for a
three-phase coexistence, as a function of the wall amplitude $A$, obtained
from DFT (symbols) and from the macroscopic prediction given by Eq. (67)
(line).

We further consider narrow pores that experience condensation in two steps via
formation of liquid bridges. We start with examining the location of the
bridges and test the reliability of Eq. (26) and its approximative
perturbative solution. Fig. 10 shows a dependence of $x_{0}$ specifying the
location, at which the menisci meet the walls, on $\delta\mu$, as obtained
from DFT for nanopores with amplitudes $A=2\,\sigma$ and $A=5\,\sigma$. The
values of $x_{0}$ corresponding to DFT have been read off from the density
profiles in the following way. We approximate the liquid-gas interface by a
part of a circle, $z_{c}(x)$, of the Laplace radius
$R=\gamma/\delta\mu\Delta\rho$. For this, we first determine the point
$(x_{m},0)$, where the interface intersects the $x$-axis using the mid-density
rule $\rho(x_{m},0)=(\rho_{g}+\rho_{l})/2$ (see Fig. 2) rule . This allows us
to determine the center of the circle, $x_{R}=x_{m}+R$, and the contact point
$x_{0}$ is then obtained using the equal tangent condition,
$z^{\prime}_{w}(x_{0})=z^{\prime}_{c}(x_{0})$. The results include the contact
points of bridges which correspond both to stable (full symbols) and
metastable (empty symbols) states and are compared with the solutions of the
quartic equation (26) and its approximative analytic solution given by Eq.
(32). The comparison shows a very good agreement between DFT and Eq. (26),
which systematically improves with increasing $A$ (as verified for other
models, the results of which are not reported here). This is because the
location of bridges is more sensitive to uncertainty in $R$ for walls with
smaller amplitudes. The simple explicit expression (32) proves to be a
reasonable approximation, except for a near proximity of saturation; however,
the bridge states are already metastable in this region.

We further test the macroscopic prediction given by Eq. (17) for a dependence
of $\delta\mu_{\rm gb}$ on $L$. The comparison between the macroscopic theory
and DFT is shown in Fig. 11, again for the amplitudes of $A=2\,\sigma$ and
$A=5\,\sigma$. It should be noted that in both cases the bridging transitions
occur over practically identical range of the distance between crests of the
opposing walls ($4$–$8\,\sigma$), although in some cases the transitions lie
already in a metastable region. The presence of the lower bound can be
interpreted as the minimal width between the crests allowing for condensation
and is comparable with the critical width for the planar slit ($L_{c}\approx
5\,\sigma$ at this temperature). On the other hand, the presence of the upper
bound is due to a free-energy cost for the presence of menisci, which
destabilizes the bridges, when $L$ becomes large. The DFT results are compared
with the prediction given by Eq. (17) (with $x_{0}$ obtained from Eq. (26))
and overall the agreement is very good, especially for $A=5\,\sigma$, owing to
a very accurate prediction of $x_{0}$ (cf. Fig. 10). We also plot the
estimated lower and upper limits of the bridging states determining the range
of stability of bridges for a given $L$, as obtained from Eqs. (38) and (39).
The predicted spinodals indeed demarcate the DFT results for the G-B
equilibrium.

Figure 14: Phase diagrams showing the phase behaviour of fluids in nanopores
with the walls of amplitudes $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b) and the
period $P=50\,\sigma$, in the $\delta\mu$-$L$ plane. The phase boundaries
between G, B and L phases correspond to the DFT results (black solid line) and
the macroscopic theory (black dashed line). Also shown are the spinodals
demarcating the limits of stability of B phase, as determined by DFT (solid
red lines) and the macroscopic theory (dashed red lines). All the three phase
boundaries meet at the triple point T, for which $L=L_{t}$ (cf. Fig. 13). The
DFT results also include the critical point ${\rm C_{\rm gb}}$, whose presence
allows for a continuous formation of bridges, cf. Fig. 15. The vertical dotted
lines depicted in the upper panel correspond to adsorption isotherms shown in
Fig. 5 (blue) and in Fig. 15 (green). Figure 15: Adsorption isotherm
corresponding to the nanopore with $A=2\,\sigma$, $P=50\,\sigma$ and
$L=7.4\,\sigma$ illustrating continuous formation of B phase. The
thermodynamic path corresponds to the green line in the phase diagram shown in
Fig. 14.

We now turn our attention to the second step of the condensation process in
narrow pores, which corresponds to B-L transition. In Fig. 12 we compare the
dependence of $\delta\mu_{\rm bl}$ on $L$ between DFT results and the
prediction given by Eq. (18). Although still very reasonable, the agreement,
compared to the previous results for G-B transition, is now slightly less
satisfactory. This can be attributed to a more approximative macroscopic
description of L phase, which, unlike the low-density G phase, exhibits
strongly inhomogeneous structure (cf. Fig. 6).

In Fig. 13 we further show a dependence of $L_{t}$, separating one-step and
two-step condensation regimes, on the wall amplitude $A$. The DFT results are
compared with the macroscopic theory, according to which the dependence of
$L_{t}(A)$ is given implicitly by solving

$\frac{S_{l}}{S}=\frac{\ell_{w}^{l}-\ell}{\ell_{w}^{l}}\,,\;\;\;(L=L_{t})\,.$
(67)

This equation follows by combining any pair of the three phase boundaries
conditions, $\delta\mu_{\rm cc}(L)$, $\delta\mu_{\rm gb}(L)$, and
$\delta\mu_{\rm bl}(L)$, as given by Eqs. (8), (17), and (18), respectively.
The comparison reveals that the macroscopic theory is in a close agreement
with DFT at least for the considered range of (small) amplitudes.

The phase behaviour in sinusoidal nanopores is summarised in the phase
diagrams displayed in Fig. 14 for $A=2\,\sigma$ and $A=5\,\sigma$, where the
phase boundaries between G, B and L phases are shown in the $\delta\mu$-$L$
plane. Note that while all the G-L, B-L and B-G lines terminate at the triple
point, only the G-L line is semi-infinite. This is in contrast to the B-L
line, which is restricted geometrically by the condition $L=2A$ and the G-B
line which possesses the critical point, allowing for a continuous transition
between G and B phases; this is demonstrated in Fig. 15 showing a continuous
adsorption corresponding to the green line in Fig. 14a. The comparison of the
DFT results with the macroscopic theory reveals an almost perfect agreement
for both cases, except for the critical point, which the macroscopic theory
does not capture. Apart from the equilibrium coexistence lines, the
borderlines demarcating the stability of the B phase within DFT are shown and
compared with the lower and upper spinodals according to the geometric
arguments (38) and (39), respectively. Here, perhaps somewhat surprisingly,
the macroscopic prediction for the upper spinodal is more accurate than for
the lower spinodal, especially for the larger amplitude.

###  V.2 $T>T_{w}$

Figure 16: DFT results showing the thickness $\ell_{\pi}$ of the liquid film
adsorbed on a planar Lennard-Jones wall as a function of $\delta\mu$. For
small values of $\delta\mu$, the results are consistent with the expected
asymptotic power-law, as is verified by the log-log plot shown in the inset,
where the straight line has a slope of $-1/3$. The line in the figure
corresponds to the fit of the power-law to the DFT data, which gives
$\ell_{\pi}=1.363\,\delta\mu^{-1/3}$. Figure 17: Comparison of the dependence
of $\delta\mu_{\rm cc}$ on the aspect ratio $a=A/P$ between DFT (symbols), the
macroscopic theory, Eq. (24), (solid line) )and the mesoscopic theory, Eq.
(41), (dashed line) for nanopores with $P=50\,\sigma$ and $L=50\,\sigma$. The
dotted line indicates the value of $\delta\mu_{\rm cc}^{\parallel}$ for
capillary condensation in the planar slit obtained from 1D DFT. The inset
shows the log-log plot of the DFT results and the straight line with the slope
of $2$ confirms the prediction (25).

Figure 18: Comparison of the dependence of $\delta\mu_{\rm cc}$ on $L$ between
DFT results (symbols), the prediction given by the fully macroscopic Kelvin
equation (24) (dotted line) and its mesoscopic correction given by Eq. (41)
(solid line). The nanopores are formed of sinusoidally shaped walls with the
amplitudes of $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b), and period
$P=50\,\sigma$. The DFT results include states which are stable (full circles)
and also metastable (open circles).

Let us now consider a temperature corresponding to $k_{B}T/\varepsilon=1.35$,
which is well above $T_{w}$, to examine the impact of the wetting layers on
the fluid phase behaviour in sinusoidal nanopores and to test the mesoscopic
corrections proposed in section III. We start by presenting the dependence of
the film thickness $\ell_{\pi}$ adsorbed on a planar, 9-3 Lennard-Jones wall,
on $\delta\mu$, as obtained from DFT (see Fig. 16); this is an important pre-
requisite for our further mesoscopic analysis requiring an explicit expression
for $\ell_{\pi}(\delta\mu)$. To this end, we fitted the asymptotic form of
$\ell_{\pi}(\delta\mu)$ to the DFT data obtaining $\ell_{\pi}\approx
1.363\delta\mu^{-1/3}$. Fig. 16 shows that the asymptotic power-law is
surprisingly accurate even far from the bulk coexistence and will thus be used
for the further analyzes.

We now turn to wide slits (with $L=50\,\sigma$), for which the condensation is
a one-step process from G to L. Fig. 17 shows the comparison of DFT results
for a dependence of $\delta\mu_{\rm cc}$ on the aspect ratio $a=A/P$, with the
predictions obtained from the macroscopic Kelvin equation, Eq. (24), and its
mesoscopic extension given by Eq. (41). While the shape of the graphs
$\delta\mu_{\rm cc}(a)$ given by both theories is very similar, the mesoscopic
theory provides a substantial improvement over the macroscopic theory and
yields a near perfect agreement with DFT especially for lower values of $a$.
Clearly, the improvement is due to the fact that according to the mesoscopic
theory the nanopores are effectively thinner, which shifts the predicted
values of $\delta\mu_{\rm cc}$ upwards (further away from saturation) compared
to the macroscopic treatment. In addition, the horizontal line denoting 1D DFT
results for $a=0$ is again completely consistent with the 2D DFT results,
while the inset of the figure confirms the predicted quadratic dependence of
$\delta\mu_{\rm cc}$ on $a$ for small values of the aspect ratio.

Similar conclusion also applies to the results shown in Fig. 18, where we
display a dependence of $\delta\mu_{\rm cc}$ on $L$ for nanopores with
amplitudes $A=2\sigma$ and $A=5\,\sigma$. A comparison between DFT, the
macroscopic theory and its mesoscopic correction is shown for a large interval
of pore widths including those, for which capillary condensation is a two-step
process and thus the G-L transition lies in a metastable region (open
circles). In both cases, the mesoscopic correction provides a considerable
improvement over the macroscopic theory.

Figure 19: Comparison of the location of G-B transition, $\delta\mu_{\rm gb}$,
as a function of $L$, obtained from DFT (symbols), the macroscopic prediction
given by Eq. (17) (dotted line) and its mesoscopic correction based on the RP
construction (full line), for nanopores formed of sinusoidal walls with the
amplitude $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b) and period $P=50\,\sigma$.
The macroscopic results terminate at the (macroscopically predicted) upper
limit of B stability (denoted by the cross), when the radius of the bridge
menisci becomes $R=R_{s}^{+}$. The DFT results include states which stable
(full circles) and also metastable (open circles).

Figure 20: Comparison of the location of B-L transition, $\delta\mu_{\rm bl}$,
as a function of $L$ obtained from DFT (symbols), the macroscopic prediction
given by Eq. (18) (dotted line) and its mesoscopic correction based on the RP
construction (full line), for nanopores formed of sinusoidal walls with the
amplitude $A=2\,\sigma$ (a) and $A=5\,\sigma$ (b) and period $P=50\,\sigma$.
The macroscopic results terminate at the (macroscopically predicted) lower
limit of B stability (denoted by the cross), when the radius of the bridge
menisci becomes $R=R_{s}^{-}$. The DFT results include states which stable
(full circles) and also metastable (open circles).

Finally, we test the impact of the mesoscopic correction, now based on the RP
construction, for narrow pores, which exhibit capillary condensation in two
steps. The dependence of the location of G-B and B-L transitions on $L$ is
shown in Fig. 19 and Fig. 20, respectively. Again, the mesoscopic correction
leads to a remarkable improvement over the macroscopic theory over the entire
interval of considered widths, including those, where G-B and B-L transitions
are already metastable w.r.t. to G-L transition. In fact, the improvement is
not only quantitative. It is because that, at this temperature, the
macroscopic theory hits the upper spinodal (for the G-B equilibrium) and the
lower spinodal (for the B-L equilibrium) within the range of $L$ where both
DFT and the mesoscopic correction allows for the presence of B phase.

##  VI Summary and Outlook

We have studied phase behaviour of fluids confined in nanopores formed by a
pair of completely wet walls of smoothly undulated shapes. The varying local
width of such confinements implies that condensation from a low-density phase
of capillary gas (G) to a high-density phase of capillary liquid (L) may be
mediated by a sequence of first-order condensation transitions corresponding
to a formation of liquid bridges between adjacent parts of the walls. Our
analysis focused on sinusoidally-shaped walls of period $P$ and amplitude $A$,
whose mean separation is $L$. The walls are placed such that one is the
reflection symmetry of the other, meaning their local separation varies
smoothly between $L-2A$ and $L+2A$. The nature of condensation in such pores
is governed by the mean distance between the walls and can be characterised by
the value $L_{t}$, which is shown to increase nearly linearly with $A$. For
separations $L>L_{t}$, the condensation is a single-step process from G to L,
similar to that in planar slits. However, for $L<L_{t}$, the condensation is a
two-step process, such that the capillary gas first condenses locally to join
the crests of the walls by liquid bridges forming the bridge phase (B). Upon
further increase of the chemical potential (or pressure), the system
eventually experiences another first-order transition corresponding to a
global condensation from B to L. It is only for the walls separation
$L=L_{t}$, which allows for a three-phase G-B-L coexistence.

The phase behaviour of fluids confined by sinusoidal walls has been described
in detail using macroscopic, mesoscopic and microscopic models. On a
macroscopic level, we assumed that the confined fluid in G and L phases has a
uniform density corresponding to that of a stable bulk gas or a metastable
bulk liquid, at the given temperature and chemical potential. The liquid
bridges in B phase are separated from the surrounding gas by curved menisci,
whose shapes were modelled as a part of a circle of the Laplace radius
connecting the walls tangentially. Based on this description we have obtained
predictions for the pertinent phase boundaries. Furthermore, we have imposed
simple geometric arguments to estimate lower and upper limits of metastable
extensions of B phase.

The comparison with DFT results has shown that the macroscopic description
provides a very accurate prediction for the fluid phase behaviour in
sinusoidal pores even for microscopically small values of the geometric
parameters, provided the influence of the wetting layers adsorbed at the walls
is insignificant. However, quite generally, their impact cannot be neglected
when the pores are formed by completely wet walls of molecularly small
separations. To this end, we have proposed simple mesoscopic corrections of
the macroscopic theory, which take into account the presence of the wetting
layers, whose width has been approximated by $\ell_{\pi}$ corresponding to the
film thickness adsorbed on the pertinent planar wall. This approximation is
thus consistent with Derjaguin’s correction of the Kelvin equation for the
location of capillary condensation in planar slits. For the transitions
involving B phase, we employed the simple geometric construction due to Rascón
and Parry, which, too, assumes a coating of the walls by a liquid film of
thickness $\ell_{\pi}$, which modifies the effective shape and separation of
the confining walls. The comparison with DFT results revealed that the
mesoscopic corrections improve the predictions considerably and provide a
description of the fluid phase behaviour in sinusoidally-shaped walls with a
remarkable accuracy, at least for the case of low to moderate values of the
aspect ratio $a=A/P$.

The reason why we have not considered high values of $a$, is not because the
geometric arguments would fail in such cases – in fact, it was shown that the
predictions for the location of the menisci is more accurate for more wavy
walls than for flatter ones – although the mesoscopic corrections might be
expected to be more approximative as $a$ increases. There is, however, a
_qualitative_ reason, why the current description should be modified for such
systems. This is related with the phenomenon of the osculation transition osc
which separates the regimes where the troughs in G and B phases are filled
with a gas (as assumed in this work), from that where the troughs are
partially filled with liquid. Allowing for this phenomenon, and the
accompanying interference between the “vertical” and the “horizontal” menisci,
would make the phase behaviour scenario even much more intricate and we
postpone this for future studies.

There are many other possible extensions of this work. For models with high
values of $a$, one should also perhaps consider some improvement over the
current mesoscopic corrections that would lead to a geometry- and position-
dependent non-uniformity in the width of the wetting layers. A more
comprehensive description of the phase behaviour in sinusoidal nanopores
should also take into account the prewetting transition, at which the
thickness of the adsorbed layers has a jump discontinuity. For partially wet
walls, the extension of the macroscopic theory would be straightforward but
there is another interfacial phenomenon usually referred to as unbending
transition which should be accounted for unbending . Natural modifications of
the nanopore model include an examination of the broken reflection symmetry on
the stability of the bridge phase. More intricate extensions of the current
model comprise pair of walls with different wavelengths or walls with
additional undulation modes.

###### Acknowledgements.

This work was financially supported by the Czech Science Foundation, Project
No. 21-27338S.

## References

  * (1) J. S. Rowlinson and B. Widom Molecular Theory of Capillarity (Oxford: Oxford University Press) (1982).
  * (2) D. Henderson, Fundamentals of Inhomoheneous Fluids, Marcel Dekker, New York (1992).
  * (3) M. E. Fisher and H. Nakanishi, J. Chem. Phys. 75, 5857 (1981).
  * (4) H. Nakanishi and M. E. Fisher, J. Chem. Phys. 78, 3279 (1983).
  * (5) L. D. Gelb, K. E. Gubbins, R. Radhakrishnan, and M. Sliwinska- Bartkowiak, Rep. Prog. Phys. 62, 1573 (1999).
  * (6) S. J. Gregg and K. S. W. Sing Adsorption, Surface Area and Porosity (New York: Academic) (1982).
  * (7) R. Evans and U. Marini Bettolo Marconni, Chem. Phys. Lett. 115, 415 (1985).
  * (8) R. Evans and P. Tarazona, Phys. Rev. Lett. 52, 557 (1984).
  * (9) R. Evans and U. Marini Bettolo Marconi, Phys. Rev. A 32, 3817 (1985).
  * (10) R. Evans, U. Marini Bettolo Marconni, and P. Tarazona, J. Chem. Soc., Faraday Trans. 82, 1763 (1986).
  * (11) R. Evans, U. Marini Bettolo Marconi, and P. Tarazona, J. Chem. Phys. 84, 2376 (1986).
  * (12) R. Evans and U. Marini Bettolo Marconni, J. Chem. Phys. 86, 7138 (1987).
  * (13) R. Evans, J. Phys. Condens. Matter 2, 8989 (1990).
  * (14) M. Müller and K. Binder, J. Phys.: Condens. Matter 17, S333 (2005).
  * (15) K. Binder, J. Horbach, R. L. C. Vink, and A. De Virgiliis, Soft Matter 4, 1555 (2008).
  * (16) P. Tarazona, U. Marini Bettolo Marconi, and R. Evans, Mol. Phys. 60, 573 (1987).
  * (17) B. V. Derjaguin, Zh. Fiz. Khim. 14, 137 (1940).
  * (18) G. A. Darbellay and J. M. Yeomans, J. Phys. A 25, 4275 (1992).
  * (19) C. Rascón, A. O. Parry, N. B. Wilding, and R. Evans, Phys. Rev. Lett. 98, 226101 (2007).
  * (20) M. Tasinkevych and S. Dietrich, Eur. Phys. J. E23, 117 (2007).
  * (21) L. Bruschi and G. Mistura, J. Low Temp. Phys. 157, 206 (2009).
  * (22) A. Malijevský, J. Chem. Phys. 137, 214704 (2012).
  * (23) C. Rascón, A. O. Parry, R. Nürnberg, A. Pozzato, M. Tormen, L Bruschi, and G. Mistura, J. Phys.: Condens. Matter 25, 192101 (2013).
  * (24) G. Mistura, A. Pozzato, G. Grenci, L. Bruschi, and M. Tormen, Nat. Commun. 4, 2966 (2013).
  * (25) A. Malijevský and A. O. Parry, J. Phys: Condens. Matter 26, 355003 (2014).
  * (26) L. Bruschi, G. Mistura, P.T.M. Nguyen, D.D. Do, D. Nicholson, S. J. Park, and W. Lee, Nanoscale 7, 2587 (2015).
  * (27) A. Malijevský and A. Parry, Phys. Rev. Lett. 120, 135701 (2018).
  * (28) A. Malijevský , Phys. Rev. E 97, 052804 (2018).
  * (29) A. B. D. Cassie, Discuss. Faraday Soc. 3, 11 (1948).
  * (30) M. Láska, A. O. Parry, A. Malijevský, Phys. Rev. Lett. 126, 125701 (2021).
  * (31) G. Chmiel, K. Karykowski A. Patrykiejew, W. Rżysko and S. Sokołowski, Mol. Phys. 81, 691 (1994).
  * (32) P. Röcken and P. Tarazona, J. Chem. Phys. 105, 2034 (1996)
  * (33) P. Röcken, A. Somoza, P. Tarazona, and G.Findenegg, J. Chem. Phys. 108, 8689 (1998).
  * (34) H. Bock and M. Schöen, Phys. Rev. E 59, 4122 (1999).
  * (35) P. S. Swain and R. Lipowsky, Europhys. Lett. 49, 203 (2000).
  * (36) H. Bock, D. J. Diestler, and M. Schöen, J. Phys. Condens. Matter 113, 4697 (2001).
  * (37) A. Valencia, M. Brinkmann, and R. Lipowsky, Langmuir 17, 3390 (2001).
  * (38) C. J. Hemming and G. N. Patey, J. Phys. Chem. B 110, 3763 (2006).
  * (39) M. Schöen, Phys. Chem. Chem. Phys. 10, 223 (2008).
  * (40) R. N. Wenzel, Ind. Eng. Chem. 28, 988 (1936).
  * (41) S. Dietrich, in Phase Transitions and Critical Phenomena, edited by C. Domb and J. L. Lebowitz (Academic, New York, 1988), Vol. 12.
  * (42) A. O. Parry, C. Rascón, N. R. Bernardino, and J. M. Romero-Enrique, J. Phys.: Condens. Matter 18 6433 (2006).
  * (43) C. Rascón and A. O. Parry, Nature 407, 986 (2000).
  * (44) R. Evans, Adv. Phys. 28, 143 (1979).
  * (45) Y. Rosenfeld, Phys. Rev. Lett. 63, 980 (1989).
  * (46) A. G. Salinger and L. J. D. Frink, J. Chem. Phys. 118, 7457 (2003).
  * (47) We adopoted the following convention for the Fourier transform: $\hat{\varphi}({\mathbf{k}})=\int{\rm d}{\mathbf{r}}\;\varphi({\mathbf{r}})\,e^{-2\pi i{\mathbf{k}}\cdot{\mathbf{r}}}$.
  * (48) G. O. Berim and E. Ruckenstein, J. Colloid Interface Sci. 359, 304 (2011).
  * (49) A. Malijevský, J. Chem. Phys. 141, 184703 (2014).
  * (50) S. Zhou, J. Stat. Phys. 170, 979 (2018).
  * (51) M. Svoboda, A. Malijevský, and M. Lísal, J. Chem. Phys. 143, 104701 (2015).
  * (52) The location of the interface does not change in any appreciable way if alternative rules, such as the one based on the arithmetic mean of the bulk packing fractions rather than the densities, is applied.
  * (53) M. Pospíšil, A. O. Parry, and A. Malijevský, Phys. Rev. E 105, 064801 (2022).
  * (54) C. Rascón, A. O. Parry, and A. Sartori, Phys. Rev. E 59, 5697 (1999).