Minkowski functionals for phase behavior under confinement

In this work, the Minkowski functionals are used as a framework to study how morphology (i.e. the shape of a structure) and topology (i.e. how different structures are connected) influence wall adsorption and capillary condensation under tight confinement. Numerical simulations based on classical density functional theory (DFT) are run for a wide variety of geometries using both hard-sphere and Lennard-Jones fluids. These DFT computations are compared to results obtained using the Minkowski functionals. It is found that the Minkowski functionals can provide a good description of the behavior of Lennard-Jones fluids down to small system sizes. In addition, through decomposition of the free energy, the Minkowski functionals provide a good framework to better understand what are the dominant contributions to the physics of a system. Lastly, while studying the phase envelope shift as a function of the Minkowski functionals it is found that topology has a different effect depending on whether the phase transition under consideration is a first- or a second-order transition.


Introduction
Under tight confinement a gas can form a condensed phase at a pressure below the bulk vapor pressure.This phenomenon is known as capillary condensation and has applications in many fields of science and engineering, including the storage of hydrogen carriers [1,2,3], battery technology [4], hydrocarbons extraction from unconventional reservoirs [5], and carbon dioxide sequestration [6].Capillary condensation can have a large effect on transport properties [7], and it is reported in the literature that both morphology (i.e. the shape of a structure) and topology (i.e.how different structures are connected) have a strong effect on the sorption of both sub-and supercritical fluids [2,8,9].For ordered porous media, the relation between capillary condensation and geometry is well understood [10]; however, in practice many porous media are disordered rather than ordered.Although simple geometries like cylinders, slit pores, ink bottles, and spheres [11,12] have been studied extensively, capillary condensation in disordered porous media is not well understood [13,14,15,16,12,17].
In this work, we study capillary condensation and wall adsorption under confinement (i.e.small pores) through the lens of the Minkowski functionals.These functionals are a concept from integral geometry which not only characterize the morphology, but also the topology of spatial patterns [18], and they have been applied in a wide array of research areas including astronomy [19,20], statistical physics [21], phase behavior [22], and granular materials [23,24].For a system in D dimensions, there are D + 1 Minkowski functionals and in the case of a twodimensional system these functionals are related to the surface area, circumference, and signed curvature (i.e. the Euler characteristic) of the system [25].In addition to providing a method to characterize spatial patterns, the Minkowski functionals also provide a powerful connection between the thermodynamics and the geometry of a system.In many cases, the free energy of a system can be expressed as a linear combination of Minkowski functionals [26,27].Once an expression for the free energy has been found, other thermodynamic properties can be derived including the surface tension, excess adsorption, and shifts in the phase envelope [28].
Minkowski functionals can be used in combination with experiments, theory, or simulations.In this work, we employ classical density functional theory (DFT) [29] to compute the free energy and adsorption for a wide variety of geometries for both hard-sphere and Lennard-Jones fluids.These results are then compared to results obtained using the Minkowski functionals.The Minkowski functionals have mainly been used to study hard-sphere fluids [27].In this study, we find that Minkowski functionals can also provide a good description of Lennard-Jones fluids down to fairly small system sizes.This, in turn, means that the decomposition of the free energy given by the Minkowski functionals can provide valuable insight into the physical behavior of a Lennard-Jones fluid under confinement; e.g. it is found that topology has a different effect on the phase envelope shift of a Lennard-Jones fluid under confinement depending on whether the phase transition under consideration is a first-or a second-order transition.It is left for future research to investigate whether this behavior is specific to wall adsorption and capillary condensation, or whether this is a more universal phenomenon.

Minkowski functionals
The Minkowski functionals are a concept from integral geometry.These functionals characterize both the morphology and the topology of a spatial pattern [30,31].For a D dimensional space, there are D + 1 functionals.Considering a 2D system with a surface, X, and a smooth boundary, δX, the following functionals can be defined: where dA is a surface element, dL is a circumference element, and k (X) is the signed curvature [32].Following the Gauss-Bonnet theorem, the signed curvature is directly proportional to the Euler characteristic, χ, which is a measure of connectivity/topology.Now consider a functional, M (X), which is additive: motion invariant: and continuous: Then, following Hadwiger's theorem [26], this functional, M (X), can be expressed as a linear combination of Minkowski functionals, M ν (X), as follows: An example of such a functional is the grand potential or Landau free energy, Ω (µ, V, T ), which is commonly used to study capillary condensation [33,34].For a 2D system, the grand potential can thus be written as [18]: where L is a unit length, p (µ, T ) is the pressure, σ (µ, T ) is the surface tension, and κ (µ, T ) is the signed bending rigidity.The above expression for the grand potential demonstrates the importance of Hadwiger's theorem.The pressure, surface tension, and signed bending rigidity are all only dependent on the chemical potential, µ, and the temperature, T .Thus, the above equation shows how thermodynamics can be separated from morphology and topology [27].Once the grand potential is known, other thermodynamic properties can be derived.This includes the excess free energy or surface tension [11,28]: and, through Gibbs' theorem, the excess adsorption: In the above equations, p b is the bulk pressure and ρ b is the bulk density.While it has been suggested in the past that Gibbs' theorem is not valid for some systems undergoing capillary condensation [33,35], later work found that Gibbs' theorem is not violated when using an arc length tracking algorithm [36,11].
In addition to the excess adsorption, one can also compute the effect of confinement on the phase envelope [28]: with: where σ sg (µ, T ) and σ sl (µ, T ) are the solid-gas and solid-liquid surface energies, respectively, and κ sg (µ, T ) and κ sl (µ, T ) are the solid-gas and solid-liquid bending rigidities.The above equation is a generalization of the Kelvin equation, and an equation of the same form can be derived for the temperature shift [37].Two points should be noted about the above equation: i) due to diverging density fluctuations, a mean field approach is not expected to fully capture the correct scaling at the critical point [38], and ii) the correlation length that measures the range of density fluctuations at the critical point also diverges, resulting in a potential violation of Hadwiger's theorem.However, while these points need to be investigated further, the above equation should give a good first approximation of how phase behavior is affected by topology.

