1 Introduction

When the density of a gas is very small, or when it is forced through a very small channel, the gas can no longer be described using a continuum representation. In this case, one says that the flow is rarefied. Knudsen (1909) observed this rarefaction effect already in 1909, when he studied the flow of a gas driven through a tube at low pressure. He found that the flow rate differed from the one predicted by the Poiseuille formula, which is based on theory governing flow of continuous media. Another situation where a gas does not behave as a continuum is when it flows through channels where the mean free path of the gas molecules is comparable to the dimensions of the channel. The classification of rarefaction, in terms of the Knudsen number, \(\mathscr {K}_n\), which is defined as the ratio of mean free path to the characteristic dimensions of the channel, presented in Barber and Emerson (2006) tells us (i) that the flow is rarefied when \(\mathscr {K}_n\gtrsim 10^{-3}\), (ii) when \(10^{-3}\lesssim \mathscr {K}_n\lesssim 10^{-1}\), the flow is in the slip-flow regime and continuum theory incorporating the slip flow boundary condition is applicable, (iii) for \(10^{-1}\lesssim \mathscr {K}_n\lesssim 10^1\), the flow is in the transition regime in which continuum theory is not applicable, and (iv) for \(\mathscr {K}_n\gtrsim 10^1\), the flow is said to be in the free molecular regime, which admits the collisionless Boltzmann equation to govern the flow behaviour.

In a porous medium, the fluid percolates through narrow channels and even more narrow constrictions, at which the pressure, consequentially, drops markedly. This means that gas rarefaction likely occurs when gas flows through a porous medium, and this is an event occurring in many applications such as gas production, storage and separation, catalytic reactions in low-porosity ceramics and filtration in medical applications (Johansson et al. 2018). In general, quantified prediction of rarefied flow through a given porous medium requires a realistic and thus highly detailed representation of the flow domain. Recently, new imaging techniques have made it possible to capture the topology of such domains (Maire and Withers 2014). Unfortunately, the models used to study rarefied gas flow become computationally expensive to solve even for well-described and simplistic types of topologies. This is also even more pronounced if the transition to rarefied flow is resolved with high accuracy by using kinetic theories based on the Boltzmann equation (Kalarakis et al. 2012; Pavan and Oxarango 2007) and its derived methods, such as the Bhatnagar–Gross–Krook kinetic equation (Germanou et al. 2018; Wu et al. 2017). Examples of some topologies that have been investigated can be found in Lasseux et al. (2014) where regularly packed balls were considered and in Colin (2005), where well-defined patterns of micro-channels are considered. The relevance of constrictions was highlighted in Zheng et al. (2016), studying the regular multi-scale Sierpinski carpet type of topology. Related to this, several studies have investigated the effect of rarefaction in topologies defined by simple regular patterns (Yang and Weigand 2018) and topologies with self-affine fractal nature (Zheng et al. 2013; Wu and Chen 2016). It has also been shown that the effect of rarefaction, i.e. how much does the flow differ from what would be expected from a continuum theory, cannot be explained by a simple parameter such as a representative pore size. Instead, it also depends on porosity (Meghdadi Isfahani 2017), heterogeneity (Zheng et al. 2017; Germanou et al. 2018) and anisotropy (Wang et al. 2016; Germanou et al. 2018), which doubtlessly complicates the analysis of rarefied gas in porous media. This underlines the importance of considering the structure of the pore topology, which significantly affects the behaviour of the flow (Yang and Weigand 2018), preventing a universal description to be developed (Kalarakis et al. 2012).

There are a few recent publications considering rarefied gas flow through porous media with heterogeneous topology. For instance, Germanou et al. (2018), Wu et al. (2017) and Lasseux et al. (2016) considered topologies consisting of a randomly packed collection of two-dimensional balls, Kawagoe et al. (2016) considered a random packing of spheres, Naraghi and Javadpour (2015) studied randomly generated topologies, and Wang et al. (2016) considered topologies reconstructed from measurements. The objectives and main contributions of the present work have, therefore, been specified as (i) to investigate in detail the importance of considering the random variations of the topology of the porous medium, both for qualitative and for quantitative predictions, when studying rarefied gas flow through it, and (ii) to propose a modelling framework that permits adapting existing models to account for these variations. To this end, a stochastic two-scale model is proposed here.

Conceptually, a good starting point for developing a two-scale model can be found in the successful use of the volume averaging method in the study of rarefied gas flow in porous media; see e.g. Lasseux et al. (2014, 2016) and Jin and Chen (2018). To find examples in which a heterogeneous porous medium has been explicitly considered, however, one must resort to the more prolific studies of the random nature of the non-rarefied (pressure driven) flows in porous media; see, e.g. Ricciardi et al. (2005), Nordlund et al. (2006), Selvadurai and Selvadurai (2010), Guilleminot et al. (2012) and Selvadurai et al. (2014). The advantage of using these techniques is that they are well tested, and thus we know that they are correct. As most of the available two-scale models, these are formulated as a combination of a global problem considering the macro-scale features and a local problem considering the micro-scale features. In this way, the global problem can be discretised using a coarse grid, which only needs to resolve the long wavelength variations induced by the macro-scale topology. This does, however, require permeability values obtained by solving problems defined at small, highly resolved domains, including the micro-scale details.

When working with highly heterogeneous porous media, however, these “small” domains must actually be rather large if they are expected to be representative of the whole domain of study. Unfortunately, when discretised, this may lead to a system of equations too large to be manageable in practice. This can be circumvented, e.g. by applying the approach presented in Nordlund et al. (2006), Guilleminot et al. (2012) and Pérez-Ràfols et al. (2016), which also is adopted here. In this approach, not one, but a number of small local-scale domains are sampled even though these, individually, are not considered to represent the statistics of the original topology. The variation within the sampled set of domains is included by considering their permeabilities as a random variable. This is the way the influence of the micro-scale topology which, spatially, varies significantly in permeability is treated in this type of approach. This means that the effect of the highly heterogeneous porous medium can be efficiently homogenised and included in the global problem, which solution can be easily computed. This does, however, imply that a quite large number of local-scale domains must be considered before convergence of the distribution can be observed, and this makes it a rather demanding problem numerically.

Since the objective of this work is to investigate the importance of considering the random variations of the topology of the porous medium, and not to improve the fundamental description of rarefied gas flow, only the most simplistic underlying physics will be considered. For the model developed here, we will, therefore, consider the slip-flow regime \(10^{-3}\lesssim \mathscr {K}_n\lesssim 10^{-1}\). Indeed, with a model constructed in a similar way as the one in Lasseux et al. (2016), we can obtain coefficients, e.g. permeability, intrinsic to the topology, which can be interpreted in a stochastic manner. We stress, however, that a similar two-scale stochastic framework could be constructed from other local-scale models that, for instance, describe the slip flow differently, concern other types of rarefied flow or even include more complex physics; see e.g. Moyne and Christian (2003), Charrier and Dubroca (2004), Wu et al. (2017) and Germanou et al. (2018).

The remainder of this paper is organised as follows: firstly, in Sect. 2, a reference problem to aid the presentation is introduced. Then, the underlying physics and the mathematical model will be presented in Sect. 3. Thereafter, in Sects. 4 and 5, the proposed two-scale model and its stochastic extension will be introduced. Lastly, the interplay between rarefaction and variability of the topology of the porous medium will be discussed in Sect. 6, and a closure of the paper will be given in Sect. 7.

2 Benchmark Topology

For the numerical simulations performed by means of the stochastic two-scale model developed in this work, we have chosen a collection of randomly packed balls, to represent a benchmark for topology of heterogeneous porous media. To this end, we have chosen to use the topology depicted in Fig. 1.

Fig. 1
figure 1

A visualisation of the original measurement of 200 randomly packed 2.0-mm-diameter balls, obtained using X-ray microtomography (a), from which the set of local-scale topologies used to describe the problem’s stochastic nature was sampled and adapted for the numerical solution procedure. The random nature of the packed bed becomes clearer when looking at the centre cross section of the reconstructed volume (b, c)

