GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
N_solute_transport.h
Go to the documentation of this file.
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
18#include "N_pde.h"
19
20#ifndef _N_SOLUTE_TRANSPORT_H_
21#define _N_SOLUTE_TRANSPORT_H_
22
23typedef struct {
24 N_array_3d *c; /*concentration */
25 N_array_3d *c_start; /*concentration at start */
26 N_array_3d *diff_x; /*x part of the diffusion tensor */
27 N_array_3d *diff_y; /*y part of the diffusion tensor */
28 N_array_3d *diff_z; /*z part of the diffusion tensor */
29 N_array_3d *nf; /*effective porosity */
30 N_array_3d *cs; /*concentration sources and sinks */
31 N_array_3d *q; /*well sources and sinks */
32 N_array_3d *R; /*retardation */
33 N_array_3d *cin; /*concentration input from wells */
34
35 N_gradient_field_3d *grad; /*velocity field */
36
37 N_array_3d *status; /*active/inactive/dirichlet cell status */
38
39 N_array_3d *disp_xx; /*x part of the dispersivity tensor */
40 N_array_3d *disp_yy; /*x part of the dispersivity tensor */
41 N_array_3d *disp_zz; /*x part of the dispersivity tensor */
42 N_array_3d *disp_xy; /*xy part of the dispersivity tensor */
43 N_array_3d *disp_xz; /*xz part of the dispersivity tensor */
44 N_array_3d *disp_yz; /*yz part of the dispersivity tensor */
45
46 double dt; /*calculation time */
47 double al, at; /*dispersivity length longditudinal and transversal */
48 int stab; /*stabilization criteria */
49
51
52typedef struct {
53 N_array_2d *c; /*concentration */
54 N_array_2d *c_start; /*concentration at start */
55 N_array_2d *diff_x; /*x part of the diffusion tensor */
56 N_array_2d *diff_y; /*y part of the diffusion tensor */
57 N_array_2d *nf; /*effective porosity */
58 N_array_2d *cs; /*concentration sources and sinks */
59 N_array_2d *q; /*well sources and sinks */
60 N_array_2d *R; /*retardation */
61 N_array_2d *cin; /*concentration */
62
63 N_gradient_field_2d *grad; /*velocity field */
64
65 N_array_2d *status; /*active/inactive/dirichlet cell status */
66 N_array_2d *top; /* top surface of the aquifer */
67 N_array_2d *bottom; /* bottom surface of the aquifer */
68
69 N_array_2d *disp_xx; /*x part of the dispersivity tensor */
70 N_array_2d *disp_yy; /*x part of the dispersivity tensor */
71 N_array_2d *disp_xy; /*xy part of the dispersivity tensor */
72
73 double dt; /*calculation time */
74 double al, at; /*dispersivity length longditudinal and transversal */
75 int stab; /*stabilization criteria */
76
78
79extern N_data_star *N_callback_solute_transport_3d(void *solutedata,
80 N_geom_data *geom, int col,
81 int row, int depth);
82extern N_data_star *N_callback_solute_transport_2d(void *solutedata,
83 N_geom_data *geom, int col,
84 int row);
86N_alloc_solute_transport_data3d(int cols, int rows, int depths);
88 int rows);
91
92/*compute the dispersivity tensor */
93extern void
95extern void
97extern void
99extern void
101#endif
N_solute_transport_data2d * N_alloc_solute_transport_data2d(int cols, int rows)
Allocate memory for the solute transport data structure in two dimensions.
void N_calc_solute_transport_disptensor_2d(N_solute_transport_data2d *data)
Compute the dispersivity tensor based on the solute transport data in 2d.
void N_free_solute_transport_data2d(N_solute_transport_data2d *data)
Release the memory of the solute transport data structure in two dimensions.
N_solute_transport_data3d * N_alloc_solute_transport_data3d(int cols, int rows, int depths)
Allocate memory for the solute transport data structure in three dimensions.
void N_free_solute_transport_data3d(N_solute_transport_data3d *data)
Release the memory of the solute transport data structure in three dimensions.
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.
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.
void N_calc_solute_transport_transmission_2d(N_solute_transport_data2d *data)
Compute the transmission boundary condition in 2d.
void N_calc_solute_transport_transmission_3d(N_solute_transport_data3d *data)
void N_calc_solute_transport_disptensor_3d(N_solute_transport_data3d *data)
Compute the dispersivity tensor based on the solute transport data in 3d.
Matrix entries for a mass balance 5/7/9 star system.
Definition N_pde.h:295
Geometric information about the structured grid.
Definition N_pde.h:101
N_gradient_field_2d * grad
N_gradient_field_3d * grad