Density Functional Theory
The Minkowski functionals can be used with either experiments, theory, or simulations.In this work, we decided on using classical density functional theory (DFT) to compute the coefficients in front of the Minkowski functionals.DFT is a mean field approach which was first developed for quantum mechanics [39], but was later adapted to describe classical mechanical systems [29] as well.This mean field approach has the advantage of giving a description of the physics at the nanoscopic molecular level, while scaling up to the mesoscopic level at which capillary condensation occurs.
The two basic assumptions of density functional theory are; i) the Hohenberg-Kohn variational principle, which states that there is a functional of the ground state free energy which can be fully recovered from the ground-state one-particle density distribution, and ii) the Gibbs' inequality, which states that any particle density distribution that is not the ground state will have a higher free energy than the ground state free energy [39].Formulated in the grand canonical (µ,V ,T ) ensemble, at the most basic level this means that classical DFT solves the following minimization problem: where Ω is the grand potential or Landau free energy, ρ is the density, and δ is the Fréchet (functional) derivative [40].To solve the above equation, we use the DFT solver Tramonto, which is developed at the Sandia National Laboratories [41,42,36,11,40].This code uses perturbation theory where the grand potential is split up as: where F id is the ideal contribution, F hs is the hard-sphere contribution, and F p is the perturbation contribution.V (r) is the external potential resulting from (pore) walls acting on the fluid.The individual contributions are given by the following integrals: In the above equations, β −1 = k B T , with k B the Boltzmann constant, and T the temperature, Λ is the thermal de Broglie wavelength, Φ is the excess free energy density which is a function of ργ , a set of weighted non-local densities, and U p is an interaction potential.This potential is based on the Weeks-Chandler-Anderson approach [43], which splits an interaction potential as U p (r) = u (r min ) for r < r min and U p (r) = u (r) for r ≥ r min .The potential u (r) is a cut and shifted Lennard-Jones potential with u (r) = u LJ (r) − u LJ (r c ) where: and r c = σ ff .Here ff is the depth of the potential well and σ ff is the finite distance at which the potential is zero.In this work, the Fundamental Measure Theory (FMT) is used with the White Bear functional [44].The weighted non-local densities are: ργ (r) = dr ρ (r ) with the weight functions: The excess free energy density is given by Φ = Φ s + Φ v with: The last term that needs to be defined is the external potential, V (r), which is defined as: where the integral is taken over all elements assigned to the (pore) wall.The potential v LJ (r) is the same as the Lennard-Jones potential defined in equation 19, but with ff replaced with sf and σ ff replaced with σ sf .More details about the discretization of the above equations, their numerical implementation, and how to solve them in parallel can be found in the literature [41,42,36,11,40].Phase transitions are tracked using the pseudo arc length continuation algorithm of Keller [45,36] which have been implemented in the LOCA software library [46].

