[GRASS-SVN] r47721 - grass/branches/develbranch_6/raster3d/r3.gwflow
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 17 17:44:08 EDT 2011
Author: neteler
Date: 2011-08-17 14:44:08 -0700 (Wed, 17 Aug 2011)
New Revision: 47721
Modified:
grass/branches/develbranch_6/raster3d/r3.gwflow/description.html
grass/branches/develbranch_6/raster3d/r3.gwflow/main.c
Log:
Milena Nowotarska: i18n cleanup; HTML cleanup
Modified: grass/branches/develbranch_6/raster3d/r3.gwflow/description.html
===================================================================
--- grass/branches/develbranch_6/raster3d/r3.gwflow/description.html 2011-08-17 21:40:45 UTC (rev 47720)
+++ grass/branches/develbranch_6/raster3d/r3.gwflow/description.html 2011-08-17 21:44:08 UTC (rev 47721)
@@ -1,24 +1,23 @@
-<H2>DESCRIPTION</H2>
-This numerical program calculates transient, confined groundwater flow in three dimensions
-based on volume maps and the current 3d region resolution.
+<h2>DESCRIPTION</h2>
+This numerical module calculates transient, confined groundwater flow
+in three dimensions based on volume maps and the current 3D region resolution.
All initial- and boundary-conditions must be provided as
volume maps.
-<br>
-<br>
-This module calculates the piezometric head and optionally the
+
+<p>
+The module calculates the piezometric head and optionally the
groundwater velocity field.
-The vector components can be visualized with paraview if they are exported
+The vector components can be visualized with ParaView if they are exported
with <em>r3.out.vtk</em>.
-<br>
-<br>
+
+<p>
The groundwater flow will always be calculated transient.
-If you want to calculate stady state, set the timestep
+If you want to calculate steady state, set the timestep
to a large number (billions of seconds) or set the
specific yield raster maps to zero.
+<h2>NOTES</h2>
-<H2>NOTES</H2>
-
The groundwater flow calculation is based on Darcy's law and a
finite volume discretization. The groundwater flow partial
differential equation is of the following form:
@@ -37,34 +36,36 @@
<li>q - inner source in [1/s]</li>
</ul>
-<br>
-<br>
+<p>
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:
+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:
<ul>
-<li>0 == inactive - the cell with status 0 will not be calulated, active cells will have a no flow boundary to an inactive cell</li>
-<li>1 == active - this cell is used for groundwater calculation, inner sources can be defined for those cells</li>
-<li>2 == Dirichlet - cells of this type will have a fixed piezometric head value which do not change over time </li>
+<li>0 == inactive - the cell with status 0 will not be calulated,
+active cells will have a no flow boundary to an inactive cell</li>
+<li>1 == active - this cell is used for groundwater calculation,
+inner sources can be defined for those cells</li>
+<li>2 == Dirichlet - cells of this type will have a fixed piezometric
+head value which do not change over time </li>
</ul>
-<br>
-<br>
-The groundwater flow equation can be solved with several solvers.
+<p>
+The groundwater flow equation can be solved with several numerical solvers.
Aditionally a direct Gauss solver and LU solver are available. Those direct solvers
only work with quadratic matrices, so be careful using them with large maps
-(maps of size 10.000 cells will need more than one gigabyte of ram).
+(maps of size 10.000 cells will need more than one gigabyte of RAM).
-<H2>EXAMPLE</H2>
+<h2>EXAMPLE</h2>
Use this small script to create a working
groundwater flow area and data. Make sure you are not in a lat/lon projection.
<div class="code"><pre>
# set the region accordingly
-g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000
+g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000 -p
#now create the input raster maps for a confined aquifer
r3.mapcalc "phead=if(row() == 1 && depth() == 4, 50, 40)"
@@ -74,21 +75,21 @@
r3.mapcalc "syield=0.0001"
r.mapcalc "recharge=0.0"
-r3.gwflow --o -s solver=cg phead=phead status=status hc_x=hydcond hc_y=hydcond \
+r3.gwflow -s 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 velocity=gwresult_velocity
-# The data can be visulaized with paraview when exported with r3.out.vtk
+# The data can be visualized with ParaView when exported with r3.out.vtk
r3.out.vtk -p in=gwresult,status vector=gwresult_velocity_x,gwresult_velocity_y,gwresult_velocity_z out=/tmp/gwdata3d.vtk
-#now load the data into paraview
+#now load the data into ParaView
</pre></div>
-<H2>SEE ALSO</H2>
+<h2>SEE ALSO</h2>
-<EM><A HREF="r.gwflow.html">r.gwflow</A></EM><br>
-<EM><A HREF="r3.out.vtk.html">r3.out.vtk</A></EM><br>
+<em><a href="r.gwflow.html">r.gwflow</a></em><br>
+<em><a href="r3.out.vtk.html">r3.out.vtk</a></em><br>
-<H2>AUTHOR</H2>
+<h2>AUTHOR</h2>
Soeren Gebbert
<p><i>Last changed: $Date$</i>
Modified: grass/branches/develbranch_6/raster3d/r3.gwflow/main.c
===================================================================
--- grass/branches/develbranch_6/raster3d/r3.gwflow/main.c 2011-08-17 21:40:45 UTC (rev 47720)
+++ grass/branches/develbranch_6/raster3d/r3.gwflow/main.c 2011-08-17 21:44:08 UTC (rev 47721)
@@ -62,8 +62,7 @@
param.status->required = YES;
param.status->gisprompt = "old,grid3,3d-raster";
param.status->description =
- _
- ("The status for each cell, = 0 - inactive, 1 - active, 2 - dirichlet");
+ _("The status for each cell, = 0 - inactive, 1 - active, 2 - dirichlet");
param.hc_x = G_define_option();
param.hc_x->key = "hc_x";
@@ -115,7 +114,8 @@
param.output->type = TYPE_STRING;
param.output->required = YES;
param.output->gisprompt = "new,grid3,3d-raster";
- param.output->description = _("The piezometric head result of the numerical calculation will be written to this map");
+ param.output->description =
+ _("The piezometric head result of the numerical calculation will be written to this map");
param.vector = G_define_option();
param.vector->key = "velocity";
@@ -124,7 +124,7 @@
param.vector->gisprompt = "new,grid3,3d-raster";
param.vector->description = _("Calculate the groundwater distance velocity vector field \n"
"and write the x, y, and z components to maps named name_[xyz].\n"
- "Name is basename for the new raster3d maps");
+ "Name is basename for the new 3D raster maps.");
param.dt = N_define_standard_option(N_OPT_CALC_TIME);
@@ -135,7 +135,7 @@
param.mask = G_define_flag();
param.mask->key = 'm';
- param.mask->description = _("Use G3D mask (if exists)");
+ param.mask->description = _("Use 3D raster mask (if exists) with input maps");
param.sparse = G_define_flag();
param.sparse->key = 's';
@@ -148,33 +148,21 @@
int main(int argc, char *argv[])
{
struct GModule *module = NULL;
-
N_gwflow_data3d *data = NULL;
-
N_geom_data *geom = NULL;
-
N_les *les = NULL;
-
N_les_callback_3d *call = NULL;
-
G3D_Region region;
-
N_gradient_field_3d *field = NULL;
-
N_array_3d *xcomp = NULL;
-
N_array_3d *ycomp = NULL;
-
N_array_3d *zcomp = NULL;
double error;
int maxit;
-
const char *solver;
-
int x, y, z, stat;
-
char *buff = NULL;
/* Initialize GRASS */
@@ -182,7 +170,8 @@
module = G_define_module();
module->keywords = _("raster3d, voxel");
- module->description = _("Numerical calculation program for transient, confined groundwater flow in three dimensions");
+ module->description =
+ _("Calculates numerically transient, confined groundwater flow in three dimensions.");
/* Get parameters from user */
set_params();
@@ -199,10 +188,9 @@
solver = param.solver->answer;
if (strcmp(solver, N_SOLVER_DIRECT_CHOLESKY) == 0 && param.sparse->answer)
- G_fatal_error(_("The direct cholesky solver do not work with sparse matrices"));
+ G_fatal_error(_("The direct Cholesky solver do not work with sparse matrices"));
-
/*Set the defaults */
G3d_initDefaults();
@@ -362,11 +350,8 @@
char *name)
{
void *map = NULL;
-
int changemask = 0;
-
int z, y, x, rows, cols, depths, count, stat;
-
double d1 = 0;
rows = region->rows;
@@ -377,10 +362,8 @@
map = G3d_openCellNew(name, DCELL_TYPE, G3D_USE_CACHE_DEFAULT, region);
if (map == NULL)
- G3d_fatalError(_("Error opening g3d map <%s>"), name);
+ G3d_fatalError(_("Unable to create 3D raster map <%s>"), name);
- G_message(_("Write the result to g3d map <%s>"), name);
-
/*if requested set the Mask on */
if (param.mask->answer) {
if (G3d_maskFileExists()) {
@@ -423,7 +406,7 @@
}
if (!G3d_closeCell(map))
- G3d_fatalError(map, NULL, 0, _("Error closing g3d file"));
+ G3d_fatalError(map, NULL, 0, _("Unable to close 3D raster map <%s>"), name);
return;
}
More information about the grass-commit
mailing list