r3.gwflow.html 6.2 KB

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