Petroleum reservoirs are nearly always heterogeneous. Therefore, it is necessary to be able to quantify the degree of heterogeneity of a reservoir.
data = read.csv("karpur.csv")
head(data)
For simplicity, sorting permeability values in a descending order.
data = data[order(data$k.core, decreasing=TRUE),]
k = data$k.core
Since values are sorted, number of samples \>= k is actually the row indices
sample = c(1: length(k))
Calculating %\>=k
k_percent=(sample * 100)/length(k)
When plotting the output, a straight line is observed.
xlab = "Portion of Total Samples Having Larger or Equal K"
ylab = "Permeability (md)"
plot(k_percent, k, log= 'y', xlab = xlab, ylab = ylab, pch = 10, cex = 0.5,col = "#001c49")
A linear model is fitted to the data.
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)
Brief description of the model coefficients and evaluation metrics.
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
calculating the HI mathematically.
new_data = data.frame(k_percent = c(50, 84.1))
predicted_values = predict(model, new_data)
heterogeneity_index = (predicted_values[1] - predicted_values[2]) /
predicted_values[1]
heterogeneity_index
1
0.2035464
So, the heterogeneity index = 0.2 , which means slightly heterogeneous reservoir.