| Title: | Interface to WTAQ Drawdown Model (http://water.usgs.gov/ogw/wtaq/) |
|---|---|
| Description: | Functions enabling the writing of WTAQ input files, running of WTAQ and reading of WTAQ output files. |
| Authors: | Hauke Sonnenberg [aut, cre] (ORCID: <https://orcid.org/0000-0001-9134-2871>), Michael Rustler [ctb] (ORCID: <https://orcid.org/0000-0003-0647-7726>), FAKIN [fnd], OPTIWELLS-2 [fnd], Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph] |
| Maintainer: | Hauke Sonnenberg <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0 |
| Built: | 2026-05-24 06:01:25 UTC |
| Source: | https://github.com/KWB-R/kwb.wtaq |
Calibration of aquifer parameter "hkr"
checkModelFit(wtaqResult, wells = ".*")checkModelFit(wtaqResult, wells = ".*")
wtaqResult |
# in WTAQ result in "long format" |
wells |
regular expression of wells to be included (e.g. ".*" for all, PW: only production well, OW: all observation wells) |
Hauke Sonnenberg
Example data of measured drawdowns in a drinking water well field.
drawdownsdrawdowns
List of five data frames each of which represents the timeseries of drawdowns measured at five different drinking water wells. The column time.in.seconds is the time of operation in seconds and the columns W1, W2, W3, W4, and W5 correspond to the drawdowns at the different Wells W1 to W5.
fitnessAquifer
fitnessAquifer(parameterValue, parameterName, configuration, wellPattern = "*")fitnessAquifer(parameterValue, parameterName, configuration, wellPattern = "*")
parameterValue |
|
parameterName |
|
configuration |
|
wellPattern |
Hauke Sonnenberg
modelFitness
modelFitness(wtaqResult, wells = "*")modelFitness(wtaqResult, wells = "*")
wtaqResult |
# in "long format" |
wells |
regular expression of wells to be included (e.g. * for all, PW: only production well, OW: all observation wells) |
Hauke Sonnenberg
modelFitnessAggregated
modelFitnessAggregated(wtaqResult, wellPattern = "*")modelFitnessAggregated(wtaqResult, wellPattern = "*")
wtaqResult |
|
wellPattern |
Hauke Sonnenberg
convert Optiwells configuration to WTAQ configuration with one well
being selected as pumping well
owConfigurationToWtConfiguration(owConfiguration, activeWell, Q, times = NULL, solution = wtConfigureSolution())owConfigurationToWtConfiguration(owConfiguration, activeWell, Q, times = NULL, solution = wtConfigureSolution())
owConfiguration |
Optiwells configuration as created with |
activeWell |
number of active well = row number in owConfiguration$wellfield |
Q |
discharge of active well |
times |
vector of times for which drawdowns are to be calculated |
solution |
List of solution parameters as retrieved by |
WTAQ configuration as e.g. returned by wtConfigure
Hauke Sonnenberg
wtConfigurationToOwConfiguration
Returns a user-defined Optiwells configuration on which e.g.
owGetDrawdowns can be run.
owConfigure(wellfield = NULL, aquifer = NULL, drainage = NULL)owConfigure(wellfield = NULL, aquifer = NULL, drainage = NULL)
wellfield |
Optiwells wellfield configuration. Data frame |
aquifer |
WTAQ aquifer configuration as returned by |
drainage |
WTAQ drainage configuration as returned by |
list with elements wellfield (configuration of well
characteristics), aquifer (WTAQ aquifer configuration) and
drainage (WTAQ drainage configuration).
Hauke Sonnenberg
Configure well(s) for Optiwells configuration
owConfigureWell(wellName, x, y, r, z1, z2, sw)owConfigureWell(wellName, x, y, r, z1, z2, sw)
wellName |
well identifier(s). Must be unique within a well field. |
x |
x coordinate(s) of well centre(s) |
y |
y coordinate(s) of well centre(s) |
r |
well radius(es) |
z1 |
Depth(s) below top of aquifer or initial water table to the top of the screened interval of the well(s), in units of length. |
z2 |
Depth(s) below top of aquifer or initial water table to the bottom of the screened interval of the well(s), in units of length. |
sw |
Well-bore skin parameter(s), dimensionless. |
data frame with one row (per well) and columns elements wellName,
x, y, r, z1, z2, sw defining a
well.
Hauke Sonnenberg
Calculate drawdowns for given Optiwells configuration and pump discharges
owGetDrawdowns(owConfiguration, Q, times = NULL, solution = NULL, to.matrix = TRUE, ...)owGetDrawdowns(owConfiguration, Q, times = NULL, solution = NULL, to.matrix = TRUE, ...)
owConfiguration |
Optiwells configuration as e.g. retrieved by |
Q |
vector of discharges at the wells in the order of wells in owConfiguration$wellfield |
times |
vector of times for which drawdowns are to be calculated |
solution |
List of solution parameters as retrieved by
configuration, as retrieved by is used. |
to.matrix |
if TRUE, the results returned by come in "long" form (the drawdowns for each well appear in blocks one below each other with a column "WELL" indicating the well name) are converted to "matrix" (= wide) form in which the calculated drawdowns appear in columns one beside the other. |
... |
additional arguments passed to show.results or dbg, see there. |
list with as many elements as there are wells defined in the Optiwells
configuration (list element wellfield of owConfiguration). For each
pumping well (well with Q > 0) the list element at the corresponding
position contains a data frame holding the drawdowns calculated by WTAQ
with that well pumping alone and the other wells being observation wells.
For each non-pumping well (well with Q = 0) the list element will be NULL.
This list can then be used to calculate the superposition of drawdowns.
Hauke Sonnenberg
Plot Optiwells configuration
owPlotConfiguration(owConfiguration, referenceWell = -1, view = c("top", "side"), col = rainbow(nrow(owConfiguration$wellfield)), onePage = TRUE, ...)owPlotConfiguration(owConfiguration, referenceWell = -1, view = c("top", "side"), col = rainbow(nrow(owConfiguration$wellfield)), onePage = TRUE, ...)
owConfiguration |
Optiwells configuration as retrieved by |
referenceWell |
Number of reference well (according to row number in owConfiguration$wellfield or -1 (no reference well). If a reference well is specified, it will be plotted on the left-hand side of the sideview and the top view will be centered around that well. |
view |
vector of c("top", "side"). Determines whether to plot top view or side view or both. |
col |
colours. Default: rainbow colours |
onePage |
if TRUE, top view and side view appear below each other on one and the same page |
... |
Hauke Sonnenberg
plot drawdown (under construction!)
owPlotDrawdowns(drawdownList, topview = TRUE, overlay = FALSE, fixview = FALSE)owPlotDrawdowns(drawdownList, topview = TRUE, overlay = FALSE, fixview = FALSE)
drawdownList |
|
topview |
|
overlay |
|
fixview |
Hauke Sonnenberg
Returns a random Optiwells configuration on which e.g.
owGetDrawdowns can be run.
owRandomConfiguration(numberOfWells, bb = 80, ...)owRandomConfiguration(numberOfWells, bb = 80, ...)
numberOfWells |
number of wells in the well field (must be a number between 1 and 25). |
bb |
Thickness or saturated thickness of aquifer at beginning of simulation, in units of length. |
... |
additional arguments that are passed to owRandomWellfield, such as: rmean, z1mean, z2mean, swmean, rsd, z1sd, z2sd, swsd, digits, see |
list with elements wellfield (configuration of well
characteristics), aquifer (WTAQ aquifer configuration) and
drainage (WTAQ drainage configuration), just as created by
Hauke Sonnenberg
owRandomWellfield, owConfigure
Generation of a random wellfield
owRandomWellfield(numberOfWells, rmean, z1mean, z2mean, swmean, rsd = 0.1 * rmean, z1sd = 0.1 * z1mean, z2sd = 0.1 * z2mean, swsd = 0.1 * swmean, digits = 1)owRandomWellfield(numberOfWells, rmean, z1mean, z2mean, swmean, rsd = 0.1 * rmean, z1sd = 0.1 * z1mean, z2sd = 0.1 * z2mean, swsd = 0.1 * swmean, digits = 1)
numberOfWells |
number of wells in the well field (must be a number between 1 and 25). |
rmean |
mean value of normal distribution used to generate random values for 'r' (well radius) |
z1mean |
mean value of normal distribution used to generate random values for 'z1' (depth of begin of screen) |
z2mean |
mean value of normal distribution used to generate random values for 'z2' (depth of end of screen) |
swmean |
mean value of normal distribution used to generate random values for 'sw' (well-bore skin parameter) |
rsd |
standard deviation of normal distribution used to generate random values for 'r' (well radius). Default: 0.1 * rmean |
z1sd |
standard deviation of normal distribution used to generate random values for 'z1'-values' (depth of begin of screen). Default: 0.1 * z1mean |
z2sd |
standard deviation of normal distribution used to generate random values for 'z2'-values' (depth of end of screen). Default: 0.1 * z2mean |
swsd |
standard deviation of normal distribution used to generate random values for 'sw' (well-bore skin parameter). Default: 0.1 * swmean |
digits |
number of decimal digits for values of r, z1, z2. Default: 1 |
data frame with each row representing a well of the well field and the
columns representing the well properties: wellName (well name),
x (x-coordinate of well), y-coordinate of well, r
(well radius), z1 (depth of begin of well screen), z2 (depth
of end of well screen), sw (well-bore skin parameter)
Hauke Sonnenberg
superpose drawdowns in list of drawdowns as returned by
owSuperposeDrawdowns(drawdownList, dbg = FALSE)owSuperposeDrawdowns(drawdownList, dbg = FALSE)
drawdownList |
list of drawdowns as returned by |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
data frame
Hauke Sonnenberg
Calculates distances between wells based on coordinates given in Optiwells
configuration of the wellfield
owWellDistances(wellfield, referenceWell = 1)owWellDistances(wellfield, referenceWell = 1)
wellfield |
data frame as e.g. retrieved by row representing a well of the well field. |
referenceWell |
Number of reference well corresponding with row number in wellfield. For each well the distance to the reference well is calculated. Default: 1 |
vector of numeric representing the distances of each well to a reference
well (determined by referenceWell)
Hauke Sonnenberg
Print WTAQ configuration
## S3 method for class 'wtaqConfiguration' print(x, ...)## S3 method for class 'wtaqConfiguration' print(x, ...)
x |
|
... |
Hauke Sonnenberg
Simple calibration procedure
wtCalibrate(configuration, parameterName = "hkr", startvalue = 0.02, endvalue = 1e-05, changevalue = 1e-04, wells = "OW4", fitnessCriteria = data.frame( name = c("RMSE", "PBIAS", "PBIAS", "R2"), vals = c(0.03, 5, -5, 0.95), condition = c("<=", "<=", ">=", ">=")))wtCalibrate(configuration, parameterName = "hkr", startvalue = 0.02, endvalue = 1e-05, changevalue = 1e-04, wells = "OW4", fitnessCriteria = data.frame( name = c("RMSE", "PBIAS", "PBIAS", "R2"), vals = c(0.03, 5, -5, 0.95), condition = c("<=", "<=", ">=", ">=")))
configuration |
|
parameterName |
|
startvalue |
|
endvalue |
|
changevalue |
|
wells |
|
fitnessCriteria |
stat. parameters for for model fit evaluation |
Hauke Sonnenberg
Checks a WTAQ configuration for its structure
wtCheckConfiguration(configuration, part = "complete", dbg = TRUE)wtCheckConfiguration(configuration, part = "complete", dbg = TRUE)
configuration |
WTAQ configuration (complete) or sub-configuration (general, aquifer, rainage, times, solution, pumpwell, obswell) |
part |
one of c("complete", "general", "aquifer", "drainage", "times", "solution", "pumpwell", "obswell") |
dbg |
if TRUE, debug messages are shown, else not. |
Error message or "" if no error occurred
Hauke Sonnenberg
# Generate default configuration cconf <- wtConfigure() # Check (complete) configuration. No error -> ok wtCheckConfiguration(cconf) # Generate default observation well configuration oconf <- wtConfigureObservationWell() # Check "obswell" configuration. No error -> ok wtCheckConfiguration(oconf, "obswell") # Set obswells in complete configuration (forgetting that obswells must be # a list!): cconf$obswells <- oconf # Check (complete) configuration again # -> Error when "Checking config of observation well 1". wtCheckConfiguration(cconf)# Generate default configuration cconf <- wtConfigure() # Check (complete) configuration. No error -> ok wtCheckConfiguration(cconf) # Generate default observation well configuration oconf <- wtConfigureObservationWell() # Check "obswell" configuration. No error -> ok wtCheckConfiguration(oconf, "obswell") # Set obswells in complete configuration (forgetting that obswells must be # a list!): cconf$obswells <- oconf # Check (complete) configuration again # -> Error when "Checking config of observation well 1". wtCheckConfiguration(cconf)
WTAQ configuration corresponding to sample problem 2 of WTAQ distribution
wtConfigurationExample2()wtConfigurationExample2()
list with elements general, aquifer, drainage,
times, solution, pumpwell, obswells,
representing a full WTAQ configuration.
Hauke Sonnenberg
wtConfigurationExample3, wtConfigure
# Get configuration of sample problem 2 of WTAQ distribution cnf <- wtConfigurationExample2() # Print formatted output of configuration print(cnf) # Plot wellfield profile of configuration wtPlotConfiguration(cnf)# Get configuration of sample problem 2 of WTAQ distribution cnf <- wtConfigurationExample2() # Print formatted output of configuration print(cnf) # Plot wellfield profile of configuration wtPlotConfiguration(cnf)
WTAQ configuration corresponding to sample problem 3 of WTAQ distribution
wtConfigurationExample3()wtConfigurationExample3()
list with elements general, aquifer, drainage,
times, solution, pumpwell, obswells,
representing a full WTAQ configuration.
Hauke Sonnenberg
wtConfigurationExample2, wtConfigure
# Get configuration of sample problem 3 of WTAQ distribution cnf <- wtConfigurationExample3() # Print formatted output of configuration print(cnf) # Plot wellfield profile of configuration wtPlotConfiguration(cnf)# Get configuration of sample problem 3 of WTAQ distribution cnf <- wtConfigurationExample3() # Print formatted output of configuration print(cnf) # Plot wellfield profile of configuration wtPlotConfiguration(cnf)
Generate Optiwells configuration from WTAQ configuration
wtConfigurationToOwConfiguration(wtaqConfiguration)wtConfigurationToOwConfiguration(wtaqConfiguration)
wtaqConfiguration |
WTAQ configuration as retrieved by |
list with elements wellfield (configuration of well
characteristics), aquifer (WTAQ aquifer configuration) and
drainage (WTAQ drainage configuration), just as creaetd by
owConfigure. The list elements aquifer and
drainage are copied from the given WTAQ configuration. The
wellfield configuration is generated from the information on the pumping
well and on the observation wells given in that same configuration.
Hauke Sonnenberg
owConfigurationToWtConfiguration
Define parameter values for WTAQ model run
wtConfigure(general = wtConfigureGeneral(), aquifer = wtConfigureAquifer(), drainage = wtConfigureDrainage(), times = wtConfigureTimes(), solution = wtConfigureSolution(), pumpwell = wtConfigurePumpwell(), obswells = list(wtConfigureObservationWell(obname = "obs1"), wtConfigureObservationWell(obname = "obs2", r = 50)))wtConfigure(general = wtConfigureGeneral(), aquifer = wtConfigureAquifer(), drainage = wtConfigureDrainage(), times = wtConfigureTimes(), solution = wtConfigureSolution(), pumpwell = wtConfigurePumpwell(), obswells = list(wtConfigureObservationWell(obname = "obs1"), wtConfigureObservationWell(obname = "obs2", r = 50)))
general |
List of general parameters as retrieved by |
aquifer |
List of aquifer parameters as retrieved by |
drainage |
List of drainage parameters as retrieved by |
times |
List of simulation time parameters as retrieved by |
solution |
List of solution parameters as retrieved by |
pumpwell |
List of pumped well parameters as retrieved by |
obswells |
List of lists of observation well parameters each of which can be retrieved by |
list with elements general, aquifer, drainage,
times, solution, pumpwell, obswells,
representing a full WTAQ configuration. For the different elements see the
descriptions in the Arguments section.
Hauke Sonnenberg
wtConfigurationExample2, wtConfigurationExample3, wtRunConfiguration
Define aquifer-related WTAQ parameters
wtConfigureAquifer(aqtype = "WATER TABLE", bb = 20, hkr = 0.0041, hkz = 0.00174, ss = 3.76e-05, sy = 0.25)wtConfigureAquifer(aqtype = "WATER TABLE", bb = 20, hkr = 0.0041, hkz = 0.00174, ss = 3.76e-05, sy = 0.25)
aqtype |
Type of aquifer being simulated. Two options are provided: AQTYPE = CONFINED or AQTYPE = WATER TABLE |
bb |
Thickness or saturated thickness of aquifer at beginning of simulation, in units of length. |
hkr |
Horizontal hydraulic conductivity of aquifer, in units of length per time. |
hkz |
Vertical hydraulic conductivity of aquifer, in units of length per time. |
ss |
Specific storage of aquifer, in units of inverse length. |
sy |
Specific yield of aquifer, dimensionless. Enter 0 if AQTYPE = CONFINED. |
list with elements aqtype, bb, hkr, hkz,
ss, sy, representing WTAQ parameters related to the aquifer.
See descriptions in Arguments section.
Hauke Sonnenberg
Vector of distances between pumping well and observation wells (including
0 as first distance!)
wtConfiguredDistances(configuration)wtConfiguredDistances(configuration)
configuration |
WTAQ configuration as retrieved by |
named vector of numeric containing zero as first element and the distances
between pumping well and observation wells as following elements, in the
order or their definition in the WTAQ configuration. The names of the
elements correspond to the well names as retrieved also with
Hauke Sonnenberg
Define drainage-related WTAQ parameters
wtConfigureDrainage(idra = 2, alpha = c(), acc = 5, akk = 31.7, amm = 100, axmm = 10)wtConfigureDrainage(idra = 2, alpha = c(), acc = 5, akk = 31.7, amm = 100, axmm = 10)
idra |
Type of drainage at water table. Enter 0 if AQTYPE = CONFINED. Three options are provided: IDRA = 0: Instantaneous drainage. IDRA = 1: Gradual drainage. IDRA = 2: Drainage with unsaturated-zone characterization. |
alpha |
Only used if idra = 1. Drainage constants, in units of inverse time. Maximum of 5 values is allowed. |
acc |
Only used if idra = 2. Soil-moisture retention exponent, in units of inverse length. |
akk |
Only used if idra = 2. Relative hydraulic-conductivity exponent, in units of inverse length. The value specified must be greater than or equal to that specified for ACC. |
amm |
Only used if idra = 2. Initial unsaturated-zone thickness above the capillary fringe, in units of length. |
axmm |
Only used if idra = 2. The unsaturated-zone thickness above the capillary fringe above which an assumption of an infinitely thick unsaturated-zone thickness is assumed, in units of length. |
list with elements idra, alpha, acc, akk,
amm, axmm, representing WTAQ parameters related to drainage.
See descriptions in Arguments section.
Hauke Sonnenberg
Read all well names (pumping well “PW” plus observation wells) from
WTAQ configuration configuration
wtConfiguredWellnames(configuration)wtConfiguredWellnames(configuration)
configuration |
WTAQ configuration as generated by |
vector of character containing the name of the pumping well (as the first
element) and the names of the observation wells as following elements
(according to the order of their definition in configuration
Hauke Sonnenberg
Define general WTAQ parameters
wtConfigureGeneral(title = paste("Input file generated by kwb.wtaq-functions on", date()), format = "DIMENSIONAL")wtConfigureGeneral(title = paste("Input file generated by kwb.wtaq-functions on", date()), format = "DIMENSIONAL")
title |
Title of simulation; up to 70 characters in length. Leave this line blank if no title is specified. |
format |
Analysis format. Enter DIMENSIONAL. |
list with elements title and format, representing general
WTAQ parameters. See descriptions in Arguments section.
Hauke Sonnenberg
Define WTAQ parameters related to an obervation well
wtConfigureObservationWell(obname = "obs1", r = 30, iows = 0, idpr = 0, rp = ifelse(idpr == 0, 0, 0.1), z1 = ifelse(iows == 2, 0, 5), z2 = ifelse(iows == 2, 0, 10), xll = ifelse(idpr == 0, 0, z2 - z1), zp = ifelse(iows == 2, 3, 0), tsobs = data.frame(t = 60 * 1:3, dd = c(0.4, 0.6, 0.7)), irun = 1)wtConfigureObservationWell(obname = "obs1", r = 30, iows = 0, idpr = 0, rp = ifelse(idpr == 0, 0, 0.1), z1 = ifelse(iows == 2, 0, 5), z2 = ifelse(iows == 2, 0, 10), xll = ifelse(idpr == 0, 0, z2 - z1), zp = ifelse(iows == 2, 3, 0), tsobs = data.frame(t = 60 * 1:3, dd = c(0.4, 0.6, 0.7)), irun = 1)
obname |
Name of observation well or piezometer; up to 10 characters in length. |
r |
Radial distance from axis of pumped well to observation well or piezometer, in units of length. |
iows |
Type of observation well or piezometer: IOWS = 0: Partially penetrating observation well. IOWS = 1: Fully penetrating observation well. IOWS = 2: Observation piezometer. Default: 0 |
idpr |
Options for delayed response of observation well. IDPR = 0: No delayed response. IDPR = 1: Delayed response. Default: 0 |
rp |
Inside radius of the observation well (or piezometer) standpipe in the interval over which water levels are changing during pumping, in units of length. Enter 0 if IDPR = 0. Default: 0.1, but 0 if idpr = 0. |
z1 |
Depth below top of aquifer or initial water table to the top of screened interval of observation well, in units of length. Use for IOWS = 0 or 1. Enter 0 if IOWS = 2. Default: 5.0, but 0 if iows = 2. |
z2 |
Depth below top of aquifer or initial water table to the bottom of screened interval of observation well, in units of length. Use for IOWS = 0 or 1. Enter 0 if IOWS = 2. Default: 10.0, but 0 if iows = 2. |
xll |
Length of screened interval of observation well or piezometer, in units of length. Must be 0 if IDPR = 0. Default: z2 - z1, but 0 if idpr = 0. |
zp |
Depth below top of aquifer or initial water table to center of piezometer, in units of length. Use for IOWS = 2. Enter 0.0 if IOWS = 0 or 1. Default: 3.0, but 0.0 if iows not equal to 2. |
tsobs |
data.frame with column t containing the user-specified times for which drawdown at the observation well or piezometer will be calculated. If the data.frame has no rows, no drawdowns are calculated for the observation well or piezometer. The data.frame can (optionally) contain the measured drawdown for the observation well or piezometer at the corresponding times in an additional column dd. |
irun |
Option to suppress drawdown calculations for the observation well or piezometer. Allows user to specify time-drawdown data, but those data are ignored during the simulation. Options are: IRUN = 0: Drawdowns not calculated. IRUN = 1: Drawdowns calculated. |
list with elements irun, obname, iows, idpr,
r, z1, z2, zp, rp, xll, tsobs,
representing WTAQ parameters related to an observation well.
See description in Arguments section.
Hauke Sonnenberg
Define WTAQ parameters related to the pumped well
wtConfigurePumpwell(ipws = 0, ipwd = 1, rw = 1, rc = ifelse(ipwd == 0, 0, rw), zpd = 5, zpl = 10, sw = 0, qq = 0.05, tspw = data.frame(t = 60 * 1:3, dd = 2 * c(0.4, 0.6, 0.7)), pwname = "PW", ipump = 1, irun = 1)wtConfigurePumpwell(ipws = 0, ipwd = 1, rw = 1, rc = ifelse(ipwd == 0, 0, rw), zpd = 5, zpl = 10, sw = 0, qq = 0.05, tspw = data.frame(t = 60 * 1:3, dd = 2 * c(0.4, 0.6, 0.7)), pwname = "PW", ipump = 1, irun = 1)
ipws |
Type of pumped well: IPWS = 0: Partially penetrating pumped well. IPWS = 1: Fully penetrating pumped well. Default: 0 |
ipwd |
Type of diameter of pumped well: IPWD = 0: Infinitesimal diameter (line-source theory). IPWD = 1: Finite diameter. Default: 1 |
rw |
Radius of pumped well screen, in units of length. Default: 1.0 |
rc |
Inside radius of pumped well in the interval where water levels are changing during pumping, in units of length. Must be 0 if IPWD = 0. Default: value of rw, but 0 if ipwd = 0. |
zpd |
Depth below top of aquifer or initial water table to the top of the screened interval of the pumped well, in units of length. Default: 5.0 |
zpl |
Depth below top of aquifer or initial water table to the bottom of the screened interval of the pumped well, in units of length. Default: 10.0 |
sw |
Well-bore skin parameter, dimensionless. Default: 0.0 |
qq |
Pumping rate of well, in units of cubic length per time. Default: 0.05 |
tspw |
data.frame with column t containing the user-specified times for which drawdown at the pumped well will be calculated. If the data.frame has no rows, no drawdowns are calculated for the pumped well. The data.frame can (optionally) contain the drawdowns that have been measured for the pumped well at the corresponding times in an additional column dd. |
pwname |
Name of pumping well. This parameter is not evaluated by WTAQ but will be used in the result data frame returned by
identify the well within a wellfield. Default: "PW" |
ipump |
Option to suppress calculations of drawdown at pumped well: IPUMP = 0: Drawdown is not calculated at pumped well. IPUMP = 1: Drawdown is calculated at pumped well. |
irun |
Option to suppress drawdown calculations for the pumped well. Allows user to specify time-drawdown data, but those data are ignored during the simulation. Options are: IRUN = 0: Drawdowns not calculated. IRUN = 1: Drawdowns calculated. |
list with elements irun, ipws, ipwd, ipump,
qq, rw, rc, zpd, zpl, sw,
tspw, representing WTAQ parameters related to the pumped well. See
descriptions in Arguments section.
Hauke Sonnenberg
Define WTAQ parameters related to the solver algorithms
wtConfigureSolution(isoln = 2, rerrnr = 1e-10, rerrsum = 0, nmax = 0, ntms = 30, ns = 8, error = 1e-04, nnn = 6, method = 3)wtConfigureSolution(isoln = 2, rerrnr = 1e-10, rerrsum = 0, nmax = 0, ntms = 30, ns = 8, error = 1e-04, nnn = 6, method = 3)
isoln |
Numerical-inversion solution type: ISOLN = 1: Solution by the Stehfest algorithm (must use this option for confined aquifers). ISOLN = 2: Solution by the de Hoog algorithm (must use this option for drainage with unsaturated-zone characterization [wtConfigureDrainage()$idra == 2]). |
rerrnr |
Relative error for Newton-Raphson iteration and finite summations of drawdown for water-table aquifers. A value of 1.0E-10 is suggested. Enter 0.0D0 for AQTYPE = CONFINED. |
rerrsum |
Only used if isoln = 1. Relative error for finite summations of drawdown for confined aquifers. Suggested value is 1.0E-07 to 1.0E-08. Enter 0 if AQTYPE = WATER TABLE. |
nmax |
Only used if isoln = 1. Maximum number of terms permitted in the finite summations of drawdown for confined aquifers. Suggested value is 200. Enter 0 if AQTYPE = WATER TABLE. |
ntms |
Factor used to determine number of terms in the finite summations for drawdown for water-table aquifers. Suggested values are 20 or 30. Enter 0 if AQTYPE = CONFINED. |
ns |
Only used if isoln = 1. Number of terms used in the Stehfest algorithm. This must be an even integer, the value of which depends upon computer precision. If the computer holds 16 significant figures in double precision, let NS = 6 to 12. A value of 8 is recommended. |
error |
Only used if isoln = 2. Relative error sought for the accuracy of the numerical inversion. A value of 1.0E-04 is suggested. |
nnn |
Only used if isoln = 2. Number of terms used in the summation of the Fourier series of the approximation to the inverse Laplace transform. A value of 6 is suggested. |
method |
Only used if isoln = 2. Indicates which method will be used to accelerate convergence of the Fourier series. Options are 1, 2, or 3. Only METHOD = 3 has been tested and was found to be satisfactory. Users can consult de Hoog and others (1982) and John Knight's subroutine LAPADC for additional details if needed. |
list with elements isoln, rerrnr, rerrsum, nmax,
ntms, ns, error, nnn, method,
representing WTAQ parameters related to the solving algorithms used in WTAQ.
See descriptions in Arguments section.
Hauke Sonnenberg
Define WTAQ parameters related to the times to be simulated
wtConfigureTimes(its = 1, tlast = 0, nlc = 0, nox = 0)wtConfigureTimes(its = 1, tlast = 0, nlc = 0, nox = 0)
its |
Time specification: ITS = 0: Log-cycle time steps (use to generate theoretical curves). ITS = 1: User-specified times. |
tlast |
Largest value of time. Enter 0 if ITS = 1. |
nlc |
Number of logarithmic cycles on the time scale for which drawdown will be calculated. Enter 0 if ITS = 1. |
nox |
Number of equally spaced times per logarithmic cycle for which drawdown will be calculated. Enter 0 if ITS = 1. |
list with elements its, tlast, nlc, nox,
representing WTAQ parameters defining the times to be simulated.
See descriptions in Arguments section.
Hauke Sonnenberg
Default WTAQ configuration.
wtDefaultConfiguration()wtDefaultConfiguration()
Currently: configuration for WTAQ sample problem 2, as also returned by
Hauke Sonnenberg
wtConfigurationExample2, wtConfigurationExample3
default configuration for the WTAQ solver
wtDefaultConfigurationSolution(aqtype, idra = ifelse(aqtype == "CONFINED", 0, 1))wtDefaultConfigurationSolution(aqtype, idra = ifelse(aqtype == "CONFINED", 0, 1))
aqtype |
Type of aquifer being simulated. Two options are provided: AQTYPE = CONFINED or AQTYPE = WATER TABLE |
idra |
Type of drainage at water table. Enter 0 if AQTYPE = CONFINED. Three options are provided: IDRA = 0: Instantaneous drainage. IDRA = 1: Gradual drainage. IDRA = 2: Drainage with unsaturated-zone characterization. |
Hauke Sonnenberg
This function transforms a WTAQ configuration as generated with
wtConfigure into a vecotor of text lines. These text lines,
written to a file, can be used as input file to the WTAQ drawdown modelling
software.
wtInputFileLines(configuration = wtConfigure(), sep = "\t\t", dbg = FALSE)wtInputFileLines(configuration = wtConfigure(), sep = "\t\t", dbg = FALSE)
configuration |
WTAQ configuration as generated by |
sep |
Separator to be placed between parameter values and parameter names. Default: two tab characters. |
dbg |
if TRUE, debug message are shown, else not. Default: FALSE |
character vector with each element representing one row of the input file.
Hauke Sonnenberg
plot wellfield profile
wtPlotConfiguration(configuration = wtConfigurationExample3(), col.pw = "black", col.ow = rainbow(length(configuration$obswells)), main = "WTAQ Configuration with Pumping Well on the Left", asp = 1, ...)wtPlotConfiguration(configuration = wtConfigurationExample3(), col.pw = "black", col.ow = rainbow(length(configuration$obswells)), main = "WTAQ Configuration with Pumping Well on the Left", asp = 1, ...)
configuration |
configuration as retrieved by default: wtConfigurationExample3() |
col.pw |
pumping well colour, default: "black" |
col.ow |
observation well colours. Default: rainbow colours |
main |
title for the plot |
asp |
aspect ratio, see ?plot |
... |
further arguments passed to .plotSideView |
Hauke Sonnenberg
Plot WTAQ results
wtPlotResult(wtaqResult, main = "", plottype = "w", showMeasurements = TRUE, auto.key = NULL, asp = NA, PDF = FALSE, PNG = FALSE, pumpingWellName = "PW", xlim = NULL, ylim = NULL, ...)wtPlotResult(wtaqResult, main = "", plottype = "w", showMeasurements = TRUE, auto.key = NULL, asp = NA, PDF = FALSE, PNG = FALSE, pumpingWellName = "PW", xlim = NULL, ylim = NULL, ...)
wtaqResult |
data frame as returned by |
main |
plot title, default: "" |
plottype |
vector of plot types ("s" = superposed, "w" = one plot per well, "d" = along distance to pump well, "t" each time along distance to well). Default: "w" (one plot per well). |
showMeasurements |
if TRUE, measurements are shown |
auto.key |
given to xyplot, see there. If NULL, a default key with as many columns as there are wells is used. Default: NULL. |
asp |
aspect ratio between x and y axis. Default: 1. Set to NA if aspect ratio does not matter. |
PDF |
if TRUE, a pdf file is created in tempdir() and opened in a PDF viewer |
PNG |
if TRUE, all plots made with plot type "t" are saved to png files in tempdir()/wtaqResult. |
pumpingWellName |
name of pumping well in wtaqResult |
xlim |
|
ylim |
|
... |
additional arguments given to xyplot |
Hauke Sonnenberg
Reads a WTAQ configuration (as e.g. required by
wtRunConfiguration) from an existing WTAQ input file.
wtReadInputFile(inputFile, dbg = FALSE)wtReadInputFile(inputFile, dbg = FALSE)
inputFile |
full path to an existing WTAQ input file |
dbg |
if TRUE, debug message are shown, else not. |
list with elements general, aquifer, drainage,
times, solution, pumpwell, obswell,
representing a WTAQ model run configuration.
Hauke Sonnenberg
Read WTAQ plot file
wtReadPlotFile(plotfile, logtimes = NULL, toListView = FALSE, dbg = FALSE)wtReadPlotFile(plotfile, logtimes = NULL, toListView = FALSE, dbg = FALSE)
plotfile |
plot file as produced by WTAQ model, either in “list view”, i.e. in which data is organised in blocks being written one after the other or in “matrix view”, i.e. in which data is organised in one table only |
logtimes |
if TRUE, time steps are supposed to be logarithmic, i.e. it is assumed that the result plot file is in “matrix form”. Otherwise (logtimes == FALSE) it is assumed that the result plot file is in “list form” as each data block can contain different timestamps. Setting this argument accelerates the reading of the results as the result plot file does not have to be read twice (once for the format, once for the actual data). |
toListView |
if TRUE, results are always returned in “list view” in which drawdowns of different wells do not appear in different columns but all in the same column CALCDD. A column WELL is added to indicate the well to which the drawdown belongs. Default: FALSE. |
dbg |
if TRUE, debug messages are shown. Default: FALSE |
Hauke Sonnenberg
### Read plot files as provided with "sample problems" 1 to 3 in WTAQ ### installation files pfile <- system.file("extdata", sprintf("plt.sp%d", 1:3), package = "kwb.wtaq") dat1 <- wtReadPlotFile(pfile[1]) dat2 <- wtReadPlotFile(pfile[2]) dat3 <- wtReadPlotFile(pfile[3]) ### Plot HDPW + HDOB1 + HDOB2 + HDOB3 + HDOB4 over dimensionless time (TDRDSQ) tr1 <- lattice::xyplot(PW + OB1 + OB2 + OB3 + OB4 ~ TDRDSQ, data = dat1, type = "l", auto.key = list(columns = 5), main = "Example 1") ### Plot CALCDD over TIME tr2 <- lattice::xyplot(CALCDD ~ TIME, groups = WELL, data = dat2, type = "l", auto.key = list(columns = 5), main = "Example 2") tr3 <- lattice::xyplot(CALCDD ~ TIME, groups = WELL, data = dat3, type = "l", auto.key = list(columns = 5), main = "Example 3") print(tr1) print(tr2) print(tr3)### Read plot files as provided with "sample problems" 1 to 3 in WTAQ ### installation files pfile <- system.file("extdata", sprintf("plt.sp%d", 1:3), package = "kwb.wtaq") dat1 <- wtReadPlotFile(pfile[1]) dat2 <- wtReadPlotFile(pfile[2]) dat3 <- wtReadPlotFile(pfile[3]) ### Plot HDPW + HDOB1 + HDOB2 + HDOB3 + HDOB4 over dimensionless time (TDRDSQ) tr1 <- lattice::xyplot(PW + OB1 + OB2 + OB3 + OB4 ~ TDRDSQ, data = dat1, type = "l", auto.key = list(columns = 5), main = "Example 1") ### Plot CALCDD over TIME tr2 <- lattice::xyplot(CALCDD ~ TIME, groups = WELL, data = dat2, type = "l", auto.key = list(columns = 5), main = "Example 2") tr3 <- lattice::xyplot(CALCDD ~ TIME, groups = WELL, data = dat3, type = "l", auto.key = list(columns = 5), main = "Example 3") print(tr1) print(tr2) print(tr3)
repair configuration by resetting parameter values that depend on others
wtRepairConfiguration(configuration, dbg = FALSE)wtRepairConfiguration(configuration, dbg = FALSE)
configuration |
WTAQ configuration, as retrieved by |
dbg |
if TRUE, debug messages are shown, else not |
Hauke Sonnenberg
Run a WTAQ simulation with the given configuration
wtRunConfiguration(configuration, wtaq.exe = .wtaq_path(), targetDirectory = tempdir(), show.results = FALSE, fileExtension = "", dbg = FALSE, ...)wtRunConfiguration(configuration, wtaq.exe = .wtaq_path(), targetDirectory = tempdir(), show.results = FALSE, fileExtension = "", dbg = FALSE, ...)
configuration |
WTAQ configuration, as retrieved by |
wtaq.exe |
full path to WTAQ executable (default: compiled executable in package subfolder "extdata" as defined in helper function .wtaq_path() ) |
targetDirectory |
optional. Target directory. If no target directory is given, a temporary directory will be used. |
show.results |
if TRUE, the content of the results file will be shown in the R console. Default: FALSE |
fileExtension |
extension given to files |
dbg |
if TRUE, debug message are shown, else not. Default: FALSE |
... |
further arguments passed to wtRunInputFile, e.g. show.output.on.console |
model result as read with wtReadPlotFile from the output
file generated by the WTAQ modelling software
Hauke Sonnenberg
Run a WTAQ simulation with the given input file
wtRunInputFile(inputFile, wtaq.exe = .wtaq_path(), targetDirectory = tempdir(), show.results = FALSE, copyToTarget = TRUE, configuration = NULL, batchRun = FALSE, dbg = FALSE)wtRunInputFile(inputFile, wtaq.exe = .wtaq_path(), targetDirectory = tempdir(), show.results = FALSE, copyToTarget = TRUE, configuration = NULL, batchRun = FALSE, dbg = FALSE)
inputFile |
Existing WTAQ input file |
wtaq.exe |
full path to WTAQ executable (default: compiled executable in package subfolder "extdata" as defined in helper function .wtaq_path() ) |
targetDirectory |
optional. Target directory. If no target directory is given, a temporary directory will be used. |
show.results |
if TRUE, the content of the results file will be shown in the R console. Default: FALSE |
copyToTarget |
if TRUE, the input file is copied to the target directory. Set this argument to FALSE if the input file already is in the target directory and does not need to be copied again. |
configuration |
WTAQ configuration object as retrieved by not given (default), it will be constructed from the input file |
batchRun |
if TRUE batch run (may require admin rights!), else using direct command, default: FALSE |
dbg |
if TRUE, debug messages are shown, else not. Default: FALSE |
model result as read with wtReadPlotFile from the output
file generated by the WTAQ modelling software
Hauke Sonnenberg
wtInputFileLines, wtReadInputFile,wtRunConfiguration
set numerical, scalar parameter in WTAQ configuration
wtSetParameter(configuration, parameterName, parameterValue)wtSetParameter(configuration, parameterName, parameterValue)
configuration |
WTAQ configuration as returned by |
parameterName |
parameter name. Must be one of the Aquifer parameters "bb", "hkr", "hkz", "ss", "sy" (see parameters "acc", "akk", "amm", "axmm" (see
"qq", "rw", "rc", "zpd", "zpl", "sw" (see |
parameterValue |
numeric value to which the parameter parameterName shall be set |
configuration with the parameter parameterName altered to
the value given in parameterValue
Hauke Sonnenberg
set numerical, scalar parameters in WTAQ configuration
wtSetParameters(configuration, assignments = NULL)wtSetParameters(configuration, assignments = NULL)
configuration |
WTAQ configuration as returned by |
assignments |
list of "name = value" pairs defining the parameter assignments, e.g. list(hkr = 0.001, hkz = 0.002) to set the horizontal hydraulic conductivity (hkr) to 0.0001 (length/time) and the vertical hydraulic conductivity (hkz) to 0.00005 (length/time). For the allowed parameter names see the description in |
configuration with adapted parameter values as defined in
assignments
Hauke Sonnenberg