log_derivative: log_derivative

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utilities.R

Description

Function to calculate the derivative of drawdown wrt the log of time

Usage

1
2
log_derivative(t, s, d = 2, method = "central", return.pos = T,
  log = T)

Arguments

t

vector with time values

s

vector with drawdown values

d

Derivative parameter. if method equals to bourdet then d is equal to the number of adjacent values used in the derivative calculation. If method is equal to spline then d is equal to the number of knots used in the interpolation of the drawdown data. In this case a value of d=20 to d=30 is recommended. If method is equal to spane then d is equal to the number of points used in the linear regression approach.

method

Method to calculate the derivative (central, horner, bourdet and spline)

return.pos

Logical flag to return only the positive values of the log-derivative (default = TRUE)

log

Logical flag to indicate that natural logarithm (a log to the base e) is used in the derivative calculation (default = TRUE). Logarithm to the base 10 is used if FALSE.

Value

This function returns a list with components named as x and y that contains the log_derivative y evaluated at specific points x.

Author(s)

Oscar Garcia-Cabrejo khaors@gmail.com

See Also

Other log_derivative functions: log_derivative_bourdet, log_derivative_central, log_derivative_horner, log_derivative_kernelreg, log_derivative_locpol, log_derivative_lokern, log_derivative_lpridge, log_derivative_smoothspline, log_derivative_spane, log_derivative_spline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Load test data
data(theis)
# calculate derrivative of s wrt to logt using central differences
logd.central <- log_derivative(theis$t, theis$s)
# calculate derrivative of s wrt to logt using Horner method
logd.horner <- log_derivative(theis$t, theis$s, method = "horner")
# calculate derrivative of s wrt to logt using Bourdet method
logd.bourdet <- log_derivative(theis$t, theis$s, method = "bourdet")
# plot results
plot(logd.central$x, logd.central$y, type = "p")
points(logd.horner$x, logd.horner$y, col = "red")
points(logd.bourdet$x, logd.bourdet$y, col = "blue")

khaors/pumpingtest documentation built on Nov. 15, 2019, 8:10 p.m.