1r3.gwflow(1) Grass User's Manual r3.gwflow(1)
2
3
4
6 r3.gwflow - Numerical calculation program for transient, confined
7 groundwater flow in three dimensions.
8
10 raster3d, groundwater flow, voxel, hydrology
11
13 r3.gwflow
14 r3.gwflow --help
15 r3.gwflow [-mf] phead=name status=name hc_x=name hc_y=name hc_z=name
16 [sink=name] yield=name [recharge=name] output=name [veloc‐
17 ity_x=name] [velocity_y=name] [velocity_z=name] [budget=name]
18 dtime=float [maxit=integer] [error=float] [solver=name] [--over‐
19 write] [--help] [--verbose] [--quiet] [--ui]
20
21 Flags:
22 -m
23 Use 3D raster mask (if exists)
24
25 -f
26 Use a full filled quadratic linear equation system, default is a
27 sparse linear equation system.
28
29 --overwrite
30 Allow output files to overwrite existing files
31
32 --help
33 Print usage summary
34
35 --verbose
36 Verbose module output
37
38 --quiet
39 Quiet module output
40
41 --ui
42 Force launching GUI dialog
43
44 Parameters:
45 phead=name [required]
46 Input 3D raster map with initial piezometric heads in [m]
47
48 status=name [required]
49 Input 3D raster map providing the status for each cell, = 0 - inac‐
50 tive, 1 - active, 2 - dirichlet
51
52 hc_x=name [required]
53 Input 3D raster map with the x-part of the hydraulic conductivity
54 tensor in [m/s]
55
56 hc_y=name [required]
57 Input 3D raster map with the y-part of the hydraulic conductivity
58 tensor in [m/s]
59
60 hc_z=name [required]
61 Input 3D raster map with the z-part of the hydraulic conductivity
62 tensor in [m/s]
63
64 sink=name
65 Input 3D raster map with sources and sinks in [m^3/s]
66
67 yield=name [required]
68 Specific yield [1/m] input 3D raster map
69
70 recharge=name
71 Recharge input 3D raster map in m^3/s
72
73 output=name [required]
74 Output 3D raster map storing the piezometric head result of the
75 numerical calculation
76
77 velocity_x=name
78 Output 3D raster map storing the groundwater filter velocity vector
79 part in x direction [m/s]
80
81 velocity_y=name
82 Output 3D raster map storing the groundwater filter velocity vector
83 part in y direction [m/s]
84
85 velocity_z=name
86 Output 3D raster map storing the groundwater filter velocity vector
87 part in z direction [m/s]
88
89 budget=name
90 Output 3D raster map storing the groundwater budget for each cell
91 [m^3/s]
92
93 dtime=float [required]
94 The calculation time in seconds
95 Default: 86400
96
97 maxit=integer
98 Maximum number of iteration used to solve the linear equation sys‐
99 tem
100 Default: 10000
101
102 error=float
103 Error break criteria for iterative solver
104 Default: 0.000001
105
106 solver=name
107 The type of solver which should solve the symmetric linear equation
108 system
109 Options: cg, pcg, cholesky
110 Default: cg
111
113 This numerical module calculates implicit transient and steady state,
114 confined groundwater flow in three dimensions based on volume maps and
115 the current 3D region settings. All initial- and boundary-conditions
116 must be provided as volume maps. The unit in the location must be
117 meters.
118
119 This module is sensitive to mask settings. All cells which are outside
120 the mask are ignored and handled as no flow boundaries.
121
122 The module calculates the piezometric head and optionally the water
123 balance for each cell and the groundwater velocity field in 3 dimen‐
124 sions. The vector components can be visualized with ParaView if they
125 are exported with r3.out.vtk.
126
127 The groundwater flow will always be calculated transient. For steady
128 state computation the user should set the timestep to a large number
129 (billions of seconds) or set the specific yield raster map to zero.
130
132 The groundwater flow calculation is based on Darcy’s law and a numeri‐
133 cal implicit finite volume discretization. The discretization results
134 in a symmetric and positive definite linear equation system in form of
135 Ax = b, which must be solved. The groundwater flow partial differential
136 equation is of the following form:
137
138 (dh/dt)*S = div (K grad h) + q
139
140 In detail for 3 dimensions:
141
142 (dh/dt)*S = Kxx * (d^2h/dx^2) + Kyy * (d^2h/dy^2) + Kzz * (d^2h/dz^2) +
143 q
144
145 · h -- the piezometric head im meters [m]
146
147 · dt -- the time step for transient calculation in seconds [s]
148
149 · S -- the specific yield [1/m]
150
151 · b -- the bottom surface of the aquifer meters [m]
152
153 · Kxx -- the hydraulic conductivity tensor part in x direction in
154 meter per second [m/s]
155
156 · Kyy -- the hydraulic conductivity tensor part in y direction in
157 meter per seconds [m/s]
158
159 · Kzz -- the hydraulic conductivity tensor part in z direction in
160 meter per seconds [m/s]
161
162 · q - inner source/sinc in [1/s]
163
164 Two different boundary conditions are implemented, the Dirichlet and
165 Neumann conditions. By default the calculation area is surrounded by
166 homogeneous Neumann boundary conditions. The calculation and boundary
167 status of single cells can be set with the status map, the following
168 cell states are supported:
169
170 · 0 == inactive - the cell with status 0 will not be calculated,
171 active cells will have a no flow boundary to an inactive cell
172
173 · 1 == active - this cell is used for groundwater calculation,
174 inner sources can be defined for those cells
175
176 · 2 == Dirichlet - cells of this type will have a fixed piezomet‐
177 ric head value which do not change over time
178
179 Note that all required raster maps are read into main memory. Addition‐
180 ally the linear equation system will be allocated, so the memory con‐
181 sumption of this module rapidely grow with the size of the input maps.
182
183 The resulting linear equation system Ax = b can be solved with several
184 solvers. An iterative solvers with sparse and quadratic matrices sup‐
185 port is implemented. The conjugate gradients method with (pcg) and
186 without (cg) precondition. Additionally a direct Cholesky solver is
187 available. This direct solver only work with normal quadratic matrices,
188 so be careful using them with large maps (maps of size 10.000 cells
189 will need more than one Gigabyte of RAM). The user should always prefer
190 to use a sparse matrix solver.
191
193 This small script creates a working groundwater flow area and data. It
194 cannot be run in a lat/lon location.
195 # set the region accordingly
196 g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000 -p3
197 #now create the input raster maps for a confined aquifer
198 r3.mapcalc expression="phead = if(row() == 1 && depth() == 4, 50, 40)"
199 r3.mapcalc expression="status = if(row() == 1 && depth() == 4, 2, 1)"
200 r3.mapcalc expression="well = if(row() == 20 && col() == 20 && depth() == 2, -0.25, 0)"
201 r3.mapcalc expression="hydcond = 0.00025"
202 r3.mapcalc expression="syield = 0.0001"
203 r.mapcalc expression="recharge = 0.0"
204 r3.gwflow solver=cg phead=phead statuyield=status hc_x=hydcond hc_y=hydcond \
205 hc_z=hydcond sink=well yield=syield r=recharge output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget
206 # The data can be visualized with ParaView when exported with r3.out.vtk
207 r3.out.vtk -p in=gwresult,status,budget vector=vx,vy,vz out=/tmp/gwdata3d.vtk
208 #now load the data into ParaView
209 paraview --data=/tmp/gwdata3d.vtk
210
212 This will create a nice 3D model with geological layer with different
213 hydraulic conductivities. Make sure you are not in a lat/lon projec‐
214 tion.
215 # set the region accordingly
216 g.region res=15 res3=15 t=500 b=0 n=1000 s=0 w=0 e=1000
217 #now create the input raster maps for a confined aquifer
218 r3.mapcalc expression="phead = if(col() == 1 && depth() == 33, 50, 40)"
219 r3.mapcalc expression="status = if(col() == 1 && depth() == 33, 2, 1)"
220 r3.mapcalc expression="well = if(row() == 20 && col() == 20 && depth() == 3, -0.25, 0)"
221 r3.mapcalc expression="well = if(row() == 50 && col() == 50 && depth() == 3, -0.25, well)"
222 r3.mapcalc expression="hydcond = 0.0025"
223 r3.mapcalc expression="hydcond = if(depth() < 30 && depth() > 23 && col() < 60, 0.000025, hydcond)"
224 r3.mapcalc expression="hydcond = if(depth() < 20 && depth() > 13 && col() > 7, 0.000025, hydcond)"
225 r3.mapcalc expression="hydcond = if(depth() < 10 && depth() > 7 && col() < 60, 0.000025, hydcond)"
226 r3.mapcalc expression="syield = 0.0001"
227 r3.gwflow solver=cg phead=phead statuyield=status hc_x=hydcond hc_y=hydcond \
228 hc_z=hydcond sink=well yield=syield output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget
229 # The data can be visualized with paraview when exported with r3.out.vtk
230 r3.out.vtk -p in=gwresult,status,budget,hydcond,well vector=vx,vy,vz out=/tmp/gwdata3d.vtk
231 #now load the data into paraview
232 paraview --data=/tmp/gwdata3d.vtk
233
235 r.gwflow, r.solute.transport, r3.out.vtk
236
238 Sören Gebbert
239
240 This work is based on the Diploma Thesis of Sören Gebbert available
241 here at Technical University Berlin, Germany.
242
243 Last changed: $Date: 2018-12-26 13:09:47 +0100 (Wed, 26 Dec 2018) $
244
246 Available at: r3.gwflow source code (history)
247
248 Main index | 3D raster index | Topics index | Keywords index | Graphi‐
249 cal index | Full index
250
251 © 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual
252
253
254
255GRASS 7.6.0 r3.gwflow(1)