Source-linked AI summary

The Open Porous Media Flow Reservoir Simulator

Atgeirr Flø Rasmussen, Tor Harald Sandve, Kai Bao, Andreas Lauser, Joakim Hove, Bård Skaflestad, Robert Klöfkorn, Markus Blatt, Alf Birger Rustad, Ove Sævareid, Knut-Andreas Lie, Andreas Thune

arXiv:1910.06059v1cs.OHphysics.comp-ph

TL;DR

OPM Flow addresses the need for long-lasting, efficient, well-maintained open-source porous-media simulation software and open data sets for benchmarking and comparison. It provides an industrial-use reservoir simulator with fully implicit models, automatic differentiation, and support for industry-standard formats; examples show agreement with ECLIPSE 100 and scaling up to sixteen cores, while some input features and convergence limit its scope.

  • Problem

    The OPM initiative seeks long-lasting, efficient, and well-maintained open-source software and open data sets for simulating, benchmarking, comparing, and testing porous-media models and implementations.

  • Method

    OPM Flow combines fully implicit black-oil-type reservoir models, automatic differentiation, industry-standard input and output formats, and staged parsing that converts deck data into semantically consistent simulator state.

  • Results

    OPM Flow agrees excellently with ECLIPSE 100 on benchmark well responses and scales well on tested models up to sixteen cores, although linear-solver and I/O scaling degrade beyond sixteen MPI processes.

  • Takeaways & Limitations

    The numerical examples include synthetic fluid-behavior cases, well-focused cases, the Norne field case, and a polymer example demonstrating industrial-field applicability and EOR capabilities.

  • Takeaways & Limitations

    OPM Flow does not yet support all ECLIPSE keywords and features, and convergence issues limit expected parallel scaling beyond sixteen cores in the 2019.10 release.

Abstract

from arXiv · show

The Open Porous Media (OPM) initiative is a community effort that encourages open innovation and reproducible research for simulation of porous media processes. OPM coordinates collaborative software development, maintains and distributes open-source software and open data sets, and seeks to ensure that these are available under a free license in a long-term perspective. In this paper, we present OPM Flow, which is a reservoir simulator developed for industrial use, as well as some of the individual components used to make OPM Flow. The descriptions apply to the 2019.10 release of OPM.

1. Introduction

OPM promotes open, reproducible porous-media simulation through collaboratively developed software and open datasets. Its software is modular, openly contributed, and distributed with free licenses and supporting test data.

  • OPM was established to support open innovation and reproducible research in porous-media modelling and simulation.
  • Open datasets enable benchmarking, comparison, and testing of mathematical models, computational methods, and software implementations.
  • The OPM suite focuses primarily on reservoir simulation and includes OPM Flow, upscaling tools, and supporting or experimental software.
  • OPM Flow is organized across six GitHub-hosted modules and uses established frameworks and libraries to reduce maintenance costs and improve software quality.
  • All OPM source code contributions use GitHub pull requests, with review and maintainer discussion covering software, documentation, reports, and bug fixes.

2. OPM Flow

OPM Flow is an open, industrially oriented reservoir simulator designed to reproduce realistic reservoir, fluid, and well behaviour while supporting research extensions. It uses fully implicit numerical models, automatic differentiation, and documented input processing, with demonstrated benchmark and parallel-simulation capabilities subject to convergence and feature limits.

  • OPM Flow targets both commercial-simulator replacement for conventional hydrocarbon assets and research prototyping in realistic, industry-relevant settings.
  • Automatic differentiation avoids hand-coded analytical Jacobians and facilitates extensions such as CO2 injection, enhanced oil recovery, and sensitivity calculations.
  • The simulator discretizes black-oil flow equations with finite volumes and implicit time integration, then solves the coupled equations using Newton-type linearization and preconditioned iterative solvers.
  • Primary variables represent phase pressure, saturations, and state-dependent composition variables, with the third variable changing when a fluid phase disappears.

2.2. Well models

