Main

The Kelvin equation predicts that capillaries become spontaneously filled with water at the relative humidity

$${{\rm{R}}{\rm{H}}}_{{\rm{K}}}=\exp (\,-\,2\sigma /{k}_{{\rm{B}}}Td{\rho }_{{\rm{N}}})$$
(1)

where σ ≈ 73 mJ m−2 is the surface tension of water at room temperature T, ρN ≈ 3.3 × 1028 m−3 is the number density of water, kB is the Boltzmann constant and d is the diameter of the meniscus curvature. For a two-dimensional (2D) confinement created by parallel walls separated by a distance h, d = h/cos θ where θ is the contact angle of water on the walls’ material. For capillary condensation to occur at relative humidity (RH) considerably below 100%, equation (1) dictates that d must be comparable to 2σ/kBN ≈ 1.1 nm. For example, under typical ambient RH of 40–50%, water is expected to condense in slits with h < 1.5 nm and cylindrical pores with diameters <3 nm, if θ is close to zero. Even stronger confinement is required for capillaries involving less hydrophilic materials. So far, a broad consensus has been reached that the Kelvin equation remains accurate for menisci with d ≥ 8 nm (refs. 1,2,3,4,6,7,8,9,10,11) and can also describe condensation phenomena in hydrophilic pores as small as 4 nm in diameter12,13,14. To achieve agreement with the experiments at this scale, the Kelvin equation is usually modified to account for ‘wetting films’ that are adsorbed on internal surfaces before the condensation transition and effectively narrow the capillaries. For the smallest capillaries, the thickness of the wetting films was used as a free parameter. In the real world, pores, cracks and cavities obviously do not terminate at the scale of several nanometres but extend even below 1 nm or 2σ/kBN, the fact that makes condensation phenomena omnipresent under ambient conditions. The latter scale is comparable to the diameter of water molecules, which makes it challenging to study experimentally because of difficulties in creating the required atomic-scale confinement1,10,12, the varying thickness of wetting films1,2,7,8,9,10,11,12,13,17 and huge capillary pressures that can cause considerable deformations13,23,24,25. As for theory, the Kelvin equation is also believed to reach its applicability limit for confinement containing a few molecular layers because, at this smallest scale, the properties of water notably change2,3,12,15,16 and the description in terms of homogeneous macroscopic thermodynamics becomes questionable1,2,3,4,16,17,18,19,20, leaving aside the fact that such quantities as d and θ in equation (1) can no longer be defined1,2,3,18,19,20.

The capillary devices that we studied are shown schematically in Fig. 1a. Their most important part is atomically flat 2D channels made by van der Waals (vdW) assembly following the fabrication procedures described in the Methods. In brief, two atomically flat crystals were exfoliated from bulk muscovite mica or graphite to become the top and bottom walls of our capillaries. Separately, narrow strips of multilayer graphene were fabricated to serve as spacers between the two mica or graphite crystals. Stacking the crystals and spacers on top of each other resulted in the 2D channels shown in Fig. 1 and Extended Data Fig. 1. We used graphene spacers between N = 2 and about 10 layers thick so that the capillaries had the designated height Na (see Fig. 1a), where a ≈ 3.35 Å is the effective thickness of monolayer graphene26,27. Examples of transmission electron microscopy imaging of our capillaries are provided in Fig. 1b and Extended Data Fig. 1d. Mica and graphite were chosen as archetypal strongly and weakly hydrophilic materials. Their contact angles are known to be in the range of 0–20° and 55–85°, respectively16,28,29. For surfaces exposed to air, θ is close to the above upper bounds28,29 (Methods).

Fig. 1: Atomic-scale capillaries and water condensation inside.
figure 1

a, Schematic of the capillary devices studied here. b, Cross-sectional imaging of a four-layer graphite capillary by scanning transmission electron microscopy (STEM). The top layer was more than 100 nm thick in this case. c, d, AFM imaging of the same mica capillary (N = 11) exposed to 30% and 95% relative humidity, respectively. In the dry state, the top crystal sagged by 5 Å, but it became flat at high RH, as illustrated in the corresponding schematics above the images. The black dotted lines indicate the edge of the top crystal (compare with a). In the upper part of the AFM images, the colour scale is given by the observed sagging (grey curves). The bottom part shows graphene spacers without the top crystal cover (dark-to-bright scale, 40 Å). e, Sagging depth δ as a function of RH for a graphite capillary with N = 4. Coloured symbols, AFM measurements. The grey symbol with error bars indicates our experimental accuracy. The two solid curves in orange indicate the constant sagging δ0 below the condensation transition and the ln(RH) dependence above it. The transition is marked by the dashed vertical line. Inset, AFM profiles (averaged over 100 nm along the channel) of the top crystal for several values of RH. All the AFM measurements were carried out in the non-contact PeakForce mode (Methods, ‘AFM topography under controlled humidity’).

