Introduction

Modeling fluid flow in porous media is essential for Reservoir engineering applications such as acidization and waterflooding projects during secondary recovery processes. It is also vital for modeling hydrological systems where groundwater flows through rocks, contamination from chemical spills, etc., and various industrial processes involving air or oil filtration (Iliev and Laptev 2004; Zhao et al. 2021). Modeling fluid flow in porous media in transportation applies to Proton-Exchange Membrane Fuel Cells (PEMFC) generation. Modeling of fluid flow can also describe physiological processes such as blood flow to the arteries in the human body (Vassilev and Yotov 2009; Taylor et al. 2023).

Fluid flow is primarily through fractures in many geological formations with low matrix permeability. Naturally fractured geological formations, such as carbonate reservoirs, are estimated to hold more than 60% of the world's proven oil reserves and 40% of the world's gas reserves and contain fractures that range from microscopic fissures to macroscopic scale, i.e., more or less than 1 mm or up to 1 km. Hence, there is a need to model the fluid flow for an accurate representation of flow in the fractures, the interaction between fractures and the surrounding porous media, and the ability to handle complex fracture network structures (Berre et al. 2019).

Fracture models for fluid flow can be represented in two broad classes, namely the Continuum Fracture Models (CFM) and the Discrete Fracture Models (DFM) (Bear and Berkowitz 1987; He et al. 2020; Kottwitz et al. 2021). Recently, hybrid models have been developed, combining the above two traditional models (Dang 2018, 2019).

The CFM determines a representative elementary volume for the fractures and porous media and the resulting equivalent parameters of the fracture system. They include the single or equivalent continuum, double continuum, and multiple interacting continua (Barrenblatt et al. 1960; Doughty 1999; Braester 2009; He et al. 2020; Kottwitz et al. 2021). Limited mass exchange occurs between the fracture and rock matrix, resulting in homogenization and equivalent behavior (continuum). Multiple interacting continua models, especially the dual-porosity model, are computationally efficient. Still, one challenge with the continuum model is the potential difficulty of generating a mathematical formulation of fluid exchange function and determining geometry-dependent parameters, thus reducing its accuracy and practical applicability (Hardebol et al. 2015).

The DFM implies that the topology of the fracture network and the properties of each fracture are completely understood (explicitly accounted for), thus giving a more accurate representation of the fracture and porous media domain. However, although the DFM tends to model fluid flow in a very realistic manner, its application is of little practical value because of the limitations in field measurements of fractures (Braester 2009). In addition, DFM simulations typically necessitate many elements to represent the fracture network accurately. Discretization methods for DFM may be roughly subdivided into three categories depending on the relation between porous medium and fracture grids. They include conforming, non-conforming, and non-matching mesh methods (Formaggia et al. 2020; Borio et al. 2021). In conforming mesh discretization, the mesh elements (polyhedral grids) align perfectly with the physical domain's boundaries and interfaces.

Conversely, the non-conforming mesh does not align and may contain gaps or overlaps between elements. Non-matching mesh discretization refers to meshes in which the elements on one side of an interface or boundary do not connect directly to the other. When complex fracture geometries are highly developed, mesh generation methods can become problematic. Due to the complex gridding and high computing cost, the application of conforming grids in real geological models is still limited; more robust discretization methods, such as the non-confirming and non-matching mesh, are now utilized (Xu et al. 2021).

Different numerical schemes depend on the discretization method for simulating fluid transport in fractured media under the DFM (Formaggia et al. 2020). They include the finite volume method (Mehrdoost 2022; Ahmed et al. 2015; Gläser et al. 2017), mimetic finite difference method (Huang et al. 2014), the finite element method (Zhang et al. 2013; Alotaibi et al. 2022), mixed finite element method (Younes et al. 2023; Fu and Yang 2022; He et al. 2021a, b) and extended finite element method (Wang et al. 2020; Mortazavi et al. 2022) etc. Researchers are also looking into reduced-order models and machine-learning methods to speed up DFM simulations while maintaining accuracy (de Hoop et al. 2022; He et al. 2020; Liu et al. 2017; Garipov et al. 2016).

Two mathematical models for modeling fluid flow in fractures and porous media under the DFM concept are the Darcy–Darcy Model (Cubic Law) and the Stokes–Brinkman Model.