This particular collection of balls was measured with X-ray microtomography, using a Zeiss Xradia Versa 510 system. The sample consists of 200 steel spheres with diameter 2.0 mm randomly packed inside a PMMA tube with inner diameter 14 mm. The full height of the bed is 10.2 mm, resulting in a packing ratio of 0.53. The steel spheres (balls) are designed for use in bearings and has a well-determined uniformity and size distribution specified by the manufacturer. The scanning was carried out with an X-ray tube voltage and output of 160 kV and of 10 W, respectively. The field of view (FOV) was 15.2 mm, and the spatial resolution in terms of voxel size 14.9 \(\upmu\)m. The total number of projection images was 1601, acquired with and exposure time of 14 s, resulting in a total scan time of approximately 7 h.

As stated above, the diameter of the balls is 2.0 mm. We have, however, applied a scaling of the topology to match the requirements of the current investigation. More precisely, we have taken samples from the measurement depicted in Fig. 1, to construct the flow domains for the local-scale problem presented in Sect. 4.2. For the numerical analysis of the effects of rarefaction and variability of the topology, the samples were scaled so that the side l of the cubical local-scale domain is equal to the radius of the balls. A motivation for this choice will be given in Sect. 4.

A collection of randomly packed balls was chosen as a benchmark topology because it is simple, but still exhibits the random spatial variation expected in a heterogeneous porous medium. As such, it can be used to illustrate the applicability of the model and it also makes it possible to study the influence of the spatial variability of the topology on the effect of rarefaction. It should, however, be emphasised that the modelling framework developed herein can be applied to study the flow of rarefied gases through other more complex types of heterogeneous porous media, provided that the due assumptions are met. Moreover, when considering more complex geometries, the random variations exhibited by the porous medium can only be expected to be more influential than in the simpler geometry considered here.

3 Modelling Rarefied Gas Flow

Let us consider the steady-state regime of (slightly) rarefied gas flow with Knudsen numbers \(10^{-3}\lesssim \mathscr {K}_n\lesssim 10^{-1}\). To this end, the Stokes momentum equations for compressible flow and the continuity equation will here be combined with a first-order slip-flow boundary condition. Indeed,

$$\begin{aligned} -\nabla p + \mu {\varvec{\nabla }}^2 \varvec{v}+ \frac{\mu }{3}{\varvec{\nabla }}\left( {\varvec{\nabla }}{\varvec{\cdot }}\varvec{v}\right)&=~0, \quad&\text {in}&V_f, \end{aligned}$$
(1a)
$$\begin{aligned} {\varvec{\nabla }}{\varvec{\cdot }}\left( \rho \varvec{v}\right)&=~0, \quad&\text {in}&V_f, \end{aligned}$$
(1b)
$$\begin{aligned} \varvec{v}&=-\xi \lambda \left( \mathbf {I}-\varvec{n}\varvec{n}\right) {\varvec{\cdot }}\left( \varvec{n}{\varvec{\cdot }}\left( {\varvec{\nabla }}\varvec{v}+{\varvec{\nabla }}\varvec{v}^T\right) \right) , \quad&\text {on}&\varGamma _{sf}, \end{aligned}$$
(1c)

where we have assumed that inertia forces are small compared to the viscous ones, that the flow is in steady-state, isothermal conditions and that the fluid can be modelled as an ideal gas with constant viscosity (\(\mu\)) and obeying the well-known constitutive relationship (2) between density and pressure

$$\begin{aligned} \rho = Mp/(RT), \end{aligned}$$
(2)

where M is the molar mass in kg/mol, T is the temperature in K and \(R= 8.314 \hbox {J}/(\hbox {mol} \text {K})\) is the universal gas constant. In (1), p, \(\varvec{v}\), \(\rho\) and \(\mu\) are the pressure, velocity, density and dynamic viscosity of the fluid, which occupies the volume \(V_f\), and \(\xi =\left( 2-\sigma _v\right) /\sigma _v\), where \(\sigma _v\) is the accommodation coefficient. In the first-order slip-flow boundary condition, at the interface \(\varGamma _{sf}\) between the solid and the fluid (1c), \(\lambda\) is the mean free path of the molecules given by

$$\begin{aligned} \lambda = \frac{k_BT}{\sqrt{2}\pi \delta ^2 p}, \end{aligned}$$
(3)

where \(k_B\) is the Boltzmann constant, T is the temperature and \(\delta\) is the collision diameter. Moreover, the unit normal vector at \(\varGamma _{sf}\) is denoted as \(\varvec{n}\) and \(\mathbf {I}\) indicates the identity matrix.

Together with adequate boundary conditions, (1) can be solved for the pressure (p) and the velocity (v), which approximately describe the state of the rarefied gas flow. Due to the small size of the pores, however, a very fine mesh would be required and solving the problem becomes extremely computationally intensive, even when considering fairly small domains. For this kind of situations, a two-scale formulation can provide for the solution. This will be the topic of the following section.

4 The Two-Scale Model

In this section, a two-scale model is built upon the rarefied gas flow model, introduced in the previous section. This two-scale model will, as we will see, form the basis for the two-scale stochastic model, presented in Sect. 5. The present model will be based on the heterogeneous multi-scale method (HMM), which is a fairly general framework that can be used to construct two-scale models for various different physics; see e.g. E and Engquist (2003) for details. The reason for selecting this framework before more rigorous and well-established methods such as the volume averaging method employed in Lasseux et al. (2016) or the two-scale homogenisation technique, see e.g. Lukkassen et al. (2002), is that it is as readily applied and more flexible at the same time. Indeed, the proposed modelling framework can be adapted to other underlying base models, by following the same procedure as we present here. Also, it avoids certain assumptions that would be in contradiction with the stochastic part of the model introduced in Sect. 5. For instance, the two-scale homogenisation technique demands periodicity and the volume averaging method requires the local-scale domain to be large compared with a typical size of the pores. We note, moreover, that this type of framework has previously been applied to a similar problem; see Pérez-Ràfols et al. (2016). We will, however, show that the resulting model in many ways is equivalent to the model derived by Lasseux et al. (2016), which is based on the more rigorous volume averaging method.

A schematic illustration of how the present two-scale model is constructed is depicted in Fig. 2. As usual, when constructing a two-scale model, global- and local-scale domains are defined. The global-scale domain covers the whole topology of interest, and, as indicated by the red grid, a coarse mesh is applied. Effectively, this means that only the large features of the topology are considered here, whereas the fine details of the topology are considered at the significantly smaller local-scale domain, with mesh resolution high enough to capture them.

Fig. 2
figure 2

Schematic illustration of the two-scale model. The original flow problem takes place in a large domain, of which a two-dimensional slide is depicted on the left. At this scale, this domain looks homogeneous. When zooming in, however, one sees that there is a rapid variation of the topology of the solid phase (dark areas) and fluid phase (light areas). In this zoomed image, a coarse global-scale mesh is defined, as depicted by the coarse grid in red. An example of a local-scale domain, \(V_f\), centred at \(\mathbf {X}_{ijk}\), is highlighted in green. A three-dimensional representation of this domain is depicted on the right. The mass fluxes \(Q_I\), in all three directions \(I=1\), \(I=2\) and \(I=3\), from and towards the neighbouring domains, are depicted with yellow arrows. Note that the directions and magnitudes of the arrows in the figure exemplify a given flow situation

Following the HMM framework, two steps are taken here to couple the global and the local scale. That is, (i) the global-scale problem is defined with a set of coupling variables—in this case permeabilities which summarise the effect of the fine details of the topology in an averaged sense and (ii) these permeabilities are computed based on the solution of the local-scale problem, defined on a small highly resolved local-scale domain. The global-scale model governs the fundamental physical nature, and in the case of fluid flow, it is a standard practice to employ a mass conservation criterion. When constructing the local-scale problem for the present work, the gas rarefaction physics is described by combining the Stokes momentum equation with the slip-flow boundary condition and the continuity equation, i.e. (1). One must, however, pay special attention when describing the boundary conditions for the local-scale domain so that the interfaces between the local- and the global-scale domains are described in a consistent manner.

