forked from gcpeixoto/gawps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdykstraparsons.m
81 lines (61 loc) · 1.9 KB
/
dykstraparsons.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
76
77
78
79
80
81
function [Ks, P, Vk] = dykstraparsons(perm, ind)
% Calculates the log-normal permeability distribution plot of the well.
% The log-normal permeability distribution plot is a method for
% characterizing wells in a hydrocarbon reservoir and identifying
% the level of heterogeneity.
%
% SYNOPSIS:
% [Ks, P, Vk] = dykstraparsons(perm, ind)
%
% PARAMETERS:
% rock.perm - permeability field.
% ind - well indices.
%
% RETURNS:
% Ks - array containing the sample permeability.
% P - array containing the log-normal permeability distribution.
% Vk - Dykstra-Parsons coefficient.
%
% SEE ALSO:
% resmodel, winland, classiclorenz, stratigraphiclorenz,
% derivativesmlp, modifiedlorenz, flowcapacity, normalizedrqi,
% normalprobability.
%{
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).
%}
[lay, len] = size(ind);
Ks = sort(perm(ind), 'descend'); % Sample Permeability
P = linspace(0,(lay-1)*100/lay, lay)';
i = 1:(lay-1);
I = find((Ks(i) - Ks(i+1)) == 0) + 1;
for j = 1:length(I)
P(I(j)) = P(I(j)-1);
end
for i = 1:len
Vk(i) = 1 - exp(-sqrt(log(mean(Ks(:,i))/harmmean(Ks(:,i)))));
end
%% Plot
str = [];
for i = 1:len
formatSpec = "W%d";
aux = compose(formatSpec, i);
str = [str; aux];
end
figure
for i = 1:len
sly = semilogy(P, Ks(:,i), '-s');
set(sly, 'MarkerFaceColor', sly.Color)
hold on
end
legend(str)
% title('Log-Normal Permeability Distribution')
xlabel('Portion of Total Sample Having Higher Permeability')
ylabel('Permeability [mD]')
grid