EGRID ECLIPSE import question

202 views
Skip to first unread message

José Kevin Páuyac Estrada

unread,
Sep 10, 2023, 12:48:01 PM9/10/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

I am new to MRST model and I would like to import an ECLIPSE grid file. However, the grid is in .EGRID format (not .GRDECL). I tried this code:

%% Import modules
mrstModule add deckformat
mrstModule add ad-core ad-props ad-blackoil
mrstModule add mrst-gui
mrstModule list
%% Import of the grid from pcube_new.grdecl
grid = readGRDECL('C:/Matlab/grid.EGRID');
%% Convert to SI units
usys = getUnitSystem('METRIC');
grdecl = convertInputUnits(grid, usys);
G = processGRDECL('C:/Matlab/grid.EGRID')
%plotGrid(grid, 'FaceColor', 'none'), view(3)

However, I get the following error:

Dot indexing is not supported for variables of this type.

Error in buildCornerPtNodes (line 63)
   nx = grdecl.cartDims(1);

Error in processGRDECL>build_coordinates (line 352)
   [X, Y, Z] = buildCornerPtNodes(grdecl);

Error in processGRDECL (line 204)
   build_coordinates(grdecl, opt.RepairZCORN);

Error in spe11c_MRST (line 15)
G = processGRDECL('C:/Matlab/grid.EGRID')

Could anyone help me, please? Thanks!

Olav Møyner

unread,
Sep 10, 2023, 12:58:12 PM9/10/23
to José Kevin Páuyac Estrada, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

If you want to read EGRIDs you can use the following functions:
egrid = readEclipseOutputFileUnFmt([pth, '.EGRID']);
init = readEclipseOutputFileUnFmt([pth, '.INIT']);

[G, rock, N, T] = initGridFromEclipseOutput(init, egrid);

Here N and T is the transmissibilities read from the files. Please note that the EGRID is already processed by a simulator so you are not guaranteed to get the same number of internal faces in the processed EGRID as what MRST would produce.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of José Kevin Páuyac Estrada <jose.pa...@gmail.com>
Sent: Sunday, September 10, 2023 16:34
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] EGRID ECLIPSE import question
 
--
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/cf384746-379f-4359-ab26-194c34a05aa5n%40googlegroups.com.

José Kevin Páuyac Estrada

unread,
Sep 10, 2023, 3:01:31 PM9/10/23
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Thank you Olav. Another question, please. How can I import and visualize the properties to the model? The properties are defined in .INC files. Thank you once again for your time and support.

Olav Møyner

unread,
Sep 15, 2023, 5:15:57 AM9/15/23
to José Kevin Páuyac Estrada, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

I think the easiest way to do this is to read the entire DATA file (readEclipseDeck) so that you get the values only on the grid cells that are active, and so on. It is also possible to read the INC files directly using various low-level routines of the deckformat module, but I'm not sure if I would recommend that approach as a starting point as there are many pitfalls around active cells, ordering of inputs and unit conversion that should be automatically handled by readEclipseDeck.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of José Kevin Páuyac Estrada <jose.pa...@gmail.com>
Sent: Sunday, September 10, 2023 19:48

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] EGRID ECLIPSE import question
 
Reply all
Reply to author
Forward
0 new messages