forked from gcpeixoto/gawps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflowcapacity.m
75 lines (59 loc) · 1.92 KB
/
flowcapacity.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
function F = flowcapacity(G, perm, ind)
% Calculates the normalized cumulative flow capacity of the well.
% The normalized cumulative flow capacity is a method for characterizing
% wells in a hydrocarbon reservoir, based on the stratigraphic modified
% Lorenz plot.
%
% SYNOPSIS:
% ncfc = flowcapacity(G, rock.perm, ind)
%
% PARAMETERS:
% G - struct containing the grid data.
% rock.perm - permeability field.
% ind - well indeces.
%
% RETURNS:
% ncfc - array containing the normalized cumulative flow capacity of
% the well.
%
% SEE ALSO:
% resmodel, winland, classiclorenz, stratigraphiclorenz,
% derivativesmlp, modifiedlorenz, normalizedrqi, normalprobability,
% dykstraparsons.
%{
UFPB - Federal University of Paraiba
LAMEP - Petroleum Engineering Modelling Laboratory
Thiago Ney Evaristo Rodrigues
Dr. Gustavo Charles Peixoto de Oliveira
This file is part of the tool GAWPS.
GAWPS is a set of codes for simulating wells using graphical methods for
characterizing oil reservoirs, based on MRST (MATLAB Reservoir Simulation
Toolbox).
%}
[~, len] = size(ind); % Number of Wells
h = G.faces.centroids(G.cells.faces(G.cells.faces(:,2)==6,1),3) - ...
G.faces.centroids(G.cells.faces(G.cells.faces(:,2)==5,1),3);
h = h(ind); % Thickness
permcumsum = cumsum(perm(ind).*h);
F = permcumsum./max(permcumsum); % Normalized Cumulative Flow Capacity
H = G.cells.centroids(:,3);
H = H(ind); % Depth
%% Plot
str = [];
for i = 1:len
formatSpec = "W%d";
aux = compose(formatSpec, i);
str = [str; aux];
end
figure
for i = 1:len
pl = plot(H(:,i), F(:,i), '-s');
set(pl, 'MarkerFaceColor', pl.Color)
hold on
end
% title('Normalized Cumulative Flow Capacity')
legend(str, 'Location', 'southeast')
xlabel('Depth [m]')
ylabel('Flow Capacity')
xlim([min(H, [], 'all') max(H, [], 'all')])
grid