The Darcy model assumes that Darcy's law governs the flow, a simplified variant of the Navier–Stokes equations. This model assumes that the flow is laminar and that the inertial forces are insignificant compared to the viscous forces. Darcy–Darcy models fluid flow in the whole porous media. In contrast, Cubic Law (CL) modifies the permeability terms in the Darcy equation. It offers a simplified approach to modeling free flow inside fractures. The Cubic Law states that the volume rate of fluid flow across a section, such as a fracture, is proportional to the applied pressure gradient and the cube of the separation distance (Ghassemi et al. 2020). Based on Cubic law, fractures are modeled as two parallel planes with no rough surfaces (walls) at a constant distance from each other (Lomize 1951; Snow 1965; 1969; Singhal and Gupta 1999). However, the Cubic law results in a lower observed flow rate, underestimating the fracture's hydraulic properties; whereas, real fractures mostly have rough surfaces and varying aperture (Ghassemi et al. 2020; He et al. 2021a, b). Many researchers have studied numerous methods for improving the accuracy of the cubic law. These methods can be broadly classified into three groups, i.e., the Modified Cubic Law (MCL), Local Cubic Law (LCL), and Modified Local Cubic Law (MLCL) (Wang et al. 2015, 2018; He et al. 2021a, b).

The Stokes–Brinkman model includes the Brinkman equation, which adds a term to the Darcy equation to account for fluid inertia effects. The additional term in the Stokes–Brinkman equation allows turbulence modeling, which can occur in high Reynolds number fractures. However, the additional complexity makes the Stokes–Brinkman model more computationally expensive than the Darcy model. The Stokes–Brinkman equations use one system of equations in the whole domain, i.e., a single equation with variable coefficients that describes the Stokes flow in the free-flow region and Darcy flow in the porous region (Morito Mansur 2018). The appropriate selection of permeability and viscosity parameters distinguishes the different medium types. The Stokes–Brinkman equations were formulated to overcome the uncertainties associated with interface locations and find appropriate interface conditions between the porous and free-flow regions, especially in highly fractured reservoirs (Brinkman 1949; Laptev 2003; Popov et al. 2009). According to Krotkiewski et al. (2011), the Stokes–Brinkman equations only apply to a certain parameter range in which the effective permeability in the free-flow region is less than four orders of magnitude different from the matrix permeability in the porous region. Morito Mansur (2018) investigated the cubic law validity range using the Stokes–Brinkman model. A permeability contrast threshold of \(10^{ - 7}\) was found, below which the difference between the two modeling approaches is insignificant and above which the cubic law model no longer provides plausible results.

In terms of the applicability of Darcy–Darcy and Stokes–Brinkman models in real-world geological formations with fractures, researchers like Zhang et al. (2021) conducted a simulation case study on a fractured reservoir, employing an embedded discrete fracture model (EDFM) to investigate flow and transport characteristics and the effect of fractures on production. The results demonstrate that the maximum production rate is reached when the fracture is perpendicular to the wellbore (horizontal fractures). This is because the direction of fluid movement is along the maximum fracture permeability. Their research also revealed that as the number of fractures increases, so does production, and when the fracture permeability increases, production also increases.

Teng et al. (2020) and Teng et al. (2022) studied the effect of Brinkman flow on the performance of hydraulically fractured wells. They showed that the Stokes–Brinkman equation is more accurate in characterizing the fracture flow than the Darcy–Darcy model because it adaptively accounts for fractures or cavities where porosity approaches one and produces a smooth solution field. As a result, the Stokes–Brinkman model can offer more precise estimates of pressure distribution, flow rates, and oil recovery in complex fractured reservoirs. The Stoke-Brinkman model is generally more favorable when a more detailed representation of fractures and flow interactions is required.

Even though some researchers have independently examined the Stokes–Brinkman and Darcy–Darcy models, there are still some knowledge gaps between the two models, particularly in areas like the validation process, identifying each model's limitations, such as when the assumption of creeping flow fails and improved numerical simulation technique. Also, very limited systematic comparisons have been made between the two models when modeling fluid flow in fractured porous media.

