OPM / opm-simulators

OPM Flow and experimental simulators, including components such as well models etc.
http://www.opm-project.org
GNU General Public License v3.0
124 stars 121 forks source link

Error when using high compressible fluids #3141

Closed wagnerqb closed 3 years ago

wagnerqb commented 3 years ago

Good morning,

I am relatively new using OPM and I am applying it to Well Test problems. My issue is: when I run using slow compressible fluids like water and oil I have really good results. But when I try high compressible fluids like gas or light oils, the result does not make sense, even if I compare with the steady-state result given by Darcy's law.

For example: I tested a simple case when I inject oil in an oil reservoir (this simulation do not make any physical sense but it is interesting because we have analytical solution for these case). If I use the oil compressibility 1E-5 1/bar I have 146.5925 bar of pressure drop between wells (consistent with Darcy's law). If I use Co=1E-2 1/bar I have 160.1047 bar of pressure drop (not consistent anymore). I run the model for a long time until steady-state establishment. Does anyone know where is my mistake?

I am attaching the data file I used to run this particular example and to diminish numerical issues I am running using the following parameters:

DbhpMaxRel=0.5
DpMaxRel=0.05
DsMax=0.05
DwellFractionMax=0.01
LinearSolverReduction=0.0001
RelaxedMaxPvFraction=0.001
ToleranceCnv=0.000001
ToleranceMb=1e-12

Thanks.


--===============================================================================
--Author: Wagner Queiroz Barros
--Date:   Mar 26 2021
--Email:  Wagnerqb@gmail.com
--===============================================================================

--=================================================
-- General Run Specifications
--=================================================
RUNSPEC

TITLE
    Single-Phase Linear Flow

DIMENS
    1001 1 1  /

-- Fluids
WATER
OIL

-- System Units
METRIC

-- Number of Equilibrium Regions
EQLDIMS
/

-- Number of KRel Tables and maximum lines
TABDIMS
    1 1 1000 1000 /

-- Number of Wells and completions
WELLDIMS
    2 1 2 2  /

-- Unified Output File
UNIFOUT

START
    1 'JAN' 2021 /

--=================================================
-- Grid Specifications
--=================================================
GRID

-- Writes the Initial Properties for ResInsight
INIT

-- Grid Lenght (m)
DX
    1001*1.0 /

DY
    1001*20.0 /

DZ
    1001*20.0 /

-- Net to Gross Ratio (-)
NTG
    1001*1.0  /

-- Depth of the top face of each cell (m)
TOPS
    1001*995.0  /

-- Rock Porosity (-)
PORO
    1001*0.1  /

-- Directional Rock Permeability (mD)
PERMX
    1001*200.0  /

PERMY
    1001*200.0  /

PERMZ
    1001*200.0  /

--=================================================
-- Rock Properties
--=================================================
PROPS

-- Rock Compressibility
--   Ref. Press        cf
--     (bara)        (1/bara)
ROCK
       100.0          1.0e-7  /

-- Waterflooding Relative Permeability Curves
--  Sw     Krw     Kro     Pcgo
SWOF
  2.000000e-01  0.000000e+00  8.000000e-01  0.000000e+00
  6.000000e-01  3.000000e-01  0.000000e+00  0.000000e+00 /

--=================================================
-- Fluid Properties
--=================================================

-- Surface Densities
--  Oil Rho   Wat Rho   Gas Rho
--  (Kg/m3)   (Kg/m3)   (Kg/m3)
DENSITY
     600.0     1000.0     1.0  /

-- Water PVT Properties
-- Ref. Pres   Bw      cw      Muw     cMuw
--  (bara)   (rc/sc) (1/bara)  (cp)  (1/bara)
PVTW
     100.0     1.0    1.0e-5   1.0     0.0  /

-- Oil PVT Properties
-- Ref. Pres   Bo      co      Muo     cMuo
--  (bara)   (rc/sc) (1/bara)  (cp)  (1/bara)
PVCDO
     100.0     1.0    1.0e-2   2.0     0.0  /

--=================================================
-- Model Initialization
--=================================================
SOLUTION

--  Datum   DtPres   WOC    PcWOC   GOC   PcGOC
--  (m)     (bara)   (m)   (atma)  (m)   (atma)
EQUIL
   1000.0   100.0   2000.0   0.0   800.0  0.0   2*0  /

-- Not Saving Grid Properties
RPTRST
    BASIC=0 ALLPROPS /

--=================================================
-- Exported Variables
--=================================================
SUMMARY

-- Writting the RSM file
RUNSUM

WBHP  -- Well Bottom-Hole Pressure
/

WVIR
/

WVPR
/

--=================================================
-- Schedule
--=================================================
SCHEDULE

-- Wells Specifications
-- Name  Group  X  Y  BHPRef  Type
--                     (m)
WELSPECS
  'INJ'   G1   1    1   1000.0  OIL  /
  'PROD'  G1  1001  1   1000.0  OIL  /
/

-- Wells Connections
-- Name    X   Y  Upper  Lower  Status  SAT Tab  TransConnect
COMPDAT
  'INJ'   1      1    1      1    OPEN      1*       1000000.0  /
  'PROD'  1001   1    1      1    OPEN      1*       1000000.0  /
/

-- Well Production Limits
-- Name  Status  Target     BHP
--                         (bara)
WCONPROD
  'PROD'  OPEN    BHP  5*   100.0   /
/

-- Well Injection Limits
-- Name  Type  Status  Target     Res Rate
--                                (rm3/d)
WCONINJE
  'INJ'   OIL  OPEN     RESV      1* 40.0    /
/

-- Timesteps (days)
--  nbr * dt days
TSTEP
   10*0.01
   10*0.1
   10*1.0
   10*10.0
   100*100.0 /

END
GitPaean commented 3 years ago

Hi, Wagner,

Welcome to OPM community.

I do not have an certain/clear answer for your question, but I think it might be related to how the RESV is calculated. In OPM, the RESV is calculated based on the average hydrocarbon pressure of the reservoir, I think it might be different from the actual reservoir volume/flux in place within reservoir. The difference can be more significant when the fluid is more compressible.

Best, Kai Bao

wagnerqb commented 3 years ago

Thank you very much for your answer. You are absolutely right, the problem is that the RESV is calculated using the average pressure of entire reservoir.

The topic #1411 of 2018 says that OPM does not support any other type of calculation.

I tried to define a new PVT region in the injector cell using FIPNUM keyword and then use this region in WELSPECS section 13. However in topic #1729 of 2019 it is said even if I try change the PVT region, the OPM does not recognize this option. In fact I tried this and I received the following message in .DBG file:

"The FIP_REGION item in the WELSPECS keyword in file:FILE line: 167 using default value: 0"

Question: Is there any other option to calculate the volumes using the injector cell pressure instead of the reservoir average?

Thank you very much.

atgeirr commented 3 years ago

I would think that if you looked at the actual injected quantity for that well, you would not get 40, but a number that would be consistent.

Question: Is there any other option to calculate the volumes using the injector cell pressure instead of the reservoir average?

Not really. But specifying a surface rate injection instead of reservoir rate could give you a bit more control?

wagnerqb commented 3 years ago

Thank you very much for the answers.

I tried to specify the surface injection rate and, as you said, I could match analytical results.

However, to accomplish this, I had to change my analytical boundary condition, changing the mathematical description of the problem.

Thanks.