1 Introduction

In many practical cases it is not possible to calculate the two-phase flow in a porous medium at pore-scale resolution, because the geometries are too large. One way to approximate the average behavior of a two-phase flow is to use an effective two-phase flow model. The two-phase Darcy equations are such a model. It reads

$$\begin{aligned} \frac{\partial \phi S_d}{\partial t}&= - \nabla \cdot u_d \; \; \; \; \; \; \text {for } d \in \{ w, n \} \nonumber \\ u_d&= -\frac{K_d(S_d)}{\mu _d} \left( \nabla p_d - \rho _d g \right) \; \; \text {for } d \in \{ w, n \} \nonumber \\ S_w + S_n&= 1 \nonumber \\ p_n - p_w&= p_c(S_w) . \end{aligned}$$
(1)

The fluids are assumed to be incompressible and Newtonian. The system of equations was introduced as a phenomenological extension of Darcy’s law. Many works have attempted to justify these equations theoretically, see e.g., Hornung (1996) and Whitaker (1986b). This often resulted in more complicated equations than (1) or additional strong assumptions. In particular, all volume averaging approaches rely on the existence of a representative elementary volume (REV). The assumption is that all pore-scale dynamics have averaged out on the REV. In Rücker et al. (2021) experiments are shown in which pore-scale effects lead to fluctuations on the centimeter-scale, typically considered as Darcy-scale. This leads to the question of whether it makes sense to assume the existence of such an REV for two-phase flow. Another approach is to derive the two-phase Darcy equations based on energy dynamics at the pore-scale. This was recently done, at least for stationary flows, in McClure et al. (2022). They do not need to assume the existence of an REV.

One of the fluids in the above equations is the wetting phase, denoted by the subscript “w”, and the other is the nonwetting phase, denoted by the subscript “n”. Whether a fluid is in the wetting or nonwetting phase depends on both fluid phases and the solid phase involved. In Eq. (1), typically the phase velocities \(u_d\), the phase pressures \(p_d\) and the phase saturations \(S_d\) are the unknowns of the PDE system. The phase saturation \(S_d \in [0, 1]\) shows how much pore space is occupied by phase d. \(\rho _d\) is the density of phase d, g is gravity and \(\mu _d\) is the viscosity of phase d. Further \(\phi \in [0, 1]\) is the porosity, \(p_c(S_w)\) is the capillary pressure function, and \(K_d(S_d)\) is the saturation-dependent permeability tensor of phase d. The porosity determines how much space is available for fluids. The capillary pressure function indicates the relationship between saturation and capillary pressure. The saturation-dependent permeability tensors model that a fluid is less able to pass through a porous medium if a second phase is present in this porous medium. Without the second phase, the saturation-dependent permeability tensor is equal to the absolute permeability tensor \(K_0\), which is independent of the fluid. When the saturation of a fluid phase is zero, the corresponding saturation-dependent permeability tensor is also zero. To summarize

$$\begin{aligned} K_w(1) = K_n(1) = K_0 \text { and } K_w(0) = K_n(0) = 0. \end{aligned}$$
(2)

It is often assumed, see e.g., Muskat et al. (1937) and Honarpour and Mahmood (1988), that there are scalar functions \(k_{rw}(S_w)\) and \(k_{rn}(S_n)\) bounded between 0 and 1, such that

$$\begin{aligned} K_w(S_w) \approx k_{rw}(S_w) \cdot K_0 \text { and } K_n(S_n) \approx k_{rn}(S_n) \cdot K_0. \end{aligned}$$
(3)

This decomposition assumes that the saturation dependence is similar for all tensor entries. This assumption is not necessarily fulfilled for anisotropic porous media, see e.g., Bear et al. (1987) and Keilegavlen et al. (2012). Because we deal with anisotropic porous media in our numerical experiments we do not assume the existence of scalar relative permeabilities and stick with the saturation-dependent permeabilities \(K_d(S_d)\).

Using model (1) we can approximate a porous medium as an effective material characterized by some effective parameters. For two-phase flow, these are \(\phi\), \(p_c(S_w)\) and \(K_d(S_d)\). In the following we refer to these parameters as effective two-phase flow parameters or sometimes as effective parameters.

There is not a unique relation between the saturations \(S_w, S_n\) and the capillary pressure or the saturation-dependent permeabilities. To account for that, hysteresis can be added to these functions, see e.g., Amaziane et al. (2012), Bear et al. (2011), and Killough (1976). This means that the capillary pressure and saturation-dependent permeabilities are dependent on the entire history of saturation values and not just on the current saturation value. In our examples, Sect. 4, we consider the effective parameters only for primary imbibition. This means that the geometry is initially completely filled with the nonwetting phase and then the wetting phase invades the geometry. As a consequence the calculated parameters are not necessarily usable for simulations in which not just imbibition occurs.

In McClure et al. (2018) it is shown that the hysteresis of the capillary pressure function can be removed by including additional state variables. For the saturation-dependent permeabilities, it is not yet completely clear which state variables could be included to remove hysteresis, see e.g., Al-Zubaidi et al. (2023), Khorsandi et al. (2017), and Liu et al. (2017) for the development regarding this question.