OPM Flow provides standard and multi-segment well models, coupling wells to reservoir equations through fully implicit conservation and control equations. Multi-segment models resolve wellbore structure and pressure losses more flexibly, at increased computational cost.

  • Standard well model: The standard well model uses one set of primary variables per well and adequately describes most reservoir-simulation wells.For three-phase black oil, these variables are total flow rate, water and gas fractions, and bottom-hole pressure.
  • Standard well model: Cross-flow is modeled, but the standard model imposes uniform wellbore composition on all injecting connections.When this assumption is inaccurate, the multi-segment model is the alternative.
  • Multi-segment well model: Multi-segment wells divide the wellbore into an arbitrary number of segments to represent multilateral, horizontal, and other advanced wells.More segments can improve accuracy and flexibility, but increase computational cost.
  • Multi-segment well model: Each segment adds a node pressure and component-flow contributions from inlet segments and reservoir connections.Connections may be placed anywhere in a grid block, while each connection contributes to one segment.
  • Multi-segment well model: Segment pressure relations include hydrostatic, frictional, and acceleration pressure drops, while the top segment uses a well-control equation.The well equations are solved fully implicitly with the reservoir equations and inserted into the global system using a Schur complement approach.

2.3. Solution strategy

OPM Flow solves coupled reservoir and well equations with Newton-type nonlinear iterations and iterative linear solvers. Its strategy addresses convergence, Jacobian construction, extensibility, and parallel partitioning, while retaining important implementation and scalability constraints.

  • Nonlinear solution: The simulator writes the coupled reservoir and well equations as R(y) = 0 and solves them iteratively with a Newton–Raphson type method.The Jacobian construction and linearized solve are the core computational tasks.
  • Nonlinear solution: Convergence can degrade for large time steps, large solution changes, variable switching, nonsmooth constitutive functions, or loose linear-solver tolerances.The Appleyard chop limits iteration changes, while variable-switching thresholds help prevent oscillation; solver and time-step settings are case-dependent.
  • Linear solution: The linearized systems are often nonsymmetric and ill-conditioned, so OPM Flow uses iterative linear solvers with preconditioning rather than solving them directly.The current implementation stores Jacobians in Dune’s block compressed row storage structures, while the solver interface can support other packages.
  • Automatic differentiation: Automatic differentiation replaces manually coded Jacobian derivatives by propagating values and relevant partial derivatives through arithmetic and mathematical operations.OPM developed its own library because existing packages did not provide the desired flexibility, performance, and licensing characteristics.
  • Automatic differentiation: The AD implementation can be slower than a well-tuned hand-written Jacobian, although hand-written derivatives for arbitrary extensions are time-consuming and error-prone.This is an explicit performance trade-off of the extensibility-oriented approach.
  • Parallelization: Parallel setup reads the complete sequential input file and initially constructs the entire grid, creating a potential scalability bottleneck for large core counts.The supplied passage identifies this as a limitation of the current data and initialization workflow.

2.6. I/O in OPM Flow

OPM Flow provides industry-compatible input and output handling through a two-stage parser, ECLIPSE-compatible files, and support for extended reservoir models. Its I/O framework is broad and documented, but does not yet cover every ECLIPSE keyword or feature.

  • OPM Flow reads ECLIPSE input decks and writes compatible outputs because these formats dominate industry pre- and post-processing.
  • The input deck is organized into sections for dimensions, grid, properties, regions, initial conditions, summary output, and well schedules.
  • The parser is extensively documented and tested on industry decks, but OPM Flow does not yet support all ECLIPSE keywords and features.
  • Parsing first resolves strings, includes, defaults, multipliers, and numerical types into Opm::Deck, then builds semantically consistent Opm::EclipseState objects.
  • OPM Flow outputs summary, restart, INIT, EGRID, RFT, PRT, and optional VTK files for time-series analysis, restarting, visualization, and reservoir diagnostics.
  • Its binary outputs can be viewed by Petrel, S3Graf, RMS, and ResInsight, and ECLIPSE can restart simulations from them.
  • OPM Flow also includes solvent and polymer models that extend black-oil simulation with additional components and their effects on flow properties.

3. Numerical examples and results

