N_solute_transport.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*****************************************************************************
  2. *
  3. * MODULE: Grass PDE Numerical Library
  4. * AUTHOR(S): Soeren Gebbert, Berlin (GER) Dec 2006
  5. * soerengebbert <at> gmx <dot> de
  6. *
  7. * PURPOSE: solute transport in porous media
  8. * part of the gpde library
  9. *
  10. * COPYRIGHT: (C) 2000 by the GRASS Development Team
  11. *
  12. * This program is free software under the GNU General Public
  13. * License (>=v2). Read the file COPYING that comes with GRASS
  14. * for details.
  15. *
  16. *****************************************************************************/
  17. #include "N_pde.h"
  18. #ifndef _N_SOLUTE_TRANSPORT_H_
  19. #define _N_SOLUTE_TRANSPORT_H_
  20. typedef struct
  21. {
  22. N_array_3d *c; /*concentration */
  23. N_array_3d *c_start; /*concentration at start */
  24. N_array_3d *diff_x; /*x part of the diffusion tensor */
  25. N_array_3d *diff_y; /*y part of the diffusion tensor */
  26. N_array_3d *diff_z; /*z part of the diffusion tensor */
  27. N_array_3d *nf; /*effective porosity */
  28. N_array_3d *cs; /*concentration sources and sinks */
  29. N_array_3d *q; /*well sources and sinks */
  30. N_array_3d *R; /*retardation */
  31. N_array_3d *cin; /*concentration input from wells */
  32. N_gradient_field_3d *grad; /*velocity field */
  33. N_array_3d *status; /*active/inactive/dirichlet cell status */
  34. N_array_3d *disp_xx; /*x part of the dispersivity tensor */
  35. N_array_3d *disp_yy; /*x part of the dispersivity tensor */
  36. N_array_3d *disp_zz; /*x part of the dispersivity tensor */
  37. N_array_3d *disp_xy; /*xy part of the dispersivity tensor */
  38. N_array_3d *disp_xz; /*xz part of the dispersivity tensor */
  39. N_array_3d *disp_yz; /*yz part of the dispersivity tensor */
  40. double dt; /*calculation time */
  41. double al, at; /*dispersivity length longditudinal and transversal */
  42. int stab; /*stabilization criteria */
  43. } N_solute_transport_data3d;
  44. typedef struct
  45. {
  46. N_array_2d *c; /*concentration */
  47. N_array_2d *c_start; /*concentration at start */
  48. N_array_2d *diff_x; /*x part of the diffusion tensor */
  49. N_array_2d *diff_y; /*y part of the diffusion tensor */
  50. N_array_2d *nf; /*effective porosity */
  51. N_array_2d *cs; /*concentration sources and sinks */
  52. N_array_2d *q; /*well sources and sinks */
  53. N_array_2d *R; /*retardation */
  54. N_array_2d *cin; /*concentration */
  55. N_gradient_field_2d *grad; /*velocity field */
  56. N_array_2d *status; /*active/inactive/dirichlet cell status */
  57. N_array_2d *top; /* top surface of the aquifer */
  58. N_array_2d *bottom; /* bottom surface of the aquifer */
  59. N_array_2d *disp_xx; /*x part of the dispersivity tensor */
  60. N_array_2d *disp_yy; /*x part of the dispersivity tensor */
  61. N_array_2d *disp_xy; /*xy part of the dispersivity tensor */
  62. double dt; /*calculation time */
  63. double al, at; /*dispersivity length longditudinal and transversal */
  64. int stab; /*stabilization criteria */
  65. } N_solute_transport_data2d;
  66. extern N_data_star *N_callback_solute_transport_3d(void *solutedata,
  67. N_geom_data * geom,
  68. int col, int row,
  69. int depth);
  70. extern N_data_star *N_callback_solute_transport_2d(void *solutedata,
  71. N_geom_data * geom,
  72. int col, int row);
  73. extern N_solute_transport_data3d *N_alloc_solute_transport_data3d(int cols,
  74. int rows,
  75. int depths);
  76. extern N_solute_transport_data2d *N_alloc_solute_transport_data2d(int cols,
  77. int rows);
  78. extern void N_free_solute_transport_data3d(N_solute_transport_data3d * data);
  79. extern void N_free_solute_transport_data2d(N_solute_transport_data2d * data);
  80. /*compute the dispersivity tensor */
  81. extern void N_calc_solute_transport_disptensor_2d(N_solute_transport_data2d *
  82. data);
  83. extern void N_calc_solute_transport_disptensor_3d(N_solute_transport_data3d *
  84. data);
  85. extern void N_calc_solute_transport_transmission_2d(N_solute_transport_data2d
  86. * data);
  87. extern void N_calc_solute_transport_transmission_3d(N_solute_transport_data3d
  88. * data);
  89. #endif