The aim of this work is to efficiently approximate the effective parameters in complex geometries spanning several length scales by simulations.

As an interesting example, we consider the liquid composite molding (LCM) process, see Sect. 4.2. This is a manufacturing process of composite materials, see e.g., Parnas (2014) for further details. The aim is to simulate the infiltration process of a polymer resin into a textile stack. The textile stack is a complex porous geometry with anisotropic flow properties.

The textile stack consists of several layers of fiber mats. The fiber mats are made up of woven rovings and the rovings themselves are made up of many filaments. Therefore, the textile structure is a porous material with three clearly distinct scales:

  • The filament scale, see Fig. 9a, with a pore size in the order of the filament radius is the microscale.

  • The woven roving scale, see Figs. 8 and 9b, with a pore sizes in the order of the roving size, is named mesoscale.

  • The complete textile stack is the macroscale.

At the mesoscale, we distinguish between resolved mesoscale geometries and effective mesoscale geometries. Resolved mesoscale geometries are mesoscale geometries in which all relevant pores are resolved. Resolved mesoscale geometries are of pore-scale description. Figures 4 and 8 show resolved mesoscale geometries. In contrast, in effective mesoscale geometries we have large pores that are resolved and we have effective porous material. This means that the small pores are not resolved, unlike the large pores. Effective mesoscale geometries lie between Darcy-scale and pore-scale description. Figures 2, 5b and 9b show effective mesoscale geometries. We refer to geometries characterizing the effective porous material in an effective mesoscale geometry as microscale geometries. Figures 5a and 9a show microscale geometries.

The effective parameters can also be determined through physical experiments. However, simulations are often more cost-effective and are particularly useful for applications, where it is difficult to measure the effective parameters experimentally.

We use pore-morphology methods for the simulations. Other possibilities are solving the coupled (Navier-) Stokes equations or using two-phase flow simulations on pore network models. These options are compared in Vogel et al. (2005) and Ahrenholz et al. (2008). Pore-morphology methods do not require a pore network model and require less memory and runtime compared to solving the coupled (Navier-) Stokes equations. However, they assume that the flow is dominated by capillary effects.

Pore-morphology methods calculate static fluid distributions in porous media. The first publication on pore-morphology methods is Hazlett (1995), in which a totally wetting material was assumed. The method was enhanced in Hilpert and Miller (2001) and generalized in Schulz et al. (2015), and Schulz et al. (2007) to partially wetting materials and multiple contact angles. In Sect. 2 the used pore-morphology method is explained and how it is used to calculate the effective parameters.

However, it is not possible to apply these pore-morphology methods from the literature to effective mesoscale geometries, because they require pore-scale geometries. In Sect. 3 a method is proposed that generalizes the idea of pore-morphology methods to effective mesoscale geometries. Figure 1 gives a summary of the method.

With this method it is possible to calculate the effective parameters from the smallest to the largest length scale. By separating length scales in different geometries, it is possible to avoid carrying out expensive calculations on large geometries with fine discretizations. The presented method does not perform phase connectivity checks. This means that both fluid phases can appear and disappear from the geometry without connection to a phase reservoir. This simplification is the reason why the irreducible phase saturations in the computational results in Sect. 4 are always zero.

In the literature, special pore network models, so-called Dual Pore Network Models (DPNM), are often used to study two-phase flows in porous media with multiple length scales. In these, a pore network model is created that covers the effects of multiple length scales on the two-phase flow. Pore network models for multiscale problems can be found, for example, in Ruspini et al. (2021), Bultreys et al. (2015), and Jiang et al. (2013). In Ruspini et al. (2021), the created pore network model consists of solid-free pores and so called Darcy pores. These Darcy pores are filled with an effective porous material and model the effects of smaller length scales on the fluid flow. In contrast, the method presented in this work calculates the effective parameters on voxelized geometries instead on pore network models.

In Sect. 4 the proposed method is tested on two different examples. The method is implemented by so-called GeoPy macros from the GeoDict software from Math2Market. In both examples the capillary pressure function is close to a calculated reference solution. The saturation-dependent permeabilities differ somewhat more, but are also similar to the respective reference solution. The first example, Sect. 4.1, is an isotropic porous medium with a pyramidal hole.

The second example is the LCM process. Using the presented method, we calculate the effective two-phase flow parameters separately for the different length scales. This allows us to obtain the effective parameters of the textile stack, while only simulating moderately large voxel geometries. The calculated effective two-phase flow parameters can be used to simulate the infiltration process of a textile component by using for example the two-phase Darcy equations (1). See e.g., Michaud (2016) and Teixidó et al. (2022) for an overview of current research on simulation of LCM processes.

All images of geometries are created using GeoDict and all plots showing mathematical functions are created using matplotlib.pyplot, a Python library.

2 Calculation of Effective Parameters on Resolved Geometries

This section describes the methods for calculating the effective two-phase flow parameters for geometries that do not contain effective porous materials. All methods in this section are known from the literature. In the following we refer to such geometries as resolved geometries. Keeping in mind that these geometries differ from reality. This is due to the voxel discretization and in the case of geometries extracted from images, e.g., micro-CT scans, due to the image segmentation threshold. In Saxena et al. (2019), Saxena et al. (2017), and Leu et al. (2014) the influence of this on parameters such as porosity and permeability are analyzed.

Pore-morphology methods are used to calculate stationary phase distributions. With these the effective parameters are approximated. In this work the pore-morphology method from Hilpert and Miller (2001) is used, with the generalization given in e.g., Schulz et al. (2007), to calculate the approximate phase distributions when the solid material is not totally wetting. More precisely, for a radius r the capillary pressure \(p_{cap}\) is calculated by the Young–Laplace equation,

$$\begin{aligned} p_{cap} = \frac{2 \gamma \text {cos}( \theta )}{r}. \end{aligned}$$
(4)

Then, the nonwetting phase distribution is calculated by first eroding the pore space by a sphere of radius r and then dilate the result by the same sphere. Between these two morphological operations, connectivity checks of the nonwetting phase to a corresponding reservoir can be performed, but this is not done in this work.

The calculation of capillary pressure functions \(p_c\) is done as e.g., in Schulz et al. (2007), Schulz et al. (2015), and Silin et al. (2011). After static phase distributions are generated as described above, we calculate the wetting phase saturations for the phase distributions. A calculated saturation together with the capillary pressure computed by Equation (4) is a point of the capillary pressure function.

In this work, absolute permeability tensors \(K_0\) are calculated by simulating a stationary flow for each coordinate direction and using Darcy’s law, see e.g., Hornung (1996) and Whitaker (1986a), to obtain the permeability in the flow direction.

This means that for each coordinate direction, the stationary flow through the porous medium in that direction is calculated by solving the Stokes equations Chung et al. (2002), Anderson and Wendt (1995). Then the mean velocity and the pressure drop in the direction of flow are calculated. These values are inserted in Darcy’s law without external forces to calculate the permeability in the direction of the flow.

This method can be generalized to effective mesoscale geometries. The difference is that instead of the Stokes equations, the Stokes–Brinkman equations Brinkman (1949) are used to calculate the stationary flow. The Stokes–Brinkman equations have an additional term that is only active in an effective porous material and includes the influence of the permeability of that material.

The calculation of the saturation-dependent permeabilities \(K_w\) and \(K_n\) is reduced to multiple calculations of absolute permeabilities. To do this, we select some static phase distributions generated by the pore-morphology method. For each static phase distribution, we determine \(K_w\) by treating the nonwetting phase as solid and calculate \(K_w\) in the same way as for the absolute permeability tensor. This means that we treat the nonwetting phase as an additional solid phase, i.e., in this case the pore space is only the part of the actual pore space that is occupied by the wetting phase. Since we only have one flowing fluid, we can again use the Stokes or Stokes–Brinkman equations for the simulation. To calculate \(K_n\), we do the same with reversed roles.

The saturation of a phase, together with the calculated permeability of this phase, is a point value of the respective saturation-dependent phase permeability. As with the capillary pressure function, this is repeated for several phase distributions and then an interpolant can be calculated from these points.

3 Calculation of the Effective Parameters of Effective Geometries

In this section we explain the method to calculate the effective parameters on effective mesoscale geometries, i.e., geometries that contain an effective porous material. This method generalizes the idea of pore-morphology methods to effective mesoscale geometries. In Fig. 1 a summary of the procedure is given.

We assume that we have the effective two-phase flow parameters \(\phi ^{mic}, p_c^{mic}, K_w^{mic}\) and \(K_n^{mic}\) from the effective porous material. And for the derivation of the method, we assume that there is a microscale geometry with volume \(V^{mic} > 0\) to which the effective two-phase flow parameters fit. In this sense, it represents the effective porous material. In our examples, Sect. 4, we model the effective porous material by generated geometries, see Figs. 5a and 9a. We simulate the required microscale effective two-phase flow parameters on these generated geometries using the methods from Sect. 2. But the formulas of this section can also be used without knowing a microscale geometry as long as the effective two-phase flow parameters are known.

Fig. 1
figure 1

This is a summary of the procedure presented in Sect. 3. For details we refer to this section. The effective microscale parameters \(\phi ^{mic}, p_c^{mic}, K_w^{mic}\) and \(K_n^{mic}\) , and the effective mesoscale porosity \(\tilde{\phi }^{eff}\), see Eq. (9), are assumed to be known or calculated prior to the procedure. The effective microscale parameter can be calculated by the methods from the literature shown in Sect. 2

3.1 Basic Definitions and Calculation of Porosity

The volume of the microscale geometry can be separated into the volume of the pore space \(V_{fl}^{mic}\) and the volume of nonporous materials \(V_{npr}^{mic}\). It is

$$\begin{aligned} V^{mic} = V_{fl}^{mic} + V_{npr}^{mic} \end{aligned}$$

and the porosity of the microscale geometry is

$$\begin{aligned} \phi ^{mic} = \frac{V_{fl}^{mic}}{V^{mic}}. \end{aligned}$$
(5)

Let \(A^{eff}\) be an effective mesoscale geometry with volume \(V^{eff} > 0\). We decompose it into the pairwise disjoint sets \(\tilde{A}_{fl}^{eff}\), \(A_{pr}^{eff}\) and \(A_{npr}^{eff}\) such that

$$\begin{aligned} A^{eff} = \tilde{A}_{fl}^{eff} \cup A_{pr}^{eff} \cup A_{npr}^{eff}. \end{aligned}$$

We denote \(\tilde{A}_{fl}^{eff}\) as the mesoscale pore space, \(A_{pr}^{eff}\) is the set of porous material whose effective two-phase flow parameters are characterized by the microscale geometry \(A^{mic}\), and \(A_{npr}^{eff}\) are nonporous materials in the effective mesoscale geometry. The pore space of the porous material \(A_{pr}^{eff}\) is not included in the set \(\tilde{A}_{fl}^{eff}\). Let \(\tilde{V}_{fl}^{eff}\), \(V_{pr}^{eff}\) and \(V_{npr}^{eff}\) be the corresponding volumes. Then, it is

$$\begin{aligned} V^{eff} = \tilde{V}_{fl}^{eff} + V_{pr}^{eff} + V_{npr}^{eff}. \end{aligned}$$

In Fig. 2 there is a simple example of the defined sets and volumes.

Fig. 2
figure 2

On the left a simple example of an effective mesoscale geometry is shown. The blue circles are porous, the red shape is nonporous and the white space is the pore space. On the right side a section of the porous material is shown, which we call microscale geometry. In this the green circles are nonporous and the white space is the pore space. In the notation of Sect. 3\(\tilde{A}_{fl}^{eff}\) is the white space in the effective mesoscale geometry, \(A_{pr}^{eff}\) is the blue space and \(A_{npr}^{eff}\) is the red space. \(V_{npr}^{mic}\) is the volume of the nonporous material in the microscale geometry, i.e., the green circles, and \(V_{fl}^{mic}\) is the volume of the microscale pore space

We define

$$\begin{aligned} V_{fl}^{eff} = \tilde{V}_{fl}^{eff} + V_{pr}^{eff} \cdot \phi ^{mic}, \end{aligned}$$
(6)

the volume of the pore space of the effective mesoscale geometry including the microscale pore space. Let

$$\begin{aligned} \tilde{\phi }^{eff} = \frac{\tilde{V}_{fl}^{eff}}{V^{eff}}, \end{aligned}$$
(7)

which is not the porosity of the effective mesoscale geometry but the volume fraction of the mesoscale pore space. Further, let

$$\begin{aligned} \tilde{\phi }_{pr}^{eff} = \frac{V_{pr}^{eff}}{V^{eff}}, \end{aligned}$$
(8)

be the volume fraction of the porous material of the effective mesoscale geometry.

The porosity of the effective mesoscale geometry including the microscale pore space can be calculated as follows:

$$\begin{aligned} \phi ^{eff} = \frac{V_{fl}^{eff}}{V^{eff}} \overset{(6)}{=} \frac{\tilde{V}_{fl}^{eff} + V_{pr}^{eff} \cdot \phi ^{mic}}{V^{eff}} \overset{(7), (8)}{=} \tilde{\phi }^{eff} + \tilde{\phi }_{pr}^{eff} \cdot \phi ^{mic}. \end{aligned}$$
(9)

In the following we call \(\phi ^{eff}\) the effective mesoscale porosity.

3.2 Calculation of Capillary Pressure Functions

To obtain the capillary pressure function of the effective mesoscale geometry, we need the microscale capillary pressure function \(p_c^{mic}(S)\).

We calculate the capillary pressure function \(\tilde{p}_c^{eff}(S)\) of the effective mesoscale geometry, while treating the porous material as nonporous. This function is just an intermediate result.

Fig. 3
figure 3

The effective mesoscale geometry of Fig. 2 is shown. The pore space is filled with two phases that form a static phase distribution. The wetting phase is represented by the yellow voxels and the nonwetting phase by the light blue voxels. The volume of the wetting phase is \(\tilde{V}_w^{eff}\). On the right side the wetting phase saturation \({\bar{S}}_w^{mic}\) is assigned to the porous material. This saturation corresponds to the same capillary pressure as the phase distribution in the mesoscale pore space. The phase distributions together with the saturation \({\bar{S}}_w^{mic}\) of the porous material is a static phase distribution of the effective mesoscale geometry

Let \({\bar{p}}_c\) be a pressure value. The goal is to calculate the corresponding saturation

$$\begin{aligned} {\bar{S}}^{eff}_w = \left( p_c^{eff} \right) ^{-1} ({\bar{p}}_c) \end{aligned}$$
(10)

of the effective mesoscale geometry.

We assume that the capillary pressure is the same in the complete porous material and on all fluid-fluid interfaces in the mesoscale geometry. We can calculate the related saturation of the porous material from the inverse capillary pressure function of the microscale. From the inverse of \(\tilde{p}_c^{eff}(S)\) we get the associated saturation of the mesoscale pore space \(\tilde{A}^{eff}_{fl}\)

$$\begin{aligned} {\bar{S}}^{mic}_w&= \left( p_c^{mic} \right) ^{-1} ({\bar{p}}_c) = \frac{V_w^{mic}}{V^{mic}_{fl}} \end{aligned}$$
(11)
$$\begin{aligned} \tilde{{\bar{S}}}^{eff}_w&= \left( \tilde{p}_c^{eff} \right) ^{-1} ({\bar{p}}_c) = \frac{\tilde{V}_w^{eff}}{\tilde{V}^{eff}_{fl}} \end{aligned}$$
(12)

Here, \(V_w^{mic} \le V^{mic}_{fl}\) is the volume of the wetting phase in the pore space of the microscale geometry and \(\tilde{V}_w^{eff} \le \tilde{V}^{eff}_{fl}\) is the wetting phase volume in the mesoscale pore space. Figure 3a shows an exemplary static phase distribution in the mesoscale pore space.

The idea is now to calculate \({\bar{S}}^{eff}_w\) using these two saturations. This saturation is given by the ratio of the volume of the wetting phase to the volume of the pore space. The volume of the wetting phase is given by

$$\begin{aligned} V_w^{eff} = \tilde{V}_w^{eff} + V_{pr}^{eff} \frac{V_w^{mic}}{V^{mic}} \cdot \frac{V_{fl}^{mic}}{V_{fl}^{mic}} \overset{(5), (11)}{=} \tilde{V}_w^{eff} + V_{pr}^{eff} \phi ^{mic} {\bar{S}}^{mic}_w. \end{aligned}$$
(13)

We get for the saturation

$$\begin{aligned} {\bar{S}}^{eff}_w&= \frac{V_w^{eff}}{V_{fl}^{eff}} \overset{(13)}{=} \frac{\tilde{V}_w^{eff} + V_{pr}^{eff} \phi ^{mic} {\bar{S}}^{mic}_w}{V^{eff} \phi ^{eff}} \nonumber \\&= \frac{1}{\phi ^{eff}} \left( \frac{\tilde{V}_w^{eff}}{V^{eff}} \cdot \frac{\tilde{V}^{eff}_{fl}}{\tilde{V}^{eff}_{fl}} + \frac{V_{pr}^{eff}}{V^{eff}} \phi ^{mic} {\bar{S}}^{mic}_w \right) \nonumber \\&\overset{(7), (12), (8)}{=} \frac{1}{\phi ^{eff}} \left( \tilde{\phi }^{eff} \tilde{{\bar{S}}}^{eff}_w + \phi ^{eff}_{pr} \phi ^{mic} {\bar{S}}^{mic}_w \right) \nonumber \\&\overset{(12), (11)}{=} \frac{1}{\phi ^{eff}} \left( \tilde{\phi }^{eff} \left( \tilde{p}_c^{eff} \right) ^{-1} ({\bar{p}}_c) + \phi ^{eff}_{pr} \phi ^{mic} \left( p_c^{mic} \right) ^{-1} ({\bar{p}}_c) \right) . \end{aligned}$$
(14)

We can calculate an approximation to the mesoscale capillary pressure function by selecting some capillary pressures \({\bar{p}}_c\) and using Eqs. (14) and (10). Thereafter, these points can be used to compute an interpolant.

3.3 Calculation of Saturation-Dependent Permeabilities

To calculate the saturation-dependent permeability tensors on an effective mesoscale geometry, we need the effective parameters of the microscale and the capillary pressure function of the mesoscale \(p_c^{eff}\) calculated as shown in Sect. 3.2.

A pore-morphology method is used to generate partially infiltrated effective mesoscale geometries. Again, we do this by treating the porous material as nonporous. In Fig. 3a an example of such a static phase distribution is shown. These phase distributions are also generated to compute the capillary pressure function \(\tilde{p}_c^{eff}\) in Sect. 3.2. For all of these phase distributions we have an associated wetting phase saturation and capillary pressure related by the function \(\tilde{p}_c^{eff}\).

Now, let \({\bar{S}}_w \in [0, 1]\) be a wetting phase saturation, we can calculate the capillary pressure in the effective mesoscale geometry by

$$\begin{aligned} {\bar{p}} = p_c^{eff}({\bar{S}}_w) . \end{aligned}$$

We assume that the capillary pressure in the porous material and in the mesoscale pore space is the same. We calculate the saturation of the porous material by

$$\begin{aligned} {\bar{S}}_w^{mic} = \left( p_c^{mic} \right) ^{-1} ({\bar{p}}) . \end{aligned}$$

We search the partially infiltrated effective mesoscale geometries for the geometry that has the smallest deviation from the capillary pressure \({\bar{p}}\) and use it. In the porous material we set the wetting phase saturation \({\bar{S}}_w^{mic}\), see Fig. 3b .

Now we set \(K_w^{mic}({\bar{S}}_w^{mic})\) as the permeability tensor of the porous material. Then, we solve the Stokes–Brinkman equations for the wetting phase to approximate the flow through the geometry. As in calculations on resolved geometries, see Sect. 2, we assume the nonwetting phase to be rigid during this simulation. We use the resulting flow to calculate the saturation-dependent permeability tensor of the wetting phase \(K_w^{eff}({\bar{S}}_w)\). This is done in the same way as in Sect. 2 for the permeabilities of resolved geometries.

