Introduction to MRST for Reservoir Simulation

rupakbhowmik564 8 views 25 slides Apr 24, 2025
Slide 1
Slide 1 of 25
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25

About This Presentation

An Introduction to MRST for Petroleum Reservoir Modelling


Slide Content

MATLAB Reservoir Simulation Toolbox (MRST)   by Rupak   Department of Chemical Engineering Indian Institute of Technology Guwahati

The MATLAB Reservoir Simulation Toolbox A free open-source software for petroleum reservoir: reading running simulation visualization MRST is not a primarily a simulator: developed as a research tool by researcher at SINTEF Digital. can be downloaded and used under GNU General Public License (GPL). To download, visit: www.sintef.no/mrst/ MRST offers black-oil and compositional model capable of simulating industry-standard problems. Graphical user interfaces for post-processing simulation results. November 15, 2021 CL 644: Reservoir Simulation 2

Core Functionality & Add-on Modules November 15, 2021 CL 644: Reservoir Simulation 3 MRST= Core Modules + Add-on Modules

Core Functionality & Add-on Modules November 15, 2021 CL 644: Reservoir Simulation 4 Core Module data structures for creating and manipulating grids. petro -physical data drive mechanism: gravity, boundary conditions, source terms, and wells Automatic differentiations . Add-on modules discretization : TPFA, MPFA, mimetic etc. flow equations and solvers workflow tools: coarsening, upscaling, flow diagnostics, visualization analysis of large-scale CO 2 storage in saline aquifers. special models like geomechanics and fractured reservoirs

Overview of Functionality Grid generation and coarsening November 15, 2021 Flow Visualization Lab 5 upr : used to generates the 2D or 3D Voronoi grid. coarsegrid : data structures and simple coarsening agglom : to create an adapted coarse partition. libgeometry : to compute geometric quantities like cell volumes, areas , centroids etc. opm_gridprocessing : contains functionality for reading and processing the GRID section of ECLIPSE input data. triangle: to create triangular grid

Overview of Functionality Discretization and solvers for incompressible flow: November 15, 2021 Flow Visualization Lab 6 incomp : incompressible, two phase flow. This module implements two point flux approximations (TPFA) and implicit/explicit transport solver. mimetic, mfpa , ntpfa , vem implements consistent discretization. adjoint : Implements strategies for production optimization for incompressible, two-phase flow

Overview of Functionality Implicit solvers based on Automatic Differentiation: November 15, 2021 Flow Visualization Lab 7 The automatic differentiation-object oriented (AD-OO) frame work offers fully implicit simulators from industry-standard input decks, including computations of adjoints

Overview of Functionality Workflow tools: November 15, 2021 Flow Visualization Lab 8 co2lab: comprehensive tools for large-scale CO2 storage saline aquifers diagnostics: flow diagnostics, mrst-gui : interactive visualization optimization : solution of optimal control problems based on AD-OO enkf and remso : third-party modules for EnKF (Ensemble Kalman filter) and multiple-shooting optimization

Overview of Functionality Upscaling and multiscale methods November 15, 2021 Flow Visualization Lab 9 msrsb is state-of-the art multiscale solver. msfem : implements multiscale finite elements method on unstructured grids. msfvm : Implements the operator formulation of the multiscale finite-volume method for incompressible flow on structured and unstructured grids. hfm : implements msrsb this for fracture models upscaling : flow-based single-phase upscaling. steady-state: multiphase upscaling based on steady state assumptions.

Overview of Functionality Fractured Media November 15, 2021 Flow Visualization Lab 10 dfm : discrete fracture models, hfm : hierarchical/embedded fracture models

Downloading and Installing November 15, 2021 CL 644: Reservoir Simulation 11 Download official release from SINTEF Digital official website and extract mrst-2021b containing all parts of software. Since MRST is a secondary software you need to activate the software in MATLAB You have to run startup.m script to activate MRST MRST Package Welcome Message

Exploring Functionality and Getting Help November 15, 2021 CL 644: Reservoir Simulation 12 To find out what a specific function does, you ca type help function_Name in the command window

Example of Automatic Differentiation (AD) November 15, 2021 CL 644: Reservoir Simulation 13 We want to compute z = f( x,y ) = x 3 y and its partial derivatives for the values x=1 and y = 2.   z = f( x,y ) = x 3 y     z | x=1,y=2 = 2     Manual Independent variables: x, y Dependent variable: z [x,y] = initVariablesADI (1,2); Independent variables Initialized value of IV            

Basic Data Structures in a Model November 15, 2021 CL 644: Reservoir Simulation 14 Fluid properties: fluid = initSingleFluid ('mu' , 1* centi *poise , ... 'rho', 1014*kilogram/meter^3); fluid = initSimpleFluid ('mu' , [ 1, 10]* centi *poise , ... 'rho', [1014, 859]*kilogram/meter^3, ... 'n' , [ 2, 2]); fluid = initCoreyFluid ('mu' , [ 1, 10]* centi *poise , ... 'rho', [1014, 859]*kilogram/meter^3, ... 'n' , [ 2, 2] , ... ' sr ' , [ 0.2, 0.2] , ... ' kwm ', [ 0.85, 0.60]); Single-Phase Flow Two-Phase Flow Corey model with exponent ‘n’ Zero residual saturation k rw = , k ro =   Two-Phase Flow Corey model with exponent ‘n’ With residual saturation k rw = , k ro =  

