Skip to contents

head_to_potential() calculates the discharge potential from the hydraulic head.

potential_to_head() calculates the hydraulic head from the discharge potential.

Usage

head_to_potential(aem, h, ...)

potential_to_head(aem, phi, na.below = TRUE, ...)

Arguments

aem

aem object.

h

numeric hydraulic head values as vector or matrix.

...

ignored

phi

numeric discharge potential values as vector or matrix.

na.below

logical indicating if calculated head values below the aquifer base should be set to NA. Defaults to TRUE. See details.

Value

head_to_potential() returns the discharge potentials calculated from h, in the same structure as h.

potential_to_head() returns the hydraulic heads calculated from phi, in the same structure as phi.

The conversion of potential to head or vice versa is different for confined (constant saturated thickness) and unconfined (variable saturated thickness) aquifers as set by the type argument in aem().

If na.below = FALSE, negative potentials can be converted to hydraulic heads if flow is unconfined (aem$type = 'variable'). The resulting heads are below the aquifer base. This may be useful for some use cases, e.g. in preliminary model construction or for internal functions. In most cases however, these values should be set to NA (the default behavior) since other analytic elements will continue to extract or inject water even though the saturated thickness of the aquifer is negative, which is not realistic. In those cases, setting aem$type = 'confined' might prove useful. Also note that these heads below the aquifer base will not be correctly re-converted to potentials using head_to_potential(). As such, caution should be taken when setting na.below = FALSE.

Examples

k <- 10
top <- 10; base <- 0
uf <- uniformflow(TR = 100, gradient = 0.001, angle = -45)
rf <- constant(TR, xc = -1000, yc = 0, hc = 10)
w1 <- well(200, 50, Q = 250)
m <- aem(k, top, base, n = 0.2, uf, rf, w1, type = 'variable') # variable saturated thickness
mc <- aem(k, top, base, n = 0.2, uf, rf, w1, type = 'confined') # constant saturated thickness
xg <- seq(-500, 500, length = 100)
yg <- seq(-250, 250, length = 100)

h <- heads(m, x = xg, y = yg, as.grid = TRUE)
hc <- heads(mc, x = xg, y = yg, as.grid = TRUE)
pot <- head_to_potential(m, h)
potc <- head_to_potential(mc, hc)

phi <- potential(m, x = xg, y = yg, as.grid = TRUE)
phic <- potential(mc, x = xg, y = yg, as.grid = TRUE)
hds <- potential_to_head(m, phi)
hdsc <- potential_to_head(mc, phic)

# Converting negative potentials results in NA's with warning
try(
potential_to_head(m, -300)
)
#> Warning: NaNs produced
#> [1] NaN

# unless na.below = FALSE
potential_to_head(m, -300, na.below = FALSE)
#> [1] -7.745967