In the following subsections, the two aforementioned steps will be developed to model rarefied gas flow through heterogeneous porous media. To this end, it will be assumed that \(L>>l\), where L is the characteristic size of the global-scale and l characterises the size of the local-scale domain. This results in that the global-scale variables vary slowly and that they, therefore, can be assumed constant inside each local-scale domain. In the majority of the available two-scale models for flow through porous media, it is also required that \(l>>d_p\), where \(d_p\) represents the characteristic diameter of the pores. This is to ensure that the results obtained from two different local-scale domains would be similar. One of the advantages with the present stochastic two-scale approach, which is based on the HMM, is that rather large variations in the local-scale response (due to the stochastic nature of the topology) can be considered and having \(l\gtrsim d_p\) is, therefore, sufficient. The numerical investigation includes a study of the rarefaction effect associated with the size of the channels that the voids between the balls constitute. This is done by analysing the effect of l, and the results are presented in Sect. 6.

4.1 The Global-Scale Problem

As stated previously, in the case of fluid flow, the associated global-scale problem is normally expressed as an equation describing conservation of mass. This is also the case here, and the discretised form is formulated by means of the finite volume method. To this end, a coarse grid is marked in red in Fig. 2, in which the elements are the local-scale cells where the mass-flow balance is imposed. More precisely, for the steady-state case considered here, mass-flow balance for a local-scale cell \(V_f\), centred at \(\mathbf {X}_{ijk}:=\left( X_{1i},X_{2j},X_{3k}\right)\), will be equated as

$$\begin{aligned} {Q_1}_{ijk} \,\,\,+\,\,\, {Q_2}_{ijk}\,\,\,+\,\,\, {Q_3}_{ijk}= 0, \end{aligned}$$
(4)

where \(Q_I\) indicate the net in- and out mass fluxes of the local-scale domain \({V_f}\) centred at \(\mathbf {X}_{ijk}\), in each direction \(I=1,2,3\). In order to compute these mass flow components, a law of the form of Darcy’s law is used. There are, however, various ways that can be applied to discretise such law, and for the present analysis, we have adopted the one in (5), in which only the diagonal terms of the permeability matrix are included, i.e.

$$\begin{aligned}&{Q_1}_{ijk} = \frac{{K_1}_{ijk}}{{\mu }}l\left( {\rho }_{i-\frac{1}{2}jk}P_{i-\frac{1}{2}jk}- {\rho }_{i+\frac{1}{2}jk}P_{i+\frac{1}{2}jk}\right) , \end{aligned}$$
(5a)
$$\begin{aligned}&{Q_2}_{ijk} = \frac{{K_2}_{ijk}}{{\mu }}l\left( {\rho }_{ij-\frac{1}{2}k}P_{ij-\frac{1}{2}k}- {\rho }_{ij+\frac{1}{2}k}P_{ij+\frac{1}{2}k}\right) , \end{aligned}$$
(5b)
$$\begin{aligned}&{Q_3}_{ijk} = \frac{{K_3}_{ijk}}{{\mu }}l\left( {\rho }_{ijk-\frac{1}{2}}P_{ijk-\frac{1}{2}}- {\rho }_{ijk+\frac{1}{2}}P_{ijk+\frac{1}{2}}\right) , \end{aligned}$$
(5c)

where \(P_{ijk}\) is the global-scale pressure defined as \(P_{ijk}:=P\left( \mathbf {X}_{ijk}\right)\), \({K_I}_{ijk}\) is the permeability in the \(X_I\)-direction of the local-scale domain \({V_f}\), centred at \(\mathbf {X}_{ijk}\), coloured in green in Fig. 2, \(\rho _{ijk}:=\rho (P_{ijk})\) the fluid’s density at the pressure \(P_{ijk}\) and l is the size of the domain. We note that we have here assumed that the domain is a cube with all three dimensions equal. Otherwise, the term l should be replaced by \(A_o/l_p\), where \(A_o\) is the area of the outlet and \(l_p\) is the dimension in the direction of the pressure gradient.

The particular choice of law in (5) does not contain the off-diagonal terms (\({K_{IJ}}, I\ne J\)) of the permeability tensor, meaning that a pressure drop in a given direction does not contribute to flow in the directions perpendicular to it. The reason for only considering the permeabilities in the main directions (by including only the diagonal terms \(K_I:={K_{II}}\)) is related to the construction of the local-scale domains, which is the same as in the model presented in Patir and Cheng (1978). A more detailed justification and an explanation of the implications of this choice is given in the end of Sect. 4.2.2. Note, moreover, that, despite we use a law of the form given in (5), we do not assume that Darcy’s law per se applies, as we will allow the permeability to be vary with pressure due to rarefaction effects.

By approximating the values of the pressure at the mid-grid nodes \(\mathbf {X}_{i\pm \frac{1}{2}ij}\) with the following expression

$$\begin{aligned} {P}_{i\pm \frac{1}{2}jk} \approx \frac{P_{i\pm 1jk}+P_{ijk}}{2}, \end{aligned}$$
(6)

and analogously for the other directions, the fluxes in each direction in (5) become

$$\begin{aligned}&{Q_1}_{ijk} = \frac{{K_1}_{ijk}}{{2\mu }}l\left( {\rho }_{i-\frac{1}{2}jk}P_{i-1jk}+\left( {\rho }_{i-\frac{1}{2}jk}-{\rho }_{i+\frac{1}{2}jk}\right) P_{ijk}-{\rho }_{i+\frac{1}{2}jk}P_{i+1jk}\right) , \end{aligned}$$
(7a)
$$\begin{aligned}&{Q_2}_{ijk} = \frac{{K_2}_{ijk}}{2\mu }l\left( {\rho }_{ij-\frac{1}{2}k}P_{ij-1k}+\left( {\rho }_{ij-\frac{1}{2}k}-{\rho }_{ij+\frac{1}{2}k}\right) P_{ijk}-{\rho }_{ij+\frac{1}{2}k}P_{ij+1k}\right) , \end{aligned}$$
(7b)
$$\begin{aligned}&{Q_3}_{ijk} = \frac{{K_3}_{ijk}}{2\mu }l\left( {\rho }_{ijk-\frac{1}{2}}P_{ijk-1}+\left( {\rho }_{ijk-\frac{1}{2}}-{\rho }_{ijk+\frac{1}{2}}\right) P_{ijk}-{\rho }_{ijk+\frac{1}{2}}P_{ijk+1}\right) . \end{aligned}$$
(7c)

An equation for the global-scale pressure can now be obtained from (4) and (7)

$$\begin{aligned} \begin{aligned}&{{K_1}_{ijk}}\left( {\rho }_{i-\frac{1}{2}jk}P_{i-1jk}+\left( {\rho }_{i-\frac{1}{2}jk}-{\rho }_{i+\frac{1}{2}jk}\right) P_{ijk}-{\rho }_{i+\frac{1}{2}jk}P_{i+1jk}\right) \\&\quad +{{K_2}_{ijk}}\left( {\rho }_{ij-\frac{1}{2}k}P_{ij-1k}+\left( {\rho }_{ij-\frac{1}{2}k}-{\rho }_{ij+\frac{1}{2}k}\right) P_{ijk}-{\rho }_{ij+\frac{1}{2}k}P_{ij+1k}\right) \\&\quad +{{K_3}_{ijk}}\left( {\rho }_{ijk-\frac{1}{2}}P_{ijk-1}+\left( {\rho }_{ijk-\frac{1}{2}}-{\rho }_{ijk+\frac{1}{2}}\right) P_{ijk}-{\rho }_{ijk+\frac{1}{2}}P_{ijk+1}\right) = 0. \end{aligned} \end{aligned}$$
(8)

In the following section, we will describe and define the local-scale problem and how to obtain the fluxes \({Q_I}_{ijk}\) and, thereafter the permeabilities \({K_I}_{ijk}\), so that we can solve (8) for the global-scale pressure \({P}_{ijk}\). We note that, since we will explicitly allow permeability to vary from cell to cell, the effects of porosity and velocity variations between cells will be implicitly considered, and Brinkman correction terms will not be necessary.

4.2 The Local-Scale Problem

In this section, the local-scale problem, that needs to be solved in order to obtain the permeabilities \({K_I}_{ijk}\) from (7), which are required to solve (8) for the global-scale pressure \(P_{ijk}\), will be defined. But, before we present the details for this, we will elaborate on the requirements for obtaining \({K_I}_{ijk}\).