Hence, this paper presents a comparative study between the Darcy–Darcy and Stokes–Brinkman models to address the knowledge gaps between both models, firstly by formulating the foundational mathematical equations for both models. Then both models were implemented into the same computational framework in FEniCS. FEniCS is this study's chosen tool because it is a powerful open-source platform for solving PDEs using Finite Element Method (FEM). It is easy to implement FEM in FEniCS, especially when converting the mathematical models in strong forms (PDEs) to their variational forms (weak forms). The computational domain or mesh for the porous media, fracture subdomains, and appropriate boundary conditions are easily set over the entire domain in FEniCS. FEniCS computational engine is written in C++; while, the front end allows Python programming (Langtangen and Logg 2017). The solutions obtained from both mathematical models were obtained from a 16 GB RAM, intel® core ™ i7-6700HQ CPU @ 2.60 HZ processor.

Secondly, the limitations of both models are addressed by validating their solutions and comparing them apple-to-apple for computational efficiency and accuracy using R-squared metric and L2 norm estimates. Sensitivity analyses are conducted on the porous media porosity, mesh resolution, fracture orientations, fracture sizes, distributions, and fractures with Local Grid Refinement (LGR) in homogenous porous media. The computation accuracy of FEniCS was further tested by solving multiple fracture cases: isolated and interconnecting fractured porous media systems, and the results were investigated.

Finally, the computational results are visualized in Paraview, a scientific visualization tool, and the FEniCS codes in this paper are shared so future researchers can easily replicate or extend the work.

Mathematical models

The following section states and describes the mathematical formulations for both the Darcy–Darcy model (Cubic Law) and the Stokes–Brinkman model in their Strong form (PDEs), weak form (Variational form), and snippets of FEniCS code.

Strong formulation of Darcy–Darcy model (Cubic Law)

Darcy's law models fluid flow in the entire domain (porous and fractured region) \(\Omega_{{\text{T}}}\) and it is given by the equation below:

$$\mu K^{ - 1} u + \nabla p = 0, \quad {\text{in}}\; \Omega_{{\text{T}}}$$
(1)
$$\nabla \cdot u = 0\quad {\text{ in}}\; \Omega_{{\text{T}}}$$
(2)

where \(u\)(vector component) and \(p\)(scalar component) are unknowns and can also be called trial functions in the finite element method. \(u\) stands for the velocity vector, \(\nabla p\) is the pressure gradient, \(\mu ,\) and \(K\) denotes the viscosity and permeability field, respectively.

The Cubic Law offers a simplified approach for modifying the permeability terms in the Darcy equation for modeling free flow inside fractures. The permeability of the fracture \(K_{{\text{f}}}\) is estimated to be \(K_{{\text{f}}} = \frac{{b^{2} }}{12}\), where b is the fracture aperture width.

Variational formulation of Darcy–Darcy model (Cubic Law)

The variational or weak formulation in FEM transforms the PDEs (Strong form) into their integral form to lessen the burden on the numerical algorithm when evaluating derivatives. To transform the Darcy–Darcy model, Eqs. (1) and (2) into their variational forms, they are multiplied by test functions \(v\)(vector) and \(q\) (scalar), respectively, and then integrated over the domain \(\Omega_{{\text{T}}}\). Integration by parts transforms any second-order derivatives in the PDE into first-order derivatives (Langtangen and Logg 2017).

From Eq. (1): multiplying both sides of the equation with test function \(v\) and then integrating both sides.

$$\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {u \cdot v} \right)\;{\text{d}}V + \frac{K}{\mu }\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla p \cdot v} \right) \;{\text{d}}V = 0$$
(3)

From Eq. (2): multiplying both sides of the equation with test function \(q\) and then integrating both sides.

$$\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla \cdot u } \right)q\;{\text{d}}V = 0$$
(4)

The variational formulation in FEniCS is shown in a snippet below.

figure a

Strong formulation of the Stokes–Brinkman model

The complete form of the Stokes–Brinkman model is,

$$\frac{1}{\emptyset }\left[ {\frac{{\partial \left( {\rho_{f} u} \right)}}{\partial t} + \nabla \cdot \left( {\frac{{\rho_{F} }}{\emptyset }uu} \right)} \right] - \frac{\mu }{\emptyset }\nabla^{2} u = - \nabla P + \rho_{f} g - \mu K^{ - 1} u$$
(5)

