1 Introduction
SECUReFoam
for the simulation of complex flow and transport in porous media. The code is named after the H2020 EU project Subsurface Evaluation of Carbon capture and storage and Unconventional Risk”, in which most of the code development took place. The framework is developed in C++
within the OpenFOAM® library and includes new solvers, boundary conditions, pre- and post-processing utilities, and new numerical schemes. We detail the implementation of the geostatistical pre-processing library and solution strategites for saturated flow and transport solvers that account for variable fluid properties (e.g., density, viscosity, relative permeability). Heterogeneity can be accounted directly through the definition of random permeability fields and by means of double porosity models. The formers are based on multi-Gaussian and thresholded Gaussian random fields (also known as pluri-Gaussian) [13, 14]. Although this kind of fields can be generated with other available geostatistics toolboxes (GSLib [15], T-PROGS [16]), the integration with the flow and transport solvers provides the computational framework the capability to tackle a wide variety complex problems.C++
implementation (thanks to the underlying OpenFOAM® structure).2 Flow and transport models
2.1 Darcy flow
2.2 Continuity equation
2.3 Transport equation
2.4 Density and viscosity models
2.5 Boussinesq approximation
2.6 Dual-porosity and multi-continuum models
3 Random fields generation
C++
implementation and parallel scalability. In our tests, in fact, although the random field generation can be significantly expensive, it is nevertheless often negligible compared to the cost of the flow and transport solvers, and these steps can be fully integrated in a single run.3.1 Continuous and pluri-Gaussian truncated fields
4 Numerical implementation
SECUReFoam
, namely:-
setRandomField: a pre-processing utility to generate random fields for permeability, porosity and other properties;
-
rhoDarcyFoam: a variable-density flow and transport solver;
-
dualSimpleDarcyFoam: a dual-porosity Darcy solver;
-
simpleDarcyFoam: a simple single-phase Darcy solver;
-
poroelasticFoam: a linear Biot poroelasticity solver;
-
dualRhoDarcyFoam: a dual-porosity variable density solver;
-
mesh importing utilities from gslib, ijk, and grdecl format;
-
spatialPdf: an utility to create linear and log-spaced histograms from spatial data;
-
fieldMetrics: co- and post-processing utility to compute statistics of spatial data. This is a specialised and extended version of the functionObject structure of OpenFOAM®.
4.1 Meshing and random field generator setRandomField
SECUReFoam
are utilities for importing corner-point reservoir models, based on the work done within the MRST project [21]. Alternatively more complex geometries can be meshed combining from elementary volume objects or CAD files.4.2 Variable density solver rhoDarcyFoam
4.3 Dual-porosity solver dualSimpleDarcyFoam
4.4 Boundary conditions and other modules
5 Numerical examples
SECUReFoam
. The heterogeneous and dispersive Henry problem (Sect. 5.1) shows how the platform deals with variable density in heterogeneous porous media. The performance of the under-relaxed Picard is demonstrated by solving a strongly non-linear viscous fingering instability (Sect. 5.2) and a highly heterogeneous Horton–Rogers–Lapwood problem (Sect. 5.3), which also shows the use of truncated pluri-Gaussian fields. Finally, we present a quarter five-spot injection problem to demonstrate the dual-porosity formulation and the capability to deal with discontinuous highly heterogeneous fields.5.1 Heterogeneous Henry problem
Parameter | Value | Units |
---|---|---|
\(Q_\text {in}\) | \(6.6\cdot 10^{-2}\) | kg/s |
\(\phi\) | 0.35 | – |
\(\rho _{0}\) | 1000 | kg/m\(^3\) |
\(\beta\) | 0.6832 | – |
\(c_{\text {sea}}\) | 36.5925 | kg/m\(^3\) |
k | \(1.02\cdot 10^{-9}\) | m\(^2\) |
\(\mu\) | 0.001 | Pa s |
\(D_{m}\) | \(6.6\cdot 10^{-6}\) | m\(^2\)/s |
\(\alpha _{L}\) | 0.1 | m |
\(\alpha _{T}\) | 0.01 | m |
\(\lambda _{x}\) | 0.2 | m |
\(\lambda _{z}\) | 0.1 | m |
\(\sigma ^{2}_{\log k}\) | 2 |
5.2 Viscous fingering
5.3 Unstable flow in highly heterogeneous media
5.4 Dual-porosity and discontinuous permeabilities
6 Conclusions
SECUReFoam
for the computational modelling of various porous media flow and transport problems. An important element of this work is the combination of geostatistical tools with partial differential equations solvers. We focused here on a very general yet simple approach to generate discontinuous random fields (for porosity, permeability and other properties), namely the truncated pluri-Gaussian simulation. We have limited our attention to unconditioned fields although it is possible to extend this to assimilate real-data by conditioning the random fields. The numerical implementation of continuous and truncated random fields is based on the explicit spectral representation evaluated in each mesh points rather than Discrete Fourier Transform, therefore independent from the space discretisation and making it suitable for the use with non-structured, non-orthogonal, and locally refined meshes, which are very common in geosciences. Future work will include the conditioning on real data (kriging) and the extension to arbitrary anisotropic correlation matrices including rotations, or more general transformation matrices, allowing therefore more flexibility in the orientation of the facies.