To detect RH at which capillary condensation occurred in the 2D capillaries described above, we exploited the fact26,30 that the suspended thin crystals exhibited noticeable sagging caused by their vdW adhesion to sidewalls (Fig. 1c). In our experiments we found that, when the capillaries became filled with water, the sagging depth δ diminished (Fig. 1d), presumably because intercalating water molecules ‘screen’ the adhesion27,30. To make the resulting changes in δ detectable by atomic force microscopy (AFM), it was important to choose the thickness H of the top crystal and the channel width w carefully (see Fig. 1a). As described in Methods (‘Remnant sagging above the condensation transition’), these two parameters define the stiffness of the top crystal and, hence, how deeply it bends inwards. We found that, for w ≈ 150 nm, the top crystal should be 50–70 nm thick to exhibit a sagging depth δ of several ångströms. If either w or H were changed only by a factor of 2, the strong dependence δ w4/H3 resulted in either collapsed channels (the top crystal attached to the bottom one) or such a small δ (<1 Å) that the condensation transition was impossible to discern by AFM. The capillaries studied here were typically 5–10 μm long.

As shown in Fig. 1a and Extended Data Fig. 1c, our capillary devices were assembled on top of a silicon nitride membrane. It had a rectangular opening that was extended into the bottom crystal by dry etching. The Si chip supporting the entire assembly was used to separate two miniature gas chambers that were integrated into an AFM set-up as shown in Extended Data Fig. 2a. The bottom chamber provided variable humidity so that one entrance of the 2D capillaries was exposed to a chosen RH. The opposite entrance was facing the top chamber, which enclosed the AFM scanning head and was usually kept at low humidity. The two-chamber configuration allowed us to avoid the influence of RH on measurements of the top crystal’s topography (for example, no condensation occurred at the AFM tip during scanning)31. Examples of AFM imaging for mica and graphite devices are given in Fig. 1c, d and in Extended Data Fig. 3, respectively. They reveal pronounced sagging under dry conditions, which disappeared in high humidity. Typical evolution of the top crystal’s profiles with changing RH is shown in Fig. 1e and Extended Data Figs. 4 and 5. In these measurements, we increased RH inside the bottom chamber in steps of 5%, waited for an hour for the system to stabilize and then recorded AFM images. The temperature was kept at 294 ± 1 K. For the device in Fig. 1e, the sagging remained practically constant for RH ≤ 75% and then exhibited a pronounced jump at RHC, which we attribute to the condensation transition (another example is shown in Extended Data Fig. 5). Further increase in RH led to a gradual decrease in δ such that the top crystal became practically flat at RH > 95% (Fig. 1). The remnant sagging at RH > RHC is well described by the negative capillary pressure which keeps the top crystal bent inwards even after water has filled the 2D channels, suppressing the adhesion of the top crystal to the sidewalls. Indeed, for RH > RHC, δ is expected to evolve proportionally to ln(RH) and reach zero at 100% humidity23,24, in agreement with the observed behaviour in Fig. 1e and Extended Data Fig. 6 (Methods, ‘Remnant sagging above the condensation transition’). If we repeated the same measurements but with decreasing RH, a reverse jump occurred at the same RHC, that is, the condensation transition was non-hysteretic (Extended Data Fig. 4a; Methods, ‘Non-hysteretic behaviour of the condensation transition’). Note, however, that it could take up to several days for capillaries exposed to high RH to dry out completely and return to their original state (Extended Data Fig. 4b). On the other hand, for measurements with increasing RH, no difference in RHC was observed after either an hour or days of equilibration. Accordingly, our experiments were normally carried out with increasing rather than decreasing RH, as in Fig. 1e.

