Converting the two-phase (gas-water relative permeability) to three-phase

185 views
Skip to first unread message

Theodore L. Wyatt

unread,
Feb 27, 2024, 4:59:38 AM2/27/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Team,
Hello everyone, I encountered an issue while using MRST for modeling. MRST restricts the use of scripts related to three-phase(oil-gas-water )systems, but I need to simulate a two-phase (gas-water) system. I thought about converting the two-phase (gas-water) relative permeability to three-phase, then setting the saturation of the oil phase to 0 (or 0.001) to comply with MRST's limitations. However, I currently only have relative permeabilities for the gas and water phases under gas saturation. In this situation, what should I do? How can I change it to three-phase relative permeabilities while still satisfying the original gas-water phase relative permeabilities as much as possible, and what should I be mindful of? Thank you.

Best Regards,
Theodore

Olav Møyner

unread,
Feb 27, 2024, 5:07:56 AM2/27/24
to Theodore L. Wyatt, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Theodore,

Thank you for your query. I am not aware of this restriction - at least the standard solvers in MRST ad-blackoil can simulate with any combination of phases. This is done automatically if a input file is used and can be done manually by setting the flags to the GenericBlackOil constructor:

model = GenericBlackOilModel(G, rock, fluid, 'oil', false, 'water', true, 'gas', true)

Could you share how you have set up your simulation? Are you maybe looking at one of the specific models (e.g. ThreePhaseBlackOilModel) that do have this restriction?

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Theodore L. Wyatt <theodore...@gmail.com>
Sent: Tuesday, February 27, 2024 9:46
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] Converting the two-phase (gas-water relative permeability) to three-phase
 
--
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/4b55c8ae-7c09-41a6-ba6a-82eb9401eb0fn%40googlegroups.com.

Theodore L. Wyatt

unread,
Feb 27, 2024, 8:23:53 AM2/27/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Olav,
Thank you for your response.
Because I am currently conducting research on Distributed Temperature Sensing (DTS) in the field of optical fiber logging, I need to investigate the relationship between temperature and gas production profiles in horizontal wells. Therefore, I need to use multiple segments  well,  however,in MRST, I have found that:% Note the MSW model now only supports the 'ThreePhaseBlackOilModel' .So, I can only find a way to transform the gas-water phase model into a three-phase model. I apologize that the model is not fully written at the moment, but this is the issue I have encountered.

Best regards,
Theodore

Olav Møyner

unread,
Mar 5, 2024, 4:27:51 AM3/5/24
to Theodore L. Wyatt, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Theodore,

Apologies for the late reply. I then understand what you mean.  Can you try the following:
  • Set f.krW and f.krG to the tables you already have
  • Set f.krOW and f.krOG to either f.krW or f.krG (it should not matter if you have zero or close to zero oil saturation in your model)
The model will use f.krW and f.krG when only water and gas is present, so it should give the same results as a two-phase model.

Best regards,
Olav


Sent: Tuesday, February 27, 2024 12:54

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] Converting the two-phase (gas-water relative permeability) to three-phase
 

Theodore L. Wyatt

unread,
Mar 5, 2024, 1:36:43 PM3/5/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Olav,
Thank you very much for your patient guidance.
I have just used the method you mentioned, and below is my Relative Permeability Data Table.
%%-----------
SGWFN                                                                        
-- Gas-Water Saturation Functions      
--Sg         Krg         Krw        Pc                
0.08 0         0.665    1*                  
0.302 0.005 0.12      1*                
0.34 0.01 0.06      1*                  
0.4         0.017 0.03      1*                
0.415 0.02 0.023    1*                
0.433 0.024 0.015    1*                
0.47 0.033 0.012    1*                  
0.55 0.07 0            1*                  
0.73 0.15 0            1*                  
/                                      
%%----------

The following code is my transformation of it into a three-phase form in MRST, and I have run it successfully. However, I am uncertain about the accuracy of the obtained results.
Can you please help me verify if my transformation is correct?

%% relative permeability and capillary pressure % Sg Krg Krw
SWGF = {
[[ 0.08 0       0.665 ] ;
[ 0.302 0.005 0.12 ] ;
[ 0.34 0.01   0.06 ] ;
[ 0.4 0.017      0.03 ] ;
[ 0.415     0.02   0.023 ] ;
[ 0.433 0.024 0.015 ] ;
[ 0.47 0.033     0.012 ] ;
[ 0.55 0.07  0 ] ;
[0.73 0.15   0 ] ;
]};
% Sw Krw Kro
SWOF = {
[[ 0.08 0     0.0665 ] ;
[ 0.302     0.005     0.012 ] ;
[ 0.34 0.01 0.006   ] ;
[ 0.4 0.017     0.003 ] ;
[ 0.415    0.02 0.0023 ] ;
[ 0.433    0.024     0.0015 ] ;
[ 0.47 0.033     0.0012 ] ;
[ 0.55 0.07 0       ] ;
[0.73 0.15 0       ] ;
]};
%
krg = @(sg) interpTable(SWGF{1}(:,1),SWGF{1}(:,2),sg) ;
krw = @(sw) interpTable(SWGF{1}(:,1),SWGF{1}(:,3),1-sw) ;
kro = @(so) interpTable(SWOF{1}(:,1),SWOF{1}(:,3),1-so) ;
krow = @(so) interpTable(SWOF{1}(:,1),SWOF{1}(:,3),1-so) ;
krog = @(sg) interpTable(SWGF{1}(:,1),SWGF{1}(:,3),1-sg) ;
fluid.krW = krw;
fluid.krO = kro;
fluid.krG = krg;
fluid.krOW = krow;
fluid.krOG = krog;
plot(SWGF{1}(:,1),...
SWGF{1}(:,[2,3]),'*-',...
'LineWidth', 2, 'MarkerSize', 5)
legend({'krg','krw'}, 'Location', 'Best')
xlabel('sg'), title('Relative Permeability')
%%


Thank you.

Best regards,
Theodore

Olav Møyner

unread,
Mar 7, 2024, 5:50:20 AM3/7/24
to Theodore L. Wyatt, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Theodore,

This looks correct to me. If the simulation runs with So = 0 it will be the same as a two-phase version.

Best regards,
Olav

Sent: Tuesday, March 5, 2024 19:01

Theodore L. Wyatt

unread,
Mar 7, 2024, 9:31:18 AM3/7/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Olav,

I appreciate your assistance, it has truly cleared any uncertainties in my mind. Thank you.

Best regards,
Theodore
Reply all
Reply to author
Forward
0 new messages