export upscale model FROM MRST TO ECLIPSE FORMAT

83 views
Skip to first unread message

THANH HÙNG VÕ

unread,
Oct 31, 2023, 12:56:26 AM10/31/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear MRST developers,

I tried to upscale model from fine scale to smaller.

I have successful upscale poro and permeability.

However, when i tried to export poro and perm properties to ECLIPSE.

Only PERM and PORO has reduce grid size.

For other keyword the grid size is same.
I use below command for export porosity and permeability
grdecl.PORO = crock.poro
grdecl.PERMX = crock.perm(:,1);
writeGRDECL(grdecl, 'downscal2')


There is notification only PERM and PORO reduce grid size!

 MAPUNITS: 'METRES'
              MAPAXES: [6×1 double]
             GRIDUNIT: {'METRES'  'MAP'}
             cartDims: [166 57 1088]
                COORD: [4220655×1 double]
                ZCORN: [4220655×1 double]
                 PORO: [68904×1 double]
                PERMX: [68904×1 double]
    UnhandledKeywords: {'COORDSYS'  'ECHO'  'NOECHO'  'PINCH'}
             SPECGRID: [4220655×1 double]


How can export correctly UPSCALE grid size for other keyword?

Thank you so much!


CODE FOR UPSCALE
mrstModule add upscaling coarsegrid
%% Load and process data
% We assume that the data has been downloaded and placed in the appropriate
% data directory under the MRST root directory.
sector = 'ccs';
grdecl = readGRDECL([sector, '.grdecl']);
G = processGRDECL(grdecl);
G = computeGeometry(G);
rock = grdecl2Rock(grdecl, G.cells.indexMap);
%% Upscale model
% Upscale the model by a factor 5x5x5 using a simple harmonic average for
% the permeability and arithmetic average for the porosity.
% (This demonstrates the power of the accumarray call..)
w = G.cells.volumes;
p = partitionUI(G, G.cartDims./[5 5 6]);
p1= round(p-min(p))+1;
w1= round(w-min(w))+1;
for i=1:size(rock.poro,2)
crock.poro(:,i) = accumarray(p1,w1) ./ ...
accumarray(p1,w1./rock.poro(:,i))
end
for i=1:size(rock.perm,2)
crock.perm(:,i) = accumarray(p1,w1) ./ ...
accumarray(p1,w1./rock.perm(:,i))
end
%% Visualize result
% As expected, using such a naive upscaling will move the permeability
% values towards the centre of their fine-scale spectre.
clf
pargs = {'EdgeColor','none'};
subplot(2,2,1)
plotCellData(G,rock.poro(:,1),pargs{:});
view(-95,40); axis tight off; cx = caxis; title('original');
subplot(2,2,2)
plotCellData(G, crock.poro(p1,1), pargs{:});
set(gca,'zdir','reverse');
view(-95,40); axis tight off; caxis(cx); title('upscaled');

Knut-Andreas Lie

unread,
Nov 7, 2023, 5:43:58 PM11/7/23
to THANH HÙNG VÕ, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

The reason your script does not produce the wanted result is because it only upscales the porosity and permeability but leaves the specification of the corner-point grid in the grdecl structure unchanged.

We have two experimental routines in-house that also coarsens the grid itself, or the whole input deck in one go. These routines make certain simplifying assumptions, and without having seen the complexity of your grid, it is difficult to judge whether they would work or not in your case.

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 THANH HÙNG VÕ <vothanhh...@gmail.com>
Sent: Tuesday, October 31, 2023 5:56 AM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] export upscale model FROM MRST TO ECLIPSE FORMAT
 
--
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/27195530-8e23-4742-aba8-dd35293f0f47n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages