Re: [MRST Users] Numerical Aquifers Keyword (AQUNUM)

209 views
Skip to first unread message

Bao Kai

unread,
Apr 17, 2021, 6:14:46 PM4/17/21
to Dan Nguku, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi, Dan, 

AQUNUM (numerical aquifers) is not supported by MRST at the moment. The only way to make MRST parsing your deck with the keyword AQUNUM is to implement so that MRST can support it. But to make the numerical aquifers specified by AQUNUM work, we need to incorporate the parsed aquifer information in the simulation.  To make the numerical aquifer work, typically another keyword AQUCON will also be used to define some connection cells so that the reservoir can be connected to the aquifers. 

I looked at your deck (TUT1A.DATA), I found that only the keyword AQUNUM is used without the keyword AQUCON. Basically, you claim some grid cells to be numerical aquifers, while not providing any reservoir cells that are connected to the numerical aquifers. In other words, there will be no flow exchange between the aquifers and the reservoir. Then what is the point to have the aquifer there?  The deck looks not very correct to me. Can you double check? And also, WCONINJ is an obsolete keyword, not totally sure we are supporting it properly. Typically, we use WCONINJE instead. 

If you want to implement numerical aquifers in MRST, it will be very welcomed. We can try to provide some assistance.

BTW: If you only want to run your deck and see the results, but you do not have the commercial Eclipse software, you can also use OPM flow (https://opm-project.org/) to run it. For that, you can ask us for more information. 

Best, 
Kai Bao




On Sat, Apr 17, 2021 at 5:20 PM Dan Nguku <danng...@gmail.com> wrote:
Hello everyone,
Am new to Mrst and still learning how to use most of its features.

On 13th Jan 2020, Mr. Bard Skaflestad mentioned that the MRST deck reader does not support the numerical aquifers keyword (AQUNUM), (I have attached the file from that conversation) is this still the case ? I am currently  using Matlab 2020a and MRST2020a.
 
if there is a  tutorial on how to by pass this challenge i will highly appreciate being guided to it. 
Thank you in advance.



--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/242b2508-6c47-4d6d-8ff7-96c33047eafdn%40googlegroups.com.

Dan Nguku

unread,
Apr 23, 2021, 7:29:34 AM4/23/21
to Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
HI BAO
Thank you for the clarification and recommendation. I will be trying out  the OPM  FlOW

 I went through the data file and made the necessary changes, all that is left is running it on the mrst platform. However, I faced this challenge after trying to load my data file into mrst.;

  >> prefix = fullfile(getDatasetPath('ass1'), 'Simulation-Output', 'SS1_CP');
Error using getDatasetInfo (line 42)
Dataset 'ss1' is not known to MRST.

Error in getDatasetPath (line 65)
    [info, present] = getDatasetInfo(name);  

I  had created a folder in  Documents\MATLAB\mrst-2021a\examples\data\SS1 to house the data file then tried to use the readandvisualiseEclipse output.m command.

that is the error that came 


Your feedback will be highly appreciated.
Regards,
Dan Nguku

Olav Møyner

unread,
Apr 23, 2021, 7:32:03 AM4/23/21
to Dan Nguku, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

getDatasetPath is for datasets that are known to MRST. Your own dataset is not known to MRST. You can replace the call to getDatasetPath with the actual path to the directory where you have stored your data.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Dan Nguku <danng...@gmail.com>
Sent: Friday, April 23, 2021 13:29
To: Bao Kai <paea...@gmail.com>
Cc: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Numerical Aquifers Keyword (AQUNUM)
 

Dan Nguku

unread,
Apr 24, 2021, 2:56:20 AM4/24/21
to Olav Møyner, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi 
that helped.
While using the other method specified in the tutorial basic objects 
( for this second data file I don't have the IINIT and EGRID files) I got this error.
plotCellData(model.G, state0.s(:, [3, 2, 1])), axis tight, grid on
Index in position 2 exceeds array bounds (must not exceed 2).
Regards 
Dan Nguku

Olav Møyner

unread,
Apr 24, 2021, 3:02:06 AM4/24/21
to Dan Nguku, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Your model is probably not three phase like the one in the tutorial. You can just write state0.s(:, 1) instead I'd state0.s(:, [3, 2, 1]) to plot the first phase instead.

Olav

Olav


From: Dan Nguku <danng...@gmail.com>
Sent: Saturday, April 24, 2021 8:56:06 AM
To: Olav Møyner <Olav....@sintef.no>
Cc: Bao Kai <paea...@gmail.com>; MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>

Dan Nguku

unread,
Apr 24, 2021, 3:29:37 AM4/24/21
to Olav Møyner, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
thank you, that worked.
the model has 2 phases.

Dan Nguku

unread,
Apr 26, 2021, 10:00:52 AM4/26/21
to Olav Møyner, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
HI,
I  was tring the steps in  blackoilTutorialSPE1 with a different set of data  and got this error 
GenericBlackOilModel with properties:

                     disgas: 0
                     vapoil: 0
                  drsMaxRel: Inf
                  drsMaxAbs: Inf
                      fluid: [1×1 struct]
                       rock: [1×1 struct]
                   dpMaxRel: Inf
                   dpMaxAbs: Inf
                   dsMaxAbs: 0.2000
            maximumPressure: Inf
            minimumPressure: 0
                      water: 1
                        gas: 0
                        oil: 1
          useCNVConvergence: 1
               toleranceCNV: 1.0000e-03
                toleranceMB: 1.0000e-07
                  inputdata: [1×1 struct]
           extraStateOutput: 0
         extraWellSolOutput: 1
               outputFluxes: 1
                    gravity: [0 0 9.8066]
              FacilityModel: [1×1 GenericFacilityModel]
    FacilityNonLinearSolver: []
               AquiferModel: []
      FlowPropertyFunctions: []
       PVTPropertyFunctions: []
         FlowDiscretization: []
                 Components: {}
                  operators: [1×1 struct]
         nonlinearTolerance: 1.0000e-06
                          G: [1×1 struct]
                    verbose: 0
       stepFunctionIsLinear: 0
            AutoDiffBackend: [1×1 AutoDiffBackend]
       OutputStateFunctions: {'ComponentTotalMass'  'Density'}

Index in position 1 exceeds array bounds (must not exceed 1).

Error in SaturationProperty/getConnateWater (line 59)
                swcon = reshape(model.fluid.krPts.w(prop.regions, 1), [], 1);

Error in SaturationProperty/storeConnateWater (line 16)
            prop.swcon = prop.getConnateWater(model, varargin{:});

Error in BaseRelativePermeability (line 19)
                gp = gp.storeConnateWater(model);

Error in FlowPropertyFunctions (line 37)
            kr = BaseRelativePermeability(model, sat, scalearg{:}, krarg{:});

Error in ReservoirModel/setupStateFunctionGroupings (line 266)
            model.FlowPropertyFunctions = FlowPropertyFunctions(model); %#ok

Error in PhysicalModel/validateModel (line 300)
        model = model.setupStateFunctionGroupings();

Error in ReservoirModel/validateModel (line 197)
        model = validateModel@PhysicalModel(model, varargin{:});

Error in ThreePhaseBlackOilModel/validateModel (line 207)
        model = validateModel@ReservoirModel(model, varargin{:});

Error in GenericBlackOilModel/validateModel (line 93)
            model = validateModel@ThreePhaseBlackOilModel(model, varargin{:});

Error in simulateScheduleAD (line 240)
    model = model.validateModel(fstruct);

Error in blackoilTutorialASS1 (line 38)
[wellSols, states, report] = simulateScheduleAD(state, model, schedule, 'nonlinearsolver', nls);
 
59                  swcon = reshape(model.fluid.krPts.w(prop.regions, 1), [], 1);

Olav Møyner

unread,
Apr 26, 2021, 10:05:18 AM4/26/21
to Dan Nguku, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

There's some mismatch between your regions in the rock and the fluid object (which only has one set of water relperm points). Can you post a complete script?

Best regards,
Olav

From: Dan Nguku <danng...@gmail.com>
Sent: Monday, April 26, 2021 16:00

Dan Nguku

unread,
Apr 26, 2021, 10:21:35 AM4/26/21
to Olav Møyner, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
--        Number of cells
--       NX      NY      NZ
--       --      --      --
DIMENS
5 5 3 /



-- Phases
OIL
WATER



-- Units
FIELD


-- Maximum well/connection/group values
--     #wells  #cons/w  #grps  #wells/grp
--     ----2--  -------  -----  ----------
WELLDIMS
1 1 5 5 /
-- Maximum number of saturation (relative permeability) tables
TABDIMS
1 1 4 3 1 /
-- Unified output files
UNIFOUT


-- Simulation start date
START
1 JAN 2000 /

UNIFOUT

UNIFIN

--NOSIM




--================================================================
GRID


-- Size of each cell in X, Y and Z directions
DX
75*500 /


DY
75*500 /


DZ
75*50 /

--TVDSS of top layer only
--         X1  X2     Y1  Y2     Z1  Z2
--         --  --     --  --     --  --

BOX
1 5 1 5 1 1 /

TOPS
25*8000 /

ENDBOX

-- Permeability in X, Y and Z directions for each cell
PERMX
25*200 25*1000 25*200 /


PERMY
25*150 25*800 25*150 /


PERMZ
25*20 25*100 25*20 /


-- Porosity of each cell
PORO
75*0.20 /

-- Output file with geometry and rock properties (.INIT)
INIT


--================================================================
PROPS


-- Densities in lb/ft3
--            Oil      Wat      
--            ---      ---      
DENSITY
49 63 /



-- PVT data for dead oil
--         P         Bo        Vis
--       ----       ----      -----
PVDO
300  1.25 1.0
800  1.20 1.1
6000 1.15 2.0 /





-- PVT data for water
--         P         Bw        Cw          Vis      Viscosibility
--       ----       ----      -----       -----     -------------
PVTW
4500 1.02 3.0E-06 0.8 0.0 /



-- Rock compressibility
--         P           Cr
--       ----        -----
ROCK
4500 4e-06 /



-- Water and oil rel perms & capillary pressures
--         Sw       Krw      Kro      Pc
--       -----     -----     ---     ----
SWOF

0.25 0.0  0.9  4.0
0.5  0.2  0.3  0.8
0.7  0.4  0.1  0.2
0.8  0.55 0.0  0.1
1.0  1.00  0.0 0.0/
   
/
--================================================================
REGIONS

SATNUM
25*2 25*1 25*2 /

SOLUTION ===============================================================
-------- THE SOLUTION SECTION DEFINES THE INITIAL STATE OF THE SOLUTION
-------- VARIABLES (PHASE PRESSURES, )
------------------------------------------------------------------------
-- DATA FOR INITIALISING FLUIDS TO POTENTIAL EQUILIBRIUM
--
-- Initial equilibration conditions
--        Datum   Pi@datum    WOC    Pc@WOC
--        -----   --------   -----   ------
EQUIL
8075 4500 8500 0 /


-- pressure
-- 25*3.0978320e7
-- 25*3.1023130e7
-- 25*3.1026410e7
-- /
pressure
25*4493.0254516
25*4499.5245926
25*4500.0003164
/



-- Output to Restart file for t=0 (.UNRST)
--     Restart file
--     for init cond
--     -------------
RPTRST
BASIC=2 /


--================================================================
SUMMARY
-- Create Excel readable Run Summary file (.RSM)
EXCEL

SEPARATE

--REQUEST PRINTED OUTPUT OF SUMMARY FILE DATA

RUNSUM

-- Field average pressure
FPR

-- Bottomhole pressure of both wells
WBHP
/
-- Field Oil Production Rate
FOPR

-- Well Water Cut for all wells
WWCT

/

-- Field Water Production Rate
FWPR
 /

-- Total Field Oil Production
FOPT
/
-- Total Field Oil Production
FWPT
/

--================================================================
SCHEDULE

-- Output to Restart file for t>0 (.UNRST)
--     Restart file
--      every step
--     ------------
RPTRST
BASIC=2 /



-- Location of wellhead and pressure gauge
--      Well  Well   Location   BHP    Pref.
--      name  group   I    J   datum   phase
--     -----  ----    -    -   -----   -----
WELSPECS
PROD GR1 1 1 1* OIL /

/


-- Completion interval
--      Well   Location  Interval  Status           Well
--      name    I    J    K1  K2   O or S            ID
--      ----    -    -    --  --   ------          ------
COMPDAT
PROD 1 1 1 3 OPEN 2 1*  0.667 5* /

/

-- Production control
--  Well  Status  Control    Oil   Wat   Gas    Liq  Resv   BHP
--  name           mode     rate  rate  rate   rate  rate  limit
--  ----  ------  ------    ----  ----  ----   ----  ----  -----
WCONPROD
PROD       OPEN     LRAT      1* 1* 1* 10000 1* 2000.0000 /
/





WELSPECS
INJ GR2 5 5 1* WATER /

/

COMPDAT

INJ 5 5 1 3 OPEN 2 1*  0.667 5* /

/

-- Injection control
--  Well  Fluid  Status  Control   Surf   Resv    Voidage   BHP
--  NAME  TYPE            mode     rate   rate  frac flag  limit
--  ----  -----  ------  -------   ----   ----  ---- ----  -----

WCONINJE
INJ WATER OPEN RATE 11000  3* 10000/
/

-- Number and size (days) of timesteps
TSTEP
10*200/
/

END

Olav Møyner

unread,
Apr 26, 2021, 10:24:21 AM4/26/21
to Dan Nguku, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Why are there more than one SATNUM region, but only one SWOF table? Is this a case that runs in Eclipse?

Best regards,
Olav

From: Dan Nguku <danng...@gmail.com>
Sent: Monday, April 26, 2021 16:21

Dan Nguku

unread,
Apr 26, 2021, 10:47:44 AM4/26/21
to Olav Møyner, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi, 
I don't have access to eclipse so I can't tell,
About having one SWOF table I will follow up and find out if it was a case of omission,
 for this case should the SWOF tables be 3?  



Olav Møyner

unread,
Apr 26, 2021, 1:01:45 PM4/26/21
to Dan Nguku, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

Your table for SATNUM has values of 2 in the top and bottom layers and 1 in the middle, so you'd need two tables:
SATNUM
25*2 25*1 25*2 /

If you replace this with
SATNUM
 75*1 /

You can use the single table that is there. It may be that the case runs in Eclipse due to some other keyword interaction.

Best regards,
Olav


From: Dan Nguku <danng...@gmail.com>
Sent: Monday, April 26, 2021 16:47

Dan Nguku

unread,
Apr 27, 2021, 8:24:46 AM4/27/21
to Olav Møyner, Bao Kai, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,
Thank you for pointing that out  
I am still getting an error when I get to line (38), this time its on setupWells  

Index exceeds the number of array elements (0).

Error in FacilityModel/setupWells (line 191)
                                vfp = model.VFPTablesInjector{vfp_ix};

Error in FacilityModel/validateModel (line 378)
                model = model.setupWells(W);

Error in GenericFacilityModel/validateModel (line 290)
            model = validateModel@FacilityModel(model, varargin{:});

Error in ReservoirModel/validateModel (line 213)
        model.FacilityModel = model.FacilityModel.validateModel(varargin{:});


Error in ThreePhaseBlackOilModel/validateModel (line 207)
        model = validateModel@ReservoirModel(model, varargin{:});

Error in GenericBlackOilModel/validateModel (line 93)
            model = validateModel@ThreePhaseBlackOilModel(model, varargin{:});

Error in simulateScheduleAD (line 240)
    model = model.validateModel(fstruct);

Error in blackoilTutorialASS1 (line 38)
[wellSols, states, report] = simulateScheduleAD(state, model, schedule,
'nonlinearsolver', nls);

Reply all
Reply to author
Forward
0 new messages