Issues with pressure-dependent bG in a gas-water system

158 views
Skip to first unread message

Oscar Molina

unread,
Dec 26, 2022, 10:12:13 AM12/26/22
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
I am setting up a gas-water simulation using initSimpleADIFluid to define the fluid system. Gas properties are pressure-dependent and defined using interpTable based on data from an external PVT table.

gasprop.png

While muG seems to work fine, I am facing difficulties with bG (reciprocal of Bg) as the simulation does not converge even for very small time steps. With no success, I have tried different solvers (GMRES_ILUSolverAD, AMGCL_CPRSolverAD, BackslashSolverAD).

Your help is greatly appreciated!

-Oscar M


Knut-Andreas Lie

unread,
Jan 14, 2023, 8:35:31 AM1/14/23
to Oscar Molina, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Oscar,

If you send us a copy of the code you have used, we could try to have a look and see if we can figure out what goes wrong.

Best regards,
Knut-Andreas

--
Knut-Andreas Lie, Professor, PhD
Chief Scientist, SINTEF Digital, Mathematics & Cybernetics, Oslo
Phone: +47 930 58 721 (mobile)
http://folk.ntnu.no/andreas

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Oscar Molina <ommoli...@gmail.com>
Sent: Monday, December 26, 2022 4:12 PM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Issues with pressure-dependent bG in a gas-water system
 
--
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/e0d891ee-99f8-4290-92e3-43e5b8fcc6cen%40googlegroups.com.

Oscar Molina

unread,
Feb 3, 2023, 3:36:51 PM2/3/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Dr. Knut,

My apologies for the very late response. It looks like the gas-water model with pressure-dependent gas properties is now working though slowly. Below is a description of how I am setting up the SimpleADIFluid object in MRST. For your reference, I am attaching the gas PVT table I used to setup the fluid model. Column 1 is Pressure (psia), column 2 is Bg (ft^3/scf), and column 3 is viscosity (cP).

% Gas-water system setup
fluid = initSimpleADIFluid('phases', 'WG', ...
        'mu', [0.6924 0.041]*centi*poise,    ...
        'rho', [1 0.15]*62.4*pound/ft^3,     ...
        'n', [2 2], 'cR', 5e-7);

% Create pressure-dependent gas properties
gasPvt       = table2array(readtable('gas_pvt_tab.csv'));    % File is attached to this message
gasPvt(:, 1) = convertFrom(gasPvt(:,1), psia);
gasPvt(:, 2) = 1./gasPvt(:,2);
gasPvt(:, 3) = gasPvt(:,3)*centi*poise;
fluid.bG     = @(p) interpTable(gasPvt(:,1), gasPvt(:,2), p);
fluid.muG    = @(p) interpTable(gasPvt(:,1), gasPvt(:,3), p);

% Create solver model
model = GenericBlackOilModel(meshobj.mrst.grid, meshobj.mrst.rock, fluid, 'oil', false);

Thank you,
-Oscar M
gas_pvt_tab.csv

Olav Møyner

unread,
Feb 7, 2023, 3:37:14 AM2/7/23
to Oscar Molina, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Oscar,

What kind of setup are you running? The tables look fine to me in terms of the shape and range of the curves. My only question is if there is something going on with the pressure units? I see that the rock compressibility is very high for a typical rock sample (going from 1 to 20 bar pressure would double the pore volume) so maybe cR should be divided by barsa to get the right expansion? A similar thing happens with the gas predicted density (rhoGS (=149.9 kg/m^3) * 1/B) as starts at 150 kg/m^3 at low pressures and goes to 5000 at around 40 bar pressure. Maybe there is some conversion factor missing? Some PVT tables use different definitions for surface volume and reservoir volume, necessitating a conversion of the B table even if it is often thought of as dimensionless. If I guess that Mscf is used for surface volumes and m^3 for reservoir volumes you can do something like this:

gasPvt(:, 1) = convertFrom(gasPvt(:,1), psia);
Mscf = 1000 * ft^3;
gasPvt(:, 2) = 1./(gasPvt(:,2)*Mscf);
gasPvt(:, 3) = gasPvt(:,3)*centi*poise;
fluid.bG     = @(p) interpTable(gasPvt(:,1), gasPvt(:,2), p);
fluid.muG    = @(p) interpTable(gasPvt(:,1), gasPvt(:,3), p);
G = computeGeometry(cartGrid(5));
model = GenericBlackOilModel(G, makeRock(G, 0.1, 0.1), fluid, 'oil', false);
inspectFluidModel(model)
and get a more expected density curve:


Best regards,
Olav

Sent: Friday, February 3, 2023 21:36

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Issues with pressure-dependent bG in a gas-water system
 

Oscar Molina

unread,
Feb 13, 2023, 11:46:05 AM2/13/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Olav,

