Heterogeneity is a function of horizontal permeability and can often be measured using two methods: 1- Dykstra-Parsons The data used
data = read.csv("karpur.csv")
This method required using only the K.core column from our data SORTING DATD BASED ON K CORE
sort_data = data[order(data$k.core, decreasing = TRUE), ]
#EXTRACTING K CORE VALUES IN ORDER
K = sort_data$k.core
creating another vector containing the number of samples ≥ k and calculat k_percent
sample = c(1:819)
k_percent = (sample * 100) / 820
we will plot Y values (log permeability) and X values k_percent
# Define axis titles
xlab = " % >= k "
ylab = " k (md)"
# Draw the graph
plot(k_percent, K, log = 'y', xlab = xlab, ylab = ylab, pch = 12, cex = 0.4, col = "#001c49")
Now, let’s find the Linear Model
log_k = log(K)
model = lm(log_k ~ k_percent)
plot(k_percent,log_k, xlab = xlab, ylab = ylab, pch = 12, cex = 0.4, col = "#001c49")
abline(model, col = 'purple', lwd = 2)
calculate heterogeneity index
# Define new data
new_data = data.frame(k_percent = c(50, 84.1))
# Predict values using the model
predicted_values = predict(model, new_data)
# Calculate the heterogenity index
heterogenity_index = (predicted_values[1] - predicted_values[2]) / predicted_values[1]
heterogenity_index
## 1
## 0.2038692
2- Lorenz Coefficient This method is measuring the inequality of distribution of a property, in finance for example: Is the income distributed equally among the population? The same concept can be applied in reservoir engineering but between the flow capacity (KH) and storage volume (PHIK).
data = read.csv("karpur.csv")
we need to calculate the thickness of each permeability based on Depth[i] - Depth[i-1]
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), ]
calculate the flow capacity and storage capacity which is easily the multiplication between permeability and porosity with corresponding thickness.
KH = thickness * data$k.core
PH = thickness * data$phi.core
sum_kh = cumsum(KH)
sum_ph = cumsum(PH)
calculate the fraction total volume and fraction total flow
fra_tot_volu = (sum_ph/100) / max(sum_ph/100)
fra_tot_flow = sum_kh / max(sum_kh)
plotting the percent of storage capacity on X-axis and the percent of flow capacity on Y-axis:
plot(fra_tot_volu,fra_tot_flow, pch = 12, cex = 0.4, col = '#001c49', text(0.4, 0.8, "D"))
text(0,0, "A", pos = 2)
text(1,1, "B", pos = 1)
text(1,0, "C", pos = 2)
abline(0,1, col = 'purple', lwd = 2)
We need to estimate the area under the curve (ADBCA).
require("DescTools")
## Loading required package: DescTools
library(DescTools)
area = AUC(fra_tot_volu, fra_tot_flow, method="trapezoid")
Lorenz_Coefficient = (area - 0.5) / 0.5
Lorenz_Coefficient
## [1] 0.4524741