2
This numerical program calculates transient, confined and
3
unconfined groundwater flow in two dimensions based on
4
raster maps and the current region resolution.
5
All initial and boundary conditions must be provided as
10
<img src=r_gwflow_concept.png border=0><br>
11
<table border=0 width=700>
13
<i>Workflow of r.gwflow</i>
19
<em>r.gwflow</em> calculates the piezometric head and optionally the
20
filter velocity field, based on the hydraulic conductivity and the piezometric head.
21
The vector components can be visualized with paraview if they are exported
22
with <em>r.out.vtk</em>.
25
The groundwater flow will always be calculated transient.
26
If you want to calculate stady state, set the timestep
27
to a large number (billions of seconds) or set the
28
specific yield/ effective porosity raster maps to zero.
33
The groundwater flow calculation is based on Darcy's law and a
34
finite volume discretization. The solved groundwater flow partial
35
differential equation is of the following form:
38
(dh/dt)*Ss = Kxx * (d^2h/dx^2) + Kyy * (d^2h/dy^2) + q
41
<li>h -- the piezometric head im [m]</li>
42
<li>dt -- the time step for transient calculation in [s]</li>
43
<li>S -- the specific yield [1/m]</li>
44
<li>Kxx -- the hydraulic conductivity tensor part in x direction in [m/s]</li>
45
<li>Kyy -- the hydraulic conductivity tensor part in y direction in [m/s]</li>
46
<li>q - inner source in meter per second [1/s]</li>
51
Two different boundary conditions are implemented,
52
the Dirichlet and Neumann conditions. By default the calculation area is surrounded by homogeneous Neumann boundary conditions.
53
The calculation and boundary status of single cells must be set with a status map,
54
the following states are supportet:
57
<li>0 == inactive - the cell with status 0 will not be calculated, active cells will have a no flow boundary to this cell</li>
58
<li>1 == active - this cell is used for groundwater floaw calculation, inner sources and recharge can be defined for those cells</li>
59
<li>2 == Dirichlet - cells of this type will have a fixed piezometric head value which do not change over the time </li>
64
The groundwater flow equation can be solved with several solvers.
65
Two iterative solvers with sparse and quadratic matrices support are implemented.
66
The conjugate gradients (cg) method and the biconjugate gradients-stabilized (bicgstab) method.
67
Aditionally a direct Gauss solver and LU solver are available. Those direct solvers
68
only work with normal quadratic matrices, so be careful using them with large maps
69
(maps of size 10.000 cells will need more than one gigabyte of RAM).
70
Always prefer a sparse matrix solver.
73
Use this small script to create a working
74
groundwater flow area and data. Make sure you are not in a lat/lon projection.
76
<div class="code"><pre>
77
# set the region accordingly
78
g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000
80
#now create the input raster maps for confined and unconfined aquifers
81
r.mapcalc "phead=if(row() == 1 , 50, 40)"
82
r.mapcalc "status=if(row() == 1 , 2, 1)"
83
r.mapcalc "well=if(row() == 20 && col() == 20 , -0.001, 0)"
84
r.mapcalc "hydcond=0.00025"
85
r.mapcalc "recharge=0"
86
r.mapcalc "top_conf=20.0"
87
r.mapcalc "top_unconf=70.0"
88
r.mapcalc "bottom=0.0"
90
r.mapcalc "poros=0.15"
91
r.mapcalc "syield=0.0001"
93
#confined groundwater flow with cg solver and sparse matrix
94
r.gwflow --o -s solver=cg top=top_conf bottom=bottom phead=phead status=status \
95
hc_x=hydcond hc_y=hydcond q=well s=syield r=recharge output=gwresult_conf \
96
dt=8640000 type=confined velocity=gwresult_conf_velocity
98
#unconfined groundwater flow with cg solver and sparse matrix
99
r.gwflow --o -s solver=cg top=top_unconf bottom=bottom phead=phead \
100
status=status hc_x=hydcond hc_y=hydcond q=well s=poros r=recharge \
101
output=gwresult_unconf dt=8640000 type=unconfined velocity=gwresult_unconf_velocity
103
# The data can be visulaized with paraview when exported with r.out.vtk
104
r.out.vtk -p in=gwresult_conf,status vector=gwresult_conf_velocity_x,gwresult_conf_velocity_y,null out=/tmp/gwdata_conf2d.vtk
105
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
107
#now load the data into paraview
108
paraview --data=/tmp/gwdata_conf2d.vtk &
109
paraview --data=/tmp/gwdata_unconf2d.vtk &
114
<em><a href="r3.gwflow.html">r3.gwflow</a></em><br>
115
<em><a href="r.out.vtk.html">r.out.vtk</a></em><br>
120
<p><i>Last changed: $Date: 2008-05-16 21:09:06 +0200 (Fri, 16 May 2008) $</i>