How to convert non-hexahedral elements into hexahedral elements?

32 views
Skip to first unread message

林克

unread,
Nov 11, 2024, 10:48:23 AM11/11/24
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear MRST Administrator:
Hello, I now encounter a problem, I import the grid from petrel to MRST, and find that some units are non-hexahedral units, which will affect my later conversion of MRST to FLAC3 D for calculation. Is there any method or function in MRST that can directly convert non-hexahedral units into hexahedral units ?
Here are some of my converted code:

clear; clc;

mrstModule add ad-core ad-props co2lab coarsegrid mrst-gui

load('HSG_G.mat');
load('HSG_rock.mat');

A = diff(G.cells.facePos);

B = find(A ~= 6);

C = A(B, :);
D = G.cells.centroids(B, :);
index = [B, C, D];

writematrix(index, 'SQF_index.txt');

figure('Position', [200, 200, 1000, 800]);
hold on;

plotGrid(G, 'FaceColor', 'none', 'EdgeColor', [0.8, 0.8, 0.8]);

plot3(D(:, 1), D(:, 2), D(:, 3), 'ro', 'MarkerSize', 10, 'MarkerFaceColor', 'r');

xlabel('X-coordinate');
ylabel('Y-coordinate');
zlabel('Z-coordinate');
title('Non-Hexahedral Cells in the Mesh');
view(3);
grid on;
hold off;

Best Regards, 林克

Olav Møyner

unread,
Nov 12, 2024, 4:40:53 AM11/12/24
to 林克, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

I am not familiar with the FLAC3D workflow, but I can explain a bit about what MRST does here. The corner-point grid format (from petrel) is not a hexahedral format in the presence of faults and pinched/eroded cells. MRST handles this by adding faces and nodes to make a mesh. If MRST makes some cells into non-hexahedral cells it is likely that this is fundamental to the model you are exporting from Petrel. MRST does include mechanical solvers that work on these meshes, but corner point meshes are in general a bit hard to deal with for general software that assumes regular structure and conformal meshes.

Best regards,
Olav

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of 林克 <a2375...@gmail.com>
Sent: Monday, November 11, 2024 16:48
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] How to convert non-hexahedral elements into hexahedral elements?
 
--
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 visit https://groups.google.com/d/msgid/sintef-mrst/cf80eb3b-4f63-4ff3-8ec6-5af6cc030addn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages