An advanced fully-implicit solver for heterogeneous porous media based on foam-extend
Description
Multiphase flow in porous media is present in many engineering applications, including hydrogeology, oil recovery, and CO2 sequestration. Accurate predictions of fluid behavior in these systems can improve process efficiency while mitigating environmental and health risks. Commercial simulators and open source software, such as the porousMultiphaseFoam repository based on the OpenFOAM framework, have been developed to model this type of problem. However, simulating heterogeneous porous media with heterogeneous porosity and permeability distributions poses significant numerical challenges. We introduce coupledMatrixFoam, an OpenFOAM-based solver designed for enhanced numerical stability and robustness. coupledMatrixFoam integrates the Eulerian multi-fluid formulation for phase fractions with Darcy's law for porous media flow, applying a fully implicit, block-coupled solution for pressure and phase fractions. The solver is based on foam-extend 5.0, leveraging the latest fvBlockMatrix developments to improve computational efficiency. This approach enables a significant increase in time step sizes, particularly in cases involving capillary pressure effects and other complex physical interactions. This work details the formulation, implementation and validation of coupledMatrixFoam, including comparisons with porousMultiphaseFoam that uses a segregated approach, to assess performance improvements. Additionally, a scalability analysis is conducted, demonstrating the solver's ability for high-performance computing (HPC) applications, which are essential for large-scale, real-world simulations.