Learn R Programming

Rrelperm

Rrelperm generates two- and three-phase relative permeability estimates for water and hydrocarbon systems. The calculated results are reported in a tabular format for fluid saturations from zero to one.

Installation

You can install the released version of Rrelperm from CRAN with:

install.packages("Rrelperm")

Example

library(Rrelperm)
library(ggplot2)
library(ggtern)
library(magrittr)

rel_perm_owg_st_ii_swsg <- kr3p_StoneII_SwSg(SWCON = 0.13, SWCRIT = 0.13, SOIRW = 0.20, 
                                      SORW = 0.2, SOIRG = 0.1, SORG = 0.1, SGCON = 0, 
                                      SGCRIT = 0, KRWIRO = 0.45, KROCW = 1, KRGCL = 0.35, 
                                      NW = 4.25, NOW = 2.5, NG = 3, NOG = 2, 
                                      NP = 501)

rel_perm_owg_st_ii_swsg <- as.data.frame(rel_perm_owg_st_ii_swsg)
colnames(rel_perm_owg_st_ii_swsg) <- c("Sw", "Sg", "So", "Kro")

rel_perm_owg_st_ii_swsg$Kro_range <- cut(rel_perm_owg_st_ii_swsg$Kro, breaks = seq(0,1, by = 0.1),
                                   right = TRUE, include.lowest = FALSE)

rel_perm_owg_st_ii_swsg_oil <- rel_perm_owg_st_ii_swsg[rel_perm_owg_st_ii_swsg$Kro > 0, ]

rel_perm_owg_st_ii_swsg_oil <- droplevels(rel_perm_owg_st_ii_swsg_oil)

p <- ggtern(data = rel_perm_owg_st_ii_swsg_oil, aes(x = Sw, y = Sg, z = So, value = Kro)) +
  geom_point(aes(value = Kro, fill = Kro_range, color = Kro_range), size = 1, shape = 22) +
  scale_T_continuous(limits = c(0.0,1.0), breaks = seq(0,1,by = 0.05)) +
  scale_L_continuous(limits = c(0.0,1.0), breaks = seq(0,1,by = 0.05)) +
  scale_R_continuous(limits = c(0.0,1.0), breaks = seq(0,1,by = 0.05)) +
  ggtitle("Three-phase Oil Relative Permeability - STONE II") +
  theme_classic()

p

Copy Link

Version

Install

install.packages('Rrelperm')

Monthly Downloads

4

Version

0.1.0

License

GPL-3

Maintainer

Farshad Tabasinejad

Last Published

June 25th, 2020

Functions in Rrelperm (0.1.0)

kr2p_ow

Generate a matrix of two-phase relative permeability data for the water-oil system using the modified Brooks-Corey model
kr3p_StoneII_SwSg

Generate a matrix of three-phase relative permeability data for the water-gas-oil system using the modified Stone II model
kr3p_StoneI_So

Generate a matrix of three-phase relative permeability data for the water-gas-oil system using the modified Stone I model
kr2p_gl

Generate a matrix of two-phase relative permeability data for the gas-liquid system using the modified Brooks-Corey model
kr3p_Baker

Generate a matrix of three-phase relative permeability data for the water-gas-oil system using Baker's linear model
kr3p_StoneII_So

Generate a matrix of three-phase relative permeability data for the water-gas-oil system using the modified Stone II model
kr3p_StoneI_SwSg

Generate a matrix of three-phase relative permeability data for the water-gas-oil system using the modified Stone I model