Search arXivSearch

arXiv · 2501.19076

An advanced fully-implicit solver for heterogeneous porous media based on foam-extend

Abstract

The study of multiphase flows in porous media is fundamental to various fields, including oil recovery, CO2 sequestration, hydrogeology, and others. Accurate predictions of fluid behavior in these systems can enhance process efficiency while mitigating environmental and health risks. In this context, numerical simulation serves as a powerful tool for anticipating complex flow phenomena and optimizing engineering strategies. Both commercial simulators and open-source softwares, such as the porousMultiphaseFoam repository based on the OpenFOAM framework, have been developed to model these processes. However, simulating heterogeneous porous media with complex porosity and permeability distributions poses significant numerical challenges. To address these, we introduce coupledMatrixFoam, a new OpenFOAM-based solver designed for enhanced robustness and numerical stability. coupledMatrixFoam integrates the Eulerian multi-fluid formulation for phase fractions with Darcy's law for porous media flow, employing a fully implicit, block-coupled solution for the governing equations. Built on foam-extend 5.0, it leverages 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 development, implementation, and validation of coupledMatrixFoam, including comparisons with porousMultiphaseFoam to assess performance improvements. Additionally, a scalability analysis is conducted, demonstrating the solver's suitability for high-performance computing (HPC) applications, which are essential for large-scale, real-world simulations.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Roberto Lange, Gabriel M. Magalhães, Franciane F. Rocha, Hélio R. Neto. 2025-09-16. An advanced fully-implicit solver for heterogeneous porous media based on foam-extend. https://doi.org/10.1016/j.cpc.2025.109842

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Kinetic closure of turbulence

This letter presents a kinetic closure of the filtered Boltzmann--BGK equation, paving the way toward an alternative description of turbulence. The closure retains the turbulent subfilter stress tensor without a separate Smagorinsky-type ansatz for its structure, unlike classical filtered Navier--Stokes closures. In contrast, it accounts for the subfilter turbulent diffusion in the nonconserved moments by generalizing the BGK collision operator. The model does not require scale separation between resolved and unresolved scales. The Chapman--Enskog analysis shows how its hydrodynamic limit can converge to the filtered Navier--Stokes equations, with velocity gradients isolating subfilter contributions. Numerical tests on the Taylor--Green vortex and the turbulent mixing layer show improved stability and reduced dissipation in the reported cases, benchmarked against the Smagorinsky model.

physics.flu-dyn

Kinetic closure of turbulence: collision-side modeling beyond the filtered Boltzmann equation

This article extends a recently introduced kinetic closure of turbulence by developing its theoretical framework, operational realizations, and validation. In contrast with filtered Navier--Stokes formulations, filtering the Boltzmann equation retains subgrid transport under the linear streaming operator, so that unresolved physics is concentrated on the collision side. We show that in dilute-gas large-eddy simulation, the main limitation of Bhatnagar--Gross--Krook (BGK)-type collision models is not the breakdown of molecular chaos, but the retention of a Markovian collision at a scale where filtering can induce finite temporal correlations in the collision product. In a BGK-type framework, the closure problem is dual: one must infer the filtered fine-grained equilibrium, not computable from filtered moments alone, and model the non-Markovian collision dynamics generated by the collision-product covariance. The present framework makes this dual structure explicit and represents the resulting collision-covariance source term through a BGK-like closure built from the equilibrium commutation residual, with the turbulent relaxation frequency given by a first phenomenological realization. The framework relies on a Chapman--Enskog analysis organized by the reference timescale ratio emerging from the nondimensionalization of the kinetic equation, performed in the classical sense, thereby avoiding artificial turbulent scale separations. We show that the Chapman--Enskog structure is not a pure one-parameter Knudsen scaling: the primary ordering is set by the kinetic-to-macroscopic timescale ratio, while higher moments retain an additional Mach dependence through the mixed scaling of particle velocity. The resulting kinetic closures are validated through lattice Boltzmann simulations and compared with the Smagorinsky model and regularization-based collision models.

physics.flu-dyn

Deep Koopman Sensing

Real-time reconstruction of fluid flows from sparse sensor measurements is important for both physical understanding and flow control. When first-principles models are too expensive for online data assimilation (DA), learned reduced-order models provide an efficient alternative, but are commonly optimized for forward prediction rather than state estimation. We propose Deep Koopman Sensing, a data-driven reduced-order DA framework that combines a nonlinear autoencoder with parameter-conditioned linear latent dynamics approximating the Koopman operator. We compare the proposed model with parametric dynamic mode decomposition (pDMD), a multilayer perceptron (MLP), and xLSTM across four benchmarks: 1D viscous Burgers, 2D flow past a cylinder, 2D dambreak, and 3D flow past a sphere. Our results reveal a marked distinction between forecasting and sensing: open-loop accuracy does not reliably predict assimilation performance, while Deep Koopman Sensing achieves the lowest assimilation error across all four benchmarks. More importantly, with an extended Kalman filter, incorporating sensor measurements improves the estimates of both linear latent models across all four benchmarks, whereas it degrades the nonlinear models, despite their strong open-loop performance. With ensemble filtering, the nonlinear models are no longer degraded by assimilation, while the Koopman model still attains the lowest assimilation error. These results show that latent dynamics should be designed for the downstream estimation task rather than selected solely for forecast accuracy, and demonstrate Koopman-based reduced-order modeling as an effective approach for real-time flow reconstruction from sparse, streaming measurements.

physics.flu-dyn