Dykstra–Parsons coefficient (VK), is another measure of heterogeneity. It is a dimensionless measure of sample variability or dispersion. It is defined as the ratio of the sample standard deviation(s) to mean.
data<-read.csv("C:/Office/karpur.csv",header=T)
summary(data)
## depth caliper ind.deep ind.med
## Min. :5667 Min. :8.487 Min. : 6.532 Min. : 9.386
## 1st Qu.:5769 1st Qu.:8.556 1st Qu.: 28.799 1st Qu.: 27.892
## Median :5872 Median :8.588 Median :217.849 Median :254.383
## Mean :5873 Mean :8.622 Mean :275.357 Mean :273.357
## 3rd Qu.:5977 3rd Qu.:8.686 3rd Qu.:566.793 3rd Qu.:544.232
## Max. :6083 Max. :8.886 Max. :769.484 Max. :746.028
## gamma phi.N R.deep R.med
## Min. : 16.74 Min. :0.0150 Min. : 1.300 Min. : 1.340
## 1st Qu.: 40.89 1st Qu.:0.2030 1st Qu.: 1.764 1st Qu.: 1.837
## Median : 51.37 Median :0.2450 Median : 4.590 Median : 3.931
## Mean : 53.42 Mean :0.2213 Mean : 24.501 Mean : 21.196
## 3rd Qu.: 62.37 3rd Qu.:0.2640 3rd Qu.: 34.724 3rd Qu.: 35.853
## Max. :112.40 Max. :0.4100 Max. :153.085 Max. :106.542
## SP density.corr density phi.core
## Min. :-73.95 Min. :-0.067000 Min. :1.758 Min. :15.70
## 1st Qu.:-42.01 1st Qu.:-0.016000 1st Qu.:2.023 1st Qu.:23.90
## Median :-32.25 Median :-0.007000 Median :2.099 Median :27.60
## Mean :-30.98 Mean :-0.008883 Mean :2.102 Mean :26.93
## 3rd Qu.:-19.48 3rd Qu.: 0.002000 3rd Qu.:2.181 3rd Qu.:30.70
## Max. : 25.13 Max. : 0.089000 Max. :2.387 Max. :36.30
## k.core Facies
## Min. : 0.42 Length:819
## 1st Qu.: 657.33 Class :character
## Median : 1591.22 Mode :character
## Mean : 2251.91
## 3rd Qu.: 3046.82
## Max. :15600.00
Only K.core data will be worked on.
The Frequency should be found for K.core.
# Create dataframe
b<-table(data$k.core)
df=data.frame(b)
t=t(df)
t=as.data.frame(t)
r=rev(t)
r=t(r)
r=as.data.frame(r)
K.core=r$Var1
Frequency=r$Freq
df2=data.frame(K.core,Frequency)
mo=head(df2,100)
mo1=head(df2,25)
mo1
K.core Frequency
1 15600 1
2 14225.3135 1
3 13544.9785 1
4 13033.5283 1
5 11841.7432 1
6 11117.4023 1
7 10860 1
8 10649.958 1
9 10540 1
10 9898.4785 1
11 9533.3623 1
12 9458.1729 1
13 9120 1
14 8820.1025 1
15 8820 2
16 8760 1
17 8742.7529 1
18 8689.8252 1
19 8390 1
20 8306.0459 1
21 8190 1
22 8030 1
23 7956.4258 1
24 7930 1
25 7918.8984 1
Then, the Number of samples with large Permeability will be found and the Cumulative Frequency Distribution.
df5=data.frame(mo)
m=seq(1,100)
df3=data.frame(m)
df3$m=as.numeric(df3$m)
df5$Frequency=as.numeric(df5$Frequency)
f=df3$m+df5$Frequency
s=table(f)
df4=data.frame(s)
no=rbind(data.frame(f = 1, Freq = 1), df4)
rr=no$f
dd=data.frame( rr)
bb=as.numeric(rr)
gg=(bb/102)*100
df6=data.frame(K.core=df5$K.core,Freq=df5$Frequency,NO.samples=dd$rr,Cum_Freq=gg)
head(df6,30)
K.core Freq NO.samples Cum_Freq
1 15600 1 1 0.9803922
2 14225.3135 1 2 1.9607843
3 13544.9785 1 3 2.9411765
4 13033.5283 1 4 3.9215686
5 11841.7432 1 5 4.9019608
6 11117.4023 1 6 5.8823529
7 10860 1 7 6.8627451
8 10649.958 1 8 7.8431373
9 10540 1 9 8.8235294
10 9898.4785 1 10 9.8039216
11 9533.3623 1 11 10.7843137
12 9458.1729 1 12 11.7647059
13 9120 1 13 12.7450980
14 8820.1025 1 14 13.7254902
15 8820 2 15 14.7058824
16 8760 1 17 16.6666667
17 8742.7529 1 18 17.6470588
18 8689.8252 1 19 18.6274510
19 8390 1 20 19.6078431
20 8306.0459 1 21 20.5882353
21 8190 1 22 21.5686275
22 8030 1 23 22.5490196
23 7956.4258 1 24 23.5294118
24 7930 1 25 24.5098039
25 7918.8984 1 26 25.4901961
26 7862.0825 1 27 26.4705882
27 7740 1 28 27.4509804
28 7725.96 1 29 28.4313725
29 7525.2207 1 30 29.4117647
30 7517.4834 1 31 30.3921569
Now, the data is ready to be plotted.
df6$K.core=as.numeric(df6$K.core)
df6$K.core=log(df6$K.core)
slop=gg
model1=lm(df6$K.core ~ slop)
plot(gg,df6$K.core,xlab ='Samples with larger Permeability',ylab='Permeability, md',axes = F)
axis(2,col = "darkgreen",col.axis="black")
axis(1,col = "darkgreen",col.axis="red")
abline(model1, lwd=3, col='green')
#find the intercept and slop
model1
Call:
lm(formula = df6$K.core ~ slop)
Coefficients:
(Intercept) slop
9.272671 -0.009271
Now, Heterogeneity Index Can be found as flow.
#find K50
K50=9.272671-0.009271*50
K50=exp(K50)
#find K84.1
K84.1=9.272671-0.009271*84.1
K84.1=exp(K84.1)
#find Heterogeneity Index
HI=(K50-K84.1)/K50
HI
[1] 0.2710434
According to Dykstra-Parsons method this value refer to Slightly Heterogeneity in the Reservoir.
it has provided a useful way to represent as a single value the degree of heterogeneity in the productivity versus storativity relationship that exists for a given scenario.
using Depth to measure h
#Calculate thickness from depth
thickness = c(0.5)
for (i in 2:819) {
h = data$depth[i] - data$depth[i-1]
thickness = append(thickness, h)
}
data = data[order(data$k.core, decreasing = TRUE), ]
Second, calculate the flow capacity and storage capacity.
KH = thickness * data$k.core
PH = thickness * data$phi.core
cum_sum_kh = cumsum(KH)
cum_sum_ph = cumsum(PH)
FTV = (cum_sum_ph/100) / max(cum_sum_ph/100) #to convert phi between (0,1)
FTF = cum_sum_kh / max(cum_sum_kh)
Now, the Graph is ready to be plotted.
plot(FTV,FTF,xlab="Fraction of Total Volume",ylab="Fraction of Total Flow Capacity", pch = 10, cex = 0.2, col = 'gold', text(0.4, 0.8, "B"))
text(0,0, "A", pos = 2)
text(1,1, "C", pos = 1)
text(1,0, "D", pos = 2)
abline(0,1, col = 'red', lwd = 1)
A = AUC(FTV,FTF, method="trapezoid")
HI = (A - 0.5) / 0.5
HI
## [1] 0.4524741
According to Lorenz Coefficient (Lk) method this value refer to heterogeneous Reservoir.