For low-velocity flow, neglecting the advective inertial forces and external forces term reduces Eq. (5) into a simplified Stokes–Brinkman model comparable to the Darcy–Darcy model for steady-state creeping flow conditions. The simplified Stokes–Brinkman equations are shown in Eqs. (6) and (7).

$$- \frac{\mu }{\emptyset }\nabla^{2} u + \mu K^{ - 1} u + \nabla p = 0, in \,\,\Omega_{{\text{T}}}$$
(6)
$$\nabla \cdot u = 0, in \,\,\Omega_{{\text{T}}}$$
(7)

Appropriate selection of permeability and viscosity parameters distinguishes the different medium types. It should also be noted that the permeability tends to be infinite in the fracture subdomain, where the porosity value is 1.0. Therefore, Eq. (6) reduces to Stokes equation, and when viscosity is 0 in the vugular region, Eq. (6) reduces to Darcy's law. Therefore, Eq. (6) can be seen as a combination between Darcy's Law and Stokes Equation; while, Eq. (5) is between Darcy's Law and Navier–Stokes equations. According to Mehdaoui et al. (2008), the simplified Stokes–Brinkman model saves computational time compared to the complete Stokes–Brinkman model for modeling natural convection in a porous cavity. The simplified Stokes–Brinkman model has been used to study the macroscopic representation of one-phase incompressible flow in fractured and cavity (or vuggy) porous media (Golfier et al. 2015). Hence, the term of the Stokes–Brinkman model in this study is the simplified Stokes–Brinkman equation. This steady-state model for creeping flow allows the apple-to-apple comparison against Darcy's Law, and its accuracy will be investigated in this study.

Variational formulation of Stokes–Brinkman model

From Eq. (6): multiplying both sides of the equation with test function \(v\) and then integrating both sides.

$$- \frac{\mu }{\emptyset }\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla^{2} u} \right)v\;{\text{d}}V + \frac{\mu }{K}\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {u \cdot v} \right)\;{\text{d}}V + \mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla p \cdot v} \right) \;{\text{d}}V = 0$$

Integration by part technique transforms the second-order derivatives into first-order derivatives. Also, applying Gauss' theorem and Divergence law further simplifies the equation below.

$$- \frac{\mu }{\emptyset }\left( { - \mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla u \cdot \nabla v} \right)\;{\text{d}}V + \mathop \int \limits_{{\partial \Omega_{{\text{T}}} }} \left( {\nabla u \cdot n} \right)v \;{\text{d}}s} \right) + \frac{\mu }{K}\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {u \cdot v} \right)\;{\text{d}}V + \mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla p \cdot v} \right) \;{\text{d}}V = 0$$

But \(v = 0\) on \(\partial \Omega_{{\text{T}}}\) (whole boundary)

$$\frac{\mu }{\emptyset }\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla u \cdot \nabla v} \right)\;{\text{d}}V + \frac{\mu }{K}\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {u \cdot v} \right)\;{\text{d}}V + \mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla p \cdot v} \right)\;{\text{d}}V = 0$$
(8)

From Eq. (7): multiplying both sides of the equation with test function \(q\) and then integrating both sides.

$$\mathop \int \limits_{{\Omega_{{\text{T}}} }} \left( {\nabla \cdot u } \right)q\;{\text{d}}V = 0$$
(9)

The variational formulation is coded in FEniCS, as shown in the snippet below.

figure b

During the computational procedures in FEniCS, the porosity is initialized for the porous media, and the unit porosity field of 1.0 is set for fracture mesh. The permeability field \(K\) is updated based on the porosity field using the Carman–Kozeny equation.

$$K = k_{0} \left[ {\left( {\frac{\emptyset }{{\emptyset_{0} }}} \right)^{3} \left( {\frac{{1 - \emptyset_{0} }}{1 - \emptyset }} \right)^{2} } \right]^{6}$$
(10)

where \(k_{0}\) stands for the reference permeability field, \(\emptyset_{0}\) stands for the reference porosity and \(\emptyset\) stands for porosity.

Model validation