Geometries
To study how capillary condensation depends on the Minkowski functionals, simulations have been performed for a broad range of pore sizes and topologies.Figure 1 shows these various geometries and topologies.Along the vertical axis, the various shapes show pores with different radii, r p .Along the horizontal axis rods with radius r r = 1.0 are placed inside the pores to modify the Euler characteristic χ.The various 2D Minkowski functionals associated with the surface area, circumference, and signed curvature, respectively, can be computed with the following set of equations: where n r is the number of rods inside the pore.As mentioned in section 2.1, in order for the Minkowski functionals to accurately capture the physics of capillary condensation, the conditions in Hadwiger's theorem need to be met.Considering that for very small pores the characteristic interaction length between molecules Figure 1: The various geometries and topologies used in the simulations.Along the vertical axis, the various shapes show pores with different radii, r p .Along the horizontal axis, rods with radius r p = 1.0 are placed inside the pores to modify the Euler characteristic, χ.The pores in gray are simulation cases where the distance between walls of either the pores or the rods are smaller than ≈ 10σ, which is the distance at which Hadwiger's theorem starts to break down [27].
becomes of the same order as the pore size, the additivity constraint (Equation 2) is expected to break down first.In the literature it is reported that an error of about 1% is found when the system size becomes of the order of ≈ 10σ ff , where σ ff is the characteristic length scale of the interaction potential between molecules [27].For the pores in gray in Figure 1 the minimum distance between the walls of the pore and/or the rods inside the pore is smaller than this distance, and Hadwiger's theorem is expected to break down.In addition, to further explore the effect of violating Hadwiger's additivity assumption, simulations are run for the geometries shown in figure 2. For all geometries, the radius of the pore is, r p = 15.0, and the Euler characteristic is, χ = 0.The radius of the rod in the top row geometries is r r = 3, and the distance with the wall is varied.In the bottom row geometries, the radius of the rod is varied from r r = 1, to r r = 13.By moving the rod towards the wall/changing the radius of the rod, the additivity assumption gradually breaks down.This allows us to investigate whether the accuracy of the simulations also breaks down gradually, or whether there is a catastrophic failure at a certain wall-to-wall distance.Again, the pores in gray are simulation cases in which the distance between the walls of the pore and the rod are smaller than ≈ 10σ ff , the distance at which the additivity A second set of geometries used in the simulations.For all geometries the radius of the pore is, r p = 15.0, and the Euler characteristic is, χ = 0.The radius of the rod in the top row geometries is r r = 3 and the distance with the wall is varied.In the bottom row geometries, the radius of the rod is varied from r r = 1, to r r = 13.The pores in gray are simulation cases in which the distance between the walls of the pore and the rod are smaller than ≈ 10σ, the distance at which the additivity assumption starts to break down according to literature [27].assumption starts to break down [27].

Simulation parameters
Table 1: DFT parameters of N 2 and SiO 2 [47].The number density for SiO 2 is ρ s = 66.15nm −3 [48].Fluid-fluid interactions are truncated at 5σ ff .The simulations are performed at 77.3K N 2 94.45 0.3575 0.3575 147.3 0.317 Existing literature has focused on the behavior of hard sphere fluids [27].This kind of potential resembles a high temperature gas and can be a useful simplification of a system of interest.However, many engineering applications require more complex particle-particle interactions like the Lennard-Jones potential.In this work, simulations have been performed for both a Table 1 shows the parameters used in the Lennard-Jones DFT simulations.Because it is a commonly used model system [50,51,52], the Lennard-Jones fluid is parameterized as Nitrogen in Vycor glass.The parameters are the same as those used by Ravikovitch et al. [47] and Ustinov et al. [48] and are very similar to the parameters used by Gelb & Gubbins [53] in their Grand Canonical Monte Carlo simulations of Nitrogen in Vycor glass.Figure 3 shows a comparison between DFT simulations and experiments [49] for the adsorption isotherm of N 2 in a SiO 2 slit pore with a width of L/σ ff = 500.The results confirm that the parameters listed in table 1 are a reasonable choice.With more advanced models for the interaction between N 2 and SiO 2 , a better match can be obtained between DFT simulations and experiments [47,48].However, the choice of the same potential for particle-particle and wall-particle keeps the system simple and the results more easy to interpret.The computations are performed in the grand canonical ensemble (µ, V, T ) and the relation between the chemical potential and pressure was obtained from a bulk DFT simulation.