Basic Data Structures in a Model November 15, 2021 CL 644: Reservoir Simulation 15 Reservoir states: state = initResSol (G, p0,s0); state = initResSol (G, W, p0,s0); p0 = Initial pressure s0 = Initial saturation When there are wells in the reservoir Additional field ‘ wellsol ’ wellSol = initWellSol (W, p w0 );  

Basic Data Structures in a Model November 15, 2021 CL 644: Reservoir Simulation 16 Fluid sources: src = addSource (src, cells , rates, ‘ sat ’, sat ) src = an empty array (src==[]) rates = volumetric flow rates of sources sat = fluid composition of injected fluids with rate > 0 Example: src ==[] src = addSource (src, 1,1,[], 100*m3/ day , ‘ sat ’, 1) Boundary conditions: bc = addBC ( bc , faces, type, values, ‘sat’, sat) bc = an empty array ( bc ==[]) faces = faces for which the conditions are set type = type of boundary condition: pressure or flux values = pressure of flux value for the given conditions

Basic Data Structures in a Model November 15, 2021 CL 644: Reservoir Simulation 17 Boundary conditions: bc = pside ( bc , G, ‘ side’,p ) bc = fluxside ( bc , G, ‘ side’,flux ) Side argument is a string which one out of the following six alias groups: West/ Xmin /Left East/ Xmax /Right South/ Ymin /Back North/ Ymax /Front Upper/ Zmin /Top Lower/ Zmax /Bottom

Basic Data Structures in a Model November 15, 2021 CL 644: Reservoir Simulation 18 Wells: W = addWell (W, G, rock, cellInx ) W = verticalWell (W, G, rock, I, J, K, 'pn1', pv1, ...) W = verticalWell (W , G, rock, I, J, K, 'Type' , 'rate/bhp' , ... ' InnerProduct ' , well_ip , ... ' Val’ ,rate /bhp value, 'Radius’ , radious of well, ... 'Name' , ‘I/P' , ' Comp_i ' , [1, 0], 'Sign' ,1); I,J,K=Location of well Type = String specifying the well control: rate or bhp InnerProduct = Method of consistent discretizations Val = Target value of well control Radius = Welbore radius in meters Name = String giving the name of the well Comp_i = Fluid composition for injection well Sign = Well type: Production (sign=-1)/Injection (sign=1)

Example: November 15, 2021 CL 644: Reservoir Simulation 19 Problem 1: Quarter five-spot problem Flow equations: -∇.(𝐾∇𝑝)=q Single-phase incompressible flow 2D cartesian grid covering 500× 500 m 2 Two source term at diagonally opposite corners Permeability = 100 mD and Porosity = 0.25 Fluid = Water Problem 2: Boundary conditions The reservoir is 50 m thick and is restricted to a 1 × 1 km 2 area. The permeability is uniform and anisotropic, with a diagonal (1,000, 300, 10) mD tensor the porosity is uniform and equal 0.2 the reservoir is represented as a 20×20×5 rectangular grid Neumann conditions with total inflow of 100 m 3 /day on the east boundary Dirichlet conditions with fixed pressure of 25 bar on the west boundary

Grids: November 15, 2021 CL 644: Reservoir Simulation 20 MRST Module: gridProcessing Features: a common data structures and infrastructures for all types of grids all grids are assumed to be unstructured nbo grid generator several grid factory routines for : regular cartesian grids, rectilinear grids, triangular grids etc. Regular Cartesian Grid Rectilinear Grid Triangular Grid

Grids: November 15, 2021 CL 644: Reservoir Simulation 21 Basic files and their functions: cartGrid - Construct 2d or 3d Cartesian grid in physical space tensorGrid - Construct Cartesian grid with variable physical cell sizes tetrahedralGrid - Construct valid grid definition from points and tetrahedron list triangleGrid - Construct valid grid definition from points and triangle list computeGeometry - Add geometry information (centroids, volumes, areas) to a grid

Parameters: November 15, 2021 CL 644: Reservoir Simulation 22 MRST Module: params Features: Data structures for petrophysical properties Routines for setting and manipulating : boundary conditions, source/sink, well models etc. Basic files and their functions: Rock makeRock - Create rock structure from given permeabilty and porosity values grdecl2Rock - Extract rock properties from input deck permeabilityConverter - Add tensor permeability to GRDECL struct permTensor - Expand permeability tensor to full format. poreVolume - Compute pore volumes of individual cells in grid. * GRDECL: Grid section of an ECLIPSE deck

Rock Modelling: Example November 15, 2021 CL 644: Reservoir Simulation 23 Homogeneous modelling: Square 10 × 10 grid model with a uniform porosity of 0.2 and isotropic permeability equal 200 mD The permeability is uniform and anisotropic, with a diagonal (1,000, 100, 10) mD tensor the porosity is uniform and equal 0.2 Heterogeneous modelling: Generate φ as a Gaussian field and then compute K from the Carman– Kozeny relation

Upscaling November 15, 2021 CL 644: Reservoir Simulation 24 Also called homogenization Replace number of heterogeneous fine grid blocks with one equivalent coarse homogeneous grid block Properties of fine scale model are approximated by that of a coarse model It’s an averaging procedure Additive properties Porosity Fluid saturations Non-additive properties: Permeability

Why Upscaling? November 15, 2021 CL 644: Reservoir Simulation 25 First level upscaling : Laboratory data interpretation at the scale of reservoir. Second level upscaling: Scales properties of a fine grid to a coarse grid Scale up of geological grid to simulator grid for numerical simulation Other example: Consideration of first-hand-data distribution. Reservoir engineers usually apply a finer local grid in well-denser-area as well as in wellbore around, and apply a coarser grid in well-thinner-area.
Tags