Figure 2 summarizes our results for the condensation transitions observed in mica and graphite 2D capillaries. To allow more accurate comparison between data collected from different devices, we have accounted for the fact that capillaries with the same N often exhibited different sagging in their dry state, δ0. For capillaries with large δ0, we observed consistently lower RHC than for those with small initial sagging and same N. Moreover, comparing capillaries with different N but similar channel heights h = Na − δ0, we found close values of RHC (Extended Data Fig. 5). This implies that it was the narrowest, central region of the 2D channels that determined the onset of condensation, in agreement with general expectations32 (Methods, ‘Effect of initial sagging’). Accordingly, to account for the effect of different δ0, Fig. 2 plots RHC as a function of h rather than of N. For mica capillaries, the experimental data are well described by equation (1) using θ and σ of bulk water. Because RHK(h) depends little on the exact value of θ for strongly hydrophilic capillaries (Fig. 2a), the comparison of RHC for mica with equation (1) is straightforward. This is not the case for weakly hydrophilic graphite, for which relatively small variations in θ lead to considerable changes in RHK(h) as per equation (1). Nonetheless, the values of RHC observed for our graphite capillaries fall well within the range expected from the Kelvin equation using the contact angles θ = 80 ± 5°, typical for graphite surfaces under ambient conditions29.

Fig. 2: Condensation transition under extreme 2D confinement.
figure 2

a, Relative humidity RHC required for water condensation in mica channels of different heights h. Blue circles indicate experimental observations, their size reflects the 3.5% experimental uncertainty in determining RHC (Methods, ‘AFM topography under controlled humidity’). Two solid curves indicate RHK given by equation (1) with bulk water’s characteristics for the range of possible θ for mica (colour-coded). The upper curve (open black circles), with its own y axis and the common x axis, shows our MD calculations for changes in γSL caused by restructuring of water inside 2D channels (θ ≈ 10°). The arrows mark the energy minima that correspond to the integer number of water monolayers that can fit inside the 2D capillaries. Red symbols (connected by the dashed curve) are the expected behaviour calculated using the oscillating γSL shown in the upper curve and equation (2). Black dashed curve, same analysis but assuming fully flexible capillary walls allowing relaxation into the energy minima at commensurate h. Green filled circles, same analysis but for a finite rigidity of the confining walls. b, Same as a, but for graphite capillaries. The simulated curves are for θ ≈ 85°.

It is surprising that the macroscopic Kevin equation using the characteristics of bulk water describes condensation in our mica capillaries so well and also provides qualitative agreement for the graphite capillaries. As mentioned in the introduction, strong discrepancy is expected for the ångström-scale confinement where only one or two layers of water fit inside capillaries. Before trying to explain the unexpected agreement between the experiment and the macroscopic Kelvin equation, we note that RHC values in Fig. 2a are notably lower than the RH values required to achieve condensation in the previous studies for d ≥ 8 nm. At our low RH, no continuous wetting layer is expected even on fresh mica surfaces12,33, and a partial coverage by monolayer water is probably suppressed further by adsorbates from air, which are responsible for the relatively large θ close to 20°. The same consideration about the apparent absence of wetting films also applies for the graphite capillaries in which the wetting transition is even less likely1,2,28. Second, to avoid the macroscopic variables σ and θ that are poorly defined under our extreme confinement, the Kelvin equation can be rewritten as1,2,18

$${{\rm{RH}}}_{{\rm{K}}}=\exp [-2({\gamma }_{{\rm{SV}}}-{\gamma }_{{\rm{SL}}})/h{k}_{{\rm{B}}}T{\rho }_{{\rm{N}}}]$$
(2)

where γSV and γSL are the surface energies for solid–vapour and solid–liquid interfaces, respectively, and γSV − γSL = σ cos θ. The energy γSV is largely independent of h because the interaction of gas molecules with surfaces should depend little on confinement. Also, ρN changes relatively little for nearly incompressible water20,34. Therefore, the dominant effect of extreme confinement is likely to come from γSL(h), which is governed by vdW interactions of liquid water with solid surfaces. Because these interactions are short-range, it is predominantly the first near-surface layer of water that determines γSL. If this layer changes little under confinement, then Δγ = γSL(h) – γSL(∞) ≈ 0, and capillary condensation should closely follow equation (1) even at the nanoscale1,2,18. Substantial changes in γSL and, hence, RHC are expected only in the limit of few-layer water where its near-surface structure is notably altered20,34 (Extended Data Fig. 7).