Results
In this section, the results are shown for both simulations with a hardsphere interaction potential and a Lennard-Jones interaction potential.All the parameters have been made dimensionless with β = k B T and σ ff .pressure, p (µ, T ), surface tension, σ (µ, T ), and bending rigidity, κ (µ, T ).These coefficients are computed by performing a least squares fit on all the simulations.The various curves show a low density regime for chemical potentials µ < 0 and a transition to a high density regime for µ > 0. Visually, in both regimes, the data sets show a good match for all geometries.The individual dimensionless Minkowski functional coefficients are shown in Figure 5 as a function of the dimensionless chemical potential, µ.These are the values of the coefficients that are used in Figure 4 to reconstruct the grand potential as a function of the chemical potential.It can be seen that in this system, the pressure coefficient is the same as the bulk pressure.The surface tension and In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore, this is the smallest distance between the pore wall and a rod or between two different rods.
bending rigidity show the same behavior as in a 3D system [27].
To get a better understanding of the error introduced by using the Minkowski functionals, Figure 6 shows the average absolute relative error, < | Ω | >, as a function of the minimal characteristic length scale of the system, l min .The average absolute relative error is defined as: where Ω DFT is the grand potential computed using DFT, and Ω Mink is the reconstruction of the grand potential using the Minkowski functionals.The error is averaged with respect to the chemical potential, µ.In the case of a pore without rods, the length scale, l min , equals twice the radius.When rods are present within the pore, this is the smallest distance between the pore wall and a rod or between two different rods.For pores without rods, it can be observed that log (< | Ω | >) scales approximately linearly with √ l min .Figure 4 indicates that there is a very good match between the grand potential computed directly using DFT and the reconstruction using the Minkowski functionals; nevertheless, close inspection of the results shows that the accuracy of the Minkowski functionals declines as the pores become smaller.This is due to the fact that when the system size is of the same order as the interaction length between molecules, Hadwiger's assumption of additivity breaks down.However, looking at other topologies suggests that l min is not a perfect description of the characteristic length scale of the system.Changing the topology of the system with rods seems to have little effect on the error and the linear scaling relation between √ l min and log (< | Ω | >) does not hold.The error, | Ω | , found in this work for cylindrical pores is consistent with the literature [27].
To further analyze the behavior of the error, | Ω | , as a function of various morphologies and topologies, Figure 7 shows an analysis of the error when applying the Minkowski functional expansion of the grand potential for the geometries shown in Figure 2. The top row of this figure shows a set of pore geometries with one rod inside.In these different geometries, the distance from the pore to the wall is varied.All of these geometries have the same Minkowski functionals.The bottom row of Figure 2 also shows a set of pore geometries with one rod inside, but the pore is centered in the middle.In this set of geometries, the size of the rod is varied.Figure 7 shows the average absolute relative error, < | Ω | >, as a function of the minimal characteristic length scale of the system, l min .The closed symbols show reference DFT simulations of pores without rods, open squares show simulations from the top row of Figure 2, and closed triangles show results from the bottom row of Figure 2. The figure shows that the scaling of the error as a function of the minimal distance, l min , is very similar for open pores and pores with rods of varying radii.However, moving a rod around inside a pore does not have much effect on the error of the Minkowski functional reconstruction of the grand potential.These results confirm that l min is not a perfect description of the characteristic length scale of the system.In addition, the literature suggests that perturbations introduced at a caustic point should increase the error [27], which is not the case for these simulations.The error was also studied as a function of the length scale defined as the ratio of the Minkowski functionals for surface area and circumference A (X) /C (X) and as the average wall-to-wall distance.However, neither of these measures improved the scaling relation and more study is needed.
An important thermodynamic property which can be derived from the grand and the Minkowski functional reconstruction is more pronounced than for the grand potential in Figure 4.This can most likely be contributed to the fact that the excess adsorption is a derivative of the grand potential, which introduces additional uncertainty in the results.A second observation is the collapse of the different adsorption isotherms for larger pore sizes.Since the difference between the pressure, p, and the bulk pressure, p b , is close to zero (see Figure 5), the only term in Equation 10 that can contribute to differences in excess adsorption between different geometries is K (X) /C (X).This suggests that, as the pore size increases, the effect of topology on the excess adsorption decreases.The matching dimensionless Minkowski functional coefficients: the derivatives of pressure,∂(p − p b )/∂µ, surface tension, ∂σ/∂µ, and bending rigidity, ∂κ/∂µ, with respect to the chemical potential are shown in Figure 9.This figure confirms again that in this system the pressure coefficient is the same as the bulk pressure.
Considering the the minus sign in Equation 10, the curves for the surface tension and bending rigidity are consistent with Figure 5.The last graph for the hard-sphere system is Figure 10, which shows the average absolute relative error < | Γ | > as a function of the minimal characteristic length scale of the system, l min .In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore, this is the smallest distance between the pore wall and a rod or between two different rods.The relative error is defined in the same manner as in equation 31.For pores without rods, it can be observed that log (< | Γ | >) scales almost linearly with l min instead of being proportional to √ l min .In addition, due to the fact that the excess adsorption is a derivative of the grand potential, the error is larger than observed in Figure 6.In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore this is the smallest distance between the pore wall and a rod or between two different rods.