OPM Flow is evaluated on synthetic benchmarks, a real field case, and a polymer example spanning black-oil, compositional, well, and EOR functionality. Across the reported comparisons, its well responses generally agree closely with ECLIPSE, including for the complex Norne case.

  • The examples cover synthetic fluid-behavior cases, a realistic well case, the Norne field, and polymer-enhanced oil recovery.
  • 3.1. SPE 1 benchmark: OPM Flow shows excellent agreement with ECLIPSE for SPE 1 well responses in the second black-oil benchmark case.
  • 3.3. SPE 5 benchmark: OPM Flow and ECLIPSE generally agree for SPE 5 solvent simulations, with minor discrepancies in gas production rate and injector bottom-hole pressure.
  • 3.4. SPE 9 benchmark: OPM Flow and ECLIPSE show excellent agreement for SPE 9 well curves while exercising the well model, reservoir interaction, and pressure-dependent gas appearance.
  • 3.5. Norne: The Norne case uses a complex, unstructured faulted grid and includes hysteresis, endpoint scaling, oil vaporization control, and multiple saturation regions, yet matches ECLIPSE excellently.
  • 3.6. Polymer example: The polymer example reports well responses for four configurations, including injector bottom-hole-pressure changes when polymer injection begins.

PERMX (md)

OPM Flow is evaluated against ECLIPSE across polymer flooding, serial and parallel reservoir simulations, and ensembles. Results show close agreement in polymer responses, case-dependent serial performance, useful scaling up to sixteen cores, and ensemble runs that are slower on average.

  • Polymer flooding: The polymer example shows reduced injection rate when polymer decreases injectivity, while shear-thinning preserves the target rate below the pressure limit.Shear-thickening decreases the injection rate further, and the example is intended for verification rather than real polymer-flooding practice.
  • Polymer flooding: Good agreement is observed between OPM Flow and ECLIPSE for all four polymer-flooding configurations.The comparison covers injector bottom-hole pressure and water rate, plus producer water rates and water cuts.
  • Serial performance: For very small SPE1 and SPE3 cases, OPM Flow has serial performance comparable to ECLIPSE 100, while ECLIPSE is approximately twice as fast on SPE9.SPE1 and SPE3 finish within a couple of seconds, whereas SPE9 takes around ten seconds on a modern CPU.
  • Serial performance: Norne runtimes are similar, with about a ten percent advantage for ECLIPSE 100 using precompiled OPM Flow packages, but source compilation reverses the comparison.The Norne model typically takes around ten minutes on a fast CPU.
  • Parallel scaling: OPM Flow scales well on both Norne and the proprietary model up to sixteen cores, while scaling beyond sixteen cores is limited by convergence issues.On the proprietary model, ECLIPSE 100 becomes much slower than its single-CPU runtime when using eight or sixteen CPUs.
  • Parallel scaling: Parallel execution reduces total time, but efficiency drops as MPI-processes increase because of linear-solver communication overhead and poorly scaling I/O.The linear solver shows little improvement beyond 16 MPI-processes, and I/O can exceed matrix-assembly time at 48 and 64 processors.
  • Ensemble performance: The Norne ensemble averages 690 seconds with OPM Flow versus 562 seconds with ECLIPSE, making OPM Flow approximately 25% slower.Both simulators complete the ensemble without severe convergence issues, using their respective default tuning parameters.

4. Summary and Outlook

The paper presents OPM Flow as a continuously developing simulator and reports that OPM provides a robust base for research and industrial applications. Its open, industrial-strength platform is intended to shorten the research cycle while satisfying engineering requirements.

  • 4. Summary and Outlook: OPM Flow is continuously developed, with planned additions including adjoint calculations, higher-order discretizations, CO2 fluid models, and sequential implicit methods.These features were identified as being in development at the time of the 2019.10 release.
  • 4. Summary and Outlook: The authors consider OPM a robust base for both research and industrial applications.The conclusion is stated for the software as described at the time of writing.
  • 4. Summary and Outlook: An industrial-strength platform can help shorten the research cycle while meeting engineering requirements.The paper connects this role to building and testing research methods on the platform.

Appendix A.1. Symbol definitions for the continuous equations