Thank you for your response. You are right, I needed to multiply rock compressibility to 1/psia . Regarding PVT properties, the fluid is a gas condensate, hence the dramatic changes in Bg. To give you more context, I am working with a fractured well (with scaled fracture width) with a logarithmic mesh distribution outward from the tallest fracture faces. However, I have observed a couple of interesting things:
  • Using constant pressure: The solver converges.
  • Using variable pressure (e.g., exponentially declining pressure): The solver does not converge. In the rare cases when it does, it returns negative gas flow rates, which is not physically meaningful to the problem.
I have tried many different things, including using the rampupTimesteps function to ensure numerical stability early on, coarsening the mesh, specifying minimum pressure, and tightening converge of the LinearSolver object, but none of them seem to alleviate this problem.

I would like to hear your thoughts on this.

Thanks,
-Oscar M

Oscar Molina

unread,
Feb 13, 2023, 1:54:26 PM2/13/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Olav,

Quick update: I forgot to mention that my model seems to work well for oil-water flow. Oil properties are pressure-dependent and defined using interpTable with the spline method. See simulation results for a test case below.

Thank you,
-Oscar M

mesh.png
Fig 1. Pressure distribution after ~1 year of variable-pressure depletion
simResOilWat.png
Fig 2. Production performance plot after ~1 year

WOR.png

Message has been deleted

Oscar Molina

unread,
Feb 26, 2023, 10:05:40 AM2/26/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi MRST authors,

A quick update: I believe I was able to fix the convergence issues with the gas-water model (fracture initially being filled with water) by adjusting the model's tolerance (model.toleranceCNV = 1e-6), limiting minimum and maximum expected pressures, and reducing the admissible changes in saturations over a time step. Still a bit hard for the nonlinear solver to converge at early time steps but it eventually does.

Thank you,
-Oscar M

Oscar Molina

unread,
Mar 13, 2023, 11:26:50 PM3/13/23
to Cong Xiao, sinte...@googlegroups.com
Hi Cong,

I could find your message on the forum so I am responding directly to you. The following 'tricks' seem to have worked for me:
  • Rescale fracture width to 1 ft
  • Define gas-water model as follows:
model = GenericBlackOilModel(G, rock, fluid, 'oil', false);
model.minimumPressure = 10*psia;
model.dpMaxRel = 0.1;
model.dsMaxAbs = 0.1;
model.toleranceCNV = 1e-6;
  • Use the AMGCL linear solver: linsolve = AMGCL_CPRSolverAD('maxIterations', 200, 'tolerance', 1e-6);
  • Implementation: [wellSols, states, report] = simulateScheduleAD(initState, model, schedule, 'linearsolver', linsolve);

Here is an example output:


image.png
image.png
Hope this helps.
-Oscar M

On Mon, Mar 13, 2023 at 5:54 AM Cong Xiao <xclm...@yahoo.com> wrote:

Dear Oscar,

 

          Now I am also trying to use MRST to simulate the water-gas two-phase flow. Unfortunately, I cannot run the model successfully, especially when I set the fracture initially saturated by all water. I encounter severely convergence issue. I’d appreciate it if you can share your successful setup (e..g, a simple code bu MRST)

Thanks for your help in advance.

 

Best regard

 

Cong

 

Windows 邮件发送

 

发件人: Oscar Molina
发送时间: 2023226 23:05
收件人: MRST-users: The Matlab Reservoir Simulation Toolbox User Group
主题: Re: [MRST Users] Issues with pressure-dependent bG in a gas-water system

 

Hi MRST authors,

 

A quick update: I believe I was able to fix the convergence issues with the gas-water model (fracture initially being filled with water) by adjusting the model's tolerance (model.toleranceCNV = 1e-6), limiting minimum and maximum expected pressures, and reducing the admissible changes in saturations over a time step. Still a bit hard for the nonlinear solver to converge at early time steps but it eventually does.

 

Thank you,

-Oscar M

 

On Monday, February 13, 2023 at 12:54:26PM UTC-6 Oscar Molina wrote:

Hi Olav,

 

Quick update: I forgot to mention that my model seems to work well for oil-water flow. Oil properties are pressure-dependent and defined using interpTable with the spline method. See simulation results for a test case below.

 

Thank you,

-Oscar M

 

Fig 1. Pressure distribution after ~1 year of variable-pressure depletion

Fig 2. Production performance plot after ~1 year

 

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Oscar Molina <ommoli...@gmail.com>
Sent: Monday, December 26, 2022 4:12 PM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Issues with pressure-dependent bG in a gas-water system

 

I am setting up a gas-water simulation using initSimpleADIFluid to define the fluid system. Gas properties are pressure-dependent and defined using interpTable based on data from an external PVT table.

 

 

While muG seems to work fine, I am facing difficulties with bG (reciprocal of Bg) as the simulation does not converge even for very small time steps. With no success, I have tried different solvers (GMRES_ILUSolverAD, AMGCL_CPRSolverAD, BackslashSolverAD).

 

Your help is greatly appreciated!

 

-Oscar M

 

 

--
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/e0d891ee-99f8-4290-92e3-43e5b8fcc6cen%40googlegroups.com.

--
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.

--
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.



--
Oscar M
Reply all
Reply to author
Forward
0 new messages