Lennard-Jones potential
In this section, the results for the Lennard-Jones fluid are presented.Due to the increased interaction length and the more complex phase behavior of this interaction potential compared to a hard-sphere fluid, it is found that Hadwiger's theorem starts to break down earlier.However, as is shown below, by performing a scaling analysis of the phase transitions of the system as a function of the Minkowski functionals, the following additional terms p (µ, T ) A 1/2 (X) and σ (µ, T ) C 3/4 (X) can be identified and added to the expansion of the grand potential for increased accuracy.All the results in this section include these extra terms.
Figure 11 shows the dimensionless 2D grand potential, Ω/L, as a function of the dimensionless chemical potential, µ, for a Lennard-Jones fluid.Only the simulation results with Euler characteristic, χ = 1, are shown.The different lines show the results of the DFT simulations while the symbols show the grand potential reconstructed from the Minkowski functionals and one set of Minkowski functional coefficients: pressure, p (µ, T ), surface tension, σ (µ, T ), bending rigidity, κ (µ, T ), and the pseudo pressure and surface tension terms p (µ, T ) and σ (µ, T ).The shape of the grand potential curves shows more complex behavior than those in Figure 4 for a hard-sphere fluid.For the pore size, r p = 25, three different regimes can be identified: i) at low chemical potential the pores are completely empty, ii) starting at about µ ≈ −10, a second-order phase transition can be observed and gas starts adsorbing on the wall, and iii) at about µ ≈ −6 capillary condensation can be observed.In this work, capillary condensation is defined as a first-order phase transition that can be identified by a van der Waals loop in the grand potential as a function of the chemical potential [37].The data sets for DFT simulations and the reconstructions using the Minkowski functionals show a good match for larger geometries, but a discrepancy for the smallest pores.
Like the hard-sphere fluid, this is the consequence of the breakdown of Hadwiger's theorem.One example of how this manifests itself, is that there is a critical pore size at which the first order capillary condensation phase transition changes into a second order transition.It is found that this change from a first-order to a second-order phase transition is not captured well by the Minkowski functional approximation of the grand potential.
The corresponding dimensionless Minkowski functional coefficients as a function of the dimensionless chemical potential, µ, are shown in Figure 12 (a).It can be observed that like the hard-sphere system, the pressure coefficient is very similar to the bulk pressure, p b .All coefficients show a large peak around µ ≈ −6 and the range of these peaks extends from about −150 to 150.Before these peaks occur, the surface tension and bending rigidity terms show very similar behavior.To get a better understanding of the behavior of a Lennard-Jones fluid under confinement, one can analyze how much individual Minkowski functionals contribute to the grand potential.In Figure 12 (b), the value of the Minkowski functional coefficients times their corresponding Minkowski functionals is shown for a pore with radius, r p = 25, and without any rods inside, χ = 1.This analysis suggests that the adsorption of gas onto the pore wall is dominated by the surface tension and the pseudo pressure.When capillary condensation occurs, the surface tension and pseudo pressure contributions both become discontinuous and show large increases.Also, the contribution from the pseudo surface tension contribution becomes significant.After the bulk phase transition, the system becomes increasingly dominated by the pressure.As expected, there is no significant contribution from the topology in this pore geometry.
Figure 13 shows the average absolute relative error, < | Ω | >, as a function of the square root of the minimal characteristic length scale of the system, √ l min .As a reminder, the average absolute relative error is defined as: where Ω DFT is the grand potential computed using DFT, and Ω Mink is the reconstruction of the grand potential using the Minkowski functionals.The error is averaged with respect to the chemical potential, µ.Due to the longer interaction µ Figure 12: (a) Dimensionless Minkowski functional coefficients: pressure, p (µ, T ), density, σ (µ, T ), bending rigidity, κ (µ, T ), and the pseudo pressure and surface tension terms p (µ, T ) and σ (µ, T ), as a function of the dimensionless chemical potential, µ.These are the values of the coefficients that are used in Figure 11 to reconstruct the grand potential as a function of the chemical potential.Like the hard-sphere system, also in this system the pressure coefficient is very similar to the bulk pressure, p b .In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore this is the smallest distance between the pore wall and a rod or between two different rods.
length of the Lennard-Jones potential compared to the hard-sphere potential and the more complex phase behavior, the observed error is larger than in Figure 6.While the cut-off length of the interaction potential is equal to 5σ in the DFT simulations, one could expect the error to be significantly less than 5 times as large because the attractive tail of the Lennard-Jones potential is almost zero at 2σ.The error is indeed significantly less than 5 times as large.However, this is in part due to the addition of the pseudo pressure and surface tension terms to the Minkowski functional expression for the grand potential.Like the hard-sphere fluid, for pores without rods, it can be observed that log (< | Ω | >) scales almost linearly with √ l min .However, this scaling does not hold for pores with rods.Like the hard-sphere system, changing the topology of the system with rods does not have a large effect on the error, < | Ω | >, especially for smaller pores.The fact that, as shown above, the topology does not have a very large contribution to the grand potential could partly explain this observation.The figure confirms the observation in Figure 11 that for larger pores the fit of the Minkowski functional reconstruction of the grand potential is much better than for smaller pores.
The dimensionless 2D excess adsorption, Γ/L, as a function of the dimensionless chemical potential, µ, for a Lennard-Jones fluid is shown in Figure 14.Again, only the simulation results when χ = 1 are shown.The different lines show the results of the DFT simulations while the symbols show the grand potential as reconstructed from the Minkowski functionals and one set of Minkowski functional coefficients: the derivatives of pressure,∂(p − p b )/∂µ, surface tension, ∂σ/∂µ, bending rigidity, ∂κ/∂µ, and the pseudo pressure and surface tension terms ∂p /∂µ and ∂σ /∂µ with respect to the chemical potential.As is the case for the grand potential in Figure 11, different regimes can be identified in Figure 14.For the pore size, r p = 25, the following regimes can be observed: i) at low chemical potential the pores are completely empty, ii) starting at about µ ≈ −10, a second-order phase transition can be observed and gas starts adsorbing on the wall, iii) at about µ ≈ −6 capillary condensation can be observed, and iv) around µ ≈ −5 the bulk phase transition occurs and the excess adsorption shows a significant drop.The inset shows that for larger pores there is a very good match between the DFT computations and the Minkowski functional reconstructions.However, for the smallest pores the match is quite poor and neither the film adsorption stage or capillary condensation is captured well.
The derivatives of the Minkowski functional coefficient with respect to the chemical potential, µ, used to reconstruct the excess adsorption, can be observed in Figure 15 a.This plot confirms that the pressure term is very similar to the bulk pressure.The peaks at about µ ≈ −10 and µ ≈ −7 are the locations of the second-order phase transitions associated with layers of gas molecules adsorbing onto the pore wall.To be able to analyze how the different terms contribute to the excess adsorption, in Figure 15 (b) the value of the Minkowski functional coefficients times their corresponding Minkowski functionals is shown for a pore with radius r p = 25 and without any rods inside, χ = 1.Since these coefficients are derivatives of the coefficients used to reconstruct the grand potential, they can be both positive and negative.The amount of gas adsorbed onto the wall is dominated by the pseudo pressure and a negative contribution from the surface tension.The pseudo surface tension only contributes during the second-order phase transitions at about µ ≈ −10 and µ ≈ −7.Capillary condensation is characterized by a much larger contribution of the pseudo surface tension and many discontinuities in all the different terms to accommodate the discontinuity of a first-order phase transition.As expected for an open-pore geometry, both the pressure and topology do not significantly contribute to the excess adsorption.
Figure 16 shows the average absolute relative error < | Γ | > as a function of the minimal characteristic length scale of the system, l min .Because excess adsorption is a derivative of the grand potential, the observed error is larger than Figure 13.Due to the more complex interactions in a Lennard-Jones fluid, the error is also larger than the error observed for a hard-sphere fluid in Figure 10.For pores without rods, it can be observed that log (< | Γ | >) scales almost linearly with l min .Again, this scaling does not hold for pores with rods.This is similar to  In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore this is the smallest distance between the pore wall and a rod or between two different rods.
Because the excess adsorption is a derivative of the grand potential, the observed error is larger than Figure 13.
what was observed for Figure 13 which is probably at least partly caused by the limited contribution of topology to the grand potential and the excess adsorption.
As expressed in Equation 11, the Minkowski functionals can also be used to evaluate the shift of the phase envelope as a function of morphology and topology.Additionally, knowing the phase behavior also helps in determining which terms should be used to expand the grand potential in terms of the Minkowski functionals.Because the rod size is constant across different simulations, the Minkowski functionals A (X) and C (X) can be expressed as a functions of only the pore radius r p for constant bending rigidity, K (X).This means that for K (X) = 0, the pressure shift in the phase envelope only depends on r p . Figure 17  shows that the pressure difference between the second-order phase transition associated with adsorption of gas onto a wall in the bulk and inside a pore, ∆p w , can be predicted well by the function: f w (C 3/4 ) = Ω lg σ lg C 3/4 , where the coefficients are: Ω lg = −8.3• 10 −3 ± 0.1 • 10 −3 and σ lg = 1.538 • 10 −3 ± 0.008 • 10 −3 .Although the power of 3/4 is reasonably close to the theoretical prediction of 1, this shows that due to the small system size, Hadwiger's additivity assumption starts to break down.A more accurate fit of the grand potential can be found by adding an additional term proportional to C 3/4 to the Minkowski functional expansion.This was done for the results presented in Figures 13 -16.Another potential source of error could be that, for very small pores, excluded volume effects keeping molecules away from the wall could be significant.
To validate how well the function f w (C 3/4 ) describes the data, Figure 18 shows the pressure difference between the second-order phase transition associated with adsorption of gas onto a wall in the bulk and inside a pore times the surface Figure 18: difference between the second-order phase transition associated with adsorption of gas onto a wall in the bulk and inside a pore times the surface area Minkowski functional minus the function from Figure 17, ∆p w • A (X) − f w (C 3/4 ), as function of the Minkowski functional, K (X).The graph shows a collapse of the data and a linear fit with: g w (K) = κ lg K (X), where κ lg = 4.6 • 10 −4 ± 0.2 • 10 −4 .area Minkowski functional minus the function f w (C 3/4 ), ∆p w • A (X) − f w (C 3/4 ), as a function of the Minkowski functional, K (X).The graph shows a collapse of the data and, as expected, a linear fit with: g w (K) = κ lg K (X), where κ lg = 4.6 • 10 −4 ± 0.2 • 10 −4 .The collapse of the data confirms that the grand potential and thus the second-order pressure shift in the phase envelope, ∆p w , is proportional to C 3/4 (X) and is linearly dependent on the topology of the system K (X).In addition, the data shows that the sensitivity of the grand potential to topology is about an order of magnitude smaller than the sensitivity to the pseudo surface tension.The outlier, r p = 2.5, χ = 1, confirms the breakdown of Figure 19: Pressure difference between the capillary condensation pressure and bulk phase transition pressure times the surface area Minkowski functional, ∆p•A (X), as a function of pore radius, r p .The Minkowski functional for topology is zero in all the shown simulations, K (X) = 0.The curve fit is equal to: , where the Minkowski functionals C (X) and A (X) only depend on r p .The coefficients are: Ω lg = −0.4± 0.2, σ lg = 0.12 ± 0.03, and p lg = −0.04 ± 0.02.
Hadwiger's theorem for small pore sizes.
A similar analysis can be performed for the phase envelope shift of capillary condensation, which is first-order phase transition.Figure 19 shows the pressure difference between the capillary condensation pressure and the bulk phase transition pressure times the surface area Minkowski functional, ∆p • A (X), as a function of pore radius, r p .The Minkowski functional for topology is zero in all the DFT simulations shown in Figure 19, K (X) = 0.The curve fit is equal to: , where the Minkowski functionals C (X) and A (X) only depend on r p .The coefficients are: Ω lg = −0.4± 0.2, σ lg = 0.12 ± 0.03, and p lg = −0.04 ± 0.02.The curvature of the simulation data presents a clear case for adding an additional term proportional to A 1/2 (X) to the expansion of the grand potential with Minkowski functionals.
To validate the data fit shown in Figure 19, Figure 20 shows the pressure difference between capillary condensation pressure and the bulk phase transition pressure times the surface area Minkowski functional minus the function from envelope shift dependence on topology is different depending on whether the phase transition is a first-order or a second-order phase transition.This is a topic for further research.

Conclusions
We studied the effect of morphology and topology on capillary condensation in a systematic manner using a Minkowski functional framework.Consistent with the literature [27], it is found that hard-sphere fluids obey Hadwiger's theorem [26] down to quite small pore sizes, especially when using the Minkowski functionals to reconstruct the grand potential.For the excess adsorption, a significantly larger average absolute error between the DFT simulations and the Minkowski functional reconstruction of the excess adsorption is found.
Analyzing the error for various geometries, it is observed that the error decreases rapidly with increasing pore size.However, it is also found that it is not trivial to find a characteristic length scale of the system at which Hadwiger's theorem starts to break down.While increasing the size of a rod inside a pore has a clear effect on the error, moving a rod around inside a pore while keeping the Minkowski functionals of the system constant has no effect.This can potentially be explained by the fact that topology only has a small contribution to the grand potential for the systems studied in this work.
Changing the system from a hard-sphere fluid to a Lennard-Jones fluid, the interaction length becomes much longer and phase behavior becomes much more complex.This results in larger errors in both the grand potential and the excess adsorption, which can be partly overcome by introducing additional terms in the expansion of the grand potential.Trends in the error observed for hard-sphere fluids are also observed for Lennard-Jones fluids.
Analyzing the contributions of the various Minkowski functional coefficients to the grand potential shows that wall adsorption is dominated by a surfacetension term and pseudo pressure, which is proportional to ∝ A 1/2 .During capillary condensation, a pseudo surface tension term proportional to ∝ C 3/4 also gains in importance and this regime is characterized by large discontinuities in the coefficients which match the discontinuities caused by capillary condensation.After the bulk phase transition the system is increasingly dominated by the pressure.A similar analysis of the coefficients contributing to the excess adsorption shows the pseudo pressure as a positively contributing term to the wall adsorption and the surface tension as a negatively contributing term.The reason that there are both positive and negative contributions to the excess adsorption is due to the fact that the derivatives present in the Minkowski functional representation of the excess adsorption can be both positive and negative.During capillary condensation, the pseudo surface tension term becomes significantly more important.For both the grand potential and the excess adsorption the effect of topology is modest.
Last but not least, the effect of confinement on phase behavior is investigated.It is found that pressure shift in the second-order phase transition describing adsorption on the pore wall is proportional to C 3/4 (X) and K (X), which is close to what is predicted based on Hadwiger's theorem.However, the pressure for the first-order phase transition describing capillary condensation is proportional to C 3/4 (X), C 1/2 (X) and K (X), which is a significant deviation from theory.In addition, the first-order phase transition and the second-order phase transition have the opposite dependence on topology.For first-order phase transitions as a function of the Minkowski functional, K (X), the fitting parameter is positive, while for second-order phase transitions this parameter is positive.Whether this is a finding which holds in general for first-and second-order phase transitions has to be investigated further.
The Minkowski functionals provide a useful framework to study capillary condensation.The separation of geometry and thermodynamics allows for a method to systematically study the effect of surface area, circumference, and the Euler characteristic on phase behavior.This provides many opportunities for future research.One of the many open questions is whether the different effect that topology has on first-versus second-order phase transitions is also found for different Lennard-Jones fluids, or even for first-and second-order phase transitions in general.Another question is whether it is possible to use the Minkowski functionals for upscaling.The idea is to perform a number of simulations on different small geometries with known Minkowski functionals to compute the Minkowski functional coefficients for the excess adsorption.These coefficients are then used to predict the excess adsorption for a much larger experimental disordered porous medium with known Minkowski functionals.Other questions to consider working on are: to continue looking for a characteristic length scale that describes when Hadwiger's theorem breaks down, study whether sorption hysteresis can be described using the Minkowski functionals, and to study whether the Minkowski functionals can be used for higher molecular weight molecules.

