GRASS GIS 7 Programmer's Manual  7.8.3(2020)-exported
N_solute_transport.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * MODULE: Grass PDE Numerical Library
5 * AUTHOR(S): Soeren Gebbert, Berlin (GER) Dec 2006
6 * soerengebbert <at> gmx <dot> de
7 *
8 * PURPOSE: solute transport in porous media
9 * part of the gpde library
10 *
11 * COPYRIGHT: (C) 2000 by the GRASS Development Team
12 *
13 * This program is free software under the GNU General Public
14 * License (>=v2). Read the file COPYING that comes with GRASS
15 * for details.
16 *
17 *****************************************************************************/
18 
19 #include "N_pde.h"
20 
21 #ifndef _N_SOLUTE_TRANSPORT_H_
22 #define _N_SOLUTE_TRANSPORT_H_
23 
24 
25 typedef struct
26 {
27  N_array_3d *c; /*concentration */
28  N_array_3d *c_start; /*concentration at start */
29  N_array_3d *diff_x; /*x part of the diffusion tensor */
30  N_array_3d *diff_y; /*y part of the diffusion tensor */
31  N_array_3d *diff_z; /*z part of the diffusion tensor */
32  N_array_3d *nf; /*effective porosity */
33  N_array_3d *cs; /*concentration sources and sinks */
34  N_array_3d *q; /*well sources and sinks */
35  N_array_3d *R; /*retardation */
36  N_array_3d *cin; /*concentration input from wells */
37 
38  N_gradient_field_3d *grad; /*velocity field */
39 
40  N_array_3d *status; /*active/inactive/dirichlet cell status */
41 
42  N_array_3d *disp_xx; /*x part of the dispersivity tensor */
43  N_array_3d *disp_yy; /*x part of the dispersivity tensor */
44  N_array_3d *disp_zz; /*x part of the dispersivity tensor */
45  N_array_3d *disp_xy; /*xy part of the dispersivity tensor */
46  N_array_3d *disp_xz; /*xz part of the dispersivity tensor */
47  N_array_3d *disp_yz; /*yz part of the dispersivity tensor */
48 
49  double dt; /*calculation time */
50  double al, at; /*dispersivity length longditudinal and transversal */
51  int stab; /*stabilization criteria */
52 
54 
55 
56 typedef struct
57 {
58  N_array_2d *c; /*concentration */
59  N_array_2d *c_start; /*concentration at start */
60  N_array_2d *diff_x; /*x part of the diffusion tensor */
61  N_array_2d *diff_y; /*y part of the diffusion tensor */
62  N_array_2d *nf; /*effective porosity */
63  N_array_2d *cs; /*concentration sources and sinks */
64  N_array_2d *q; /*well sources and sinks */
65  N_array_2d *R; /*retardation */
66  N_array_2d *cin; /*concentration */
67 
68  N_gradient_field_2d *grad; /*velocity field */
69 
70  N_array_2d *status; /*active/inactive/dirichlet cell status */
71  N_array_2d *top; /* top surface of the aquifer */
72  N_array_2d *bottom; /* bottom surface of the aquifer */
73 
74  N_array_2d *disp_xx; /*x part of the dispersivity tensor */
75  N_array_2d *disp_yy; /*x part of the dispersivity tensor */
76  N_array_2d *disp_xy; /*xy part of the dispersivity tensor */
77 
78  double dt; /*calculation time */
79  double al, at; /*dispersivity length longditudinal and transversal */
80  int stab; /*stabilization criteria */
81 
83 
84 
85 extern N_data_star *N_callback_solute_transport_3d(void *solutedata,
86  N_geom_data * geom,
87  int col, int row,
88  int depth);
89 extern N_data_star *N_callback_solute_transport_2d(void *solutedata,
90  N_geom_data * geom,
91  int col, int row);
93  int rows,
94  int depths);
96  int rows);
99 
100 /*compute the dispersivity tensor */
102  data);
104  data);
106  * data);
108  * data);
109 #endif
N_geom_data
Geometric information about the structured grid.
Definition: N_pde.h:103
N_solute_transport_data2d::at
double at
Definition: N_solute_transport.h:79
N_solute_transport_data2d::stab
int stab
Definition: N_solute_transport.h:80
N_free_solute_transport_data2d
void N_free_solute_transport_data2d(N_solute_transport_data2d *data)
Release the memory of the solute transport data structure in two dimensions.
Definition: n_solute_transport.c:536
N_solute_transport_data2d::disp_xy
N_array_2d * disp_xy
Definition: N_solute_transport.h:76
N_solute_transport_data2d::grad
N_gradient_field_2d * grad
Definition: N_solute_transport.h:68
N_solute_transport_data2d::q
N_array_2d * q
Definition: N_solute_transport.h:64
N_gradient_field_3d
Definition: N_pde.h:532
N_solute_transport_data2d::disp_xx
N_array_2d * disp_xx
Definition: N_solute_transport.h:74
N_array_2d
Definition: N_pde.h:131
N_solute_transport_data2d::nf
N_array_2d * nf
Definition: N_solute_transport.h:62
N_alloc_solute_transport_data3d
N_solute_transport_data3d * N_alloc_solute_transport_data3d(int cols, int rows, int depths)
Alllocate memory for the solute transport data structure in three dimensions.
Definition: n_solute_transport.c:402
N_calc_solute_transport_transmission_2d
void N_calc_solute_transport_transmission_2d(N_solute_transport_data2d *data)
Compute the transmission boundary condition in 2d.
Definition: n_solute_transport.c:578
N_solute_transport_data2d
Definition: N_solute_transport.h:56
N_alloc_solute_transport_data2d
N_solute_transport_data2d * N_alloc_solute_transport_data2d(int cols, int rows)
Alllocate memory for the solute transport data structure in two dimensions.
Definition: n_solute_transport.c:457
N_solute_transport_data2d::disp_yy
N_array_2d * disp_yy
Definition: N_solute_transport.h:75
N_solute_transport_data2d::status
N_array_2d * status
Definition: N_solute_transport.h:70
N_pde.h
N_calc_solute_transport_transmission_3d
void N_calc_solute_transport_transmission_3d(N_solute_transport_data3d *data)
N_data_star
Matrix entries for a mass balance 5/7/9 star system.
Definition: N_pde.h:272
N_callback_solute_transport_3d
N_data_star * N_callback_solute_transport_3d(void *solutedata, N_geom_data *geom, int col, int row, int depth)
This is just a placeholder.
Definition: n_solute_transport.c:28
N_calc_solute_transport_disptensor_3d
void N_calc_solute_transport_disptensor_3d(N_solute_transport_data3d *data)
Compute the dispersivity tensor based on the solute transport data in 3d.
Definition: n_solute_transport.c:710
N_callback_solute_transport_2d
N_data_star * N_callback_solute_transport_2d(void *solutedata, N_geom_data *geom, int col, int row)
This callback function creates the mass balance of a 5 point star.
Definition: n_solute_transport.c:184
N_solute_transport_data2d::cs
N_array_2d * cs
Definition: N_solute_transport.h:63
N_free_solute_transport_data3d
void N_free_solute_transport_data3d(N_solute_transport_data3d *data)
Release the memory of the solute transport data structure in three dimensions.
Definition: n_solute_transport.c:499
N_calc_solute_transport_disptensor_2d
void N_calc_solute_transport_disptensor_2d(N_solute_transport_data2d *data)
Compute the dispersivity tensor based on the solute transport data in 2d.
Definition: n_solute_transport.c:651
N_array_3d
Definition: N_pde.h:165
N_solute_transport_data2d::top
N_array_2d * top
Definition: N_solute_transport.h:71
N_gradient_field_2d
Definition: N_pde.h:520
N_solute_transport_data2d::R
N_array_2d * R
Definition: N_solute_transport.h:65
N_solute_transport_data2d::bottom
N_array_2d * bottom
Definition: N_solute_transport.h:72
N_solute_transport_data2d::dt
double dt
Definition: N_solute_transport.h:78
N_solute_transport_data3d
Definition: N_solute_transport.h:25