At the global scale, each component \({K_I}_{ijk}\) of \(K_I\) represents the permeability in the \(X_I\)-direction of the local-scale cell \(V_f\) centred at \(\mathbf {X}_{ijk}\). The spatial variation of the topology implies that obtaining \({K_I}_{ijk}\) would require solving as many local-scale problems as there are local-scale cells \(V_f\). In Sect. 5, we will present the stochastic model, which presents an effective way of avoiding this problem. Moreover, it should be noted that (7) is not a simple linear equation, and an approximation that the density’s variation is small enough to consider it constant within each local-scale domain \(V_f\), i.e. \({\rho }_{ijk}\) will, therefore, be applied. This leads to that \({K_I}_{ijk}\) (approximately) can be determined as

$$\begin{aligned} \begin{aligned} {K_1}_{ijk} \approx 2\mu {Q_1}_{ijk}\end{aligned}/ {l\left( {\rho }_{ijk} \varDelta _IP_{ijk}\right) , } \end{aligned}$$
(9)

where \(\varDelta _IP_{ijk}={\left( P_{i-1jk}-P_{i+1jk}\right) }\), with \({Q_I}_{ijk}\) computed from the solution obtained by solving the local-scale problem (12). This implies that \({K_I}_{ijk}\) would depend on the pressure \(P_{ijk}\) as well as \({\rho }_{ijk}\) and \({\mu }\). For a fluid which is iso-viscous and almost incompressible, a combination of a non-dimensionalisation and a Taylor expansion of the permeability can be adopted to alleviate the need to compute \({K_I}_{ijk}\) for all the values of \(\varDelta _IP_{ijk}\) and \({\rho }_{ijk}\) for the global-scale grid employed.

Let us now consider a full three-dimensional local-scale domain, such as the one illustrated to the right in Fig 2, which would be used to compute \({K_I}_{ijk}\). Note that the boundaries \(\varGamma _i\), \(\varGamma _o\) and \(\varGamma _l\), as specified in Fig 2 (right), are for the flow in the \(x_1\)-direction. Since the permeabilities at other locations and in other directions are computed analogously by choosing the appropriate domain, the presentation will in the following be exemplified for \({K_1}_{ijk}\). At the local scale, the flow in the \(x_1\)-direction is given by

$$\begin{aligned} {Q_1}_{ijk} =\frac{1}{l}\int _{V_f}{\rho }_{ijk}v_1d V_f, \end{aligned}$$
(10)

where \(v_1=\varvec{v}_1{\varvec{\cdot }}\mathbf {e}_1\) (\(\mathbf {e}_1\) being the unit vector in \(x_1\)-direction) is the velocity of the fluid in the \(x_1\)-direction and \(\varvec{v}_1\) is the solution to (12). Note that, in (10), the mass flow has been defined through integration of the velocity over the whole volume instead of along the output surface, hence the 1/l term. Due to the topology of the domain and the chosen boundary conditions, the two formulations are equivalent. The latter formulation is, however, more robust when employed for numerical computation, and it also compares better with other two-scale models. By (10) and by employing the approximation (6), the permeability as defined in (9) can be computed as

$$\begin{aligned} {K_1}_{ijk} = \frac{2{\mu }}{\left( P_{i-1jk}-P_{i+1jk}\right) }\frac{1}{l^2}\int _{V_f}v_1d V_f. \end{aligned}$$
(11)

In order to obtain \(v_1\), a model governing the flow through the local-scale domain is required. For this purpose, we have chosen to adopt the incompressible form of the model posed in (1), which together with the appropriate boundary is defined as

$$\begin{aligned} {\varvec{\nabla }}{\varvec{\cdot }}\varvec{v}&~=~0, \quad&\text {in }&V_f, \end{aligned}$$
(12a)
$$\begin{aligned} \nabla p&~=~\mu {\varvec{\nabla }}^2 \varvec{v}, \quad&\text {in }&V_f, \end{aligned}$$
(12b)
$$\begin{aligned} \varvec{v}_1&~=~-\xi {\bar{\lambda }}\left( \mathbf {I}-\varvec{n}\varvec{n}\right) {\varvec{\cdot }}\left( \varvec{n}{\varvec{\cdot }}\left( {\varvec{\nabla }}\varvec{v}+{\varvec{\nabla }}\varvec{v}^T\right) \right) , \quad&\text {on }&\varGamma _{sf}, \end{aligned}$$
(12c)
$$\begin{aligned} p&~=~{P}_{i-\frac{1}{2}jk}, \quad&\text {on }&\varGamma _i, \end{aligned}$$
(12d)
$$\begin{aligned} p&~=~{P}_{i+\frac{1}{2}jk}, \quad&\text {on }&\varGamma _o, \end{aligned}$$
(12e)
$$\begin{aligned} \varvec{n}{\varvec{\cdot }}{\varvec{\nabla }}\varvec{v}&~=~0, \quad&\text {on }&\varGamma _l.\ \end{aligned}$$
(12f)

We do note that assuming that the density does not vary is not technically correct, since it is coupled to the pressure, which varies linearly through the domain. Despite that, provided the local-scale domains are much smaller than the global-scale geometry, the pressure drop inside a single domain can be expected to be small compared to its mean value. As a result, the density variation would also be small as compared to its mean value within the domain. Therefore, the error induced by assuming that the density is constant is expected to be small. The great simplification introduced by this extra assumption then justifies taking it. Also, \({\bar{\lambda }}\) is defined as the mean free path at the average pressure, \(\bar{p}\), i.e.

$$\begin{aligned} {\bar{\lambda }} = \frac{k_BT}{\sqrt{2}\pi \delta ^2 \bar{p}}, \end{aligned}$$
(13)

The pressure boundary conditions at the inlet \(\varGamma _i\) and the outlet \(\varGamma _o\) ensure that the \(v_1\) component of the solution \(\varvec{v}\) is determined correctly, but note that the approximation (6) is used to determine the values for \({P}_{i\pm \frac{1}{2}jk}\). At the sides of the cell that are neither the inlet nor the outlet, \(\varGamma _l\), a no-flow symmetry condition has been specified. A discussion on the validity of this boundary condition is given in Sect. 4.2.2.

4.2.1 Dimensionless Formulation of the Local-Scale Problem

The local problem as posed in (12), and its variants in \(x_2\)- and \(x_3\)-directions, can be used to compute the permeabilities \(K_n\) directly. However, since the global pressure (at each side of \(V_f\)) enters the problem via the boundary conditions, the local-scale flow components obtained from its solution would depend on the global pressure too. Since neither of them are known a priori, the local problems would then have to be solved for a whole range of mean pressures (\(\bar{p}\)) and pressure pairs \((P_{i-\frac{1}{2}jk},P_{i+\frac{1}{2}jk})\), requiring a tremendous computational effort. To relax this problem, the independent- and dependent variables in (12) are made dimensionless by the scaling (14), which also include a translation of the pressure solution. Indeed, by introducing the scaling

$$\begin{aligned} p^*= \frac{p-P_{i+\frac{1}{2}jk}}{\left( P_{i-\frac{1}{2}jk}-P_{i+\frac{1}{2}jk}\right) },\ \varvec{v}^*= \varvec{v}\, / \, {\left( \frac{P_{i-\frac{1}{2}jk}-P_{i+\frac{1}{2}jk}}{2} \frac{l}{\mu }\right) },\ {\bar{{\lambda }^*}}=\frac{{\bar{\lambda }}}{l},\ \varvec{x}^*= \frac{\varvec{x}}{l}, \end{aligned}$$
(14)

into (12), we obtain

