GRASS logo

NAME

r.gwflow - Numerical calculation program for transient, confined and unconfined groundwater flow in two dimensions.

KEYWORDS

raster

SYNOPSIS

r.gwflow
r.gwflow help
r.gwflow [-s] phead=string status=string hc_x=string hc_y=string [q=string] s=string [r=string] top=string bottom=string output=string [velocity=string] [type=string] [river_bed=string] [river_head=string] [river_leak=string] [drain_bed=string] [drain_leak=string] dt=float [maxit=integer] [error=float] [solver=name] [relax=float] [--overwrite] [--verbose] [--quiet]

Flags:

-s
Use a sparse matrix, only available with iterative solvers
--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

phead=string
The initial piezometric head in [m]
status=string
Boundary condition status, 0-inactive, 1-active, 2-dirichlet
hc_x=string
X-part of the hydraulic conductivity tensor in [m/s]
hc_y=string
Y-part of the hydraulic conductivity tensor in [m/s]
q=string
Water sources and sinks in [m^3/s]
s=string
Specific yield in [1/m]
r=string
Recharge map e.g: 6*10^-9 per cell in [m^3/s*m^2]
top=string
Top surface of the aquifer in [m]
bottom=string
Bottom surface of the aquifer in [m]
output=string
The map storing the numerical result [m]
velocity=string
Calculate the groundwater filter velocity vector field [m/s]
and write the x, and y components to maps named name_[xy]
type=string
The type of groundwater flow
Options: confined,unconfined
Default: confined
river_bed=string
The hight of the river bed in [m]
river_head=string
Water level (head) of the river with leakage connection in [m]
river_leak=string
The leakage coefficient of the river bed in [1/s].
drain_bed=string
The hight of the drainage bed in [m]
drain_leak=string
The leakage coefficient of the drainage bed in [1/s]
dt=float
The calculation time in seconds
Default: 86400
maxit=integer
Maximum number of iteration used to solver the linear equation system
Default: 100000
error=float
Error break criteria for iterative solvers (jacobi, sor, cg or bicgstab)
Default: 0.0000000001
solver=name
The type of solver which should solve the symmetric linear equation system
Options: gauss,lu,cholesky,jacobi,sor,cg,bicgstab,pcg
Default: cg
relax=float
The relaxation parameter used by the jacobi and sor solver for speedup or stabilizing
Default: 1

DESCRIPTION

This numerical program calculates transient, confined and unconfined groundwater flow in two dimensions based on raster maps and the current region resolution. All initial and boundary conditions must be provided as raster maps.


Workflow of r.gwflow

r.gwflow calculates the piezometric head and optionally the filter velocity field, based on the hydraulic conductivity and the piezometric head. The vector components can be visualized with paraview if they are exported with r.out.vtk.

The groundwater flow will always be calculated transient. If you want to calculate stady state, set the timestep to a large number (billions of seconds) or set the specific yield/ effective porosity raster maps to zero.

NOTES

The groundwater flow calculation is based on Darcy's law and a finite volume discretization. The solved groundwater flow partial differential equation is of the following form:

(dh/dt)*Ss = Kxx * (d^2h/dx^2) + Kyy * (d^2h/dy^2) + q



Two different boundary conditions are implemented, the Dirichlet and Neumann conditions. By default the calculation area is surrounded by homogeneous Neumann boundary conditions. The calculation and boundary status of single cells must be set with a status map, the following states are supportet:

The groundwater flow equation can be solved with several solvers. Two iterative solvers with sparse and quadratic matrices support are implemented. The conjugate gradients (cg) method and the biconjugate gradients-stabilized (bicgstab) method. Aditionally a direct Gauss solver and LU solver are available. Those direct solvers only work with normal quadratic matrices, so be careful using them with large maps (maps of size 10.000 cells will need more than one gigabyte of RAM). Always prefer a sparse matrix solver.

EXAMPLE

Use this small script to create a working groundwater flow area and data. Make sure you are not in a lat/lon projection.
# set the region accordingly
g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000

#now create the input raster maps for confined and unconfined aquifers
r.mapcalc "phead=if(row() == 1 , 50, 40)"
r.mapcalc "status=if(row() == 1 , 2, 1)"
r.mapcalc "well=if(row() == 20 && col() == 20 , -0.001, 0)"
r.mapcalc "hydcond=0.00025"
r.mapcalc "recharge=0"
r.mapcalc "top_conf=20.0"
r.mapcalc "top_unconf=70.0"
r.mapcalc "bottom=0.0"
r.mapcalc "null=0.0"
r.mapcalc "poros=0.15"
r.mapcalc "syield=0.0001"

#confined groundwater flow with cg solver and sparse matrix
r.gwflow --o -s solver=cg top=top_conf bottom=bottom phead=phead status=status \
hc_x=hydcond hc_y=hydcond q=well s=syield r=recharge output=gwresult_conf \
dt=8640000 type=confined velocity=gwresult_conf_velocity

#unconfined groundwater flow with cg solver and sparse matrix
r.gwflow --o -s solver=cg top=top_unconf bottom=bottom phead=phead \
status=status hc_x=hydcond hc_y=hydcond q=well s=poros r=recharge \
output=gwresult_unconf dt=8640000 type=unconfined velocity=gwresult_unconf_velocity

# The data can be visulaized with paraview when exported with r.out.vtk
r.out.vtk -p in=gwresult_conf,status vector=gwresult_conf_velocity_x,gwresult_conf_velocity_y,null out=/tmp/gwdata_conf2d.vtk
r.out.vtk -p elevation=gwresult_unconf in=gwresult_unconf,status vector=gwresult_unconf_velocity_x,gwresult_unconf_velocity_y,null out=/tmp/gwdata_unconf2d.vtk

#now load the data into paraview
paraview --data=/tmp/gwdata_conf2d.vtk &
paraview --data=/tmp/gwdata_unconf2d.vtk &

SEE ALSO

r3.gwflow
r.out.vtk

AUTHOR

Soeren Gebbert

Last changed: $Date: 2007-11-26 07:22:41 -0800 (Mon, 26 Nov 2007) $


Main index - raster index - Full index

© 2003-2008 GRASS Development Team