Debian Codegraph @

raster3d/r3.gwflow/r3.gwflow.html

raw
1 <h2>DESCRIPTION</h2>
2
3 This numerical module calculates implicit transient and steady state,
4 confined groundwater flow in three dimensions based on volume maps
5 and the current 3D region settings.
6 All initial- and boundary-conditions must be provided as volume maps.
7 The unit of the current coordinate reference system must be meters.
8 <p>This module is sensitive to mask settings. All cells which are outside
9 the mask are ignored and handled as no flow boundaries.
10 <p>The module calculates the piezometric head and optionally the water
11 balance for each cell and the groundwater velocity field in 3 dimensions.
12 The vector components can be visualized with ParaView if they are exported
13 with <em>r3.out.vtk</em>.
14
15 <p>The groundwater flow will always be calculated transient.
16 For steady state computation the user should set the timestep
17 to a large number (billions of seconds) or set the
18 specific yield raster map to zero.
19
20 <h2>NOTES</h2>
21
22 The groundwater flow calculation is based on Darcy's law and a numerical
23 implicit finite volume discretization. The discretization results in a
24 symmetric and positive definite linear equation system in form of
25 <i>Ax = b</i>, which must be solved. The groundwater flow partial
26 differential equation is of the following form:
27
28 <p>(dh/dt)*S = div (K grad h) + q
29 <p>In detail for 3 dimensions:
30 <p>(dh/dt)*S = Kxx * (d^2h/dx^2) + Kyy * (d^2h/dy^2) + Kzz * (d^2h/dz^2) + q
31
32 <ul>
33 <li>h -- the piezometric head im meters [m]</li>
34 <li>dt -- the time step for transient calculation in seconds [s]</li>
35 <li>S -- the specific yield [1/m]</li>
36 <li>b -- the bottom surface of the aquifer meters [m]</li>
37 <li>Kxx -- the hydraulic conductivity tensor part in x direction in meter per second [m/s]</li>
38 <li>Kyy -- the hydraulic conductivity tensor part in y direction in meter per seconds [m/s]</li>
39 <li>Kzz -- the hydraulic conductivity tensor part in z direction in meter per seconds [m/s]</li>
40 <li>q - inner source/sinc in [1/s]</li>
41 </ul>
42
43 <p>Two different boundary conditions are implemented, the Dirichlet and
44 Neumann conditions. By default the calculation area is surrounded by
45 homogeneous Neumann boundary conditions. The calculation and boundary
46 status of single cells can be set with the status map, the following
47 cell states are supported:
48
49 <ul>
50 <li>0 == inactive - the cell with status 0 will not be calculated,
51 active cells will have a no flow boundary to an inactive cell</li>
52 <li>1 == active - this cell is used for groundwater calculation,
53 inner sources can be defined for those cells</li>
54 <li>2 == Dirichlet - cells of this type will have a fixed piezometric
55 head value which do not change over time </li>
56 </ul>
57
58 <p>Note that all required raster maps are read into main memory. Additionally
59 the linear equation system will be allocated, so the memory consumption of
60 this module rapidely grow with the size of the input maps.
61
62 <p>The resulting linear equation system <i>Ax = b</i> can be solved with
63 several solvers. An iterative solvers with sparse and quadratic matrices
64 support is implemented.
65 The conjugate gradients method with (pcg) and without (cg) precondition.
66 Additionally a direct Cholesky solver is available. This direct solver
67 only work with normal quadratic matrices, so be careful using them with
68 large maps (maps of size 10.000 cells will need more than one Gigabyte
69 of RAM). The user should always prefer to use a sparse matrix solver.
70
71 <h2>EXAMPLE 1</h2>
72
73 This small script creates a working groundwater flow area and
74 data. It cannot be run in a lat/lon project.
75
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 -p3
79
80 #now create the input raster maps for a confined aquifer
81 r3.mapcalc expression="phead = if(row() == 1 &amp;&amp; depth() == 4, 50, 40)"
82 r3.mapcalc expression="status = if(row() == 1 &amp;&amp; depth() == 4, 2, 1)"
83 r3.mapcalc expression="well = if(row() == 20 &amp;&amp; col() == 20 &amp;&amp; depth() == 2, -0.25, 0)"
84 r3.mapcalc expression="hydcond = 0.00025"
85 r3.mapcalc expression="syield = 0.0001"
86 r.mapcalc expression="recharge = 0.0"
87
88 r3.gwflow solver=cg phead=phead statuyield=status hc_x=hydcond hc_y=hydcond \
89 hc_z=hydcond sink=well yield=syield r=recharge output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget
90
91 # The data can be visualized with ParaView when exported with r3.out.vtk
92 r3.out.vtk -p in=gwresult,status,budget vector=vx,vy,vz out=/tmp/gwdata3d.vtk
93
94 #now load the data into ParaView
95 paraview --data=/tmp/gwdata3d.vtk
96 </pre></div>
97
98 <h2>EXAMPLE 2</h2>
99
100 This will create a nice 3D model with geological layer with different
101 hydraulic conductivities. Make sure you are not in a lat/lon projection.
102
103 <div class="code"><pre>
104 # set the region accordingly
105 g.region res=15 res3=15 t=500 b=0 n=1000 s=0 w=0 e=1000
106
107 #now create the input raster maps for a confined aquifer
108 r3.mapcalc expression="phead = if(col() == 1 &amp;&amp; depth() == 33, 50, 40)"
109 r3.mapcalc expression="status = if(col() == 1 &amp;&amp; depth() == 33, 2, 1)"
110 r3.mapcalc expression="well = if(row() == 20 &amp;&amp; col() == 20 &amp;&amp; depth() == 3, -0.25, 0)"
111 r3.mapcalc expression="well = if(row() == 50 &amp;&amp; col() == 50 &amp;&amp; depth() == 3, -0.25, well)"
112 r3.mapcalc expression="hydcond = 0.0025"
113 r3.mapcalc expression="hydcond = if(depth() &lt; 30 &amp;&amp; depth() &gt; 23 &amp;&amp; col() &lt; 60, 0.000025, hydcond)"
114 r3.mapcalc expression="hydcond = if(depth() &lt; 20 &amp;&amp; depth() &gt; 13 &amp;&amp; col() &gt; 7, 0.000025, hydcond)"
115 r3.mapcalc expression="hydcond = if(depth() &lt; 10 &amp;&amp; depth() &gt; 7 &amp;&amp; col() &lt; 60, 0.000025, hydcond)"
116 r3.mapcalc expression="syield = 0.0001"
117
118 r3.gwflow solver=cg phead=phead statuyield=status hc_x=hydcond hc_y=hydcond \
119 hc_z=hydcond sink=well yield=syield output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget
120
121 # The data can be visualized with paraview when exported with r3.out.vtk
122 r3.out.vtk -p in=gwresult,status,budget,hydcond,well vector=vx,vy,vz out=/tmp/gwdata3d.vtk
123
124 #now load the data into paraview
125 paraview --data=/tmp/gwdata3d.vtk
126 </pre></div>
127
128 <h2>SEE ALSO</h2>
129
130 <em>
131 <a href="r.gwflow.html">r.gwflow</a>,
132 <a href="r.solute.transport.html">r.solute.transport</a>,
133 <a href="r3.out.vtk.html">r3.out.vtk</a>
134 </em>
135
136 <h2>AUTHOR</h2>
137
138 S&ouml;ren Gebbert
139 <p>This work is based on the Diploma Thesis of S&ouml;ren Gebbert available
140 <a href="https://grass.osgeo.org/gdp/hydrology/gebbert2007_diplom_stroemung_grass_gis.pdf">here</a>
141 at Technical University Berlin, Germany.