Why we need to do Scale Correction of Core Permeability ?
Scale Correction is essential step when we dealing with Reservoir Simulation because the data we get from core samples is in few inches and in Reservoir Simulation we deal with grids that have minimum dimensions(10 X 10 X 10 meters).
So let’s start and upload some Data.
depth <- seq(3000, 3499.5, sd=0.5)
## Warning: In seq.default(3000, 3499.5, sd = 0.5) :
## extra argument 'sd' will be disregarded
vsh <- rnorm(1000, mean=50, sd=10)
sw <- rnorm(1000, mean=0.5, sd=0.15)
por <- rnorm(1000, mean=0.3, sd=0.1)
perm <- rnorm(1000, mean=2000, sd=500)
par(mfrow=c(2,2))
hist(vsh, col='red', main='', xlab='Shale Volume')
hist(sw, col='blue', main='', xlab='Water Saturation')
hist(por, col='gold', main='', xlab='Porosity')
hist(perm, col='green', main='', xlab='Permeability, md')
model <- lm(perm~por+vsh+sw)
summary(model)
##
## Call:
## lm(formula = perm ~ por + vsh + sw)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1638.29 -324.71 -8.48 307.98 1522.32
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1918.617 99.865 19.212 <2e-16 ***
## por 335.203 158.203 2.119 0.0344 *
## vsh 1.009 1.477 0.683 0.4947
## sw -206.087 100.777 -2.045 0.0411 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 479.4 on 996 degrees of freedom
## Multiple R-squared: 0.009161, Adjusted R-squared: 0.006176
## F-statistic: 3.069 on 3 and 996 DF, p-value: 0.0271
rdata <- data.frame(depth,vsh,sw,por,perm)
summary(rdata)
## depth vsh sw por
## Min. :3000 Min. :13.95 Min. :-0.002885 Min. :0.03424
## 1st Qu.:3125 1st Qu.:43.30 1st Qu.: 0.396466 1st Qu.:0.24588
## Median :3250 Median :50.12 Median : 0.499801 Median :0.31195
## Mean :3250 Mean :49.97 Mean : 0.500604 Mean :0.30898
## 3rd Qu.:3374 3rd Qu.:56.93 3rd Qu.: 0.593428 3rd Qu.:0.37463
## Max. :3499 Max. :84.30 Max. : 1.000289 Max. :0.65124
## perm
## Min. : 267.5
## 1st Qu.:1642.7
## Median :1956.9
## Mean :1969.4
## 3rd Qu.:2281.5
## Max. :3493.7
dim(rdata)
## [1] 1000 5
write.csv(rdata, "rdata.csv")
plot(por,perm, xlab='Porosity', ylab='Permeability',
col='darkred', pch=19, main='Poro-K CP')
grid()
abline(0,1)
data<-read.csv("C:/Users/Lenovo/Desktop/karpur.csv",header=TRUE)
summary(data)
## 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
plot(data$phi.core,data$k.core, xlab='Core Porosity',
ylab='Core Permeability', col='blue', pch=19)
Now we build a simple linear regression model
slr <- lm(k.core ~ phi.core, data = data)
summary(slr)
##
## Call:
## lm(formula = k.core ~ phi.core, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2480.4 -1291.4 -383.9 355.0 13123.2
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4013.55 411.82 -9.746 <2e-16 ***
## phi.core 232.63 15.08 15.431 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1968 on 817 degrees of freedom
## Multiple R-squared: 0.2257, Adjusted R-squared: 0.2247
## F-statistic: 238.1 on 1 and 817 DF, p-value: < 2.2e-16
Now we predicted the core permeability as a function of core porosity from the same dataset (kdata)
k.core.pred <- predict(slr, data=data)
cbind(kdata$k.core,k.core.pred) Corssplot between the measured and predicted core perm
plot(data$k.core,k.core.pred, xlab='Measured Perm',
ylab='Predicted Perm', col='gold', pch=16)
Plot the best straight line
par(mfrow=c(2,1))
plot(data$phi.core,data$k.core, xlab='Core Porosity',
ylab='Core Permeability', col='blue', pch=19)
plot(data$k.core,k.core.pred, xlab='Measured Perm',
ylab='Predicted Perm', col='gold', pch=16)
hist(data$k.core)