GRASS logo

NAME

r3.gwflow - Numerical calculation program for transient, confined groundwater flow in three dimensions

KEYWORDS

raster3d, voxel, groundwater, numeric, simulation

SYNOPSIS

r3.gwflow
r3.gwflow help
r3.gwflow [-mf] phead=name status=name hc_x=name hc_y=name hc_z=name [q=name] s=name [r=name] output=name [vx=name] [vy=name] [vz=name] [budget=name] dt=float [maxit=integer] [error=float] [solver=name] [--overwrite] [--verbose] [--quiet]

Flags:

-m
Use G3D mask (if exists)
-f
Use a full filled quadratic linear equation system, default is a sparse linear equation system.
--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

phead=name
Input 3d-raster map with initial piezometric heads in [m]
status=name
Input 3d-raster map providing the status for each cell, = 0 - inactive, 1 - active, 2 - dirichlet
hc_x=name
Input 3d-raster map with the x-part of the hydraulic conductivity tensor in [m/s]
hc_y=name
Input 3d-raster map with the y-part of the hydraulic conductivity tensor in [m/s]
hc_z=name
Input 3d-raster map with the z-part of the hydraulic conductivity tensor in [m/s]
q=name
Input 3d-raster map with sources and sinks in [m^3/s]
s=name
Specific yield [1/m] input 3d-raster map
r=name
Recharge input 3d-raster map in m^3/s
output=name
Output 3d-raster map storing the piezometric head result of the numerical calculation
vx=name
Output 3d-raster map storing the groundwater filter velocity vector part in x direction [m/s]
vy=name
Output 3d-raster map storing the groundwater filter velocity vector part in y direction [m/s]
vz=name
Output 3d-raster map storing the groundwater filter velocity vector part in z direction [m/s]
budget=name
Output 3d-raster map Storing the groundwater budget for each cell [m^3/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: cg,pcg,cholesky
Default: cg

DESCRIPTION

This numerical program calculates implicit transient and steady state, confined groundwater flow in three dimensions based on volume maps and the current 3d region settings. All initial- and boundary-conditions must be provided as volume maps. The unit in the location must be meters.

This module is sensitive to mask settings. All cells which are outside the mask are ignored and handled as no flow boundaries.
This module calculates the piezometric head and optionally the water balance for each cell and the groundwater velocity field in 3 dimensions. The vector components can be visualized with paraview if they are exported with r3.out.vtk.

The groundwater flow will always be calculated transient. For stady state computation set the timestep to a large number (billions of seconds) or set the specific yield raster map to zero.

NOTES

The groundwater flow calculation is based on Darcy's law and a numerical implicit finite volume discretization. The discretization results in a symmetric and positive definit linear equation system in form of Ax = b, which must be solved. The groundwater flow partial differential equation is of the following form:

(dh/dt)*S = div (K grad h) + q

In detail for 3 dimensions:

(dh/dt)*S = Kxx * (d^2h/dx^2) + Kyy * (d^2h/dy^2) + Kzz * (d^2h/dz^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 can be set with the status map, the following cell states are supportet:

Note that all required raster maps are read into main memory. Additionally the linear equation system will be allocated, so the memory consumption of this module rapidely grow with the size of the input maps.

The resulting linear equation system Ax = b can be solved with several solvers. An iterative solvers with sparse and quadratic matrices support is implemented. The conjugate gradients method with (pcg) and without (cg) precondition. Aditionally a direct Cholesky solver is available. This direct solver 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 1

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 a confined aquifer
r3.mapcalc --o expression="phead = if(row() == 1 && depth() == 4, 50, 40)"
r3.mapcalc --o expression="status = if(row() == 1 && depth() == 4, 2, 1)"
r3.mapcalc --o expression="well = if(row() == 20 && col() == 20 && depth() == 2, -0.25, 0)"
r3.mapcalc --o expression="hydcond = 0.00025"
r3.mapcalc --o expression="syield = 0.0001"
r.mapcalc  --o expression="recharge = 0.0"

r3.gwflow --o solver=cg phead=phead status=status hc_x=hydcond hc_y=hydcond  \
hc_z=hydcond q=well s=syield r=recharge output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget

# The data can be visulaized with paraview when exported with r3.out.vtk
r3.out.vtk -p in=gwresult,status,budget vector=vx,vy,vz out=/tmp/gwdata3d.vtk

#now load the data into paraview
paraview --data=/tmp/gwdata3d.vtk

EXAMPLE 2

This will create a nice 3d model with geolgical layer with different hydraulic conductivities. Make sure you are not in a lat/lon projection.
# set the region accordingly
g.region res=15 res3=15 t=500 b=0 n=1000 s=0 w=0 e=1000

#now create the input raster maps for a confined aquifer
r3.mapcalc --o expression="phead = if(col() == 1 && depth() == 33, 50, 40)"
r3.mapcalc --o expression="status = if(col() == 1 && depth() == 33, 2, 1)"
r3.mapcalc --o expression="well = if(row() == 20 && col() == 20 && depth() == 3, -0.25, 0)"
r3.mapcalc --o expression="well = if(row() == 50 && col() == 50 && depth() == 3, -0.25, well)"
r3.mapcalc --o expression="hydcond = 0.0025"
r3.mapcalc --o expression="hydcond = if(depth() < 30 && depth() > 23 && col() < 60, 0.000025, hydcond)"
r3.mapcalc --o expression="hydcond = if(depth() < 20 && depth() > 13 && col() >  7, 0.000025, hydcond)"
r3.mapcalc --o expression="hydcond = if(depth() < 10 && depth() >  7 && col() < 60, 0.000025, hydcond)"
r3.mapcalc --o expression="syield = 0.0001"

r3.gwflow --o solver=cg phead=phead status=status hc_x=hydcond hc_y=hydcond  \
hc_z=hydcond q=well s=syield output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget

# The data can be visulaized with paraview when exported with r3.out.vtk
r3.out.vtk -p in=gwresult,status,budget,hydcond,well vector=vx,vy,vz out=/tmp/gwdata3d.vtk

#now load the data into paraview
paraview --data=/tmp/gwdata3d.vtk

SEE ALSO

r.gwflow
r.solute.transport
r3.out.vtk

AUTHOR

Sören Gebbert

This work is based on the Diploma Thesis of Sören Gebbert available here at Technical University Berlin in Germany.

Last changed: $Date: 2010-01-23 05:49:09 -0800 (Sat, 23 Jan 2010) $


Main index - raster3D index - Full index

© 2003-2011 GRASS Development Team