$$\begin{aligned} {{\varvec{\nabla }}^*}{\varvec{\cdot }}\varvec{v}^*&~=~0, \quad&\text {in }&{V^*_f}, \end{aligned}$$
(15a)
$$\begin{aligned} {\nabla ^*}p^*&~=~{{\varvec{\nabla }}^*}^2 \varvec{v}^*, \quad&\text {in }&{V^*_f}, \end{aligned}$$
(15b)
$$\begin{aligned} \varvec{v}^*_1&~=~-\xi {\bar{{\lambda }^*}}\left( \mathbf {I}-\varvec{n}\varvec{n}\right) {\varvec{\cdot }}\left( \varvec{n}{\varvec{\cdot }}\left( {{\varvec{\nabla }}^*}\varvec{v}^*+{{\varvec{\nabla }}^*}{\varvec{v}^*}^T\right) \right) , \quad&\text {on }&{\varGamma ^*_{sf}}, \end{aligned}$$
(15c)
$$\begin{aligned} p^*&~=~1, \quad&\text {on }&{\varGamma ^*_i}, \end{aligned}$$
(15d)
$$\begin{aligned} p^*&~=~0, \quad&\text {on }&{\varGamma ^*_o}, \end{aligned}$$
(15e)
$$\begin{aligned} \varvec{n}{\varvec{\cdot }}{{\varvec{\nabla }}^*}\varvec{v}^*&~=~0,\quad&\text {on }&{\varGamma ^*_l}, \end{aligned}$$
(15f)

where \({\nabla ^*}\) indicates that the derivatives are taken with respect to \(\varvec{x}^*\). We note that the averaged dimensionless mean free path can be expressed as

$$\begin{aligned} \begin{aligned} {\bar{{\lambda }^*}} =&\frac{k_BT}{\sqrt{2}\pi \delta ^2 l \left( {\bar{p^*}}{ \left( P_{i-\frac{1}{2}jk}-P_{i+\frac{1}{2}jk}\right) }+P_{i+\frac{1}{2}jk} \right) }, \end{aligned} \end{aligned}$$
(16)

according to (13) and (14). Thus, although \(P_{i-\frac{1}{2}jk}\) and \(P_{i+\frac{1}{2}jk}\), which are approximated by means of (6), do not appear explicitly in (15), they affect the solution through \({\bar{{\lambda }^*}}\). Note that \({\bar{{\lambda }^*}}\) also contributes to the nonlinearity of the local-scale problem as it includes the local-scale variable \({\bar{p^*}}\), which represents the dimensionless mean value of the pressure within \(V_f\).

Having solved (15), the permeability can be computed from the dimensionless form,

$$\begin{aligned} {K^*_1}_{ijk} = \int _{{V^*_f}}v^*_1d {V^*_f}, \end{aligned}$$
(17)

as \({K_1}={l^2}{K^*_1}\). The reason for the variation in \(K_1\) with \(X_{ijk}\) resides in the definition of \({\bar{{\lambda }^*}}\), and the way in which this dependency will be treated is presented in Sect. 4.2.3.

4.2.2 Comparison with the Volume Averaging Method

As we have stated previously, the method used here is less rigorous than other methods used for constructing two-scale methods such as homogenisation or the volume averaging method. The choice of HMM was motivated by the fact that some assumptions of those methods are incompatible with the construction of the present model. For example, demands such as periodicity of the local-scale domain (needed for homogenisation) or that the typical pore size is much smaller than the local-scale domain (needed for the volume averaging method) are hard to reconcile with the large variation in permeability between neighbouring local-scale domains assumed in this work. As discussed in this section, however, the resulting local-scale problem is very similar to those obtained with the more rigorous methods. To show that, we compare the local-scale problem (15) and the problem (3.7) in Lasseux et al. (2016), which they obtained by using the volume averaging method.

Note first that our problem (15) can be seen as a projection of theirs in \(x^*_1\)-direction, so that only \(K^*_1\), and not the whole permeability tensor, is considered. This goes for the problems defined to obtain \(K^*_2\) and \(K^*_3\) too. From this point of view, the equations are equal if one interprets their D as \(\varvec{v}^*\) and their d as \(p^*-x^*_1\). (a more explicit comparison for a similar case can be found in Pérez-Ràfols et al. (2016)). Note also that (3.7e) in Lasseux et al. (2016) is equivalent to (17) and that the periodicity condition (3.7d) is replaced by the combined symmetry and Dirichlet boundary conditions imposed here. The main differences between our formulation and the one in Lasseux et al. (2016) are, therefore, that we omit the off-diagonal terms of the permeability tensor and that the faces other than the inlet and outlet have no-flow condition instead of being periodic boundaries as in Lasseux et al. (2016). We shall now see, however, that these differences are not as notable as they seem.

In the present analysis, the local-scale domains, acquired from the X-ray microtomography scan, are not periodic, as clearly seen in Fig. 3a. If this domain is not manipulated, this would impede imposing periodic boundaries in the faces other than the inlet and the outlet. Indeed, the fluid domain would not match at the periodic boundary. Due to the small size of the local-scale domain, as compared to the size of the balls, this is hard to solve unless the local-scale domain is mirrored. Such a mirrored domain was studied in Almqvist et al. (2011), where the authors compared local-scale problems including no-flow conditions with the periodic local-scale problem obtained by homogenisation. They could show that, if the local-scale domain was mirrored, the two problems were equivalent. Moreover, the off-diagonal terms in their “flow-factor matrix” vanish, provided that the local-scale domain has been obtained by mirroring. This directly translates to the present three-dimensional problem, and it means that the solutions to (15) and (3.7) in Lasseux et al. (2016) are equivalent, provided that the local-scale domain in the periodic problem is constructed by mirroring.

Moreover, we note that, because of the rapid spatial change in permeability, flow perpendicular to the global-scale pressure drop will arise in all global-scale simulations, thus reducing the possible error coming from the zero off-diagonal terms. Also, as shown in Almqvist et al. (2011) and in Almqvist et al. (2007, 2008) by means of another approach related to homogenisation, the off-diagonal terms do not significantly influence the global-scale solution, if the local-scale topologies do not exhibit distinct directionality. Actually, topologies with a directionality aligned with or perpendicular to the flow direction are intrinsically symmetric; thus, the off-diagonal terms are identical to zero in these cases.

4.2.3 Expansion of the Local-Scale Problem in \(\xi {\bar{{\lambda }^*}}\)

In the previous section, we have shown that the permeability’s dependence on global-scale conditions resides in \({\bar{{\lambda }^*}}\) defined in (16). More precisely, these global-scale conditions are the global-scale pressure P and the temperature T. Since we are considering ideal gas flow under iso-thermal conditions, the temperature is just an input, the viscosity \(\mu\) is constant and density is given by the pressure, following the constitutive relationship (2). This effectively means that the global-scale pressure is the only variable that couples the scales. Next, we will present a methodology for how to fully decouple the scales. We start by noting that, in (15), \({\bar{{\lambda }^*}}\) appears in combination with \(\xi\), i.e. as the product \(\xi {\bar{{\lambda }^*}}\). In order to estimate the magnitude of this product, one should recall that, in this work, only low Knudsen number flows are considered, i.e. \(10^{-3}\lesssim \mathscr {K}_n\lesssim 10^{-1}\). The Knudsen number can be expressed as

$$\begin{aligned} \mathscr {K}_n= {\bar{\lambda }}/d_p={\bar{{\lambda }^*}}\,l/d_p, \end{aligned}$$
(18)

where \(d_p\), in this case, characterises the size of the voids between the balls. Now since \({\bar{{\lambda }^*}}={\bar{\lambda }}/l\), where l is chosen such that \(l \gtrsim d_p\), it is clear that \({\bar{{\lambda }^*}} \lesssim \mathscr {K}_n\). Since \(\xi\) is of order unity, we have that \(\xi {\bar{{\lambda }^*}} \lesssim 10^{-1}\). Therefore, \(\xi {\bar{{\lambda }^*}}\) is small enough to allow for expansions of the dependent variables \(\varvec{v}^*_1\) and \(p^*\) in terms of it and is also what they did in Lasseux et al. (2016).

Indeed,

$$\begin{aligned} \varvec{v}^*= \varvec{v}^*_{(0)} + \sum _{J=1}^{m}\left( \xi {\bar{{\lambda }^*}}\right) ^J\varvec{v}^*_{(J)} + R_m^v, \end{aligned}$$
(19a)
$$\begin{aligned} p^*= p^*_{(0)} + \sum _{J=1}^{m}\left( \xi {\bar{{\lambda }^*}}\right) ^Jp^*_{(J)} + R_m^p, \end{aligned}$$
(19b)

