Recharge flow potential function

get_recharge_flow_potential(loc, aquifer)

Arguments

loc

Location for evaluating Vector location as c(x,y) or data.frame containing x, y columns

Aquifer

Aquifer containing containing aquifer_type,h0 and recharge (see Details)

Value

Returns hydraulic head (confined aquifers) or discharge potential (unconfined aquifers) at the location(s).

Details

Recharge parameters must contain x0, y0, x_term, and y_term. For confined aquifers, the last two are:

  • x_term: -flow * cos(theta) * sign(dx) / (Ksat * z0)

  • y_term: -flow * sin(theta) * sign(dy) / (Ksat * z0)

For unconfined aquifers, these parameters are:

  • x_term: -2 * flow * cos(theta) * sign(dx) / Ksat

  • y_term: -2 * flow * sin(theta) * sign(dy) / Ksat

Examples

if (FALSE) { ## Flow - confined aquifer recharge_params <- list(recharge_type="F",recharge_vector=c(0,0,1,2),flow=1,x0=0,y0=0) aquifer <- define_aquifer("confined",1,h0=0,z0=1,recharge=recharge_params) get_recharge_flow_potential(c(1/sqrt(2),1/sqrt(2)), aquifer) loc <- expand.grid(x=-2:2,y=-2:2) loc$h <- get_recharge_flow_potential(loc, aquifer) library(ggplot2) ggplot(loc) + geom_raster(aes(x,y,fill=h)) + scale_fill_gradient2() recharge_params <- list(recharge_type="F",recharge_vector=c(-1,-5,0,0),flow=1,x0=0,y0=0) aquifer <- define_aquifer("confined",1,h0=10,z0=1,recharge=recharge_params) loc <- expand.grid(x=-100:100,y=-100:100) loc$h <- get_recharge_flow_potential(loc, aquifer) ggplot(loc) + geom_raster(aes(x,y,fill=h)) + scale_fill_gradient2() recharge_params <- list(recharge_type="F",recharge_vector=c(-1,-5,0,0),flow=1,x0=0,y0=0) aquifer <- define_aquifer("unconfined",1e-1,h0=50,recharge=recharge_params) loc <- expand.grid(x=-100:100,y=-100:100) loc$h2 <- get_recharge_flow_potential(loc, aquifer) loc$h <- sqrt(loc$h2) ggplot(loc) + geom_raster(aes(x,y,fill=h)) + scale_fill_gradient2(midpoint=50) }