To validate the FEM mathematical formulations of the Darcy–Darcy and Stokes–Brinkman models as presented in this study, we simulated the test case studies on a cross-shaped fracture network that was based on EDFM and finite volume method as shown in Fig. 1 (Hajibeygi et al. 2011; Pluimers 2015; Zhang et al. 2021). Figure 1 is the 2D geometry of two vertical crossing fractures, each with an aperture size of 0.004, considered over a square domain of \(9 \times 9.\) Dirichlet conditions are set on the left and right boundary, i.e., the pressure at the inlet (left-hand-side) is 1, and the outlet pressure (right-hand-side) is 0; while, no-flow conditions are imposed on the top and bottom boundaries.

Fig. 1
figure 1

Domain and boundary conditions of Test case

Other test case l parameters used for the model validation are shown in Table 1. Two different fracture-matrix permeability ratios, i.e. \(K_{{\text{f}}} /K_{{\text{m}}} = 10^{3}\) and \(K_{{\text{f}}} /K_{{\text{m}}} = 10^{5}\), were considered for the sensitivity to the fracture conductivity contrast (Pluimers 2015).

Table 1 Default parameters for Test case used in validation

Figure 2 compares the 2D pressure solutions between the reference work, the Darcy–Darcy and Stokes–Brinkman models for the two fracture-matrix permeability ratios cases using 32,482 cells (90 mesh resolution). Although the matrix-fracture interaction becomes increasingly significant at the tips of the fracture network as the matrix-fracture conductivity contrast increases, the reference work, the Darcy–Darcy model, and the Stokes–Brinkman model appear to agree well qualitatively on the calculated 2D pressure solutions.

Fig. 2
figure 2

Pressure solutions of cross-shaped fracture network from model validation

Figure 3 shows the quantitative comparison of pressure solution in two cross-shaped fracture networks between the referenced work and models along a horizontal cross section of the fracture porous media domain.

Fig. 3
figure 3

Pressure solutions along horizontal cross section from model validation

The R-square values between the reference work and the Darcy–Darcy model and between the reference model and the Stokes–Brinkman models are very high (0.9984), i.e., thus showing high correlations between the reference work and the models. Therefore, FEM mathematical formulations of this study's Darcy–Darcy and Stokes–Brinkman models are validated.

Models setup and performance metrics

Darcy–Darcy and Stokes–Brinkman models under low flow velocity and steady-state creeping flow conditions are run from a 16 GB RAM, intel® core™ i7-6700HQ CPU @ 2.60 HZ processor, and their solutions are compared apple-to-apple for computational efficiency and accuracy when conducting sensitivity studies on the effect of porosity, mesh resolution, fracture orientations, fracture sizes, and fracture distributions in homogenous porous media.

The simulation domain is comprised of homogeneous porous media and fractured subdomains. Table 2 shows the default parameters used in the simulation. The underlying assumption is that the medium porosity value of the homogenous porous media used in the simulation is 0.2, corresponding to a characteristic limestone core. Based on Cubic law, fractures are assumed to be modeled as two parallel planes with no rough surfaces (walls) at a constant fracture width of 0.02 m. Also, the initial conditions of the simulations consider that the domain is filled with a single-phase fluid in the pores with a viscosity of 0.001 pa-sec.

Table 2 Default parameters for single fracture case

The R-squared metric was considered to quantify the comparison because of its intuitiveness. It determines the precision of one model relative to the other by measuring the variance in response variable "y" that can be predicted using predictor variable "x." R-squared is the square of the correlation coefficient r, mathematically.

$$R{\text{ - squared}} = r^{2} = \left( {\frac{{n\left( {\sum xy} \right) - \left( {\sum x} \right)\left( {\sum y} \right)}}{{\sqrt {\left[ {n\sum x^{2} - \left( {\sum x} \right)^{2} } \right]\left[ {n\sum y^{2} - \left( {\sum y} \right)^{2} } \right]} }}} \right)^{2}$$
(11)

x and y are variables (i.e., pressure and velocity outputs from both mathematical models). n is the number of data points. R-squared ranges from 0 (no correlation between variables) to 1 (perfect correlation between variables).

The accuracy between both models is estimated by comparing the difference in the L2 norm of the pressure and velocity field solutions. The \(L^{2}\) norm, defined by