where \(R_m^v\) and \(R_m^p\) are the residuals of the expansions up to order m. We really want to stress here that the expansion considered here intends to capture only the effect of \(\xi {\bar{{\lambda }^*}}\) on the topology. Obviously, as the original equations are of first order in \(\mathscr {K}_n\), we do not claim that the model provides for an approximation of higher order for the behaviour of the gas.

Introducing (19) into (15) and requiring that the system must be valid for each order of \(\xi {\bar{{\lambda }^*}}\) independently, we find for \(J=0\)

$$\begin{aligned} {{\varvec{\nabla }}^*}{\varvec{\cdot }}{\varvec{v}^*_{(0)}}&~=~0, \quad&\text {in }&{V^*_f}, \end{aligned}$$
(20a)
$$\begin{aligned} {\nabla ^*}p^*_{(0)}&~=~{{\varvec{\nabla }}^*}^2 {\varvec{v}^*_{(0)}}, \quad&\text {in }&{V^*_f}, \end{aligned}$$
(20b)
$$\begin{aligned} {\varvec{v}^*_{(0)}}&~=~0, \quad&\text {on }&{\varGamma ^*_{sf}}, \end{aligned}$$
(20c)
$$\begin{aligned} p^*_{(0)}&~=~1, \quad&\text {on }&{\varGamma ^*_i}, \end{aligned}$$
(20d)
$$\begin{aligned} p^*_{(0)}&~=~0, \quad&\text {on }&{\varGamma ^*_o},\end{aligned}$$
(20e)
$$\begin{aligned} \varvec{n}{\varvec{\cdot }}{{\varvec{\nabla }}^*}{\varvec{v}^*_{(0)}}&~=~0, \quad&\text {on}\&{\varGamma ^*_l}, \end{aligned}$$
(20f)

and, for \(J\ge 1\)

$$\begin{aligned} {{\varvec{\nabla }}^*}{\varvec{\cdot }}{\varvec{v}^*_{(J)}}&~=~0, \quad&\text {in }&{V^*_f}, \end{aligned}$$
(21a)
$$\begin{aligned} {\nabla ^*}p^*_{(J)}&~=~{{\varvec{\nabla }}^*}^2 {\varvec{v}^*_{(J)}}, \quad&\text {in }&{V^*_f}, \end{aligned}$$
(21b)
$$\begin{aligned} {\varvec{v}^*_{(J)}}&~=~-\left( \mathbf {I}-\varvec{n}\varvec{n}\right) {\varvec{\cdot }}\left( \varvec{n}{\varvec{\cdot }}\left( {{\varvec{\nabla }}^*}{\varvec{v}^*_1}_{(J-1)} +{{{\varvec{\nabla }}^*}{\varvec{v}^*_1}_{(J-1)}}^T\right) \right) , \quad&\text {on}&{\varGamma ^*_{sf}}, \end{aligned}$$
(21c)
$$\begin{aligned} p^*_{(J)}&~=~0, \quad&\text {on }&{\varGamma ^*_i}, \end{aligned}$$
(21d)
$$\begin{aligned} p^*_{(J)}&~=~0, \quad&\text {on }&{\varGamma ^*_o}, \end{aligned}$$
(21e)
$$\begin{aligned} \varvec{n}{\varvec{\cdot }}{{\varvec{\nabla }}^*}{\varvec{v}^*_{(J)}}&~=~0,\quad&\text {on}&{\varGamma ^*_l}. \end{aligned}$$
(21f)

These problems are similar to (15), but as they do not include \(\xi {\bar{{\lambda }^*}}\), they are independent of the global-scale pressure, making the global and the local scale fully decoupled. Thus, having solved the virtual problems (20) and (21), the auxiliary dimensionless permeabilities \({K^*_I}_J\), for each \(\mathbf {X}_{ijk}\), can then be computed as

$$\begin{aligned} {{K^*_I}_{(J)}}_{ijk} = \int _{{V^*_f}}{v^*_I}_{(J)} d {V^*_f}. \end{aligned}$$
(22)

Thereafter, an approximation of the permeability \({K_1}\) can be obtained by

$$\begin{aligned} {K^*_I} \approx {K^*_I}_{(0)} + \sum _{J=1}^m\left( \xi {\bar{{\lambda }^*}}\right) ^J{{K^*_I}_{(J)}} \end{aligned}$$
(23)

as \({K_I}=l^2{K^*_I}\). Note that \({K_I}_{(0)}=l^2{K^*_I}_0\) represents the permeability without slip and the terms \({K_I}_{(J)}=l^2\left( \xi {\bar{{\lambda }^*}}\right) ^J{K^*_I}_J\), for \(J=1,2,\ldots ,m\), corrects for slip flow. We can, therefore, define rarefaction correction factors \({S_I}_{(J)} = {K_I}_{(J)}/{K_I}_{(0)}\) and write the permeability \({K_I}\) as

$$\begin{aligned} {K_I} \approx {K_I}_{(0)}\left( 1 + \sum _{J=1}^m\left( \xi {\bar{{\lambda }^*}}\right) ^J{S_I}_{(J)}\right) . \end{aligned}$$
(24)

The advantage of expressing the effect of rarefaction in terms \({S_I}_{(J)}\) instead of \({K_I}_{(J)}\) is that the correlation between \({K_I}_{(J)}\) and the former is less strong than with the latter. It is also on this basis that we neglect the correlation completely, while constructing the resulting stochastic model, which then becomes much simpler.

4.2.4 A Realisation of a Local-Scale Solution

Fig. 3
figure 3

In (a), the permeable phase sampled from the measurement of the bed of random packed balls in Fig. 1, constituting an example of a local-scale domain. The dimensionless size of the domain equals the radius of the balls. In sub-figures (be), the colour map depicts the pressure (\({p^*_J}\)) resulting from solving (20) (b) and (21) with \(J=1\) (c), 2 (d) and 3 (e). The streamlines correspond to the velocities (\({\varvec{v}^*_J}\)), resulting from solving the same problems. The corresponding permeability values are \({K^*_1}_{(0)}=7.5\cdot 10^{-4}\), \({K^*_1}_{(1)}=2.1\cdot 10^{-2}\), \({K^*_1}_{(2)}=-2.9\cdot 10^{-3}\) and \({K^*_1}_{(3)}=1.8\cdot 10^{2}\)

Before presenting the stochastic two-scale model, we present an example of a local-scale result, with topology and solutions shown in Fig. 3. The topology of the permeable phase of the local-scale domain depicted in grey in Fig. 3a has been randomly sampled from the original measurement shown in Fig. 1 and its size is comparable to the radius of the balls. In Fig. 3b-e, the pressure \({p^*}_0\) and velocity \({\varvec{v}^*}_0\) of the virtual problem (20) and \({p^*}_J\) and \({\varvec{v}^*_J}\) of (21), for \(J=1\), 2 and 3, are depicted. These were obtained using COMSOL Multiphysics. A maximum element size of 0.033 has been used on the boundaries of the dimensionless local-scale domains, while the elements within the bulk were restrained to a maximum size of 0.13. The maximum growth rate in the transition between bulk and boundary was chosen as 1.18. This has led, in this particular case, to around \(4\times 10^5\) elements, although some of the domains were resolved with the double amount of elements. The reason for the smaller elements on the boundary surfaces and for the (relatively) small growth rate is to capture a more accurate representation of the velocity gradient close to the boundaries of the local-scale domain. Note that this is necessary in order to accurately capture the boundary condition (21c), which is the driving force of the flow. It has been shown to be quite challenging to accurately resolve this condition for several reasons, that is, (i) due to the fine mesh needed, (ii) the effect of measurement errors and irregularities on the surface (note that the curvature is particularly affected by those) and (iii) the cumulative nature of the error as J increases. One can, in fact, identify some oscillations in the resulting pressures when inspecting closely Fig. 3, particularly in Fig. 3d.