For further analysis, we used molecular dynamics (MD) simulations (Methods) to evaluate Δγ and the resulting corrections to the macroscopic Kelvin equation, which are given by the factor exp(2Δγ/hkBN) according to equation (2). Examples of the calculated Δγ(h) are shown in Fig. 2a and Extended Data Fig. 8. There are pronounced commensurability oscillations20,21,34 in γSL(h) such that energy minima appear if 2D channels accommodate exactly one, two, three or four molecular layers of water. The oscillations practically disappear for h > 15 Å where Δγ becomes almost zero, which also implies that the macroscopic Kelvin equation should be valid in this regime. For smaller h, changes in γSL are comparable to σ, which means that the above correction factor is comparable to RHK itself. Consequently, the simulated RHC(h) dependences shown in Fig. 2 (red dotted curves and symbols) exhibit giant oscillations such that, for incommensurate h, water condensation becomes unfavourable and should not occur even at 100% humidity. No such oscillatory behaviour could be detected in our experiments. We attribute its absence to elastic adjustment such that 2D channels tend to accommodate an integer number of molecular layers of water20. Indeed, the energy minimization should be applied to the entire system, including the elastic energy of confining walls23,24,25. For an extremely soft confinement, 2D channels would adjust their h to reach the commensurate states at minima of Δγ. The condensation behaviour in this case should follow the step-like black dashed curves shown in Fig. 2.

A finite rigidity pushes the equilibrium conditions away from the commensurability minima. To estimate a likely elastic response of our 2D channels, note that the capillary pressure above RHC, which is defined by σ, keeps the top crystal bent inwards typically by several ångströms (Fig. 1e; Extended Data Figs. 46). Similar elastic adjustments can be expected in our capillaries because changes in Δγ are comparable to the absolute value of σ. Accordingly, our confinement should be considered as rather soft. To illustrate the likely condensation behaviour in such a case, the green curves in Fig. 2 show the RHC(h) dependences expected if the walls’ finite rigidity allows their deformations to reach within 0.5 Å of the commensurability minima in Δγ. The latter curves are in good agreement with the experiment and, in the case of graphite capillaries, also exhibit the same trend towards lower RH for h < 10 Å as observed experimentally in Fig. 2b. In principle, the elastic response of 2D confinement could be included in the simulations self-consistently, but the scatter in the experimental data and different H used for different capillary devices make this effort beyond the rationale of the present study.

Finally, we note that elastic adjustments should also play an important role in real-life capillaries responsible for condensation phenomena under ambient humidity. Indeed, capillary pressures at 1-nm scale typically exceed 1 kbar, and the resulting elastic response of even infinitely thick walls can exceed 1 Å for the case of 2D confinement (Methods, ‘Remnant sagging above the condensation transition’). This should force atomic-scale capillaries to elastically adjust their geometry13,23,24, suppressing commensurability oscillations and resulting in the condensation transition at RH close to the values prescribed for a soft confinement. Accordingly, capillary condensation under ambient conditions can be expected to qualitatively follow the macroscopic Kelvin equation, as happened for the reported capillaries.

Methods

Fabrication procedures

The capillary devices studied here were fabricated following the procedures described in refs. 26,27 and shown in the flow chart of Extended Data Fig. 1a. First, a large crystal of multilayer graphene (number of layers N) was prepared on an oxidized Si wafer by mechanical exfoliation. Using electron-beam lithography and oxygen plasma etching, we patterned the crystal into a set of parallel narrow strips that had a width of 150 nm and were separated by approximately the same distance (Extended Data Fig. 1b). These spacers were then put on top of a mica or graphite crystal of typically 20 nm in thickness. The latter crystal was prepared on a separate Si wafer and, in this work, is referred to as the bottom crystal (Extended Data Fig. 1a, stage 1).

In parallel, we prepared a suspended silicon nitride (SiN) membrane with a rectangular hole in the centre (Extended Data Fig. 1a, stage 2). To this end, we used commercial Si wafers with 500 nm of SiN deposited on both sides. Using photolithography and reactive ion etching (RIE), we made a window of about 750 × 750 μm2 in size in one of the SiN layers. The wafer was then placed in hot KOH to etch through the entire Si thickness and obtain a freestanding SiN membrane of 70 × 70 μm2 in size. After that, a rectangular hole (3 × 20 μm2) was plasma-etched in the SiN membrane by means of another round of photolithography and RIE (Extended Data Fig. 1a, stage 2).

The two-layer assembly consisting of the bottom crystal and graphene spacers (Extended Data Fig. 1a, stage 1) was transferred on top of the SiN membrane in such a way that graphene strips were aligned perpendicular to the long edge of the rectangular hole. This step was followed by RIE from the backside of the Si wafer to extend the hole through the bottom crystal (Extended Data Fig. 1a, stage 3). Finally, another mica (or graphite) crystal was placed on top of the two-layer assembly to form 2D channels (Extended Data Fig. 1a stage 4, Extended Data Fig. 1c).

