Dynamic matrix compression: A new perspective on two-phase flows.

Keywords

Abstract

Simulations to predict two-phase flows in porous media require the solution of large systems of nonlinear equations, typically addressed using a Newton-type method. A major computational cost in this Simulations to predict two-phase flows in porous media require the solution of large systems of nonlinear equations, typically addressed using a Newton-type method. A major computational cost in this process is often the assembly, storage, and evaluation of the underlying sparse Jacobian matrices. It is well-known that automatic differentiation is capable of exploiting this sparsity structure by first representing the Jacobian by a matrix compression from which the Jacobian is then reconstructed. This work introduces a novel matrix compression strategy that enables the efficient construction of a sequence of Jacobian matrices with varying sparsity patterns. In contrast to a standard approach which, in a static fashion, computes a matrix compression from scratch at every Newton iteration, the new dynamic strategy reduces the computational effort by updating all sparsity-exploiting data structures incrementally. For an immiscible flow of two fluids moving through the pore space without mass exchange, the resulting dynamic approach is shown to speed up the construction of matrix compressions by a factor of up to 400.