Flow – an open source research tool forreservoir simulation
Robert Klöfkorn – IRIS & The National IOR Centre of Norway
April 27, 2016
Task 6 – Reservoir Simulation Tools
Pål (PostDoc UiS) Trine (PostDoc IRIS) Anna (PhDUiS/IRIS)
Steinar (Prof. UiS) Ove (IRIS) Robert (IRIS)Task Leader
Svein (Prof. UiS)Task Leader
Outline
1. Current status of OPM-Flow
2. Research Activities in Task 6Higher order schemes for reactive advection-diffusionModeling reactive advection-diffusion
3. Summary
2 / 23 Robert Klöfkorn
Outline
1. Current status of OPM-Flow
2. Research Activities in Task 6Higher order schemes for reactive advection-diffusionModeling reactive advection-diffusion
3. Summary
3 / 23 Robert Klöfkorn
Open Porous Media Initiative (OPM)OPM encourages open innovation and reproducible research for modeling andsimulation of porous media processes. All OPM software is open-source.
Main contributors
I Statoil ASA (Alf B. Rustad, Joakim Hove, and many more)I SINTEF ICT (group of K.A. Lie, Atgeirr Rasmussen and many more)I IRIS Energy (Reservoir group)I Ceetron Solutions ASI A. Lauser (Poware)I M. Blatt (Dr. Blatt HPC Simulation and Service)
Other (current and former) partners:I Uni Research CIPRI University of BergenI TotalI University of StuttgartI University of Heidelberg
www.opm-project.org
4 / 23 Robert Klöfkorn
Open Porous Media Initiative (OPM)OPM encourages open innovation and reproducible research for modeling andsimulation of porous media processes. All OPM software is open-source.
Main contributors
I Statoil ASA (Alf B. Rustad, Joakim Hove, and many more)I SINTEF ICT (group of K.A. Lie, Atgeirr Rasmussen and many more)I IRIS Energy (Reservoir group)I Ceetron Solutions ASI A. Lauser (Poware)I M. Blatt (Dr. Blatt HPC Simulation and Service)
Other (current and former) partners:I Uni Research CIPRI University of BergenI TotalI University of StuttgartI University of Heidelberg
www.opm-project.org
4 / 23 Robert Klöfkorn
Open Porous Media Initiative (OPM)OPM encourages open innovation and reproducible research for modeling andsimulation of porous media processes. All OPM software is open-source.
Main contributors
I Statoil ASA (Alf B. Rustad, Joakim Hove, and many more)I SINTEF ICT (group of K.A. Lie, Atgeirr Rasmussen and many more)I IRIS Energy (Reservoir group)I Ceetron Solutions ASI A. Lauser (Poware)I M. Blatt (Dr. Blatt HPC Simulation and Service)
Other (current and former) partners:I Uni Research CIPRI University of BergenI TotalI University of StuttgartI University of Heidelberg
www.opm-project.org
4 / 23 Robert Klöfkorn
Open Porous Media Initiative (OPM)
Installation (releases twice a year):
Open-source (GPL v3+)
I Ubuntu/Red Hat packing systemI Run OPM-Flow using a virtual machineI Install from source on Linux and Mac OS X
5 / 23 Robert Klöfkorn
Open Porous Media Initiative (OPM)
Installation (releases twice a year):
Open-source (GPL v3+)
I Ubuntu/Red Hat packing systemI Run OPM-Flow using a virtual machineI Install from source on Linux and Mac OS X
5 / 23 Robert Klöfkorn
Open Porous Media Initiative (OPM)
Installation (releases twice a year): Open-source (GPL v3+)I Ubuntu/Red Hat packing systemI Run OPM-Flow using a virtual machineI Install from source on Linux and Mac OS X
5 / 23 Robert Klöfkorn
OPM-Flow Features
Fully implicit model formulation based on Automatic Differentiation:I black-oil with dissolved gas and vaporized oilI rock-dependent capillary and relative-permeability curvesI end-point scaling and hysteresisI oil vaporization control
EOR options:I Todd-Longstaff type polymer model with adsorption, dead-pore space,
permeability reduction, and shear effects (Flow-polymer)I extra component equation(s), such as a solvent model (Flow-solvent)
Performance:I 2014: ≈ 60× slower than Eclipse100 on SPE cases
I 2015: ≈ 8× slower than Eclipse100 on Norne field modelI 2016: ≈ 2.2× slower than Eclipse100 on Norne field model
Other features:I Code review via github merge requestsI Performance monitoring on linuxbenchmarking.orgI Parallel version of flow working for limited number of cores
6 / 23 Robert Klöfkorn
OPM-Flow Features
Fully implicit model formulation based on Automatic Differentiation:I black-oil with dissolved gas and vaporized oilI rock-dependent capillary and relative-permeability curvesI end-point scaling and hysteresisI oil vaporization control
EOR options:I Todd-Longstaff type polymer model with adsorption, dead-pore space,
permeability reduction, and shear effects (Flow-polymer)I extra component equation(s), such as a solvent model (Flow-solvent)
Performance:I 2014: ≈ 60× slower than Eclipse100 on SPE cases
I 2015: ≈ 8× slower than Eclipse100 on Norne field modelI 2016: ≈ 2.2× slower than Eclipse100 on Norne field model
Other features:I Code review via github merge requestsI Performance monitoring on linuxbenchmarking.orgI Parallel version of flow working for limited number of cores
6 / 23 Robert Klöfkorn
OPM-Flow Features
Fully implicit model formulation based on Automatic Differentiation:I black-oil with dissolved gas and vaporized oilI rock-dependent capillary and relative-permeability curvesI end-point scaling and hysteresisI oil vaporization control
EOR options:I Todd-Longstaff type polymer model with adsorption, dead-pore space,
permeability reduction, and shear effects (Flow-polymer)I extra component equation(s), such as a solvent model (Flow-solvent)
Performance:I 2014: ≈ 60× slower than Eclipse100 on SPE cases
I 2015: ≈ 8× slower than Eclipse100 on Norne field modelI 2016: ≈ 2.2× slower than Eclipse100 on Norne field model
Other features:I Code review via github merge requestsI Performance monitoring on linuxbenchmarking.orgI Parallel version of flow working for limited number of cores
6 / 23 Robert Klöfkorn
OPM-Flow Features
Fully implicit model formulation based on Automatic Differentiation:I black-oil with dissolved gas and vaporized oilI rock-dependent capillary and relative-permeability curvesI end-point scaling and hysteresisI oil vaporization control
EOR options:I Todd-Longstaff type polymer model with adsorption, dead-pore space,
permeability reduction, and shear effects (Flow-polymer)I extra component equation(s), such as a solvent model (Flow-solvent)
Performance:I 2014: ≈ 60× slower than Eclipse100 on SPE casesI 2015: ≈ 8× slower than Eclipse100 on Norne field model
I 2016: ≈ 2.2× slower than Eclipse100 on Norne field model
Other features:I Code review via github merge requestsI Performance monitoring on linuxbenchmarking.orgI Parallel version of flow working for limited number of cores
6 / 23 Robert Klöfkorn
OPM-Flow Features
Fully implicit model formulation based on Automatic Differentiation:I black-oil with dissolved gas and vaporized oilI rock-dependent capillary and relative-permeability curvesI end-point scaling and hysteresisI oil vaporization control
EOR options:I Todd-Longstaff type polymer model with adsorption, dead-pore space,
permeability reduction, and shear effects (Flow-polymer)I extra component equation(s), such as a solvent model (Flow-solvent)
Performance:I 2014: ≈ 60× slower than Eclipse100 on SPE casesI 2015: ≈ 8× slower than Eclipse100 on Norne field modelI 2016: ≈ 2.2× slower than Eclipse100 on Norne field model
Other features:I Code review via github merge requestsI Performance monitoring on linuxbenchmarking.orgI Parallel version of flow working for limited number of cores
6 / 23 Robert Klöfkorn
OPM-Flow Features
Fully implicit model formulation based on Automatic Differentiation:I black-oil with dissolved gas and vaporized oilI rock-dependent capillary and relative-permeability curvesI end-point scaling and hysteresisI oil vaporization control
EOR options:I Todd-Longstaff type polymer model with adsorption, dead-pore space,
permeability reduction, and shear effects (Flow-polymer)I extra component equation(s), such as a solvent model (Flow-solvent)
Performance:I 2014: ≈ 60× slower than Eclipse100 on SPE casesI 2015: ≈ 8× slower than Eclipse100 on Norne field modelI 2016: ≈ 2.2× slower than Eclipse100 on Norne field model
Other features:I Code review via github merge requestsI Performance monitoring on linuxbenchmarking.orgI Parallel version of flow working for limited number of cores
6 / 23 Robert Klöfkorn
NORNE field model (SOIL)
Visualization with ResInsight
7 / 23 Robert Klöfkorn
NORNE field model (SWAT)
Visualization with ResInsight
8 / 23 Robert Klöfkorn
NORNE field model (D-2H)
0
50
100
150
200
250
300
0 500 1000 1500 2000 2500 3000 3500
WB
HP
days
ECL.2014.2OPM-Flow
0
1000
2000
3000
4000
5000
6000
7000
8000
0 500 1000 1500 2000 2500 3000 3500
WO
PR
days
ECL.2014.2OPM-Flow
0
500
1000
1500
2000
2500
0 500 1000 1500 2000 2500 3000 3500
WW
PR
days
ECL.2014.2OPM-Flow
0
500000
1x106
1.5x106
2x106
2.5x106
3x106
0 500 1000 1500 2000 2500 3000 3500
WG
PR
days
ECL.2014.2OPM-Flow
9 / 23 Robert Klöfkorn
NORNE field model (E-3H)
0
50
100
150
200
250
0 500 1000 1500 2000 2500 3000 3500
WB
HP
days
ECL.2014.2OPM-Flow
0
1000
2000
3000
4000
5000
6000
0 500 1000 1500 2000 2500 3000 3500
WO
PR
days
ECL.2014.2OPM-Flow
0
100
200
300
400
500
600
700
0 500 1000 1500 2000 2500 3000 3500
WW
PR
days
ECL.2014.2OPM-Flow
0
100000
200000
300000
400000
500000
600000
0 500 1000 1500 2000 2500 3000 3500
WG
PR
days
ECL.2014.2OPM-Flow
10 / 23 Robert Klöfkorn
OPM-Flow future directions
Ongoing work:I More field cases (Model 2,...)I Enhanced solvent model (CO2,...)I Use OPM-Flow in history matching activities in Task 7I Coupling with IORSimI Improved overall performanceI Parallelization to many cores
Long term:I New non-linear solvers and splitting methodsI Higher order methods discretization methodsI Seamless integration with history matching and UQ
Except a bumpy ride.
11 / 23 Robert Klöfkorn
OPM-Flow future directions
Ongoing work:I More field cases (Model 2,...)I Enhanced solvent model (CO2,...)I Use OPM-Flow in history matching activities in Task 7I Coupling with IORSimI Improved overall performanceI Parallelization to many cores
Long term:I New non-linear solvers and splitting methodsI Higher order methods discretization methodsI Seamless integration with history matching and UQ
Except a bumpy ride.
11 / 23 Robert Klöfkorn
OPM-Flow future directions
Ongoing work:I More field cases (Model 2,...)I Enhanced solvent model (CO2,...)I Use OPM-Flow in history matching activities in Task 7I Coupling with IORSimI Improved overall performanceI Parallelization to many cores
Long term:I New non-linear solvers and splitting methodsI Higher order methods discretization methodsI Seamless integration with history matching and UQ
Except a bumpy ride.
11 / 23 Robert Klöfkorn
Outline
1. Current status of OPM-Flow
2. Research Activities in Task 6Higher order schemes for reactive advection-diffusionModeling reactive advection-diffusion
3. Summary
12 / 23 Robert Klöfkorn
Reactive Advection-Diffusion Problems
Motivation
Unlike water fronts, polymer fronts described by linear waves are not self-sharpening.
φ∂tc+∇ ·(uc−D(u)∇c
)= S(c)
Low Order Finite Volume Higher Order Finite Volume
R. Klöfkorn, D. Kröner, and M. Ohlberger. Local adaptive methods for convection dominatedproblems. Int. J. Numer. Methods Fluids, 40(1-2):79–91, 2002.
13 / 23 Robert Klöfkorn
Reactive Advection-Diffusion Problems
Motivation
Unlike water fronts, polymer fronts described by linear waves are not self-sharpening.
φ∂tc+∇ ·(uc−D(u)∇c
)= S(c)
Low Order Finite Volume
Higher Order Finite Volume
R. Klöfkorn, D. Kröner, and M. Ohlberger. Local adaptive methods for convection dominatedproblems. Int. J. Numer. Methods Fluids, 40(1-2):79–91, 2002.
13 / 23 Robert Klöfkorn
Reactive Advection-Diffusion Problems
Motivation
Unlike water fronts, polymer fronts described by linear waves are not self-sharpening.
φ∂tc+∇ ·(uc−D(u)∇c
)= S(c)
Low Order Finite Volume Higher Order Finite Volume
R. Klöfkorn, D. Kröner, and M. Ohlberger. Local adaptive methods for convection dominatedproblems. Int. J. Numer. Methods Fluids, 40(1-2):79–91, 2002.
13 / 23 Robert Klöfkorn
Reactive Advection-Diffusion Problems
Motivation
Unlike water fronts, polymer fronts described by linear waves are not self-sharpening.
φ∂tc+∇ ·(uc−D(u)∇c
)= S(c)
Low Order Finite Volume Higher Order Finite Volume
R. Klöfkorn, D. Kröner, and M. Ohlberger. Local adaptive methods for convection dominatedproblems. Int. J. Numer. Methods Fluids, 40(1-2):79–91, 2002.
13 / 23 Robert Klöfkorn
Fully implicit higher order schemes for polymerflooding
Motivation
Unlike water fronts, polymer fronts described by linear waves are not self-sharpening.
∂tρφso +∇ ·(ρouo(sw,o)
)= 0
∂tρφsw +∇ ·(ρwuw(sw,o)
)= 0
∂tR(c, sw) +∇ ·(cρwuwp(so, sw)
)= 0
Challenges:I Fully implicit fully coupled formulationI Integration of slope limiter techniques
into OPM’s Automatic Differentiationframework
Trine S. Mykkeltvedt (IRIS), Xavier Raynaud (SINTEF), Knut-Andreas Lie (SINTEF).Fully implicit higher-order scheme applied to polymer flooding. In preparation.
14 / 23 Robert Klöfkorn
Fully implicit higher order schemes for polymerflooding
Grid = 20× 20
Grid = 50× 50
Challenges:I Fully implicit fully coupled formulationI Integration of slope limiter techniques
into OPM’s Automatic Differentiationframework
Trine S. Mykkeltvedt (IRIS), Xavier Raynaud (SINTEF), Knut-Andreas Lie (SINTEF).Fully implicit higher-order scheme applied to polymer flooding. In preparation.
14 / 23 Robert Klöfkorn
Higher order schemes in 3D on regular meshes
∂tc+∇ ·(uc) = 0
100
102
104
Logarithm of the CPU time
10-2
10-1
Logarith
m o
f th
e e
rror
L1-n
orm
Error Change w.r.t. CPU on Cartesian Grid
First Order
Second Order
EOC = 1
EOC = 0.5
Results on the Cartesian grid for thesecond order scheme (top-left) and the firstorder scheme (bottom-right).
A. Dedner and R. Klöfkorn.A Generic Stabilization Approach for Higher Order DiscontinuousGalerkin Methods for Convection Dominated Problems.J. Sci. Comput. 47(3):365–388, 2011.
15 / 23 Robert Klöfkorn
Higher order schemes in 3D on regular meshes
∂tc+∇ ·(uc) = 0
100
102
104
Logarithm of the CPU time
10-2
10-1
Logarith
m o
f th
e e
rror
L1-n
orm
Error Change w.r.t. CPU on Cartesian Grid
First Order
Second Order
EOC = 1
EOC = 0.5
Results on the Cartesian grid for thesecond order scheme (top-left) and the firstorder scheme (bottom-right).
A. Dedner and R. Klöfkorn.A Generic Stabilization Approach for Higher Order DiscontinuousGalerkin Methods for Convection Dominated Problems.J. Sci. Comput. 47(3):365–388, 2011.
15 / 23 Robert Klöfkorn
Higher order schemes on polyhedral meshes
Results on a grid consisting of hexagonalprims for the second order scheme(top-left) and the first order scheme(bottom-right).
Hexagonal prism grid
Anna Kvashchuk (UiS/IRIS), R. Klöfkorn (IRIS), and M. Nolte (Uni Freiburg).Higher Order Finite Volume Schemes on Polygonal and Polyhedral Grids.In preparation.
Anna Kvashchuk (UiS/IRIS), IOR Norway 2016, Poster.
16 / 23 Robert Klöfkorn
Higher order schemes on polyhedral meshes
Results on a grid consisting of hexagonalprims for the second order scheme(top-left) and the first order scheme(bottom-right).
Hexagonal prism grid
Anna Kvashchuk (UiS/IRIS), R. Klöfkorn (IRIS), and M. Nolte (Uni Freiburg).Higher Order Finite Volume Schemes on Polygonal and Polyhedral Grids.In preparation.
Anna Kvashchuk (UiS/IRIS), IOR Norway 2016, Poster.
16 / 23 Robert Klöfkorn
UiS Postdoc activity: Paper 1
Issue:
How would lab scale experiment behave on higher scale?
Consider MgCl2 which reacts with chalk in similar way as
seawater:
Dissolution + precipitation
of minerals
Exchange of ions at the surface
Obtain reaction kinetic parameters from core scale experiment
Scaled model for MgCl2 injection into
fracture-matrix geometry
Advection along fracture
Diffusion between matrix and
fracture
Ion exchange and dissolution +
precipitation in matrix
Important dimensionless numbers
Alfa: time scale ratio of diffusion to advection
Beta: volume ratio of matrix to fracture
Gamma: time scale ratio of reaction to advection
Time scale given in injected fracture volumes (FV)
Ex 3: Flow in different regions
• 3 regions with different fracture spacing and apertures, same volume
• Case with similar flux to each region (depends on parameters)
• Produced compositions from regions 1-3 and combined composition
• Even if the regions receive same amount of brine the interaction is
very different in each region (alfa * beta and beta * gamma)
P. Ø. Andersen and S. Evje. A Model for reactive flow
in fractured porous media. Chem. Eng. Sci. , 2016
Outline
1. Current status of OPM-Flow
2. Research Activities in Task 6Higher order schemes for reactive advection-diffusionModeling reactive advection-diffusion
3. Summary
21 / 23 Robert Klöfkorn
SummaryCollaborations outside of the IOR Centre
I SINTEF ICTI Cluster of Excellence in Simulation Technology (University of Stuttgart)I Collaboration through DUNE, especially EXA-DUNE: Flexible PDE Solvers,
Numerical Methods, and Applications1. RWTH Aachen2. Heidelberg University3. University of Freiburg4. University of Heidelberg5. University of Münster6. University of Stuttgart7. University of Warwick and Imperial College London
I Colorado School of MinesI ...
I Task 6 research contributes to improved reservoir simulation capabilitiesI Research is supposed to be integrated into OPM
I Flow (OPM-SIMULATORS) allows for simulation of field scale modelsI Performance is currently addressed (right now within reach of the commercial
simulators)I Improve research transfer to industry relevant casesI Upcoming release 2016.04 (www.opm-project.org)I OPM Meeting at SINTEF in Oslo, June 1-2, 2016
Thank you for your attention.
22 / 23 Robert Klöfkorn
SummaryCollaborations outside of the IOR Centre
I SINTEF ICTI Cluster of Excellence in Simulation Technology (University of Stuttgart)I Collaboration through DUNE, especially EXA-DUNE: Flexible PDE Solvers,
Numerical Methods, and Applications (University of Heidelberg and others)I Colorado School of MinesI ...
I Task 6 research contributes to improved reservoir simulation capabilitiesI Research is supposed to be integrated into OPM
I Flow (OPM-SIMULATORS) allows for simulation of field scale modelsI Performance is currently addressed (right now within reach of the commercial
simulators)I Improve research transfer to industry relevant casesI Upcoming release 2016.04 (www.opm-project.org)I OPM Meeting at SINTEF in Oslo, June 1-2, 2016
Thank you for your attention.
22 / 23 Robert Klöfkorn
SummaryCollaborations outside of the IOR Centre
I SINTEF ICTI Cluster of Excellence in Simulation Technology (University of Stuttgart)I Collaboration through DUNE, especially EXA-DUNE: Flexible PDE Solvers,
Numerical Methods, and Applications (University of Heidelberg and others)I Colorado School of MinesI ...
I Task 6 research contributes to improved reservoir simulation capabilitiesI Research is supposed to be integrated into OPM
I Flow (OPM-SIMULATORS) allows for simulation of field scale modelsI Performance is currently addressed (right now within reach of the commercial
simulators)I Improve research transfer to industry relevant casesI Upcoming release 2016.04 (www.opm-project.org)I OPM Meeting at SINTEF in Oslo, June 1-2, 2016
Thank you for your attention.
22 / 23 Robert Klöfkorn
SummaryCollaborations outside of the IOR Centre
I SINTEF ICTI Cluster of Excellence in Simulation Technology (University of Stuttgart)I Collaboration through DUNE, especially EXA-DUNE: Flexible PDE Solvers,
Numerical Methods, and Applications (University of Heidelberg and others)I Colorado School of MinesI ...
I Task 6 research contributes to improved reservoir simulation capabilitiesI Research is supposed to be integrated into OPM
I Flow (OPM-SIMULATORS) allows for simulation of field scale modelsI Performance is currently addressed (right now within reach of the commercial
simulators)I Improve research transfer to industry relevant casesI Upcoming release 2016.04 (www.opm-project.org)I OPM Meeting at SINTEF in Oslo, June 1-2, 2016
Thank you for your attention.
22 / 23 Robert Klöfkorn