After each crystal transfer, samples were cleaned in acetone, deionized water and isopropanol. This was followed by annealing at 400 °C in a hydrogen–argon atmosphere for 3 h. Such thorough cleaning was essential to remove polymer residues and other possible contamination, which could otherwise block the capillaries. In our experiments, we used only those capillaries that exhibited uniform sagging along their entire length, such as those shown in Fig. 1c and Extended Data Fig. 3.

The contact angle for muscovite mica and natural graphite used for making our devices was measured by Drop Shape Analyzer 100S (Krüss). We found θ ≈ 80–85° for graphite and 15–20° for mica after exposure to ambient air for a few days, in agreement with previous reports (see, for example, refs. 28,29).

AFM topography under controlled humidity

Our set-up for AFM measurements is shown in Extended Data Fig. 2a. The SiN wafer containing a capillary device such as that shown in Extended Data Fig. 1c was placed to seal an airtight metal chamber with a volume of about 1 cm3. A continuous flow of nitrogen gas into this chamber was provided through miniature inlets. The humidity was controlled by mixing dry nitrogen with nitrogen bubbled through deionized water, using a computer-controlled flowmeter. RH was measured by a humidity sensor (Sensirion), which was mounted inside the bottom chamber. The sensor was calibrated with three different saturated salt solutions (lithium chloride, magnesium nitride and potassium chloride) to ensure readings of RH with an accuracy of ±1%. A commercial silicone rubber enclosure (Bruker) was attached to the AFM head (Extended Data Fig. 2a). When it was lowered for taking AFM images, the enclosure edges sealed the space above the devices being studied. Fresh silica gel granules were usually placed inside the enclosure to provide low humidity in the top chamber.

All AFM images in our experiments were taken in the PeakForce mode using Dimension FastScan (Bruker) and analysed with WSxM software35. Selected capillaries were imaged at regular RH intervals of 5%, after stabilizing humidity in the bottom chamber for approximately an hour. As an example of our AFM measurements, Extended Data Fig. 3 shows three critical steps in the evolution of the topography for an N = 3 graphite capillary. The initial sagging in this case was 4 Å as seen for RH = 55% in Extended Data Fig. 3a. With RH increasing in 5% steps, no change in the sagging profile was observed until we reached 70% RH. At the latter humidity, the top crystal was found to sag notably less (Extended Data Fig. 3b). On increasing RH further, the top crystal gradually lifted and became practically flat at 95% RH (Extended Data Fig. 3c). The flattening process is described in detail below. Because the rapid change in sagging happened somewhere between 65% and 70% RH, we assigned the condensation transition to RHC = 67.5 ± 2.5% with an additional error of ±1% because of the humidity sensor’s accuracy (as indicated by the symbol size in Fig. 2).

The use of low humidity in the top chamber notably improved the stability of AFM imaging but was not essential. Indeed, if we simply connected the top and bottom chambers so that both sides of the studied capillaries were exposed to the same RH, the condensation transition was found to occur at the same RHC as in the case of low RH in the top chamber. This shows that the condensation transition is determined by the RH at the entrance side (that is, the highest RH) (Extended Data Fig. 2b). This observation is consistent with the fact that no difference in sagging was observed along the entire length of the capillaries, even when their exits were at low RH (Fig. 1d; Extended Data Fig. 3b), which indicates no detectable gradient in negative capillary pressure along the 2D channels. The constant capillary pressure can be attributed to a very fast flow of liquid water through our atomically flat capillaries26, which allows essentially the same meniscus curvature at both entrance and exit sides, as shown schematically in Extended Data Fig. 2b. If the top chamber is kept at low humidity, such an equilibrium state is stabilized by a slightly retracted exit meniscus and slow Knudsen diffusion of water vapour near the capillary exit26, which provide the required RH gradient. This is different from the case of nanoporous media with rough internal surfaces and tortuous capillaries, where both liquid and vapour transport are slow, allowing large pressure gradients to build up along the liquid flow direction14.

Non-hysteretic behaviour of the condensation transition

