Thank you very much for your patient guidance.
I have just used the method you mentioned, and below is my Relative Permeability Data Table.
%% 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.