Introduction

well data collected exhibits varying scales; for instance, core data is represented on a scale of (mm/cm), while log data may have a larger scale (cm/m). Both scales are smaller than the required reservoir scale (grids) used in simulation. Therefore, it is imperative to reconcile the core scale with the log scale before aligning them with the reservoir scale. This document covers only the first part of this process.

Data Processing

data set is :

data = read.csv("karpur.csv") head(data)

 

 

depth

<dbl>

caliper

<dbl>

ind.deep

<dbl>

ind.med

<dbl>

gamma

<dbl>

phi.N

<dbl>

R.deep

<dbl>

R.med

<dbl>

SP

<dbl>

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

6 rows | 1-10 of 14 columns

Checking Outliers

First let’s check if there are outliers in our interested data using plot-box:

par(mfrow = c(1,3)) boxplot(data$k.core, xlab = "Kcore", col = 'red', cex = 1.5) boxplot(data$phi.core, xlab = "PHIcore", col = 'green', cex = 1.5)
boxplot(data$phi.N, xlab = "PHlog", col = 'yellow', cex = 1.5)

There are clear outliers in Core-Permeability and Log-Porosity (Outliers showed by circles).

in oreder to remove these outliers, we can use the following:

quartiles1 = quantile(data$k.core, probs=c(.25, .75), na.rm = FALSE) quartiles2 = quantile(data$phi.N, probs=c(.25, .75), na.rm = FALSE)  IQR1 = IQR(data$k.core) IQR2 = IQR(data$phi.N)  Lower1 = quartiles1[1] - 1.5*IQR1 Upper1 = quartiles1[2] + 1.5*IQR1 Lower2 = quartiles2[1] - 1.5*IQR2 Upper2 = quartiles2[2] + 1.5*IQR2  sub1 = subset(data, data$k.core > Lower1 & data$k.core < Upper1) new_data  = subset(sub1, data$phi.N > Lower2 & data$phi.N < Upper2)

We calculate first (Q1) and third (Q3) quartiles by using quantile() function. Then, interquartile range (IQR) is found by IQR() function. Then, we calculate Q1 – 1.5*IQR to find lower limit for outliers. After that, we calculate Q3 + 1.5*IQR to find upper limit for outliers. Then, we use subset() function to eliminate outliers.

Let’s check it again:

par(mfrow = c(1,3)) boxplot(new_data$k.core, xlab = "Kcore", col = 'red', cex = 1.5) boxplot(new_data$phi.core, xlab = "PHIcore", col = 'green', cex = 1.5)
boxplot(new_data$phi.N, xlab = "PHlog", col = 'yellow', cex = 1.5)

the number of outliers is less than before

Checking Normal Distribution

checking the normality of Kcore and PHIcore visually by histogram:

Kcore = new_data$k.core PHIcore = (new_data$phi.core) / 100 PHIlog = new_data$phi.N  par(mfrow = c(1,2)) hist(Kcore, main = '', xlab = "non-normlized K core") hist(PHIcore, main = '', xlab = "non-normlized PHI core")

as we see here k core is not normal

par(mfrow = c(2,2)) hist(Kcore, main = '', xlab = "non-normlized K core", col = "yellow") hist(PHIcore, main = '', xlab = "non-normlized PHI core", col = "yellow")
 hist(sqrt(Kcore), main = '', xlab = "normlized K core" , col = "green") hist(PHIcore, main = '', xlab = "normlized PHI core", col = "green")
KcoreNorm = sqrt(new_data$k.core)

Data Correlations

The data is now ready for the correlation process.

The correction of porosity core data by porosity log data

Using Linear Regression model ml() to find the relation between PHICORE and PHILOG

PhiCoreCorrected = lm(PHIcore ~ PHIlog) summary(PhiCoreCorrected)
 Call: lm(formula = PHIcore ~ PHIlog)  Residuals:       Min        1Q    Median        3Q       Max  -0.103280 -0.040444  0.009061  0.039229  0.093787   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept)  0.27170    0.01029  26.406   <2e-16 *** PHIlog      -0.04495    0.04096  -1.097    0.273     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 0.04538 on 642 degrees of freedom   (47 observations deleted due to missingness) Multiple R-squared:  0.001872,  Adjusted R-squared:  0.0003175  F-statistic: 1.204 on 1 and 642 DF,  p-value: 0.2729

The R2 is quite low, indicating a weak linearity between the variables.

Let’s plot the data for more understanding:

par(mfrow = c(1,1)) plot(PHIlog, PHIcore, col = '#001c49', pch = 15, cex = 0.5) abline(PhiCoreCorrected, col = "red" , lwd = "2")

Now we need corrected core porosity based on this model:

model_input = data.frame(PHIlog) PhiCoreCorrected = predict(PhiCoreCorrected, model_input)

The correction of core permeability by corrected core porosity

Using Linear Regression model ml() to find the relation between KCORE and PHICOREL

KcoreCorrected = lm(KcoreNorm ~ PhiCoreCorrected) summary(KcoreCorrected)
 Call: lm(formula = KcoreNorm ~ PhiCoreCorrected)  Residuals:     Min      1Q  Median      3Q     Max  -39.474 -13.311  -2.836  15.323  44.902   Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       -530.64      96.77  -5.484 6.00e-08 *** PhiCoreCorrected  2177.82     371.35   5.865 7.21e-09 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 18.49 on 642 degrees of freedom   (47 observations deleted due to missingness) Multiple R-squared:  0.05085,   Adjusted R-squared:  0.04937  F-statistic: 34.39 on 1 and 642 DF,  p-value: 7.208e-09

The R2 is quite low which is indicate low linearity between the variables.

Lets plot the data for more understanding:

plot(PhiCoreCorrected, KcoreNorm, col = '#001c49', pch = 15, cex = 0.5) abline(KcoreCorrected, col = "red" , lwd = "2")

To get the corrected value of core permeability based on this model:

input_model2 = data.frame(PhiCoreCorrected) KcoreCorrected = predict(KcoreCorrected, input_model2)

Let’s combine the result in on data-set:

KcoreNorm = KcoreNorm**2 KcoreCorrected = KcoreCorrected**2  final_data = data.frame(KcoreNorm, KcoreCorrected , PHIcore, PhiCoreCorrected, PHIlog) head(final_data)

KcoreNorm

<dbl>

KcoreCorrected

<dbl>

PHIcore

<dbl>

PhiCoreCorrected

<dbl>

PHIlog

<dbl>

1 3006.989 961.924 0.334131 0.2578982 0.307
2 3370.000 1697.016 0.331000 0.2625726 0.203
3 2270.000 2442.051 0.349000 0.2663481 0.119
4 3000.000 2413.114 0.360000 0.2662132 0.122
5 3066.865 2413.114 0.346627 0.2662132 0.122
6 3110.000 2500.442 0.338000 0.2666177 0.113

6 rows

In Conclusion

The relationship between Permeability and Porosity is not linear (low R2), making it unreasonable to model using Simple Linear Regression. Permeability is not solely dependent on porosity but is influenced by other properties, especially facies and other logs.