Description Usage Arguments Value Examples
Dynamic Random Walk aqueous contaminant transport solution
1 2 3 4 5 6 | DRW(rootname, description, mfdir = ".", mfdata, wtop, dis, bas, wel, hds, cbb,
cbf, newcbf = TRUE, source.term, STna.rm = FALSE, porosity, start.t,
end.t, dt, D, vdepD, Rf = 1, lambda = 0, decay.sorbed = FALSE, cd, mm,
minnp = 100L, maxnp, Ndp = 2L, init = NULL, nc.to.mf = 1L,
plot.state = TRUE, keep.MF.cellref = TRUE, time.mismatch.tol = 0.001,
..., keepMPfiles = FALSE)
|
rootname |
character string;
the rootname for the results file ( |
description |
character string; a description of this model run, for future reference |
mfdir |
character string; path to the directory holding all the MODFLOW input and output files; the function navigates to this directory so that extended file paths for MODFLOW files needn't be specified |
mfdata |
NetCDF object, list of NetCDF objects or character string[Nmfds];
the MODFLOW data sets in NetCDF form (see |
wtop |
NetCDF object, list of NetCDF objects or character string [Nmfds];
NetCDF data sets of the cell-by-cell top of water in each cell (the
lower out of head and cell top); if character string file names are
used, the files needn't exist beforehand as they can be created using
|
dis |
character string [Nmfds]; file paths to DIS package files corresponding to the MODFLOW data sets in mfdata (note, this cannot be a list of DIS.MFpackage objects, as the file names are needed for MODPATH) |
bas |
BAS.MFpackage object (or list thereof) or character string [Nmfds];
the BAS packages corresponding to mfdata (see
|
wel |
Optional: WEL.MFpackage object (or list thereof) or character string
[Nmfds];
the WEL packages corresponding to mfdata (see
|
hds, cbb |
character string [Nmfds]; the head save and cell-by-cell budget files corresponding to mfdata; although this information is in mfdata, MODPATH needs to know where the original HDS files are |
cbf |
character string [Nmfds];
the composite budget file names created by MODPATH 5; if these files
don't already exist or |
newcbf |
logical [1];
Whether MODPATH 5 should rewrite the CBF file. If you have modified the
MODFLOW model since the last DRW run, then you should set this to
|
source.term |
data.table, data.frame, DNAPLSourceTerm object, or list of
any combination of these;
information about the transient point releases in the system; if a data
table or frame, columns should be: x, y (location in the same absolute
co-ordinate system as |
STna.rm |
logical [1];
if |
porosity |
numeric [1], numeric [NLAY] or numeric array [NCOL, NROW, NLAY]; the porosity (fractional, 0 to 1), either as uniform value, layer-by-layer values or a 3D array of cell-by-cell values matching the MODFLOW grid dimensions |
start.t, end.t |
numeric [1];
start and end times of the model (the |
dt |
numeric [1]; time step size |
D |
numeric [2 or 3]; simplified dispersivity/ dispersion coefficient tensor, giving longitudinal, transverse and optionally vertical components |
vdepD |
logical [1];
|
Rf |
numeric [1]; retardation factor (1 - (bulk_density times K_d)/(effective_porosity)) |
lambda |
numeric [1]; first-order degradation constant (log(2)/half_life) |
decay.sorbed |
logical [1];
|
cd |
numeric [2];
horizontal and vertical coalescing search radii (see
|
mm |
numeric [1];
minimum mass of particles after coalescing (see
|
minnp |
integer [1]; minimum number of particles on which to perform coalescing |
maxnp |
integer [1];
maximum number of particles after coalescing (see
|
Ndp |
integer [1]; number of pairs of particles to spawn to model the dispersion of contaminant mass |
init |
|
nc.to.mf |
integer [ |
plot.state |
logical [1];
if |
keep.MF.cellref |
logical [2];
if |
time.mismatch.tol |
numeric [1];
various time comparisons are made during the model in order to check
consistency, such as checking that the end time of one MODFLOW dataset
matches the start time of the next; time.mismatch.tol gives the
tolerance used in these comparisons in calls to
|
... |
graphical parameters such as |
keepMPfiles |
logical [1]; use for debugging when MODPATH not working: doesn't delete the MODPATH files |
A DRWmodel object, invisibly. The result is also saved to file:
paste0(rootname, ".rds")
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(data.table)
# single point source which ceases after t = 10000
mfdir <- system.file(package = "DRW")
demoDRW <- DRW("DRW_EXAMPLE", "demo", mfdir,
"drw_mf_demo.nc", "drw_mf_demo_wtop.nc",
"drw_mf_demo.dis", "drw_mf_demo.bas", "drw_mf_demo.wel",
"drw_mf_demo.hds", "drw_mf_demo.cbb", "DRWtest.cbf",
newcbf = TRUE,
source.term = data.table(x = 625, y = 825,
L = 1L, zo = .5,
J = function(t){
if(t < 1e4) 1 else 0
}),
porosity = .1,
start.t = 9000, end.t = 11000, dt = 200,
D = c(10, 1), vdepD = TRUE,
cd = c(20, 10), mm = 1e-7, minnp = 100L, maxnp = 2e4L,
Ndp = 4L)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.