Focusing now on the flow pattern, the case \(J=0\) depicted in Fig. 3b is the most intuitive as it has pressure-drop type of boundary conditions and as it reflects flow without rarefaction. It thus makes sense that the flow occurs from left to right, with the streamlines getting closer to each other when moving from the larger inlet to the smaller outlet. The others are harder to interpret as the driving force behind the flow is given by the boundary condition (21c). In Fig. 3d, for instance, one can clearly see that the main portion of the flow occurs along the boundary. One should notice that the absolute value of \({p^*}_{J}\) increases as J increases since, in general, \(\left| {{\varvec{\nabla }}^*}{\varvec{v}^*}_{J}\right| >\left| {\varvec{v}^*}_{J}\right|\) which then translates into an increased pressure. The same occurs with the magnitude of the velocity. In the non-scaled version of the problem, this increase can be shown to be of order 1/l. The scaling, not being able to capture the average velocity, cannot either fully erase this increase. The relevance of this is that, in order for any convergence to be expected in (23), we must have \(\xi {\bar{{\lambda }^*}}<1\). This, however, should not be a problem in general, since we need \(10^{-3}\lesssim \mathscr {K}_n\lesssim 10^{-1}\) for the local-scale problem to be valid. Recall that \({\bar{{\lambda }^*}}\) differs from the Knudsen number by a factor \(d_p/l\), where \(d_p\) is the characteristic size of the voids between the balls. In our case, \(d_p/l\simeq 10^{-1}\), and the difference is a factor of ten, but in other arrangements or porous media, this is a concern that one should be aware of.

5 The Stochastic Two-Scale Model

The model described in Sect. 4 allows for computing the flow in a two-scale manner. Following it literally, however, would imply computing the permeability for each of the local-scale domains \(V_f\), defined by the elements of the global-scale grid. This is, obviously, not practical from a computational point of view, but most importantly, it is not necessary. This can be explained as follows. Despite that the permeability can vary greatly between each local-scale domain, the values will follow a certain probability distribution, governed by the structure of the porous medium. The approach adopted for the stochastic two-scale model here is, therefore, to compute the permeability for as many local-scale domains as it takes to obtain a representative probability density function (PDF), which describes the variability with respect to the topology. Subsequently, the PDF is used to randomly generate a permeability distribution occupying each element of the global-scale domain, which in a statistical sense represents the original one. Note that this is actually more informative than a deterministic solution, since it describes how the flow through a whole set of statistically equivalent realisations varies and not just how the flow through one particular realisation varies. These ideas are elaborated upon within this section, which first describes how the local-scale permeability variability can be characterised and how the associated PDF’s can be obtained. Thereafter, the recipe for constructing the global-scale model is presented.

5.1 Characterisation of Local-Scale Variability

As stated previously, the permeability is regarded as a random variable given by a PDF, which describes its variability with respect to the local-scale topology. We remark that the size (l) of scaled domain, obtained by scaling the original measurement depicted in Fig. 1, is of the same order as the diameter of the balls (\(d_p\)). This implies that there is a rather high possibility that the resulting permeabilities exhibit a strong correlation with each other. There are, however, cases where the correlation is expected to be small. For example, if the centre of one of the balls is located close to the centre of one of the boundaries, then the permeability in the direction normal to the boundary surface would be minimal, while the permeabilities in the other direction may be rather large in comparison.

In the present work, nine local-scale domains (such as the one exemplified in Fig. 3) were extracted from the original domain in Fig. 1 and then scaled to one of the four different sizes \(l=18\), 32, 56 and 100\(\upmu\)m. Thereafter, 27 permeabilities (in all three directions for each of the nine local-scale domains) were computed, as described in (24). Because of not considering the correlation, a single PDF for the permeability distributions in all three directions could be established based on the 27 resulting permeabilities. The results in terms of \({K^*_I}_{(0)}\), \({S_I}_{(1)}\), \({S_I}_{(2)}\) and \({S_I}_{(3)}\), are summarised in the histograms depicted in Fig. 4.

Fig. 4
figure 4

Histograms for \({K^*_I}_0\), \({S_I}_{(1)}\), \({S_I}_{(2)}\) and \({S_I}_{(3)}\), established from 27 realisations (nine cells times three directions). The purple line represents the best normal or log-normal PDF fit. The relevant means are \({\overline{\log K}_I}_{(0)}=-6.137\), \({\overline{\log S}_I}_{(1)}= 2.746\), \({{\overline{S}}_I}_{(2)}=22.651\) and \({\overline{\log S}_I}_{(3)}= 11.395\), while the standard deviations are \(s_{{\log K}_I}=2.7\), \(s_{{\log {S}_I}_{(1)}}=1.0\), \(s_{{ {S}_I}_{(2)}}=360\), \(s_{{\log {S}_I}_{(3)}}=1.8\). The errors on the means are 0.52, 0.19, 70 and 0.34, respectively

It is clear that the spread is quite large (notice that the only one with linear x-axis is \({S_I}_{(2)}\)), which, of course, is to be expected due to the small size of the domain. In order to utilise these results to generate permeabilities and distribute them over the global-scale mesh, we have chosen to fit normal (Gaussian) distributions whenever possible. In cases where normality could not be assumed, i.e. for \({K^*_I}_{(0)}\), \({S_I}_{(1)}\) and \({S_I}_{(3)}\), log-normal distributions were used instead. This choice is motivated by the fact that these variables can only take positive values, and the criteria for not using normal distributions were based on the Lilliefors’ 1967 statistical test. As indicated in Fig. 4, the uncertainty in the coefficients of the fitted distributions is now much smaller and thus can be used in the global-scale simulation. The log-normal distribution and other options as well have been used to model the variability of the permeability of porous media previously; see e.g. (Selvadurai et al. 2014; Selvadurai and Selvadurai 2010) for the former and Ricciardi et al. (2005) which employed the beta distribution. One advantage with the log-normal distribution is that the unintentional generation of negative values of permeability is avoided. Albeit being out of the scope of this paper, an interesting, and more complex, approach would be to follow the one in Guilleminot et al. (2012), where the maximum entropy principle is used to find the distribution that introduces the smallest bias. At last, it should be noted that for a flow close to the percolation limit, many of the local-scale domains would exhibit zero permeability. Such a distortion does, in turn, mean that it will no longer be possible to describe it using a log-normal distribution.

5.2 Construction of the Global-Scale Model

At this point, the apparent permeability \({K_I}_{(0)}\), as well as the correction functions \({S_I}_{(J)}\), has been described by log-normal and normal distributions. We will now proceed with the construction of the global-scale model, for which a mesh, with nodes at each \(\mathbf {X}_{ijk}\), of the whole domain of study is first defined. Then, values of \({K_I}_{(0)}\) and \({S_I}_{(J)}\) are randomly sampled from the corresponding distribution and, thereafter, assigned to each element \(V_f\) (centre points at \(\mathbf {X}_{ijk}\)) of the mesh. With the values of \({K_{I}}_{(0)}\) and \({S_{I}}_{(J)}\) generated, the permeabilities \(K_1\), \(K_2\) and \(K_3\) can be obtained and (8) can be solved for the global-scale pressure distribution \(P_{ijk}\). Once the pressure distribution has been obtained, the total flow can simply be computed by summing up the flows of the cells located at the outlet of the global-scale domain. Computed in this way, the resulting total flow is a direct result of one realisation of a randomly generated permeability map. Realisations of randomly generated permeability maps and subsequent computations of the total flow must and are, therefore, repeated until a converged mean value and standard deviation are obtained.

6 The Interplay Between Rarefaction and Variability

In order to study the interplay between rarefaction and the variability of the local-scale permeability, with respect to the local-scale topology, numerous global-scale simulations were performed. The global-scale domain was discretised using a mesh consisting of 100 cells in the \(x_1\)-direction and 10 cells in both the \(x_2\)- and the \(x_3\)-directions. To drive the flow, a pressure drop (\(p_i=10^5\) Pa and \(p_o=10^4\) Pa) was applied in the \(x_1\)-direction and periodic boundaries are applied in the \(x_2\)- and \(x_3\)-directions. This configuration, with the cell aspect ratio aligned with the direction of the pressure gradient, ensures that the pressure drop over each cell would lead to density variations small enough for the local-scale flow to be considered as incompressible and modelled by (12). The size of the local-scale domain, l, was used to vary the topology and four different sizes were considered, i.e. \(l=18\), 32, 56 and 100 \(\upmu\)m. In this way, the size of the balls and the voids between are also scaled. These choices of l were taken to vary the Knudsen number (18), while keeping it within the range of applicability of the presented model. The fluid is assumed to be nitrogen and in this work modelled as an ideal gas \(\rho =pM/(RT)\), with \(M=28 \ \mathrm{g/mol}\), \(R=8.314 \ \mathrm{J/molK})\), viscosity (\(\mu =10\upmu \mathrm{Pas}\)) and the temperature was specified as \(T=273 \ \mathrm{K}\).

Before presenting the outcome of the study, let us define what we hereafter will refer to as the rarefaction effect \(\mathscr {R}\) and the variability effect \(\mathscr {V}\), which will be used in order to interpret the results. To this end, we have chosen the following definitions:

$$\begin{aligned} \mathscr {V}^r = \frac{Q^r_v}{Q^r_0},\quad \mathscr {V}^{0} = \frac{Q^0_v}{Q^0_{0}} \end{aligned}$$
(25)

and

$$\begin{aligned} \mathscr {R}_v = \frac{Q^r_v}{Q^0_v},\quad \mathscr {R}_{0} = \frac{Q^r_0}{Q^0_{0}}, \end{aligned}$$
(26)

where \(Q^r_v\) denotes the flow including both variability of the permeability and gas rarefaction, \(Q^0_v\) with variability but without rarefaction. Similarly, \(Q^r_0\) denotes the total flow without considering the variability but including rarefaction and \(Q^0_0\) when both variability and rarefaction are excluded. Indeed, when rarefaction is not considered, the Knudsen number is zero (so is \({\bar{{\lambda }^*}}\)) and the total flow \(Q^0_v\) is determined by only \({K_I^*}_{(0)}\)—computed by (24), and not the correction functions \({S_I}_{(J)}\). When including the variability of the permeability, it is included via the PDF according to Fig. 4, only. When variability is not considered, the flow (\(Q^r_0\)) is determined by the permeabilities \({K_I}\), which are computed by (24), assuming that the permeability \({K_I}_{(0)}\) and the correction functions \({S_I}_{(J)}\) are constant and equal to the mean values; \({\overline{\log K}_I}_{(0)}=-6.137\), \({\overline{\log S}_I}_{(1)}= 2.746\), \({{\overline{S}}_I}_{(2)}=22.651\) and \({\overline{\log S}_I}_{(3)}= 11.395\) of the corresponding probability density function.

The effects of gas rarefaction and the effect of variability of the local-scale permeability with respect to the local-scale topology, with varying domain size (l), are visualised in Fig. 5.

Fig. 5
figure 5

The relationship between flow and the size of the local-scale domain including the variability of the permeability with respect to the local-scale topology, both with and without gas rarefaction (left) and including gas rarefaction both with and without including the variability of the permeability with respect to the local-scale topology (right)

As expected, \(\mathscr {V}^0\) is constant, since, in the absence of rarefaction, scaling the geometry only changes the flow by a multiplicative factor. Therefore, \(Q^0_v\) and \(Q^0_0\) are changed by the same factor and their ratio remains unchanged. Of course, the variability still does have a significant effect and \(\mathscr {V}^0\) is not unity. When there is rarefaction, however, the variability effect \(\mathscr {V}^r\) increases as l increases and that the influence of gas rarefaction decreases at the same time. This is also confirmed by the results depicted in Fig. 5 (right), which also shows that including the variability reduces the rarefaction effect. These results are consistent with the ones presented by Germanou et al. (2018) when studying a two-dimensional random pack of spheres with a deterministic model. Let us now elaborate on the possible explanation for them. To this end, we start by revisiting the work by Pérez-Ràfols et al. (2016), where it was shown that the total flow will be significantly lower in the case when there is no gas rarefaction. Indeed, due to the variability in the local-scale permeability, the fluid does not follow a direct path between the inlet and the outlet. Instead, it meanders through the local-scale cells, looking for the path offering the least resistance. This does, however, increase the effective tortuosity, making the course of flow longer. In turn, this lowers the pressure drops and reduces the total flow. Moreover, the probability of passing through a low-permeability region on this meandering path is increased, and this reduces the total flow. In practice, this acts as a flow restriction, increasing the pressure upstream.

Fig. 6
figure 6

Non-dimensional global pressure (\(P/p_o\)) over the local cells as a function of normalised length, from inlet (0) to outlet (1) (left) and the corresponding increase in \({\bar{{\lambda }^*}}\), which is related to the Knudsen number \(\mathscr {K}_n\) (right). Results obtained without including the effect of rarefaction are depicted by the continuous black lines, and those that do are depicted in colour, including error bars for the variability. The results are presented for the four local-scale cell sizes \(l=18\), 32, 56 and \(100 \ \upmu \mathrm{m}\) and the legend is the same for both the figures

When the flowing gas is rarefied, the presence of these restrictions will cause a cascade effect, as the increase in pressure upstream leads to a decrease in \({\bar{{\lambda }^*}}\) which reduces the effective permeability there (24). In turn, this will cause a further decrease on flow and a further increase in pressure (and thus permeability) further upstream. The relevance of this effect is shown in Fig. 6, in terms of the global-scale pressure and the averaged dimensionless mean free path \({\bar{{\lambda }^*}}\) (which is directly proportional to the Knudsen number \(\mathscr {K}_n\)). Clearly, the global-scale pressure becomes larger (left) at locations far from the outlet and \({\bar{{\lambda }^*}}\) becomes smaller (right). It should be noticed, however, that this reduction likely vanishes for a flow situation close to the percolation threshold. In such case, it is the critical constriction that controls the flow and what happens far away from there is rather irrelevant. Thus, although still present, the cascade effect would only very slightly influence the total flow.

One might note that through the discussion of the results, there has been no need to invoke the precise nature of the problem. Indeed, we have only used the fact that permeability increases due to rarefaction but not the precise way in which this occurs. This suggests that the reduction in the rarefaction effect induces in the total flow—due to the variability of the local-scale permeability—can be expected to be relevant in a more general case, not necessarily involving slip flow nor connected to the particular model used here. Of course, the strength of the reduction due to the rarefaction effect can vary notably in other cases, and this requires more detailed investigations. A critical implication of the result presented here is that, in general, a universal relation between the rarefaction effect and the intrinsic permeability, as presented in Bravo (2007) and Kalarakis et al. (2012), cannot be established. Indeed, rarefaction would affect the flow through two different porous media with the same intrinsic permeability differently, depending on the characteristics of their local-scale topology. Of course, if the porous medium studied is close enough in terms of their spatial variation, as in Bravo (2007) and Kalarakis et al. (2012), such general relations can be found even for fairly different topologies.

We note that the heterogeneous multi-scale method is feasible and that it may be used when constructing two-scale models. This implies that the same procedure followed here can be applied to models with second-order corrections (Wang et al. 2017) or more complex models describing the transition regime, e.g. Moyne and Christian (2003) and Charrier and Dubroca (2004). Although the computational effort to run sufficiently many local-scale cases would still be high, it would be markedly lower compared to if a domain large enough to obtain converged results would be considered. A difficulty may arise in case when the local-scale permeability depends on both the pressure drop and the mean pressure in a more complex way. In such a case, covering a sufficient range of conditions may be very computationally expensive. The expenses could, however, be significantly reduced, by realising only the conditions that are strictly necessary. An efficient design of experiments, which takes into consideration the variation of the permeability with varying conditions and using knowledge-based interpolation schemes, would be required for this. An example of such approach can be found in the work by de Boer et al. (2016), albeit applied to a problem originating in another field of research.

7 Concluding Remarks

The modelling framework developed and presented here was applied to study fluid flow through porous media confined within the slip-flow regime, although it could be adapted to study other cases as well. This framework is based on a two-scale approach in which the highly heterogeneous nature of the porous medium is modelled by treating the permeability of local-scale domains as a random variable. By utilising the present model, it was shown that the rarefaction effect is significantly reduced because of the variability of permeability with respect to the local-scale topology. This underpins the importance of considering the characteristics of the local-scale topology and that results obtained by studying the flow through topologies exhibiting regular patterns cannot be used to draw useful conclusions pertaining to the effects of rarefied flows through highly heterogeneous porous media.