Indexing the matrix grids that intersect with each individual fracture.

51 views
Skip to first unread message

Calvin Scott

unread,
May 4, 2024, 2:17:49 AMMay 4
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Team,
Hello, I have a question while working on constructing natural fractures using EDFM, and I'd like to seek some advice. Specifically, I'm wondering how to find the indices of the matrix grids that intersect with each individual fracture. This is because I need to consider acidizing later on, and I'm currently unsure how to account for acidizing with respect to fractures. Currently, I'm only studying acidizing of the matrix. I came up with an idea to use the method of equivalent permeability to expand the matrix grids intersecting with fractures (nnc) based on equivalent permeability. So, I'd like to ask how to index the matrix grids intersecting with each fracture. Thank you in advance for any help!

Best regards,
Calvin

XiuWei Liu

unread,
May 5, 2024, 8:49:14 AMMay 5
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Calvin,

I am not sure I understand your question well. But If you want to get the indices of matrix grids which intersect with fracture girds, after the preprocessing of EDFM, you can look into G.nnc.cells (information about the indices of the matrix grid and fractures grid which are connected, or indices of fracture grid and fracture grid which are connected) and G.nnc.type (information about nnc type: matrix-fracture or fracture-fracture). I think with the help of these two variables, you can achieve the indices of all matrix grids which intersect with fractures.

Best regrads,
XiuWei

Calvin Scott

unread,
May 5, 2024, 11:32:27 AMMay 5
to XiuWei Liu, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear XiuWei,
Hello, I'm sorry for not describing my question clearly earlier. Let me describe my issue with  an example  : I used EDFM to construct crack grids within a matrix grid, where the matrix grid is 64*50*3, totaling 9600 grids. EDFM generated 175 fractures in total. I want to know and index which matrix grids are adjacent to fracture1.  In other words, I need guidance on the specific indexed positions (i, j, k) of these adjacent matrix grids within the matrix grid system (64*50*3).

I have attempted to use G.nnc.cells as you described, as shown in Figure 1, but it's impossible to determine which G.nnc.cells belong to a specific fracture's nnc matrix grid. Also, G.nnc.type (results shown in Figure 2) doesn't help me achieve my goal. I still can't reach my objective, and I hope to receive your guidance. Thank you. I will upload my script below for easier communication. 
image.pngimage.png

Best regards,
Calvin

--
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/6053abbf-9fc4-466a-895b-6153ade08ea4n%40googlegroups.com.
edfmTopo3DtsgRefMoveNplus.m
topo_gaswater3phase.DATA

XiuWei Liu

unread,
May 6, 2024, 3:03:17 AMMay 6
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

You mean "matrix grids are adjacent to fracture1"? Does this means matrix girds intersect with fracture 1?
If you want to get all the (i, j, k) indices of matrix grids which intersect with one fracture. Like this: you have 3 fractures, and you want all the (i, j, k) indices of matrix intersect with Fracture 1.
If you want this, you can refer to G.FracGrid.Frac1.matrix_connection.cells, this variable is the indices of all matrix which intersect with Fracture 1. And then you can get the  (i, j, k) indices by this variable.
Hope I understand you well. And the following is an example, by this way, you can get all (i, j, k) indices of matrix grids which intersect with Frac1.
%%
clear; close all; clc
%%
celldim = [10, 10, 3];
physdim = [100, 100, 100];
G = cartGrid(celldim, physdim);
G = computeGeometry(G);
G.rock=makeRock(G,100*milli*darcy,0.3);
[I,J,K] = gridLogicalIndices(G);
%%
points = [20 20 0;
60 60 0;
60 60 100;
20 20 100]; %vertices
f2normal = getnormal(points);
points([1,2],:)=points([1,2],:)-f2normal*15; % displace top points
points([3,4],:)=points([3,4],:)+f2normal*15; % displace bottom points
fracplanes(1).points = points;
fracplanes(1).aperture = 1/25;
fracplanes(1).poro=0.8;
fracplanes(1).perm=10000*darcy;
figure;
plotfracongrid(G,fracplanes);
view(30,45)
%%
tol=1e-5;
[G,fracplanes]=EDFMgrid(G,fracplanes,...
'Tolerance',tol,'fracturelist',1:length(fracplanes));
%%
figure;
plotGrid(G,'facealpha',0,'edgealpha',0.5);
view(30,45); axis equal tight; hold on;
plotGrid(G, G.FracGrid.Frac1.matrix_connection.cells, 'facecolor', 'y', 'facealpha', 0.5);
plotfracongrid(G, fracplanes, 'fracfacealpha', 1, 'fracfacecolor', 'r');
%%
I1 = I(G.FracGrid.Frac1.matrix_connection.cells);
J1 = J(G.FracGrid.Frac1.matrix_connection.cells);
K1 = K(G.FracGrid.Frac1.matrix_connection.cells);
IJK = [I1 J1 K1];

Best regards,
XiuWei

Calvin Scott

unread,
May 11, 2024, 3:31:54 AMMay 11
to XiuWei Liu, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear XiuWei,
Thank you very much for your guidance and clarification. Your pointers have been immensely beneficial to me, and now I understand that I can directly index the coordinates corresponding to the grid blocks through numerical values, revealing such hidden correspondences. This discovery is very inspiring to me because with your explanation, I will be able to avoid a lot of unnecessary tedious work in my subsequent tasks. Additionally, you kindly provided the code, which will help me to understand better. I'm truly grateful to you. Thank you.

Best regards,
Calvin

Reply all
Reply to author
Forward
0 new messages