Capillary condensation in nanochannels is often accompanied by hysteresis such that RHC required to reach the transition depends on whether external RH is increased or decreased1,4,11,13,23,24,36. This was not the case for our capillaries, which exhibited no hysteresis within our experimental accuracy. This behaviour is illustrated in Extended Data Fig. 4a, which shows the profiles of the top crystal for a four-layer graphite capillary where RH was changed in a small loop around the transition observed at RHC = 77.5 ± 2.5%. The capillary’s sagging was constant for RH ≤ 75%. Then we increased RH to 80% and equilibrated for 1 h, following the experimental procedures described above. The 5% change in RH led to a pronounced jump in the sagging depth δ, indicating the condensation transition (compare black and red curves in Extended Data Fig. 4a). The capillary profile remained stable while RH was maintained at 80%. When we decreased RH back to 75%, the capillary did not return to the initial dry state after 4 h (blue curve). Nonetheless, the top crystal continued to sag gradually with time (Extended Data Fig. 4a). The dry state was eventually reached (after more than 9 h but less than 16 h). Therefore, the condensation transition occurred at the same RHC with either increasing or decreasing humidity, although long equilibration times were needed for 2D channels to dry up.

The slow recovery of the initial dry state is further exemplified by Extended Data Fig. 4b. It shows the case of a graphite capillary with N = 6, where the condensation transition was found to occur between 60% and 65% RH. In Extended Data Fig. 4b, we first increased RH from 60% directly to 95%, well above the transition (black and red curves, respectively). Then RH was reduced to 30%, well below RHC = 62.5 ± 2.5%. As seen in Extended Data Fig. 4b, the top crystal regained its original profile very slowly, and the capillary returned to its dry state only after several days. After this the sagging remained stable. The reason for such a slow drying process remains to be understood.

It is also worth mentioning that our capillary devices did not show any discernible change in sagging with changing RH below the condensation transition, as seen, for example, in Fig. 1e. This is in contrast to the usual elasto-capillary response of nanoporous media, in which adsorption of water molecules on internal surfaces leads to notable strain, usually referred to as the Bangham effect37. Its apparent absence in our experiment is perhaps not surprising. First, as discussed in the main text, we expect only a small partial coverage of internal walls by adsorbed water molecules before the transition. Second, if there were notable adsorption, the adsorption-induced strain is typically of the order of 10−4 for materials with high Young’s moduli13,23,24,36. Therefore, for our top crystals with H and w of 100 nm, this strain would translate into sagging of the order of 0.1 Å, below our experimental accuracy.

Effect of initial sagging

For 2D channels with the same N, their heights h = Na − δ0 could vary considerably because of different H and slightly different w, which control the initial sagging δ0. This resulted in different RHC observed for capillaries with the same N. This behaviour is illustrated in Extended Data Fig. 5, which shows the condensation transition in two capillaries with N = 5 but different δ0. The capillary in Extended Data Fig. 5a had a top layer with H ≈ 70 nm and exhibited initial sagging of 4 Å. The transition in this device occurred at RHC = 82.5%. The other capillary (Extended Data Fig. 5b) had a thinner (45 nm) top crystal and, accordingly, its δ0 was larger (8.5 Å). The latter device exhibited RHC = 72.5%, considerably lower than that in Extended Data Fig. 5a. This implies that N was not the characteristic determining the onset of water condensation. The importance of h rather than N is even better exemplified by the results of Extended Data Fig. 4: the capillary with N = 4 in Extended Data Fig. 4a exhibited the condensation transition at 77.5% RH, whereas the nominally larger capillary with N = 6 in Extended Data Fig. 4b showed the transition at lower RHC = 62.5%. This obviously contradicts the expectation that the smaller-N capillary should exhibit lower RHC. However, because of different δ0, the smaller (N = 4) capillary in Extended Data Fig. 4a had h ≈ 7 Å, which was larger than h ≈ 3.5 Å for the larger (N = 6) capillary in Extended Data Fig. 4b. The smaller RHC for 2D channels with smaller h agrees with the general expectations.

The above observations strongly suggest that h is the size parameter that best describes the condensation transition in our atomic-scale capillaries. This means that it is the central region between the sagged-top and flat-bottom crystals where the condensation process is effectively initiated. This is not entirely unexpected because MD simulations have previously shown that corner menisci in narrow channels were unfavourable for condensation32. Furthermore, note that the mean free path of water molecules in air is about 65 nm, which is comparable to the channel width w ≈ 150 nm. This implies that the entire channel should present a single entity from the standpoint of thermodynamics, allowing only one condensation transition over the channel’s cross-section. To this end, it is important to note that although our capillaries contained only a few monolayers of water, there were still millions of molecules inside each capillary, which should be sufficient for the thermodynamic description, unlike in the case of nanometre-scale droplets containing a small number of molecules3,16,18.

Remnant sagging above the condensation transition

Nanometre-thick suspended crystals are known to exhibit considerable sagging, which is believed to be caused by their vdW attraction to sidewalls26,30,38,39. As water spontaneously condensed inside the 2D channels, the sagging was found to decrease suddenly (see the jump-like changes in Fig. 1e and in Extended Data Figs. 4a and 5), which we attribute to suppression of the vdW attraction by intercalating water molecules. This explanation is supported by MD simulations27. They showed that capillaries with monolayer spacers (N = 1) always collapsed (independently of H) because of vdW interaction between the top and bottom crystals. The collapsed capillaries could be opened by intercalating water, because the attraction rapidly diminishes at distances more than a few ångströms so that even a monolayer of water provided sufficient ‘screening’ of the vdW attraction26,27.

In all our measurements, the sagging depth δ0 became abruptly smaller at the condensation transition but did not completely disappear. Only if RH was increased further did the remnant sagging gradually decrease, approaching zero at 100% RH, so that the top layer became essentially flat (Fig. 1d, e; Extended Data Fig. 3). The remnant sagging at the transition and its gradual changes with further increases in RH can be explained by the negative pressure P caused by the condensed water meniscus1,40. Let us consider our typical mica capillary with w ≈ 150 nm and top-layer thickness H ≈ 50–60 nm (Extended Data Fig. 6a). After the condensation transition occurred at a certain RH (which depended on channel height h), the top layer remained sagged typically by several ångströms. At the condensation transition, the capillary pressure is given by P ≈ 2σ cos θ/h. Using the contact angle θ ≈ 20° for mica and the surface tension of bulk water, σ ≈ 73 mN m−1, the Young–Laplace equation yields P ≈ 700 bar for h ≈ 2 nm.

The negative pressure P forces the top crystal to bend downwards, resulting in its sagging given by41

$$\delta =\frac{5P{w}^{4}}{32E{H}^{3}},$$
(3)

where E ≈ 60 GPa is Young’s modulus of mica in the out-of-plane direction42. Equation (3) yields δ ≈ 4−7 Å, in agreement with our observations. This substantiates our model that the remnant sagging above the condensation transition is caused by the negative capillary pressure. Similar agreement is found for graphite capillaries, although there is a larger uncertainty in the estimates (a factor of 2) because P strongly depends on θ for the large contact angles exhibited by water on graphite. As RH is increased beyond the condensation point, the meniscus extends outside capillaries, and its curvature becomes progressively smaller to match the external RH. Accordingly, the negative capillary pressure above RHC evolves with RH and is given by the other Kelvin equation as1,23,24,36,40

$$P={k}_{{\rm{B}}}T{\rho }_{{\rm{N}}}\mathrm{ln}\,{\rm{R}}{\rm{H}}.$$
(4)

According to this equation, the pressure that bends the top crystal should decrease logarithmically with RH, in good agreement with our observations (Extended Data Fig. 6b). Note that, close to 100% RH, δ P ln(RH) ≈ (RH – 1) is expected to approach zero linearly, as indeed observed in Fig. 1e and Extended Data Fig. 6b.

The condition of partially sagged but open capillaries (that is, few ångströms < δ0 < Na, as in our devices) is rather difficult to satisfy experimentally. Indeed, if we were to decrease H or increase w by only a factor of 2 with respect to the optimal design found, δ in equation (3) would increase by an order of magnitude because of the high powers. On the other hand, the capillary pressure P in equation (4) depends on RH only logarithmically, which means that even at very low humidity (for example, 5%), it would be thermodynamically favourable for the top layer with the non-optimal w or H to bend all the way down and reach the channel’s bottom. Therefore, such non-optimized 2D channels are unstable with respect to spontaneous water condensation under low-humidity conditions. If we were to do the opposite and increase the top crystal’s stiffness (by halving w or doubling H), δ in equation (3) becomes so small (<1 Å) that changes in the sagging would be impossible to detect by AFM. The above consideration shows that there is a subtle interplay between materials parameters and the design of 2D channels, and stringent rules should be followed in order to detect the condensation transition in experiment. Following this insight, we usually increased H by 50% for our smallest 2D channels with N = 2 and 3, which ensured that they remained open. Also, when making graphite capillaries, we used top crystals slightly (20%) thicker than in the case of mica capillaries with the same N because mica has a higher Young’s modulus than graphite43.

For nanoscale 2D capillaries such as cracks or slits inside bulk materials (H → ∞), their elastic deformations caused by large capillary pressures can notably shift the condensation transition with respect to that expected for the rigid confinement20,21. To estimate the magnitude of such adjustments, let us consider the deformation of a half-space elastic medium subject to the uniform load p over a suspended strip with the width w = 2a in the range of −a ≤ x ≤ a. The vertical deformation is given by44