lFigure 2 :
Figure2:A second set of geometries used in the simulations.For all geometries the radius of the pore is, r p = 15.0, and the Euler characteristic is, χ = 0.The radius of the rod in the top row geometries is r r = 3 and the distance with the wall is varied.In the bottom row geometries, the radius of the rod is varied from r r = 1, to r r = 13.The pores in gray are simulation cases in which the distance between the walls of the pore and the rod are smaller than ≈ 10σ, the distance at which the additivity assumption starts to break down according to literature[27].

Figure 3 :
Figure 3: Comparison between experiments[49] and our DFT simulations for the adsorption isotherm of N 2 in a SiO 2 slit pore with a width of L = 500σ ff .The chosen wall potential does not fully capture the interactions between N 2 and SiO 2 , but the results show a good match.This confirms that the used parameters shown in table 1 are a reasonable choice.

Figure 4 :
Figure 4: Dimensionless 2D grand potential, Ω/L, as a function of the dimensionless chemical potential, µ, for a hard sphere fluid.For clarity, only the simulation results from Figure 1 when χ = 1 are shown.The different lines show the results of the DFT simulations, and the symbols show the grand potential as reconstructed from the Minkowski functionals.The reconstruction of the grand potential uses only one set of Minkowski functional coefficients: pressure, p (µ, T ), surface tension, σ (µ, T ), and bending rigidity, κ (µ, T ).

