Skip to contents

dirflow() computes a flow variable at the given points in the direction of the supplied angle.

Usage

dirflow(
  aem,
  x,
  y,
  angle,
  flow = c("discharge", "darcy", "velocity"),
  as.grid = FALSE,
  ...
)

Arguments

aem

aem object.

x

numeric x coordinates to evaluate flow at.

y

numeric y coordinates to evaluate flow at.

angle

numeric, angle of the direction to evaluate flow, in degrees counterclockwise from the x-axis.

flow

character specifying which flow variable to use. Possible values are discharge (default), darcy and velocity. See flow().

as.grid

logical, should a matrix be returned? Defaults to FALSE. See details.

...

additional arguments passed to discharge(), darcy() or velocity().

Value

A vector of length(x) (equal to length(y)) with the flow values at x and y in the direction of angle. If as.grid = TRUE, a matrix of dimensions c(length(y), length(x)) described by marginal vectors x and y containing the directed flow values at the grid points.

Details

The x and y components of flow are used to calculate the directed value using angle. The z coordinate in discharge(), darcy() or velocity() is set at the aquifer base. Under Dupuit-Forchheimer, the x and y components of the flow vector do not change along the vertical axis.

Examples

rf <- constant(-1000, 0, hc = 10)
uf <- uniformflow(TR = 100, gradient = 0.001, angle = -45)
w <- well(10, -50, Q = 200)

m <- aem(k = 10, top = 10, base = 0, n = 0.2, rf, uf)
dirflow(m, x = c(0, 100), y = 50, angle = -45)
#> [1] 0.1 0.1

m <- aem(k = 10, top = 10, base = 0, n = 0.2, rf, uf, w, type = 'confined')
dirflow(m, x = c(0, 50, 100), y = c(0, 50), angle = -90,
flow = 'velocity', as.grid = TRUE)
#>           [,1]      [,2]      [,3]
#> [1,] 0.1929345 0.1725579 0.1232862
#> [2,] 0.3414225 0.2294467 0.1104284