The continuous black-oil equations use symbols for rock, fluid, gravity, well, and phase-flow properties. These definitions specify the physical quantities and constitutive factors used in the model.

  • Rock properties: mφ is the pressure-dependent pore-volume multiplier, while φref is the spatially varying reference porosity.The multiplier is a function of pressure; the reference porosity is constant in time.
  • Fluid properties: bα is the phase shrinkage or expansion factor, defined as surface volume divided by reservoir volume for a given fluid amount.Its reciprocal is the formation volume factor Bα, and bα commonly depends on pressure and composition.
  • Composition: rgo and rog denote dissolved-gas-to-oil and vaporized-oil-to-gas ratios, respectively.The paper notes that these quantities are often called rS and rV in other literature.
  • Phase and rock flow: sα is phase saturation, pc,αβ is interphase capillary pressure, and K is porous-medium permeability.Saturations sum to 1, capillary pressure typically depends on saturation, and permeability characterizes the porous medium.
  • Phase and rock flow: kr,α is relative permeability, modeling the reduction in effective permeability caused by the presence of other phases.The paper typically treats it as saturation-dependent.
  • Fluid properties: µα denotes phase viscosity, and ρα denotes reservoir density, with density relations incorporating shrinkage factors and dissolved or vaporized components.The oil and gas density expressions include rgo and rog, respectively.
  • Gravity and wells: g is the gravitational acceleration vector, while qα is the pseudo-component well outflux density and is negative for well inflows.The form of qα depends on the selected well model.

Appendix A.2. Symbol definitions for the discrete equations

The discrete equations introduce timestep, transmissibility, connectivity, upwinding, potential, gravity, and cell-depth symbols. Together, these quantities describe intercellular phase-flow calculations.

  • Time discretization: ∆t denotes the time-step length for the current Euler step.
  • Connections: Tij is the transmissibility factor for a cell connection, while mT is its pressure-dependent multiplier.The transmissibility factor is derived from permeability.
  • Connections: C(i) is the set of cells connected to cell i, and U(α, ij) identifies the upwind cell for phase α on connection ij.
  • Potential and geometry: ∆Φα,ij is the oriented potential difference for phase α across the connection between cells i and j.
  • Potential and geometry: g denotes gravitational acceleration in the z-direction, while zi is the depth of cell i’s center.

Appendix A.3. Symbol definitions for the well models

This appendix defines quantities used in well models, including connection transmissibility, grid-block pressure, bottom-hole pressure, and wellbore pressure differences.

  • Tw,j is the connection transmissibility factor.
  • pj denotes the pressure of the grid block containing connection j.
  • pbhp,w denotes the bottom-hole pressure of well w.
  • hw,j denotes the pressure difference between connection j and the well’s bottom-hole datum depth.
  • Figure B.22 identifies the quantities used to compute transmissibility between two cells.

Appendix B. Transmissibility

The appendix derives transmissibility as a discrete measure of fluid-flow capacity between cells using Darcy’s law and interface-pressure matching. It also describes pressure-dependent transmissibility multipliers for modeling sub-scale features such as fractures.

  • Definition: Transmissibility Tij is defined as a discrete measure of the fluid-flow capacity of a connection between two cells.The definition requires the discrete flow equations to hold for a piecewise homogeneous medium with a Darcy-law velocity field.
  • Derivation assumptions: The derivation simplifies the discrete equations by considering a single incompressible fluid and ignoring gravity.The viscosity is also set to 1 without loss of generality.
  • Flux approximation: The flux between cells is evaluated at the common-face centroid using the face normal and Darcy’s law in both cells.The face quantities include the area of Fij and pressures in cells i and j at the face centroid.
  • Half-transmissibility: Half-transmissibility tij is defined for cell i with respect to the common face Fij, after approximating the flux from both adjacent cells.The construction uses the face area and pressures at the common-face centroid.
  • Interface condition: Equal interface pressures are imposed to obtain the transmissibility relation between the two cells.
  • Modeling tool: Pressure-dependent multipliers mT can model fractures opening or closing by changing transmissibilities without explicitly representing the fractures.
Loading 1910.06059v1…