Figure 5 :
Figure5: Dimensionless Minkowski functional coefficients: pressure, p (µ, T ), density, σ (µ, T ), and bending rigidity, κ (µ, T ), as a function of the dimensionless chemical potential, µ.These are the values of the coefficients that are used in Figure4to reconstruct the grand potential as a function of the chemical potential.

5 Figure 6 :
Figure 6: Average absolute relative error, < | Ω | >, as a function of the square root of the minimal characteristic length scale of the system, √ l min .In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore, this is the smallest distance between the pore wall and a rod or between two different rods.

Figure 7 :Figure 8 :
Figure7: Relative error | Ω | as a function of the minimal characteristic length scale of the system, l min .In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore this is the smallest distance between the pore wall and a rod or between two different rods.

Figure 9 :
Figure 9: Dimensionless Minkowski functional coefficients: the derivatives of pressure,∂(p − p b )/∂µ, surface tension, ∂σ/∂µ, and bending rigidity, ∂κ/∂µ, with respect to the chemical potential.These are the values of the coefficients that are used in Figure 8 to reconstruct the excess adsorption as a function of the chemical potential.

5 Figure 10 :
Figure10: Average absolute relative error, < | Γ | >, as a function of the minimal characteristic length scale of the system, l min .In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore this is the smallest distance between the pore wall and a rod or between two different rods.

Figure 11 :
Figure 11: Dimensionless 2D grand potential, Ω/L, as a function of the dimensionless chemical potential, µ, for a Lennard-Jones fluid.Only the simulation results when χ = 1 are shown.The different lines show the results of the DFT simulations while the symbols show the grand potential as reconstructed from the Minkowski functionals and one set of Minkowski functional coefficients: pressure, p (µ, T ), surface tension, σ (µ, T ), bending rigidity, κ (µ, T ), and the pseudo pressure and surface tension terms p (µ, T ) and σ (µ, T ).

5 Figure 13 :
Figure13: Average absolute relative error < | Ω | > as a function of the minimal characteristic length scale of the system, l min .In the case of a pore without rods, this distance is twice the radius.When rods are present within the pore this is the smallest distance between the pore wall and a rod or between two different rods.

Figure 14 :
Figure 14: Dimensionless 2D excess adsorption, Γ/L, as a function of the dimensionless chemical potential, µ, for a Lennard-Jones fluid.Only the simulation results from Figure 1 when χ = 1 are shown.The different lines show the results of the DFT simulations while the symbols show the grand potential as reconstructed from the Minkowski functionals and one set of Minkowski functional coefficients: the derivatives of pressure,∂(p−p b )/∂µ, pressure per surface area, p (µ, T ), surface tension, ∂σ/∂µ, bending rigidity, ∂κ/∂µ, and the pseudo pressure and surface tension terms ∂p /∂µ and ∂σ /∂µ with respect to the chemical potential.

Figure 15 : 5 Figure 16 :
Figure 15: (a) Dimensionless Minkowski functional coefficients: the derivatives of pressure,∂(p − p b )/∂µ, pressure per surface area, p (µ, T ),surface tension, ∂σ/∂µ, bending rigidity, ∂κ/∂µ, and the pseudo pressure and surface tension terms ∂p /∂µ and ∂σ /∂µ, with respect to the chemical potential.These are the values of the coefficients that are used in Figure 14 to reconstruct the excess adsorption as a function of the chemical potential.(b) Contribution of the Minkowski functional coefficients to the excess adsorption for a pore with a radius of r p = 25 and an Euler characteristic of χ = 1.

Figure 17 :
Figure 17: Pressure difference between the second-order phase transition associated with adsorption of gas onto a wall in the bulk and inside a pore times the surface area Minkowski functional, ∆p w •A (X), as function of pore radius, r p .The Minkowski functional for topology is zero in all the shown simulations, K (X) = 0.The curve fit is equal to: f w (C 3/4 ) = Ω lg +σ lg C 3/4 , where the Minkowski functional C(X) only depends on r p .The coefficients are: Ω lg = −8.3• 10 −3 ± 0.1 • 10 −3 and σ lg = 1.538 • 10 −3 ± 0.008 • 10 −3 .