$$E_{{\text{p}}} = \sqrt {\mathop \int \limits_{\Omega } \left( {P_{{{\text{CL}}}} - P_{{{\text{SB}}}} } \right)^{2} \;{\text{d}}x}$$
(12)
$$E_{{\text{u}}} = \sqrt {\mathop \int \limits_{\Omega } \left( {U_{{{\text{CL}}}} - U_{{{\text{SB}}}} } \right)^{2} \;{\text{d}}x}$$
(13)

where \(E_{{{\text{p}} }} \;{\text{and}}\; E_{{\text{u}}}\) are computed L2 norms for the pressure and velocity fields between the Darcy–Darcy and Stokes–Brinkman models. \(P_{{{\text{CL}}}} \;{\text{ and}}\; U_{{{\text{CL}}}}\), are the pressure and velocity fields solution from the Darcy–Darcy model (cubic law) and \(P_{{{\text{SB}} }} \;{\text{and}}\; U_{{{\text{SB}}}}\), are the Pressure and velocity fields solution from the Stoke-Brinkman models, respectively.

Results

Based on the following boundary conditions: fluid velocity of 0.0167 m/s specified at the inlet, pressure set to zero at the outlet, no-slip boundary conditions (i.e., velocity is set to zero) specified at the walls, the effects of fracture orientations, fracture size, and porous media porosity on the models were investigated. Results are presented and discussed below.

Effect of fracture orientation

The following pressure field solutions were generated based on the default parameters for a single fracture case in Table 2.

Figures 4, 5, 6 and 7 show the pressure and velocity field solutions of the Darcy–Darcy and Stokes–Brinkman models for no-fracture case, vertical, horizontal, and diagonal fracture orientations in a homogenous porous media, respectively. Both models produce similar pressure and velocity results based on their high R-squared values (above 0.99999 for pressure and 0.9 for velocity) see Table 3. However, the velocity field calculated along the fractures is slightly higher for the Stokes–Brinkman model compared to the Darcy–Darcy model in Fig. 7a, c, and d due to a slightly higher pressure gradient of the Stokes–Brinkman model along the fracture see Figs. 6a, c, and d, respectively. Table 3 shows that the computational time needed to solve the Stokes–Brinkman model was unusually lower than that of the Darcy–Darcy model; this is attributed to the manner of implementation of the Stokes–Brinkman and Darcy–Darcy models algorithm in FEniCS. When the pressure and velocity terms in the Darcy–Darcy model are solved simultaneously using two PDEs, i.e., Eqs. (3) and (4), similar to the Stokes–Brinkman model, Eqs. (6) and (7), the Darcy–Darcy model becomes more computationally expensive. However, when the pressure term of the Darcy–Darcy model is first solved, and the velocity by projecting the pressure gradient onto a vector space, the Darcy–Darcy model becomes less computationally expensive than the Stokes–Brinkman model. The reduced computational time to solve the Stokes–Brinkman model may also result from the omitted inertial and external force terms for creeping steady-state flow.

Fig. 4
figure 4

Pressure field solutions for different fracture orientation

Fig. 5
figure 5

Velocity field solutions for different fracture orientations

Fig. 6
figure 6

Pressure profile along cross sections for different fracture orientations

Fig. 7
figure 7

Velocity profile along cross sections for different fracture orientations

Table 3 Summary of results from velocity and pressure profile along cross sections for different fracture orientations

The vertical fracture causes little inlet pressure variation compared to the no-fracture case because the vertical fracture is perpendicular to the flow's direction (pressure gradient). However, the diagonal and horizontal fractures cause a decrease in the inlet pressure calculated along the cross section by about 15 and 32% from the no-fracture case, respectively. Since the horizontal fracture orientations reveal more information on the pressure changes along the vicinity of the fracture and porous media, it is investigated further to know the effect of fracture width, the porosity of the porous media, and mesh resolution on the pressure solutions from both models.

Effect of varying fracture width and media porosity

The fluid flow simulation in the horizontal fractured porous media was performed using key input data from Table 2 and varied porous media porosity and fracture width ranging from 0.175 to 0.3 and 0.00005 to 0.01 m, respectively, to capture very tight to wide fracture apertures. The simulation results are presented in Fig. 8a–f below.

