create.waterflow {SoPhy} | R Documentation |
The function creates the input list for swms2d
create.waterflow(h, Kat = 2, MaxIt = 20, hTab = c(0.001, 200), dtMinMax = h$water$dtMinMax, DMul = c(1.1, 0.33), atmadd=FALSE )
h |
a list of the
same format as the output xswms2d |
Kat |
type of flow system:
|
MaxIt |
maximum number of iteration during any time step. |
hTab |
c(hTab1, hTabN) , interval of pressure heads
within which a table of hydraulic properties is generated. |
dtMinMax |
(dtmin, dtmax) , minimum and maximum permitted
time increment. |
DMul |
c(dMul, dMul2) ,
dMul >= 1 ,
dMul2 <= 1 ;
if number of required iterations is less than 4 or greater than 6
then the next time
step is multiplied by dMul and dMul2 , respectively. |
atmadd |
logical. If a segment contains several roots, the
potential water uptake for all the roots is added if
atmadd=TRUE . Otherwise the maximum potential water uptake
is assigned to the segment.
|
The function is usually called internally; see Examples for an explicite call. The function performes several tasks
h$water$red
the grid is thinned.
If several root segments belong to a single pixel then the boundary condition is taken that appears most. If equality, then in the order of atmospheric condition, Neumann condition, and Dirichlet condition, the first one is taken as condition for the pixel.
In case of the atmospheric condition, the root uptake function is the minimal function of the standard form (given by P0, P2H, P2L, and P3), such that the values equal the maximal root uptake function at the considered pixel.
For the Neumann condition, the sum of the Neumann values is taken over all root segment at the pixel with Neumann condition.
For the Dirichlet condition, the minimum over all Dirichlet values is taken.
$stone$value=NA
)
are excluded.
The output is a list suitable as input list for swms2d
.
Additionally, the list has the following elements:
flux |
a length(water.x) *length(water.y)
vector of logical values indicating
which grid elements of the simulation
grid are part of the finite element mesh.
|
water.x |
the x coordinates of the thinned grid |
water.y |
the y coordinates of the thinned grid |
Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/institute
modify.horizons
,
plotRF
,
plotWater
,
simulateHorizons
,
SoPhy
,
swms2d
,
xswms2d
h <- xswms2d(xlim=c(1, 50), ylim=c(1, 30), step=1, new=NULL) h$water$red <- 1 h$water$top.value <- -50 ## pressure head at surface h$water$TPrint <- 10 h <- simulateHorizons(h) ## simulation of the stochastic components plotRF(h) swms2d.in <- create.waterflow(h) ## rewrite h as a list readable by ## swms2d; the following function can also directly be called ## with the argument h; then create.waterflow is called ## internally str(swms2d.in) swms2d.out <- swms2d(swms2d.in, iter.print=1) ## numerical simulation if (is.character(swms2d.out)) cat(swms2d.out, "\n") else plotWater(swms2d.out, what="H")