Learn R Programming

gek (version 1.2.0)

borehole: Borehole Function

Description

The borehole function is defined by $$f_{\rm borehole}(x) = \frac{2 \pi T_u (H_u - H_l)}{\log(r/r_w)\left(1 + \frac{2 L T_u}{\log(r / r_w) r_w^2 K_w} + \frac{T_u}{T_l}\right)}$$ with \(x = (r_w, r, T_u, H_u, T_l, H_l, L, K_w)\).

Usage

borehole(x)
boreholeGrad(x)

Value

borehole returns the function value of borehole function at x.

boreholeGrad returns the gradient of borehole function at x.

Arguments

x

a numeric vector of length 8 or a numeric matrix with n rows and 8 columns.

Author

Carmen van Meegen

Details

The borehole function calculates the water flow rate \(\rm [m^3/yr]\) through a borehole.

InputDomainDistributionDescription
\(r_w\)\([0.05, 0.15]\)\(\mathcal{N}(0.1, 0.0161812)\)radius of borehole in \(\rm m\)
\(r\)\([100, 50000]\)\(\mathcal{LN}(7.71, 1.0056)\)radius of influence in \(\rm m\)
\(T_u\)\([63070, 115600]\)\(\mathcal{U}(63070, 115600)\)transmissivity of upper aquifer in \(\rm m^2/yr\)
\(H_u\)\([990, 1100]\)\(\mathcal{U}(990, 1110)\)potentiometric head of upper aquifer in \(\rm m\)
\(T_l\)\([63.1, 116]\)\(\mathcal{U}(63.1, 116)\)transmissivity of lower aquifer in \(\rm m^2/yr\)
\(H_l\)\([700, 820]\)\(\mathcal{U}(700, 820)\)potentiometric head of lower aquifer in \(\rm m\)
\(L\)\([1120, 1680]\)\(\mathcal{U}(1120, 1680)\)length of borehole in \(\rm m\)
\(K_w\)\([9855, 12045]\)\(\mathcal{U}(9855, 12045)\)hydraulic conductivity of borehole in \(\rm m/yr\)

Note, \(\mathcal{N}(\mu, \sigma)\) represents the normal distribution with expected value \(\mu\) and standard deviation \(\sigma\) and \(\mathcal{LN}(\mu, \sigma)\) is the log-normal distribution with mean \(\mu\) and standard deviation \(\sigma\) of the logarithm. Further, \(\mathcal{U}(a,b)\) denotes the continuous uniform distribution over the interval \([a,b]\).

References

Harper, W. V. and Gupta, S. K. (1983). Sensitivity/Uncertainty Analysis of a Borehole Scenario Comparing Latin Hypercube Sampling and Deterministic Sensitivity Approaches. BMI/ONWI-516, Office of Nuclear Waste Isolation, Battelle Memorial Institute, Columbus, OH.

Morris, M., Mitchell, T., and Ylvisaker, D. (1993). Bayesian Design and Analysis of Computer Experiments: Use of Derivatives in Surface Prediction. Technometrics, 35(3):243--255. tools:::Rd_expr_doi("10.1080/00401706.1993.10485320").

See Also

gekm for another example.

testfunctions for further test functions.

Examples

Run this code
# List of inputs with their distributions and their respective ranges
inputs <- list("r_w" = list(dist = "norm", mean =  0.1, sd = 0.0161812, min = 0.05, max = 0.15),
	"r" = list(dist = "lnorm", meanlog = 7.71, sdlog = 1.0056, min = 100, max = 50000),
	"T_u" = list(dist = "unif", min = 63070, max = 115600),
	"H_u" = list(dist = "unif", min = 990, max = 1110),
	"T_l" = list(dist = "unif", min = 63.1, max = 116),
	"H_l" = list(dist = "unif", min = 700, max = 820),
	"L" = list(dist = "unif", min = 1120, max = 1680),
	# for a more nonlinear, nonadditive function, see Morris et al. (1993)
	"K_w" = list(dist = "unif", min = 1500, max = 15000))

# Function for Monte Carlo simulation
samples <- function(x, N = 10^5){
	switch(x$dist,
		"norm" = rnorm(N, x$mean, x$sd),
		"lnorm" = rlnorm(N, x$meanlog, x$sdlog),
		"unif" = runif(N, x$min, x$max))
}

# Uncertainty distribution of the water flow rate
set.seed(1)
X <- sapply(inputs, samples)
y <- borehole(X)
hist(y, breaks = 50, xlab = expression(paste("Water flow rate ", group("[", m^3/yr, "]"))), 
	main = "", freq = FALSE)

Run the code above in your browser using DataLab