cfs_tpfa.h
Go to the documentation of this file.
1 /*
2  Copyright 2010 SINTEF ICT, Applied Mathematics.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_CFS_TPFA_HEADER_INCLUDED
21 #define OPM_CFS_TPFA_HEADER_INCLUDED
22 
23 #include <opm/core/grid.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 struct cfs_tpfa_impl;
32 struct CSRMatrix;
33 struct compr_quantities;
34 
35 struct cfs_tpfa_data {
36  struct CSRMatrix *A;
37  double *b;
38  double *x;
39 
40  struct cfs_tpfa_impl *pimpl;
41 };
42 
43 
44 struct cfs_tpfa_data *
45 cfs_tpfa_construct(struct UnstructuredGrid *G, well_t *W, int nphases);
46 
47 void
49  double dt,
50  well_t *W,
51  struct FlowBoundaryConditions *bc,
52  const double *src,
53  struct compr_quantities *cq,
54  const double *trans,
55  const double *gravcap_f,
56  well_control_t *wctrl,
57  struct completion_data *wdata,
58  const double *cpress0,
59  const double *porevol,
60  struct cfs_tpfa_data *h);
61 
62 void
64  struct FlowBoundaryConditions *bc,
65  well_t *W,
66  int np,
67  const double *trans,
68  const double *pmobf,
69  const double *gravcap_f,
70  struct completion_data *wdata,
71  struct cfs_tpfa_data *h,
72  double *cpress,
73  double *fflux,
74  double *wpress,
75  double *wflux);
76 
77 void
79  struct FlowBoundaryConditions *bc,
80  int np,
81  const double *htrans,
82  const double *pmobf,
83  const double *gravcap_f,
84  struct cfs_tpfa_data *h,
85  const double *cpress,
86  const double *fflux,
87  double *fpress);
88 
89 void
91  int np,
92  struct cfs_tpfa_data *h,
93  double *masstrans_f);
94 
95 void
97  int np,
98  struct cfs_tpfa_data *h,
99  double *gravtrans_f);
100 
101 double
103  struct compr_quantities *cq,
104  const double *trans,
105  const double *porevol,
106  struct cfs_tpfa_data *h,
107  const double *dpmobf,
108  const double *surf_dens,
109  const double *gravity);
110 
111 void
113  well_t *W,
114  struct completion_data *wdata,
115  int np,
116  double dt,
117  const double *porevol,
118  struct cfs_tpfa_data *h,
119  double *surf_vol);
120 
121 void
123 
124 #ifdef __cplusplus
125 }
126 #endif
127 
128 #endif /* OPM_CFS_TPFA_HEADER_INCLUDED */
void cfs_tpfa_retrieve_masstrans(struct UnstructuredGrid *G, int np, struct cfs_tpfa_data *h, double *masstrans_f)
Definition: sparse_sys.h:38
struct cfs_tpfa_impl * pimpl
Definition: cfs_tpfa.h:40
Definition: grid.h:98
Definition: compr_quant.h:31
Definition: flow_bc.h:39
void cfs_tpfa_press_flux(struct UnstructuredGrid *G, struct FlowBoundaryConditions *bc, well_t *W, int np, const double *trans, const double *pmobf, const double *gravcap_f, struct completion_data *wdata, struct cfs_tpfa_data *h, double *cpress, double *fflux, double *wpress, double *wflux)
struct cfs_tpfa_data * cfs_tpfa_construct(struct UnstructuredGrid *G, well_t *W, int nphases)
Definition: cfs_tpfa.h:35
double cfs_tpfa_impes_maxtime(struct UnstructuredGrid *G, struct compr_quantities *cq, const double *trans, const double *porevol, struct cfs_tpfa_data *h, const double *dpmobf, const double *surf_dens, const double *gravity)
void cfs_tpfa_retrieve_gravtrans(struct UnstructuredGrid *G, int np, struct cfs_tpfa_data *h, double *gravtrans_f)
void cfs_tpfa_assemble(struct UnstructuredGrid *G, double dt, well_t *W, struct FlowBoundaryConditions *bc, const double *src, struct compr_quantities *cq, const double *trans, const double *gravcap_f, well_control_t *wctrl, struct completion_data *wdata, const double *cpress0, const double *porevol, struct cfs_tpfa_data *h)
struct CSRMatrix * A
Definition: cfs_tpfa.h:36
const double gravity
Definition: Units.hpp:120
void cfs_tpfa_fpress(struct UnstructuredGrid *G, struct FlowBoundaryConditions *bc, int np, const double *htrans, const double *pmobf, const double *gravcap_f, struct cfs_tpfa_data *h, const double *cpress, const double *fflux, double *fpress)
double * x
Definition: cfs_tpfa.h:38
Definition: legacy_well.h:61
double * b
Definition: cfs_tpfa.h:37
void cfs_tpfa_destroy(struct cfs_tpfa_data *h)
Definition: legacy_well.h:71
Definition: legacy_well.h:52
void cfs_tpfa_expl_mass_transport(struct UnstructuredGrid *G, well_t *W, struct completion_data *wdata, int np, double dt, const double *porevol, struct cfs_tpfa_data *h, double *surf_vol)