Fig. 8
figure 8

Effect of fracture width and porosity

Both the Darcy–Darcy and Stokes–Brinkman models also generated very similar results. The results show that increments in the porosity of a porous media cause the pressure change around the vicinity of a single horizontal fracture to act as though there was no fracture, i.e., rapid pressure decline, which leads to ease of fluid movement between the porous media and the fractures.

Effect of varying mesh resolution

The precision and accuracy of the Darcy–Darcy and Stokes–Brinkman Models were analyzed using three mesh resolutions, as shown in Fig. 9. Mesh resolutions of 5, 50, and 90, as defined in FEniCS, correspond to the number of cell elements: 608, 7908, and 25,008, respectively, for fractured porous media with a fracture width of 0.005 m. Also, 5, 50, and 90 mesh resolutions correspond to the number of cell elements: 2254, 9466, and 26,636, respectively, for the system with a fracture width of 0.001 m.

Fig. 9
figure 9

Effect of mesh resolution on models

The results in Fig. 9a–d show that at very low mesh resolution, the Darcy–Darcy model deviates significantly from the Stokes–Brinkman model and is prone to inconsistencies. One such inconsistency is shown when comparing Fig. 9a, 9c and b, d. Notice that the inlet pressure calculated from the Stokes–Brinkman model at a fracture width of 0.001 is less than that at a fracture width of 0.005 m with constant porous media porosities.

At low mesh resolution, the Stokes–Brinkman model deviates significantly from the Darcy–Darcy model, but the Stokes–Brinkman model converges with the Darcy–Darcy model at high mesh resolution. The above observation is because the Stokes–Brinkman model includes a second-order term called the Brinkman term that accounts for the viscous dissipation in the fluid flow. The second-order term causes numerical errors when the resolution of the numerical simulation is low because the Brinkman term involves the second derivative of the fluid velocity, which requires higher spatial resolution for accurate numerical calculation.

On the other hand, the Darcy model involves only the first derivative of the fluid velocity, which requires lower spatial resolution for accurate numerical calculation. As a result, the Darcy model may produce more accurate results than the Stokes–Brinkman model at low spatial resolutions.

Therefore, appropriate mesh resolution should be selected when implementing the Stokes–Brinkman model.

Effect of local grid refinement (LGR)

Local Grid Refinement was implemented to the unstructured grid mesh around the fractures to improve the simulation accuracy of both models. The fluid flow simulation in the horizontal fractured porous media was performed using input parameters such as fracture width of 0.001 m, porosity of porous media of 0.175, and other relevant inputs from Table 2. The pressure field solutions for single fracture with LGR are presented in Fig. 10 below. Notice the slight differences between the pressure field solutions.

Fig. 10
figure 10

Pressure field solution for single fracture with Local Grid Refinement (LGR)

To check the accuracy, we use the inlet pressure field solutions of 1263.3 × 106 Pa calculated at higher mesh resolutions of 150 (70,583 cell elements) with no LGR as the benchmark solution; see Table 4. Tables 4 and 5 show that LGR improved the estimated inlet pressure of both models as they converge faster to the benchmark solution even when fewer cell elements are used and require less computational time. For example, in Table 4, the inlet pressure of 1264.3 × 106 Pa, estimated in the LGR case with a mesh resolution of 50 (22,619 cell elements), deviates from the benchmark solution by 0.08%. In addition, the solution was obtained in 7.32 sec, while that of the benchmark solution was estimated in 52.66 sec.

Table 4 Effect of LGR in the Stokes–Brinkman model
Table 5 Effect of LGR in the Darcy–Darcy model

The Stokes–Brinkman model tends to be more sensitive to LGR than the Darcy–Darcy model due to the improved estimated inlet pressure field at lower mesh resolutions.

Other cases

The computational power of FEniCS for solving more complex fractured porous systems is presented in this section. The results from multiple fracture cases, i.e., interconnecting and isolated fractured porous media systems, are discussed below.

Multiple fracture case: isolated fractures

A simulation study was conducted based on a porous media domain comprising multiple isolated fractures, each with a fracture width of 0.001 m, average porous media porosity of 0.175, and other input parameters based on Table 2.

