Loading...
Searching...
No Matches
N_solute_transport.h
Go to the documentation of this file.
/*****************************************************************************
*
* MODULE: Grass PDE Numerical Library
* AUTHOR(S): Soeren Gebbert, Berlin (GER) Dec 2006
* soerengebbert <at> gmx <dot> de
*
* PURPOSE: solute transport in porous media
* part of the gpde library
*
* COPYRIGHT: (C) 2000 by the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
* for details.
*
*****************************************************************************/
#include "N_pde.h"
#ifndef _N_SOLUTE_TRANSPORT_H_
#define _N_SOLUTE_TRANSPORT_H_
typedef struct {
N_array_3d *c; /*concentration */
N_array_3d *c_start; /*concentration at start */
N_array_3d *diff_x; /*x part of the diffusion tensor */
N_array_3d *diff_y; /*y part of the diffusion tensor */
N_array_3d *diff_z; /*z part of the diffusion tensor */
N_array_3d *nf; /*effective porosity */
N_array_3d *cs; /*concentration sources and sinks */
N_array_3d *q; /*well sources and sinks */
N_array_3d *R; /*retardation */
N_array_3d *cin; /*concentration input from wells */
N_gradient_field_3d *grad; /*velocity field */
N_array_3d *status; /*active/inactive/dirichlet cell status */
N_array_3d *disp_xx; /*x part of the dispersivity tensor */
N_array_3d *disp_yy; /*x part of the dispersivity tensor */
N_array_3d *disp_zz; /*x part of the dispersivity tensor */
N_array_3d *disp_xy; /*xy part of the dispersivity tensor */
N_array_3d *disp_xz; /*xz part of the dispersivity tensor */
N_array_3d *disp_yz; /*yz part of the dispersivity tensor */
double dt; /*calculation time */
double al, at; /*dispersivity length longditudinal and transversal */
int stab; /*stabilization criteria */
} N_solute_transport_data3d;
typedef struct {
N_array_2d *c; /*concentration */
N_array_2d *c_start; /*concentration at start */
N_array_2d *diff_x; /*x part of the diffusion tensor */
N_array_2d *diff_y; /*y part of the diffusion tensor */
N_array_2d *nf; /*effective porosity */
N_array_2d *cs; /*concentration sources and sinks */
N_array_2d *q; /*well sources and sinks */
N_array_2d *R; /*retardation */
N_array_2d *cin; /*concentration */
N_gradient_field_2d *grad; /*velocity field */
N_array_2d *status; /*active/inactive/dirichlet cell status */
N_array_2d *top; /* top surface of the aquifer */
N_array_2d *bottom; /* bottom surface of the aquifer */
N_array_2d *disp_xx; /*x part of the dispersivity tensor */
N_array_2d *disp_yy; /*x part of the dispersivity tensor */
N_array_2d *disp_xy; /*xy part of the dispersivity tensor */
double dt; /*calculation time */
double al, at; /*dispersivity length longditudinal and transversal */
int stab; /*stabilization criteria */
} N_solute_transport_data2d;
extern N_data_star *N_callback_solute_transport_3d(void *solutedata,
N_geom_data *geom, int col,
int row, int depth);
extern N_data_star *N_callback_solute_transport_2d(void *solutedata,
N_geom_data *geom, int col,
int row);
extern N_solute_transport_data3d *
N_alloc_solute_transport_data3d(int cols, int rows, int depths);
extern N_solute_transport_data2d *N_alloc_solute_transport_data2d(int cols,
int rows);
extern void N_free_solute_transport_data3d(N_solute_transport_data3d *data);
extern void N_free_solute_transport_data2d(N_solute_transport_data2d *data);
/*compute the dispersivity tensor */
extern void
N_calc_solute_transport_disptensor_2d(N_solute_transport_data2d *data);
extern void
N_calc_solute_transport_disptensor_3d(N_solute_transport_data3d *data);
extern void
N_calc_solute_transport_transmission_2d(N_solute_transport_data2d *data);
extern void
N_calc_solute_transport_transmission_3d(N_solute_transport_data3d *data);
#endif
N_pde.h
N_alloc_solute_transport_data2d
N_solute_transport_data2d * N_alloc_solute_transport_data2d(int cols, int rows)
Allocate memory for the solute transport data structure in two dimensions.
Definition n_solute_transport.c:442
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:637
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:521
N_alloc_solute_transport_data3d
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.
Definition n_solute_transport.c:389
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:483
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:180
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:27
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:563
N_calc_solute_transport_transmission_3d
void N_calc_solute_transport_transmission_3d(N_solute_transport_data3d *data)
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:698
N_array_2d
Definition N_pde.h:132
N_array_3d
Definition N_pde.h:175
N_data_star
Matrix entries for a mass balance 5/7/9 star system.
Definition N_pde.h:295
N_geom_data
Geometric information about the structured grid.
Definition N_pde.h:101
N_gradient_field_2d
Definition N_pde.h:559
N_gradient_field_3d
Definition N_pde.h:570
N_solute_transport_data2d
Definition N_solute_transport.h:52
N_solute_transport_data2d::al
double al
Definition N_solute_transport.h:74
N_solute_transport_data2d::stab
int stab
Definition N_solute_transport.h:75
N_solute_transport_data2d::c_start
N_array_2d * c_start
Definition N_solute_transport.h:54
N_solute_transport_data2d::dt
double dt
Definition N_solute_transport.h:73
N_solute_transport_data2d::status
N_array_2d * status
Definition N_solute_transport.h:65
N_solute_transport_data2d::R
N_array_2d * R
Definition N_solute_transport.h:60
N_solute_transport_data2d::cin
N_array_2d * cin
Definition N_solute_transport.h:61
N_solute_transport_data2d::bottom
N_array_2d * bottom
Definition N_solute_transport.h:67
N_solute_transport_data2d::grad
N_gradient_field_2d * grad
Definition N_solute_transport.h:63
N_solute_transport_data2d::q
N_array_2d * q
Definition N_solute_transport.h:59
N_solute_transport_data2d::diff_x
N_array_2d * diff_x
Definition N_solute_transport.h:55
N_solute_transport_data2d::cs
N_array_2d * cs
Definition N_solute_transport.h:58
N_solute_transport_data2d::top
N_array_2d * top
Definition N_solute_transport.h:66
N_solute_transport_data2d::disp_xy
N_array_2d * disp_xy
Definition N_solute_transport.h:71
N_solute_transport_data2d::nf
N_array_2d * nf
Definition N_solute_transport.h:57
N_solute_transport_data2d::disp_xx
N_array_2d * disp_xx
Definition N_solute_transport.h:69
N_solute_transport_data2d::disp_yy
N_array_2d * disp_yy
Definition N_solute_transport.h:70
N_solute_transport_data2d::c
N_array_2d * c
Definition N_solute_transport.h:53
N_solute_transport_data2d::at
double at
Definition N_solute_transport.h:74
N_solute_transport_data2d::diff_y
N_array_2d * diff_y
Definition N_solute_transport.h:56
N_solute_transport_data3d
Definition N_solute_transport.h:23
N_solute_transport_data3d::disp_yz
N_array_3d * disp_yz
Definition N_solute_transport.h:44
N_solute_transport_data3d::disp_xx
N_array_3d * disp_xx
Definition N_solute_transport.h:39
N_solute_transport_data3d::c
N_array_3d * c
Definition N_solute_transport.h:24
N_solute_transport_data3d::disp_zz
N_array_3d * disp_zz
Definition N_solute_transport.h:41
N_solute_transport_data3d::q
N_array_3d * q
Definition N_solute_transport.h:31
N_solute_transport_data3d::al
double al
Definition N_solute_transport.h:47
N_solute_transport_data3d::nf
N_array_3d * nf
Definition N_solute_transport.h:29
N_solute_transport_data3d::disp_yy
N_array_3d * disp_yy
Definition N_solute_transport.h:40
N_solute_transport_data3d::c_start
N_array_3d * c_start
Definition N_solute_transport.h:25
N_solute_transport_data3d::grad
N_gradient_field_3d * grad
Definition N_solute_transport.h:35
N_solute_transport_data3d::disp_xy
N_array_3d * disp_xy
Definition N_solute_transport.h:42
N_solute_transport_data3d::diff_y
N_array_3d * diff_y
Definition N_solute_transport.h:27
N_solute_transport_data3d::cin
N_array_3d * cin
Definition N_solute_transport.h:33
N_solute_transport_data3d::dt
double dt
Definition N_solute_transport.h:46
N_solute_transport_data3d::cs
N_array_3d * cs
Definition N_solute_transport.h:30
N_solute_transport_data3d::stab
int stab
Definition N_solute_transport.h:48
N_solute_transport_data3d::at
double at
Definition N_solute_transport.h:47
N_solute_transport_data3d::diff_x
N_array_3d * diff_x
Definition N_solute_transport.h:26
N_solute_transport_data3d::status
N_array_3d * status
Definition N_solute_transport.h:37
N_solute_transport_data3d::R
N_array_3d * R
Definition N_solute_transport.h:32
N_solute_transport_data3d::diff_z
N_array_3d * diff_z
Definition N_solute_transport.h:28
N_solute_transport_data3d::disp_xz
N_array_3d * disp_xz
Definition N_solute_transport.h:43