To calculate the saturation-dependent permeability tensor of the nonwetting phase \(K_n^{eff}(1 - {\bar{S}}_w)\) we do the same, but we use \(K_n^{mic}({1-\bar{S}}_w^{mic})\) as the permeability of the porous material and the wetting phase is assumed to be rigid during the simulation. This procedure is repeated for different saturations \({\bar{S}}_w \in [0, 1]\).

4 Numerical Experiments

In this section the proposed method is tested on two different examples. In both examples we calculate the effective parameters on effective mesoscale geometries and a reference solution on a resolved mesoscale geometry and compare them.

The GeoDict software of Math2Market is used to implement the procedure from Sect. 3. GeoDict is also used to create the geometries and the images of those geometries. Two different flow solver implementations from Math2Market are used. The first is called the LIR solver, see Linden et al. (2015). Because this solver cannot solve the Stokes–Brinkman equations, it cannot be used for simulations on the effective mesoscale geometries. In this case the SIMPLE-FFT solver, see e.g., Patankar (2018) and Van Doormaal and Raithby (1984), is used.

In Berg et al. (2016) the calculations of the effective parameters with GeoDict are compared to physical experiments with sandstone rocks. A good agreement of the parameters was found for drainage experiments. For imbibition experiments the deviations were larger. We do not perform connectivity checks in this work, so both results do not fit completely. It is also reported that the deviations of capillary pressure functions for saturations close to zero can be high. That is because the smallest pores the discrete geometry can have are bounded by the used voxel size. This leads by the Young–Laplace equation, (4), to an upper bound for the capillary pressure. But in reality there can be smaller pores.

That we do not apply connectivity checks is also the reason why the irreducible phase saturations are zero in the results. This can be seen in the Figs. 6, 10, 11 and 13 as the capillary pressure functions are defined from wetting phase saturation zero to one.

4.1 Isotropic Porous Medium with Hole

We consider a porous medium composed of small cylindrical obstacles. The obstacles have a length of \(25 \mu m\) and a diameter of \(12 \mu m\). The orientation of the obstacles is chosen uniformly randomly. The porosity of the porous medium is \(40 \%\) and we use a voxel size of \(1 \mu m\). We created a geometry filled with this porous medium that is 600 voxels long in each spatial dimension. Then, we cut a hole in this medium that has the shape of an 8-sided pyramid. The resulting geometry can be seen in Fig. 4.

Fig. 4
figure 4

This is the resolved mesoscale geometry of Sect. 4.1. The voxel size is \(1 \mu m \)

Fig. 5
figure 5

The voxel size of both geometries is \(1 \mu m \)

The aim is to calculate the effective parameters of this geometry. First we do this by applying the corresponding functions shown in Sect. 2 to the geometry. We regard the results from this as a reference solution. After that we perform the calculation of the effective parameters by the procedure shown in Sect. 3. Then we compare the results of both ways.

To use the procedure from Sect. 3, we create a microscale and an effective mesoscale geometry. As a microscale geometry, we use a cube that is filled with the described porous medium. It has a length of 200 voxels in each spatial dimension and a voxel length of \(1 \mu m\), see Fig. 5a. The effective mesoscale geometry is the same as the resolved mesoscale geometry, but with an effective porous material instead of the resolved porous medium. We create an effective mesoscale geometry with a voxel size of \(1 \mu m\), see Fig. 5b, and a second one with a voxel size of \(8 \mu m\). Because the pyramidal hole is approximated less well at a voxel size of \(8 \mu m\), we expect the result to deviate slightly more from the reference solution than at a voxel size of \(1 \mu m\).

Table 1 This table compares the number of voxels, effective porosities and total runtimes of the imbibition experiments in Sect. 4.1
Fig. 6
figure 6

The two images show the mesoscale capillary pressure functions of the imbibition experiments in Sect. 4.1. The black triangles mark the result of simulation of the resolved mesoscale geometry. The other lines show the results of simulating the effective mesoscale geometries. Both images show the same lines, but the right image in a semi-logarithmic representation. The mesoscale voxel size is denoted by dx

Fig. 7
figure 7

The images show the mesoscale permeabilities of the imbibition experiments in Sect. 4.1. The curves starting at 0 for a wetting phase saturation of zero are the wetting phase permeabilities. The others are the nonwetting phase permeabilities. The black triangles mark the result of simulation of the resolved mesoscale geometry with the LIR solver and the blue stars mark the same but calculated with the SIMPLE-FFT solver. The mesoscale voxel size is denoted by dx

