Numerical artifacts in the Generalized Porous Medium Equation: Why harmonic averaging itself is not to blame

Danielle C. Maddix, Luiz Sampaio, Margot Gerritsen

Abstract

The Generalized Porous Medium Equation (GPME) is a degenerate parabolic equation critical for modeling various physical phenomena, yet it is prone to numerical artifacts such as locking, lagging, and temporal oscillations. While harmonic averaging is frequently cited as the cause of these issues, this study utilizes modified equation analysis to demonstrate that these artifacts arise from specific leading-order error terms. We propose the Modified Harmonic Method (MHM), which explicitly cancels these errors. Our results show that MHM eliminates numerical artifacts and maintains high accuracy, proving that harmonic averaging is not inherently flawed but requires precise error compensation.

Introduction

The Generalized Porous Medium Equation (GPME) models phenomena where the diffusion coefficient vanishes as the primary variable (density or pressure) approaches zero. This "degeneracy" makes the GPME a challenging target for numerical simulation. Practitioners often encounter three distinct numerical "headaches":

  1. Locking: The solution's moving front prematurely stalls.
  2. Lagging: The numerical front propagates significantly slower than the physical front.
  3. Temporal Oscillations: High-frequency "wiggles" appear in the solution over time, which surprisingly do not disappear even when the spatial grid is refined.

Historically, these artifacts led researchers to favor arithmetic averaging over harmonic averaging. However, arithmetic averaging can be overly diffusive and physically inaccurate in reservoir simulations. This work investigates whether harmonic averaging can be corrected rather than discarded.

Solution profiles for self-sharpening (a) and moving interface (b) examples, illustrating the typical behavior of GPME solutions over time.

Methodology: Modified Equation Analysis

To identify the root cause of these artifacts, the authors employ Modified Equation Analysis. By applying Taylor series expansions to the numerical discretization, they derive the "modified" PDE that the scheme actually solves.

Comparing the modified equations for arithmetic and harmonic schemes reveals that harmonic averaging introduces two unique leading-order error terms: an anti-diffusive term and an advective term. Temporal oscillations occur when the discretization errors are so large and "anti-diffusive" that the effective diffusion coefficient of the numerical scheme becomes negative near the front.

The Modified Harmonic Method (MHM)

To address this, the authors developed the Modified Harmonic Method (MHM), a Lax-Wendroff style approach. Instead of switching to arithmetic averaging, MHM retains the harmonic framework but explicitly subtracts the identified leading-order error terms from the numerical scheme. This targeted cancellation effectively "cancels out" the math that causes the locking, lagging, and oscillations.

Results and Discussion

The MHM successfully eliminated temporal oscillations and corrected the front speed (lagging/locking) across all test cases, including the notoriously difficult "superslow" diffusion model.

Comparison of numerical artifacts: Standard harmonic averaging (blue triangles) exhibits significant lagging in the spatial profile (a) and severe temporal oscillations in the time profile (b) compared to the reference solution.

As shown in the comparison above, standard harmonic averaging suffers from pronounced lagging and oscillations. Notably, in the "Locking Problem," MHM was found to be more accurate than arithmetic averaging, which tended to predict a front that moved slightly too fast. The method maintains second-order spatial accuracy in smooth regions while remaining stable at sharp fronts.

Key Insights

  • Harmonic Averaging is Not Broken: The artifacts are a result of a specific error profile that becomes visible on coarse grids, not an inherent flaw in the averaging logic.
  • Coupled Errors: Lagging and oscillations are two sides of the same coin. Fixing only the anti-diffusive error term might stop the wiggles but won't fix the front speed; both advective and diffusive error terms must be counteracted.
  • Local Adaptability: Because the MHM identifies exactly where the errors come from, it can be applied locally (using a "switch") only in regions with sharp gradients, preserving the benefits of standard harmonic averaging elsewhere.

Conclusion and Future Work

This study clarifies that numerical artifacts in GPME simulations are not an indictment of harmonic averaging itself. By identifying and canceling the specific error terms responsible, the Modified Harmonic Method provides a robust alternative that preserves the physical accuracy of harmonic schemes. Future work will extend MHM to multi-dimensional cases and more complex temporal schemes, such as TVD Runge-Kutta methods.

Summary updated

Abstract

The degenerate parabolic Generalized Porous Medium Equation (GPME) poses numerical challenges due to self-sharpening and its sharp corner solutions. For these problems, we show results for two subclasses of the GPME with differentiable $k(p)$ with respect to $p$, namely the Porous Medium Equation (PME) and the superslow diffusion equation. Spurious temporal oscillations, and nonphysical locking and lagging have been reported in the literature. These issues have been attributed to harmonic averaging of the coefficient $k(p)$ for small $p$, and arithmetic averaging has been suggested as an alternative. We show that harmonic averaging is not solely responsible and that an improved discretization can mitigate these issues. Here, we investigate the causes of these numerical artifacts using modified equation analysis. The modified equation framework can be used for any type of discretization. We show results for the second order finite volume method. The observed problems with harmonic averaging can be traced to two leading error terms in its modified equation. This is also illustrated numerically through a Modified Harmonic Method (MHM) that can locally modify the critical terms to remove the aforementioned numerical artifacts.
BibTeX
@article{maddix2018numerical,
  author = {Danielle C. Maddix and Luiz Sampaio and Margot Gerritsen},
  title = {{Numerical artifacts in the Generalized Porous Medium Equation: Why harmonic averaging itself is not to blame}},
  journal = {Journal of Computational Physics},
  year = {2018},
  doi = {10.1016/j.jcp.2018.02.010},
}
Figure