The Heterogeneity Index can be calculated using two methods:
Dykstra-Parsons Method: Only described
Lorenz Method
setwd("C:/Users/n/Desktop/ResCharHomework")
data<-read.csv(("karpur.csv"), header = TRUE)
head(data)
## depth caliper ind.deep ind.med gamma phi.N R.deep R.med SP
## 1 5667.0 8.685 618.005 569.781 98.823 0.410 1.618 1.755 -56.587
## 2 5667.5 8.686 497.547 419.494 90.640 0.307 2.010 2.384 -61.916
## 3 5668.0 8.686 384.935 300.155 78.087 0.203 2.598 3.332 -55.861
## 4 5668.5 8.686 278.324 205.224 66.232 0.119 3.593 4.873 -41.860
## 5 5669.0 8.686 183.743 131.155 59.807 0.069 5.442 7.625 -34.934
## 6 5669.5 8.686 109.512 75.633 57.109 0.048 9.131 13.222 -39.769
## density.corr density phi.core k.core Facies
## 1 -0.033 2.205 33.9000 2442.590 F1
## 2 -0.067 2.040 33.4131 3006.989 F1
## 3 -0.064 1.888 33.1000 3370.000 F1
## 4 -0.053 1.794 34.9000 2270.000 F1
## 5 -0.054 1.758 35.0644 2530.758 F1
## 6 -0.058 1.759 35.3152 2928.314 F1
ordered_data = data[order(data$k.core, decreasing = TRUE), ]
k = ordered_data$k.core
num_samples = c(1: length(k))
k_percent = (num_samples * 100)/length(k)
plot(k_percent, k,
log = "y", # Set y-axis to log scale
xlab = "Portion of Total Samples Having Larger or Equal k",
ylab = "Permeability (mD)",
pch = 19,
col = "black",
main = "Semi-Log Plot of Permeability vs. Sample Portion"
)
log_k = log(k)
model = lm(log_k ~ k_percent)
summary((model))
##
## Call:
## lm(formula = log_k ~ k_percent)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.8697 -0.2047 0.1235 0.3150 0.4280
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.2584172 0.0377994 244.94 <2e-16 ***
## k_percent -0.0425617 0.0006541 -65.07 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5404 on 817 degrees of freedom
## Multiple R-squared: 0.8382, Adjusted R-squared: 0.838
## F-statistic: 4234 on 1 and 817 DF, p-value: < 2.2e-16
wanted_k = data.frame(k_percent = c(50, 84.1))
predict_k = predict(model, wanted_k)
HI = (predict_k[1]-predict_k[2]) / predict_k[1]
HI
## 1
## 0.2035464
The Value Range according to Dykstra-Parsons is as follows:
0 = Completely homogeneous (all layers have identical permeability).
1 = Extremely heterogeneous (large differences in permeability across layers).
Therefore, this reservoir is considered to have moderate heterogeneity, as the Dykstra-Parsons coefficient is around 0.2035464.