Table 1 lists the number of voxels, the total runtimes and the effective porosities for the three experiments. The porosities are very similar for all three experiments. The calculation of the saturation-dependent permeability tensors dominates the total runtime, since for this the Stokes or Stokes–Brinkman equations have to be solved several times. The reference solution is calculated with the LIR and the SIMPLE-FFT solver. The LIR solver cannot be applied to effective mesoscale geometries. For a fair comparison, the runtimes with the SIMPLE-FFT solver should be used. The effective mesoscale geometry with a voxel size of \(1 \mu m\) has the same number of voxels as the resolved mesoscale geometry. Nevertheless, the runtime is lower by a small factor. The runtime for the effective mesoscale geometry with a voxel size of \(8 \mu m\) is much lower. If we add the 1626s runtime from the microscale calculation, the calculation is almost 20 times faster than the reference solution calculation. In addition, the effective microscale parameters do not need to be recalculated when the same porous material is used in a different effective mesoscale geometry.

The results of calculating the capillary pressure functions on the mesoscale are shown in Fig. 6. They are all very similar.

The diagonal entries of the saturation-dependent permeability tensors are shown in Fig. 7. The influence of the pyramidal hole to the permeability in the direction of the hole is clearly visible in Fig. 7a. For example, the absolute permeability in this direction is about twice as large as in the other directions. The permeability curves of the other two directions are similar. Both experiments on the effective mesoscale geometries have rather small deviations from the reference solution and they give almost the same results, except for the saturation-dependent permeability of the nonwetting phase in the direction of the hole. The deviation of this curve could be due to the poorer approximation of the pyramidal hole.

Overall, the method gives reasonable approximations of the mesoscale effective parameters. In the case of the effective mesoscale geometry with a voxel size of \(8 \mu m\), the runtime is much lower than the runtime of the reference solution.

4.2 Liquid Composite Molding (LCM) Process

In the LCM process under consideration, a textile stack initially filled with air is infiltrated with a polymer resin. The textile stack consists of several layers of fiber mats. The fiber mats are made up of woven rovings and the rovings themselves are made up of many filaments. Three different length scales can be distinguished. The largest is the macroscale and that is the complete component. Its size is typically in the range of several centimeters or meters depending on the application of the composite. Then we have the mesoscale, which is a small section of some fiber mats stacked on top of each other. The size of a mesoscale geometry is typically in the millimeter range. Figure 8 shows a resolved mesoscale geometry and Fig. 9b shows an effective mesoscale geometry. The smallest length scale is the microscale, which is a section of a roving, see Fig. 9a. The filaments in this microscale geometry have a diameter of 7 \(\mu m\). The micro- and mesoscale geometries are visibly anisotropic.

Fig. 8
figure 8

This is the resolved mesoscale geometry of Sect. 4.2. The voxel size is \(1 \mu m \)

Fig. 9
figure 9

A microscale geometry (left) and an effective mesoscale geometry (right) of Sect. 4.2 are shown

Fig. 10
figure 10

These images compare the imbibition capillary pressure functions and saturation-dependent permeabilities of ten microscale geometries of Sect. 4.2. The voxel size of the geometries is \(1 \mu m\). The black dotted lines show the average calculated as described in Appendix A. The other lines are the results from the individual microscale geometries. The permeability curves starting at zero for a saturation of zero are the wetting phase permeabilities. The others are the nonwetting phase permeabilities

Table 2 This table compares the number of voxels and effective porosities of the imbibition experiments in Sect. 4.2 with a microscale voxel size of \(1 \mu m\)

The geometry from Fig. 8 and the microscale geometries, see e.g., Fig. 9a, are created with GeoDict.

The microscale geometries have a porosity of \(35 \%\), a voxel size of \(1 \mu m\) and the size of the geometry is 100 voxels in each coordinate direction. Ten different microscale geometries are created with these specifications. These are different, since many geometric properties are only statistical. In a resolved mesoscale geometry the arrangement of the filaments is also different in different sections of the rovings.

Figure 10 shows the capillary pressure functions and saturation-dependent permeabilities of all ten geometries. The variations of the capillary pressure functions are moderate, but the variations of the saturation-dependent permeabilities are large. To reduce the influence of these variations, the effective parameters of all ten microscale experiments are averaged as described in Appendix A. The average values are shown in Fig. 10 and are used as the effective parameters for representing the rovings.

The effective mesoscale geometries are constructed by taking the geometry from Fig. 8 and applying morphological dilations to it until there is no pore space between the filaments. Thereafter, morphological erosions are applied until the rovings have a similar size as before the dilations. These morphological operations are defined in Hilpert and Miller (2001), for example. After that we coarsen the geometries to reduce the number of voxels in the geometry. We increase the voxel size to \(2 \mu m\) and \(4 \mu m\). These two geometries are then the effective mesoscale geometries used in this section. Figure 9b shows the effective geometry with a voxel size of \(2 \mu m\). Increasing the voxel size slightly changes the volume of the pore space. The effect on the effective porosity can be seen in the Table 2. The effective porosity deviates from the resolved mesoscale geometry by \(0.44 \%\) and \(0.92 \%\). In addition to the less well approximated shapes of the rovings, this also affects the quality of the calculated effective parameters.

The runtimes are not included in Table 2, because the resolved mesoscale geometry is simulated with the LIR solver and the effective mesoscale geometries can only be simulated with the SIMPLE FFT solver. Because of that a fair comparison of runtimes is not possible.

Fig. 11
figure 11