Figure 11 presents the simulation results, and it shows that both models can successfully model multiple isolated fracture cases with slight differences in outcome. Furthermore, the effect of increasing the mesh resolution of 5 (7869 cell elements) to a mesh resolution of 50 (14,286 cell elements) of the computational domain causes a drastic decrease in the computed L2 norm in magnitudes of \(10^{1}\) Pa (i.e., the differences in the computed L2 norm of the pressure field between the Darcy–Darcy and Stokes–Brinkman models when the computational domain has mesh resolution of 5 and 50, respectively).

Fig. 11
figure 11

Pressure field solution for isolated fracture case

The smaller computed L2 norm of 4.02 × 106 Pa from the computational domain with a higher mesh resolution of 50 suggests higher accuracy and agreement between both models; while, the computational domain with a low mesh resolution of 5, having a larger L2 norm of 53.0 × 106 Pa, indicates potential discrepancies in accuracy between the two models.

Multiple fracture case: interconnecting fractures

Based on a porous media domain comprising multiple interconnecting fractures, each with a fracture width of 0.001 m, average porous media porosity of 0.175, and other input parameters based on Table 2, a simulation study was carried out. Figure 12 presents the simulation results, and it shows that both models can successfully model multiple isolated fracture cases with slight differences in outcome. The computational domain, with a mesh resolution of 50, has an L2 norm of 9.52 × 106 Pa.

Fig. 12
figure 12

Pressure field solution for interconnecting fracture case

Conclusions

In this study, the Darcy–Darcy and Stokes–Brinkman models for fluid flow in fractured porous media under steady-state creeping flow conditions were validated and compared apple-to-apple for computational efficiency and accuracy when carrying out sensitivities on effects of mesh resolution, fracture orientations, fracture sizes, and porous media porosity. The following concluding remarks are summarized as follows:

  1. 1.

    Both models show similar results for estimated pressure and velocity fields with high R-squared values (above 0.99999 for pressure and 0.9 for velocity) for single fracture orientations under steady-state creeping flow conditions.

  2. 2.

    When the pressure and velocity terms in the Darcy–Darcy model were solved simultaneously using two PDEs (similar to the implementation of the Stokes–Brinkman model), the computational time needed to solve the Stokes–Brinkman model would be half of the computational time of the Darcy–Darcy model. However, when the pressure term of the Darcy–Darcy model is first solved, and the velocity by projecting the pressure gradient onto a vector space, the Darcy–Darcy model becomes less computationally expensive (about twice as fast) than the Stokes–Brinkman model.

  3. 3.

    For a given fracture aperture in a fractured porous media, as the porosity of the porous media increases, the pressure drop along the fracture decreases, contrary to the behavior observed in narrower fracture apertures. The Stokes–Brinkman model produces better results when a porous medium has more considerable porosity variation and fractures. This investigation is significant for studies predicting oil production from hydraulic fractured wells.

  4. 4.

    The Stokes–Brinkman model is more sensitive to the mesh resolution, and as a result, the Darcy–Darcy model is more accurate than the Stokes–Brinkman model at low resolutions. The LGR improves both model results but significantly improves the Stokes–Brinkman model solutions at low mesh resolution.

  5. 5.

    Furthermore, both models showed similar results (based on L2 norm estimates) when compared for complex fracture systems such as multiple fracture cases: isolated and interconnecting fractured porous media for low-velocity and steady-state creeping flow conditions.

  6. 6.

    FEniCS, as a powerful open-source solution platform, was adopted to solve fluid flow in fractured porous media based on FEM. All FEniCS code in this paper is shared to make it easy for future researchers to reproduce results or extend the research work. The FEniCS code used in this work can be downloaded from https://github.com/Dudun007/FEniCS-Code.git.

Results show that the simplified Stoke-Brinkman model runs as efficiently and is comparable to the Darcy–Darcy model for steady-state creeping conditions. The simplified Stoke-Brinkman can adaptively account for fractures or cavities where porosity approaches one and produces a smooth solution field. It can estimate pressure distribution, flow rates, and fracture behavior, which is important for predicting oil production from hydraulic fractured wells. Other real-world applications include modeling hot water in underground geothermal reservoirs and simulation of CO2 injection and migration during Carbon Capture and Storage (CCS).