Skip to contents

discharge() computes the x, y and z components of the discharge vector for an aem object at the given x, y and z coordinates.

darcy() computes the x, y and z components of the Darcy flux vector (also called specific discharge vector) for an aem object at the given x, y and z coordinates.

velocity() computes the x, y and z components of the average linear groundwater flow velocity vector for an aem object at the given x, y and z coordinates.

domega() computes the complex discharge for an aem or element object at the given x and y coordinates.

Usage

discharge(...)

darcy(...)

velocity(...)

domega(...)

# S3 method for class 'aem'
discharge(
  aem,
  x,
  y,
  z,
  as.grid = FALSE,
  magnitude = FALSE,
  verbose = TRUE,
  ...
)

# S3 method for class 'aem'
darcy(aem, x, y, z, as.grid = FALSE, magnitude = FALSE, ...)

# S3 method for class 'aem'
velocity(aem, x, y, z, as.grid = FALSE, magnitude = FALSE, R = 1, ...)

# S3 method for class 'aem'
domega(aem, x, y, as.grid = FALSE, ...)

# S3 method for class 'element'
domega(element, x, y, ...)

Arguments

...

ignored or arguments passed from velocity() or darcy() to discharge().

aem

aem object.

x

numeric x coordinates to evaluate the flow at.

y

numeric y coordinates to evaluate the flow at.

z

numeric z coordinates to evaluate at

as.grid

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

magnitude

logical, should the magnitude of the flow vector be returned as well? Default to FALSE. See details.

verbose

logical, if TRUE (default), warnings with regards to setting Qz to NA are printed. See details.

R

numeric, retardation coefficient used in velocity(). Defaults to 1 (no retardation).

element

analytic element of class element.

Value

For discharge(), a matrix with the number of rows equal to the number of points to evaluate the discharge vector at, and with columns Qx, Qy and Qz corresponding to x, y and z components of the discharge vector at coordinates x, y and z. If as.grid = TRUE, an array of dimensions c(length(y), length(x), length(z), 3) described by marginal vectors x, y and z (columns, rows and third dimension) containing the x, y and z components of the discharge vector (Qx, Qy and Qz) as the fourth dimension.

The x component of discharge() is the real value of domega(), the y component the negative imaginary component and the z component is calculated based on area-sink strengths and/or the curvature of the phreatic surface.

If magnitude = TRUE, the last dimension of the returned array is expanded to include the magnitude of the discharge/Darcy/velocity vector, calculated as sqrt(Qx^2 + Qy^2 + Qz^2) (or sqrt(qx^2 + qy^2 + qz^2) or sqrt(vx^2 + vy^2 + vz^2), respectively).

For darcy(), the same as for discharge() but with the x, y and z components of the Darcy flux vector (qx, qy and qz). The values are computed by dividing the values of discharge() by the saturated thickness at x, y and z.

For velocity(), the same as for discharge() but with the x, y and z components of the average linear groundwater flow velocity vector (vx, vy and vz). The values are computed by dividing the darcy() values by the effective porosity (aem$n) and the retardation coefficient R.

For domega(), a vector of length(x) (equal to length(y)) with the complex discharge values at x and y, If as.grid = TRUE, a matrix of dimensions c(length(y), length(x)) described by marginal vectors x and y containing the complex discharge values at the grid points. domega() is the derivative of omega() in the x and y directions.

Details

There is no discharge(), darcy() or velocity() method for an object of class element because an aem object is required to obtain the aquifer base and top.

If the z coordinate is above the saturated aquifer level (i.e. the water-table for unconfined conditions or the aquifer top for confined conditions), or below the aquifer base, Qz values are set to NA with a warning (if verbose = TRUE). The Qx and Qy values are not set to NA, for convenience in specifying the z coordinate when only lateral flow is of interest.

Examples

w <- well(xw = 55, yw = 0, Q = 200)
uf <- uniformflow(gradient = 0.002, angle = -45, TR = 100)
as <- areasink(xc = 0, yc = 0, N = 0.001, R = 500)
rf <- constant(xc = -1000, yc = 1000, hc = 10)
ml <- aem(k = 10, top = 10, base = -15, n = 0.2, w, uf, as, rf)

xg <- seq(-100, 100, length = 5)
yg <- seq(-75, 75, length = 3)

# Discharge vector
discharge(ml, c(150, 0), c(80, -80), z = -10)
#>              Qx         Qy           Qz
#> [1,] 0.02037961 -0.2665091 -0.005060767
#> [2,] 0.32717248  0.0887621 -0.005097869
discharge(ml, c(150, 0), c(80, -80), z = c(2, 5), magnitude = TRUE)
#>              Qx         Qy          Qz         Q
#> [1,] 0.02037961 -0.2665091 -0.01720661 0.2678405
#> [2,] 0.32717248  0.0887621 -0.02039148 0.3396121
discharge(ml, xg, yg, z = 2, as.grid = TRUE)
#> , , 1, Qx
#> 
#>           [,1]      [,2]      [,3]      [,4]         [,5]
#> [1,] 0.2578228 0.3171573 0.3438149 0.1945904  0.004180247
#> [2,] 0.2967826 0.4195736 0.7201666 6.5326191 -0.515933946
#> [3,] 0.2578228 0.3171573 0.3438149 0.1945904  0.004180247
#> 
#> , , 1, Qy
#> 
#>             [,1]        [,2]        [,3]       [,4]       [,5]
#> [1,] -0.18443819 -0.24730419 -0.37991259 -0.5264566 -0.4159899
#> [2,] -0.14142136 -0.14142136 -0.14142136 -0.1414214 -0.1414214
#> [3,] -0.09840452 -0.03553852  0.09706987  0.2436139  0.1331472
#> 
#> , , 1, Qz
#> 
#>             [,1]        [,2]        [,3]        [,4]        [,5]
#> [1,] -0.01728591 -0.01746242 -0.01775486 -0.01791021 -0.01750075
#> [2,] -0.01730880 -0.01756345 -0.01856240 -0.14449874 -0.01783670
#> [3,] -0.01721822 -0.01729328 -0.01736962 -0.01728292 -0.01705172
#> 
discharge(ml, c(150, 0), c(80, -80), z = ml$top + c(-5, 0.5)) # NA for z > water-table
#> Warning: Setting Qz values to NA for z above saturated aquifer level or below aquifer base
#>              Qx         Qy          Qz
#> [1,] 0.02037961 -0.2665091 -0.02024307
#> [2,] 0.32717248  0.0887621          NA

# Darcy flux
darcy(ml, c(150, 0), c(80, -80), c(0, 5), magnitude = TRUE)
#>               qx           qy            qz          q
#> [1,] 0.000840556 -0.010992156 -0.0006261932 0.01104202
#> [2,] 0.013502552  0.003663251 -0.0008415652 0.01401594

# Velocity
velocity(ml, c(150, 0), c(80, -80), c(0, 5), magnitude = TRUE, R = 5)
#>               vx           vy            vz          v
#> [1,] 0.000840556 -0.010992156 -0.0006261932 0.01104202
#> [2,] 0.013502552  0.003663251 -0.0008415652 0.01401594

# Complex discharge
domega(ml, c(150, 0), c(80, -80))
#> [1] 0.02037961+0.2665091i 0.32717248-0.0887621i

# Complex discharge for elements
domega(w, c(150, 0), c(80, -80))
#> [1] -0.1960417+0.1650878i  0.1857511-0.2701835i