# Fetkovich Decline Curves

A short description of the post.

06-16-2021

For a well entered in a closed circular reservoir a constant BHFP , the relationship between Fetkovich dimensionless decline rate function qDd and dimensionless decline time tDd is defined as:

$q_{Dd} = q_D\left[ln \left(\frac{r_e}{r_{wa}}\right)-\frac{1}{2}\right]$ $t_{Dd} = \frac{t_D}{\frac{1}{2}\left[\left(\frac{r_e}{r_{wa}}\right)^2-1\right]\left[ln \left(\frac{r_e}{r_{wa}}\right)-\frac{1}{2}\right]}$ $r_{eD} = \frac{r_e}{r_{wa}}$ Dimensionless rate $$qD$$ in function of dimensionless time $$tD$$ can be approximate by (Edwardson et al., 1961):

$$t_D < 200$$

$q_D = \frac{26.7544 + 43.5537t_D^{0.5}+13.3813t_D+0.492949t_D^{1.5}}{47.421t_D^{0.5}+35.5372t_D+2.60967t_D^{1.5}}$ $$t_D \leq 200$$

$q_D = \frac{3.90086+2.02623t_D(ln \ t_D-1)}{t_D(ln\ t_D)^2}$

Now, we can generate Fetkovich dimensionless flow rate $$q_{Dd}$$ type curves

First, define $$t_{Dd}$$ and $$r_{eD}$$ range, in this case, 2000 $$t_{Dd}$$ values and 8 $$r_{eD}$$ values

library(emdbook)
library(reshape2)
library(dplyr)
library(plotly)

#Dimensionaless decline time
tDd <-  lseq(0.0001,10,2000)
reD <- c(10, 20, 50, 100, 10^3, 10^4, 10^5, 10^6)


We need to define $$t_D$$ from $$t_{Dd}$$ equation above, using sapply function we repeat the calculate with every $$r_{eD}$$ value.

For $$q_D$$, we define a functión qD.func(), using the aproximation and then calculate $$q_{Dd}$$

#Dimensionaless time
tD <- sapply(reD,function(reD){
tDd*(0.5*(reD^2-1)*(log(reD)-0.5))
})

#Dimensionaless rate
qD.func <- function(tD){
ifelse(tD < 200,
(26.7544+43.5537*tD^0.5+13.3818*tD+0.492949*tD^1.5)/
(47.421*tD^0.5+35.5372*tD+2.60967*tD^1.5),
(3.90086+2.02623*tD*(log(tD)-1))/(tD*(log(tD))^2))
}

qD <- qD.func(tD)

#Dimensionaless decline rate
qDd <- qD
for(i in 1:8){
qDd[,i] <- qD[,i]*(log(reD[i])-0.5)
}


For plotting, generate a Dataframe using all the above values, with the function melt you can join several column in one define a common variable, in this case $$t_{Dd}$$. Finally we plot $$q_{Dd}$$ vs $$t_{Dd}$$ for every $$r_{eD}$$

data.FET <- data.frame(tDd, qDd, exp(-tDd))
colnames(data.FET) <- c("TDd","10", "20", "50", "100", "10^3", "10^4", "10^5",
"10^6", "e(-tDd)")

data.FET <- reshape2::melt(data.FET,id.vars=c("TDd"))

colnames(data.FET)<-c("TDd","reD", "qDd")

data.FET <- data.FET %>%
filter(qDd >= 0.01)

data.FET$qDd <- ifelse(data.FET$TDd > 0.13 & data.FET$reD != "e(-tDd)", NA, data.FET$qDd)

#Plot
plot_FET <- plot_ly() %>%
add_trace(x = data.FET$TDd , y = data.FET$qDd, color = data.FET$reD, legendgroup = 'group1', mode = 'lines', text =data.FET$reD,
hovertemplate  = paste("reD: %{text}")) %>%
layout(xaxis = list(title = "tDd", type = "log"),
yaxis = list(title = "qDd", type = "log"),
legend=list(title=list(text = "reD")))

plot_FET