This method assumes a log normal permeability distribution and gives rise to a coefficient of permeability variation between 0 and 1.

First of all, we have to recall the DATA

rdata<-read.csv("C:/Users/alzah/Downloads/Telegram Desktop/karpur.csv", header=TRUE)
summary(rdata)
##      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

arranging the k values in descending order

rdata=rdata[order(rdata$k.core, decreasing=TRUE),]
K=rdata$k.core

Number of samples >= k

sample=c(1:length(K))

Calculating the present of the samples with permeabilities greater than that value (%>=k)

k.percent = (sample * 100) / length(K)
plot(k.percent, K, log =  'y', xlab = "Portion of total sample having higher permeability ", ylab = "Sample permeability, md", pch = 10, cex = 1, col = "blue")

We can notice that the plot gives a straight line, at least when the central portion is used. Therefore, a simple linear regression model can be generated with showing the optimal line.

log.k = log(K)
slr = lm(log.k ~ k.percent)
plot(k.percent,log.k, xlab = "Portion of total sample having higher permeability ", ylab = "Sample permeability, md", pch = 10, cex = 1, col = "gray")
abline(slr, col = 'red', lwd = 2)

Now, Dykstra-Parsons coefficient of permeability variation (heterogeneity) can be determined through:

Hdata = data.frame(k.percent  = c(50, 84.1))
pred.values = predict(slr, Hdata)
Heterogenity.index = (pred.values[1] - pred.values[2]) / pred.values[1]
Heterogenity.index
##         1 
## 0.2035464

HI=0.2035, which is close to zero. Therefore, this reservoir can be classified as homogeneous or slightly heterogeneous reservoir.