Heterogeneity is a function of horizontal permeability, and can be quantified by two techniques:
1-Dykstra-Parsons
2-Lorenz Coefficient
we used the data:
data = read.csv("karpur.csv")
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
1-Dykstra-Parson:
This one of the method use to measure of the heterogeneity of the reservoir depending on the permeability of the core
#laying based on K core
data = data[order(data$k.core, decreasing = TRUE), ]
K = data$k.core
After that, make another vector with the number of samples ≥ k. As the data order descends, the last K will have 819 (data length) values of transmittance greater than or equal to its value, while the first K will only have one.
sample = c(1:819)
The percentage of samples with permeability greater than or equal to the current K value, which represents the probability of the current K value, is the next necessary parameter. Note: the division to disregard having a probability of zero and one on [length of the data-set +1].
k_percent = (sample * 100) / 820
Now, all parameters is ready to use. Let’s plot Y values (logarithmic permeability) and X values (probability):
xlab = "Portion of Total Sample Having Higher K "
ylab = "Permeability in (md) "
plot(k_percent, K, log = 'y', xlab = xlab, ylab = ylab, pch = 10, cex = 0.5, col = "#001c49")
Now, let’s find the Linear Model that fits the data, lm() function used to build linear regression model:
log_k = log(K)
model = lm(log_k ~ k_percent)
plot(k_percent,log_k, xlab = xlab, ylab = ylab, pch = 10, cex = 0.5, col = "#001c49")
abline(model, col = 'red', lwd = 2)
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.0426137 0.0006549 -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
Our model has good R2 value which is obvious from the plot. abline is just adding the fitted line
new_data = data.frame(k_percent = c(50, 84.1))
Next Step: predict () function to predict from given model:
predicted_values = predict(model, new_data)
so the logarithmic permeability of K50 = 7.13 & K84.1 = 5.67
to calculate heterogeneity index:
V=(K50-K84.1)/(K50)
heterogenity_index = (predicted_values[1] - predicted_values[2]) / predicted_values[1]
heterogenity_index
## 1
## 0.2038692
The least amount of error can be achieved by using a homogeneous model because of the low heterogeneity value. With a heterogeneity index of 0.2038, the permeability distribution class is shown to be somewhat heterogeneous.
2- Lorenz Coefficient
This method measures the differently a property is distributed; in the setting of finance, for examples, is income distributed among the populace? In reservoir engineering, the same idea can be used, but it works between the flow capacity (KH) and storage volume (PHIK).
we using the same data:
data = read.csv("karpur.csv")
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
Calculation Steps: 1-Tabulate thickness , permeability , and porosity
#thickness calculation
thickness = c(0.5)
for (n in 2:819) {
h = data$depth[n] - data$depth[n-1]
thickness = append(thickness, h)}
data = data[order(data$k.core, decreasing = TRUE), ]
Step 2: Use the cumsum() function to calculate the cumulative permeability capacity and cumulative capacity volume.
KH = thickness * data$k.core
PH = thickness * data$phi.core
cum_sum_kh = cumsum(KH)
cum_sum_ph = cumsum(PH)
Step3:Calculate the normalized cumulative capacities cum.k.core=(∑(kh)i/∑(kh)t) cum.phi.core=(∑(PHI* h)i/∑(PHI *h)t)
frac_TOTAL_VOLUME = (cum_sum_ph/100) / max(cum_sum_ph/100) #to convert phi between (0,1)
frac_TOTAL_FLOW_CAPACITY = cum_sum_kh / max(cum_sum_kh)
Step 4: Draw a straight diagonal from the curve’s beginning to its end by plotting the FRACTION OF TOTAL VOLUME on the X-axis and the FRACTION OF TOTAL FLOW CAPACITY on the Y-axis:
plot(frac_TOTAL_VOLUME,frac_TOTAL_FLOW_CAPACITY, pch = 16, cex = 0.5, col = "black", text(0.4, 0.8, "B"))
text(0,0, "A", pos = 2)
text(1,1, "D", pos = 1)
text(1,0, "C", pos = 4)
abline(0,1, col = 'red', lwd = 3)
We must now calculate the area under the curve(ABCDA).
utilizing the numerical method known as trapezoid, which approximates the area under a curve using the AUC() function:d
require("DescTools")
## Loading required package: DescTools
library(DescTools)
area = AUC(frac_TOTAL_VOLUME, frac_TOTAL_FLOW_CAPACITY, method="trapezoid")
The formula of Lorenz Coefficient:
Lorenz Coefficient=[area(ABDA)-area(ACDA)]/[area(ACDA)]
Since area(ACDA)=0.5 So:
Lorenz_Coefficient = (area - 0.5) / 0.5
The heterogeneity Index:
Lorenz_Coefficient
## [1] 0.4524741
If Lk < 0, the reservoir is regarded as having a uniform permeability distribution. If Lk < 1, the reservoir is regarded as fully heterogeneous. Therefore, the current value of 0.452 is regarded as a highly heterogeneous reservoir.