The two images show the mesoscale capillary pressure functions of the imbibition experiments in Sect. 4.2 with a microscale voxel size of \(1 \mu m\). The black triangles mark the result of simulation of the resolved mesoscale geometry. The other lines show the results of simulating the effective mesoscale geometries. Both images show the same lines, but the right image in a semi-logarithmic representation. The mesoscale voxel size is denoted by dx

Fig. 12
figure 12

The images show the saturation-dependent permeabilities of the imbibition experiments in Sect. 4.2 with a microscale voxel size of \(1 \mu m\). The black triangles show the result of direct simulation of the resolved mesoscale geometry. The other two lines show the results of simulating the effective mesoscale geometries. The curves starting at zero are the wetting phase permeabilities. The others are the nonwetting phase permeabilities. The mesoscale voxel size is denoted by dx

Fig. 13
figure 13

These images show the imbibition capillary pressure functions and saturation-dependent permeabilities for the LCM process, when we use a voxel size of \(0.5 \mu m\) on the microscale. The permeability curves starting at zero for a saturation of zero are the wetting phase permeabilities. The others are the nonwetting phase permeabilities. The mesoscale voxel size is denoted by dx

Figure 11 shows the results of the calculation of the capillary pressure function of the mesoscale. The capillary pressure functions calculated on the effective mesoscale geometries are slightly above the reference solution, but the curves still look similar.

Figure 12 shows the results of the calculation of the diagonal elements of the saturation-dependent permeability tensors. All permeabilities are presented in an ordinary and a semi-logarithmic coordinate system. The semi-logarithmic representation is shown, as this shows the behavior of the permeability curves close to zero. The saturation-dependent permeabilities of the two in-plane directions look similar. While, the saturation-dependent permeabilities are different in the out-of-plane direction. The saturation-dependent permeabilities of the resolved and effective mesoscale geometry are similar for most saturation values. The largest absolute deviation is in the in-plane direction around a saturation of 0.5. Another deviation is visible in Fig. 12f. There, the wetting phase permeabilities of the effective mesoscale geometries are above 0 for significantly smaller wetting phase saturation than in the reference solution.

Overall, the method provides reasonable approximations of the mesoscale effective parameters for the LCM example, while allowing the use of geometries with significantly fewer voxels. As in the example in Sect. 4.1, the deviations in the saturation-dependent permeabilities are larger than in the capillary pressure function.

A major advantage of the method from Sect. 3 is that we can change the voxel size of the microscale geometry without changing the effective mesoscale geometry. We run simulations with a microscale voxel size of \(0.5 \mu m\) instead of \(1 \mu m\). All other parameters remain the same and we also use the same effective mesoscale geometries. We have not calculated a reference solution. A resolved mesoscale geometry with a voxel size of \(0.5 \mu m\) would require about \(13.5 \cdot 10^9\) voxels. If we use an effective mesoscale geometry only the number of voxels for the microscale geometries increases by a factor of 8.

The results of these simulations can be found in Fig. 13. There are small differences in the saturation-dependent permeabilities to the results in Fig. 12. The capillary pressure functions near to zero wetting phase saturation are much larger than in Fig. 11. This is because the size of the smallest pores in the microscale geometries is halved, resulting in twice the capillary pressure for the smallest pores, see Eq. (4).

5 Conclusion

The method for calculating effective two-phase flow parameters of effective mesoscale geometries is presented and derived. It is based on pore-morphology methods. This means that the flow is assumed to be dominated by capillary effects. The method is defined for effective mesoscale geometries containing one porous material characterized by effective two-phase flow parameters. Generalizing the method to effective mesoscale geometries with multiple porous materials that have different effective parameters should not be a problem.

The shown method is tested on two examples. In both a reference solution is simulated on a resolved mesoscale geometry. In both examples, the method provides reasonable results, even when the number of voxels in the effective mesoscale geometries is significantly lower than in the reference solution.

So far, no connectivity checks are included in the presented method. As a consequence we cannot simulate irreducible phase saturations. But in physical experiments and real world applications, irreducible phase saturations occur. Connectivity checks would therefore be an interesting generalization of the proposed method. In particular for the LCM process, as air entrapment can affect the quality of the composite materials produced, see e.g., Varna et al. (1995) and Lee and Wei (2000).

However, it is not straight forward to add connectivity checks to the method. To incorporate connectivity checks to the method it is necessary to decide how the effective porous material is handled during connectivity checks, i.e., defining in which situations a phase can pass through an effective porous material. In this case the micro- and mesoscale contributions to the capillary pressure function are coupled and it is no longer possible to come up with a mathematical formula like (14) for the capillary pressure function.

An option for connectivity checks through an effective porous material would be to allow a phase to pass, if the respective phase saturation of the effective porous material is above a certain threshold. A natural choice for the threshold would be the respective residual phase saturation. But this may only be realistic if the length of the connection path through the effective porous material is comparable to the size of the microscale geometries that were used to calculate the effective parameters of the effective porous material. Because on pore-scale level, the larger the porous medium is, the less likely it is to have a path only through the corresponding phase, even if the overall phase volume fraction is the same.