Package 'kwb.hantush'

Title: Calculation of Groundwater Mounding Beneath an Infiltration Basin
Description: Calculation groundwater mounding beneath an infiltration basin based on the Hantush (1967) equation (<doi:10.1029/WR003i001p00227>). The correct implementation is shown with a verification example based on a USGS report (page 25, <https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf#page=35>).
Authors: Michael Rustler [aut, cre] , Kompetenzzentrum Wasser Berlin gGmbH [cph]
Maintainer: Michael Rustler <[email protected]>
License: MIT + file LICENSE
Version: 0.3.0
Built: 2024-10-29 03:16:14 UTC
Source: https://github.com/KWB-R/kwb.hantush

Help Index


Hantush equation base properties

Description

Hantush equation base properties

Usage

baseProperties(time = 10, basinWidth = 10, basinLength = 10,
  infiltrationRate = 0.5, horizConductivity = 10, iniHead = 10,
  specificYield = 0.2, numberTimeSteps = 150)

Arguments

time

time elapsed since recharge began (T), (Default: 1.5 days)

basinWidth

half width of the recharge basin (L), (Default: 10 m)

basinLength

half length of the recharge basin (L), (Default: 10 m)

infiltrationRate

recharge (infiltration) rate (L/T), (Default: 0.5 m/d)

horizConductivity

horizontal hydraulic conductivity (L/T), (Default: 10 m/d)

iniHead

initial head (height of the water table above the base of the aquifer);(L), (Default: 10)

specificYield

specific yield (Default: 0.2)

numberTimeSteps

number of time steps to be used for average aquifer thickness calculation (Default: 150)

Value

Base properties for Hantush equation

References

p.22, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf


USGS verification example: base parameterisation

Description

USGS verification example

Usage

baseProps_ex1()

References

p.23, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf


USGS verification example: compare R results for water level increase with other models and calculate statistical goodness of fit values (e.g. RMSE, PBIAS, NSE)

Description

USGS verification example: compare R results for water level increase with other models and calculate statistical goodness of fit values (e.g. RMSE, PBIAS, NSE)

Usage

compareModelResults(conf = example1())

Arguments

conf

list as retrieved by example1()

Value

data.frame with R results and other model including all goodness of fit criteria calculated with gof() of package hydrogof

References

Table 5, p.25, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf

See Also

example1 for the USGS example parameterisation with distances


Error function

Description

Error function

Usage

erf(x)

Arguments

x

x

Value

Error function result

References

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Normal.html


USGS verification example: model parameterisation (multiple distances)

Description

USGS verification example: model parameterisation (multiple distances)

Usage

example1(x = c(0, 0.3, 3.3, 6.6, 10, 20, 25, 30, 40, 50, 75, 100, 150,
  200), baseProps = baseProps_ex1(), dbg = FALSE)

Arguments

x

distance from the center of the recharge basin in the x direction (L)

baseProps

basic model properties as retrieved by baseProps_ex1()

dbg

If True additional messages on debug messages

References

p.23, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf

Examples

res <- example1()
if (FALSE) {
  #### Head for each time step (defined with parameter "numberTimeSteps)
  xyplot(head ~ x | as.factor(sprintf("%f days", timeSteps)),
    data = res$timeSteps,
    type = "b",
    las = 1,
    as.table = TRUE
  )
  #### Head at end of simulation
  plot(head ~ x,
    data = res$simTime,
    type = "b",
    las = 1
  )
}
#### Water level increase at end of simulation & compare to alternative models
modelComparison <- compareModelResults(conf = res)
plotModelComparison(modelComparison = modelComparison)

USGS verification example: get model comparison table

Description

USGS verification example: get model comparison table

Usage

getModelComparisonTable()

Value

data.frame with water level increase of different model approaches

References

Table 5, p.25, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf

Examples

modelComparison <- getModelComparisonTable()

Hantush equation

Description

Hantush equation

Usage

hantush(x = 0, y = 0, baseProps = baseProperties(), dbg = TRUE)

Arguments

x

distance from the center of the recharge basin in the x direction (L)

y

distance from the center of the recharge basin in the y direction (L)

baseProps

basic model properties as retrieved by baseProperties()

dbg

If True additional messages on integration quality of function hantushSstar are printed on screen

Value

Head at a given time after recharge begins

References

p.22, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf

See Also

baseProperties for basic model properties


Hantush distance: for multiple coordinates

Description

Hantush distance: for multiple coordinates

Usage

hantushDistances(x = 0:10, y = rep(0, length(x)),
  baseProps = baseProperties(), dbg = TRUE)

Arguments

x

vector with distances from the center of the recharge basin in the x direction (L), (Default: each meter between 0-100m)

y

vector with distances from the center of the recharge basin in the y direction (L), (Default: 0 times length of x)

baseProps

basic model properties as retrieved by baseProperties()

dbg

If True additional debug messages are printed on screen

Value

Head at a given time after recharge begins

See Also

hantush for parameterizing the Hantush equation


Hantush distances & base properties: allows input of vector of x,y coordinates and also a vector for one of the base properties

Description

Hantush distances & base properties: allows input of vector of x,y coordinates and also a vector for one of the base properties

Usage

hantushDistancesBaseProps(x = seq(0, 200, 5), y = rep(0, length(x)),
  baseProps = baseProperties(time = 2^(0:6), infiltrationRate = 1,
  basinWidth = 10, basinLength = 50, horizConductivity = 10, iniHead = 10,
  specificYield = 0.2), dbg = FALSE)

Arguments

x

vector with distances from the center of the recharge basin in the x direction (L), (Default: every 5 meter between 0-200m)

y

vector with distances from the center of the recharge basin in the y direction (L), (Default: 0 times length of x)

baseProps

as retrieved by baseProperties(), but one property is allowed to be a vector (e.g. infiltrationRate = c(1,2,4))

dbg

If True additional debug messages are printed on screen

Value

List with sublists "dat" (x,y,head & WLincrease), "changedBaseProp.Name" (name of base property with multiple values) and "baseProps" (complete base parameterisation)

See Also

baseProperties for basic model properties

Examples

baseProps <- baseProperties(
  time = 2^(0:6),
  infiltrationRate = 1,
  basinWidth = 10,
  basinLength = 50,
  horizConductivity = 10,
  iniHead = 10,
  specificYield = 0.2,
  numberTimeSteps = 10
)
res <- hantushDistancesBaseProps(baseProps = baseProps)
cols <- length(unique(res$dat[[res$changedBaseProp.Name]]))
mainTxt <- sprintf("Changed baseProperty: %s", res$changedBaseProp.Name)
xyplot(WLincrease ~ x,
  groups = res$dat[[res$changedBaseProp.Name]],
  data = res$dat,
  type = "b",
  auto.key = list(columns = cols),
  main = mainTxt
)

Helper function hantushS

Description

Helper function hantushS

Usage

hantushS(x, alpha, beta)

Arguments

x

distance between 0 and half length of recharge basin

alpha

alpha

beta

beta

Value

Hantush star

References

p.22, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf


Hantush function Sstar

Description

Hantush function Sstar

Usage

hantushSstar(alpha, beta, dbg)

Arguments

alpha

alpha

beta

beta

dbg

If True additional messages on integration quality of function hantushSstar are printed on screen

Value

Hantush Sstar result

References

p.22, https://pubs.usgs.gov/sir/2010/5102/support/sir2010-5102.pdf


USGS verification example: plot model comparison results

Description

USGS verification example: plot model comparison results

Usage

plotModelComparison(modelComparison = compareModelResults(),
  title = "", ...)

Arguments

modelComparison

data.frame as retrieved by compareModelResults(), Default: (compareModelResults())

title

to be used as title above plot (Default: "")

...

further arguments passed to function xyplot()

Value

model comparison goodness of fit plots

See Also

compareModelResults for comparison with USGS benchmark models

Examples

### Plot model comparison with title "Model comparison" and one plot for
### each page
plotModelComparison(
  title = "Model comparison",
  layout = c(1, 1)
)