Scale Correction of Core Permeability

We should do scale correction to permeability that has few inch of data do spread it on the whole Reservoir.

Upload Data.

data<-read.csv("C:/Office/karpur.csv",header=T)
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

At First , we should find the correlation between phi.core and phi.log

model1 <- lm(data$phi.core/100 ~ data$phi.N)
summary(model1)
## 
## Call:
## lm(formula = data$phi.core/100 ~ data$phi.N)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.135237 -0.030779  0.009432  0.033563  0.104025 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.30962    0.00485  63.846   <2e-16 ***
## data$phi.N  -0.18207    0.02080  -8.753   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.04368 on 817 degrees of freedom
## Multiple R-squared:  0.08573,    Adjusted R-squared:  0.08462 
## F-statistic: 76.61 on 1 and 817 DF,  p-value: < 2.2e-16
plot(data$phi.N,data$phi.core,xlab="phi.log",ylab="phi.core",axes = F)
axis(2,col = "darkgreen",col.axis="black")
axis(1,col = "darkgreen",col.axis="red")
abline(model1, lwd=3, col='green')

Predict the core porosity corrected to the log scale by using phi.core and phi.log

phi.corel<-predict(model1,data)

To Compare between core porosity and core porosity corrected to the log scale

#cbind(data$phi.core/100,phi.corel)

Construction a relationship between permeability calculated from core and core porosity corrected to the log scale in order to get core premeability corrected to the log scale

model2<-lm(k.core~phi.corel+Facies-1,data=data)
summary(model2)
## 
## Call:
## lm(formula = k.core ~ phi.corel + Facies - 1, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5613.4  -596.9  -130.3   475.0 10449.1 
## 
## Coefficients:
##           Estimate Std. Error t value Pr(>|t|)    
## phi.corel    30268       6593   4.591 5.11e-06 ***
## FaciesF1     -6523       1935  -3.371 0.000784 ***
## FaciesF10    -7140       1730  -4.128 4.04e-05 ***
## FaciesF2     -7650       1824  -4.195 3.04e-05 ***
## FaciesF3     -7102       1798  -3.949 8.52e-05 ***
## FaciesF5     -3008       1833  -1.641 0.101209    
## FaciesF7     -6350       1848  -3.437 0.000619 ***
## FaciesF8     -4513       1731  -2.606 0.009315 ** 
## FaciesF9     -7093       1747  -4.060 5.37e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1546 on 810 degrees of freedom
## Multiple R-squared:  0.7652, Adjusted R-squared:  0.7626 
## F-statistic: 293.2 on 9 and 810 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(model2)

Predict and plot the core permeability corrected to the log scale

k.corel<-predict(model2,data)
plot(k.corel, col="gold",ylab="K.core log (md)",xlab="Number of K")

To Compare between core permeability and core permeability corrected to the log scale

#cbind(data$k.core,k.corel)

Combine the new column of corrected permeability to the file

karpur2<-cbind(data,k.corel)
write.csv(karpur2,"karpur2.csv")
head(karpur2)
##    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   k.corel
## 1       -0.033   2.205  33.9000 2442.590     F1  589.2371
## 2       -0.067   2.040  33.4131 3006.989     F1 1156.8516
## 3       -0.064   1.888  33.1000 3370.000     F1 1729.9769
## 4       -0.053   1.794  34.9000 2270.000     F1 2192.8857
## 5       -0.054   1.758  35.0644 2530.758     F1 2468.4267
## 6       -0.058   1.759  35.3152 2928.314     F1 2584.1540

Now, Data is represent as follow:

#plot graph
par(mfrow=c(1,5))
plot(y=y<-(data$depth),ylim=rev(range(data$depth)),x=x<-(data$phi.core/100),type="l", col="gold", lwd = 5, pch=17, xlab='phi.core',
     ylab='Depth, m', xlim=c(0.14,0.38), cex=1.5, cex.lab=1.5, cex.axis=1.2)
grid()
plot(y=y<-(data$depth),ylim=rev(range(data$depth)),x=x<-(data$ k.core),type="l", col="black", lwd = 5, pch=17, xlab='k.core',
     ylab='Depth, m', xlim=c(0.22,15800.00), cex=1.5, cex.lab=1.5, cex.axis=1.2)
grid()
plot(y=y<-(data$depth),ylim=rev(range(data$depth)),x=x<-(data$ phi.N),type="l", col="red", lwd = 5, pch=17, xlab='phi.N',
     ylab='Depth, m', xlim=c(0.012,0.510), cex=1.5, cex.lab=1.5, cex.axis=1.2)
grid()

plot(y=y<-(data$depth),ylim=rev(range(data$depth)),x=x<-(phi.corel),type="l", col="darkblue", lwd = 5, pch=17, xlab='phi.corel',
     ylab='Depth, m', xlim=c(0.16,0.38), cex=1.5, cex.lab=1.5, cex.axis=1.2)
grid()
plot(y=y<-(data$depth),ylim=rev(range(data$depth)),x=x<-(k.corel),type="l", col="red", lwd = 5, pch=17, xlab='k.corel',
     ylab='Depth, m', xlim=c(10,6400), cex=1.5, cex.lab=1.5, cex.axis=1.2)
grid()

#plot histigram
par(mfrow=c(1,2))
hist(phi.corel,col='darkblue',main='')
hist(k.corel,col='green',main='')