$${u}_{z}(x)=-\frac{(1-\nu )p}{{\rm{\pi }}G}a\,\left[(\frac{x}{a}+1)\mathrm{ln}|x+a|-(\frac{x}{a}-1)\mathrm{ln}|x-a|-2\right],$$
(5)

where ν is Poisson’s ratio and G is the shear modulus. This equation yields the sagging

$$\delta ={u}_{z}(0)-{u}_{z}(\pm a)=\frac{\mathrm{ln}(2)(1-\nu )pw}{{\rm{\pi }}G}.$$
(6)

If we take as an example the elastic properties of graphite with G ≈ 10 GPa and ν ≈ 0.343, equation (6) yields δ ≈ 2.3 Å for capillary pressures of about 1,000 bar. Such P are typical for cavities of 1–2 nm in height (see above). This indicates that elastic deformations can not only be a contributing factor during the condensation transition23,24,36 but also allow atomic-scale cavities in bulk materials to adjust their size so that an integer number of water layers can fit inside, similar to our case where the top crystal was intentionally made sufficiently flexible.

Molecular dynamics simulations of water–surface interaction under strong confinement

To investigate the dependence of the solid–liquid surface energy γSL on h, MD simulations were performed using LAMMPS simulation code45 and the SPC/E model for water molecules46. The interaction between water and confining walls was modelled by the Lennard–Jones potential with parameters taken from ref. 47. Flat rigid graphene sheets were used to mimic the confining walls. For simplicity, to account for surfaces with different θ, we varied the interaction energies of carbon with hydrogen, εHC, and oxygen, εOC. These energies47 were multiplied by a factor of k that was varied from 0.7 to 1.3 in steps of 0.2 to find the water–wall interaction that would approximate the experimental contact angles. The MD angles θ were estimated by using water droplets containing 4,000 molecules. Our simulations yielded θ ≈ 85°, 63°, 30° and 11° for k = 0.7, 0.9, 1.1 and 1.3, respectively. The insets of Extended Data Fig. 7 show the profiles for the water droplets found in the case of θ ≈ 11° and 85°. We used these two θ and the corresponding k to model γSL(h) for our mica and graphite capillaries, respectively. Note that the former value lies in the middle of the contact-angle interval observed for mica28 and, importantly, our MD results exhibited little sensitivity to the exact θ for strongly hydrophilic capillaries, as expected from the cos θ dependence.

Having established parameters for the desired contact angles, we proceeded to another simulation set-up that consisted of two flat four-layer graphite sheets immersed in a water box containing 40,000 molecules. The dimension of each graphene sheet was 102.2 × 100.9 Å2 whereas the water box was 140.0 × 140.0 Å2 in size, which allowed water molecules confined between the rigid graphite sheets to exchange easily with outside molecules. After an equilibration run of 1.0 ns, the two sheets were brought progressively closer in steps of 0.2 Å. Each time the system was equilibrated for 0.1 ns and its total potential energy was calculated for further analysis. Periodic boundary conditions were imposed in all three directions. All the simulations were carried out with the isothermal–isobaric ensemble at 298 K. The density profiles found in our simulations are shown in Extended Data Fig. 7. The confined water exhibits a pronounced layered structure that extends over two intermolecular distances from each surface, before the water density converges to its bulk value, in agreement with the earlier literature (see, for example, refs. 19,20,48,49).

The deviations Δγ in the solid–liquid surface energy γSL from its bulk value may be considered as extra work spent to rearrange water molecules into the strongly layered structures shown in Extended Data Fig. 7. If h is sufficiently large, the extra work is negligible because the opposite surfaces do not ‘feel’ each other, and their near-surface water structures remain unchanged with respect to the case of infinite h. However, as the walls are getting closer, the layered structures overlap (see the density profiles for h 10 Å in Extended Data Fig. 7). As a result, the total energy and, hence, Δγ exhibit pronounced oscillations (Extended Data Fig. 8).

Using equation (2) and the numerically found Δγ, it is straightforward to calculate the RH required for water condensation inside atomic-scale capillaries. The results are plotted in Fig. 2 of the main text and reveal giant oscillations in RHC which emerge when the structured layers of water near the two confining surfaces start overlapping. Note that the confining walls in the MD simulations were made rigid, disallowing elastic deformations considered separately in our analysis in Fig. 2.