PvtInterface.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2010, 2011, 2012 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_PVTINTERFACE_HEADER_INCLUDED
21 #define OPM_PVTINTERFACE_HEADER_INCLUDED
22 
24 #include <opm/parser/eclipse/Deck/Deck.hpp>
25 
26 
27 namespace Opm
28 {
29 
31  {
32  public:
33  PvtInterface();
34 
35  virtual ~PvtInterface();
36 
43  void setPhaseConfiguration(const int num_phases, const int* phase_pos);
44 
56 
58  virtual void mu(const int n,
59  const int* pvtRegionIdx,
60  const double* p,
61  const double* T,
62  const double* z,
63  double* output_mu) const = 0;
64 
67  virtual void mu(const int n,
68  const int* pvtRegionIdx,
69  const double* p,
70  const double* T,
71  const double* r,
72  double* output_mu,
73  double* output_dmudp,
74  double* output_dmudr) const = 0;
75 
78  virtual void mu(const int n,
79  const int* pvtRegionIdx,
80  const double* p,
81  const double* T,
82  const double* r,
83  const PhasePresence* cond,
84  double* output_mu,
85  double* output_dmudp,
86  double* output_dmudr) const = 0;
87 
89  virtual void B(const int n,
90  const int* pvtRegionIdx,
91  const double* p,
92  const double* T,
93  const double* z,
94  double* output_B) const = 0;
95 
97  virtual void dBdp(const int n,
98  const int* pvtRegionIdx,
99  const double* p,
100  const double* T,
101  const double* z,
102  double* output_B,
103  double* output_dBdp) const = 0;
104 
107  virtual void b(const int n,
108  const int* pvtRegionIdx,
109  const double* p,
110  const double* T,
111  const double* r,
112  double* output_b,
113  double* output_dbdp,
114  double* output_dpdr) const = 0;
115 
118  virtual void b(const int n,
119  const int* pvtRegionIdx,
120  const double* p,
121  const double* T,
122  const double* r,
123  const PhasePresence* cond,
124  double* output_b,
125  double* output_dbdp,
126  double* output_dpdr) const = 0;
127 
129  virtual void rsSat(const int n,
130  const int* pvtRegionIdx,
131  const double* p,
132  double* output_rsSat,
133  double* output_drsSatdp) const = 0;
134 
136  virtual void rvSat(const int n,
137  const int* pvtRegionIdx,
138  const double* p,
139  double* output_rvSat,
140  double* output_drvSatdp) const = 0;
141 
142 
144  virtual void R(const int n,
145  const int* pvtRegionIdx,
146  const double* p,
147  const double* z,
148  double* output_R) const = 0;
149 
151  virtual void dRdp(const int n,
152  const int* pvtRegionIdx,
153  const double* p,
154  const double* z,
155  double* output_R,
156  double* output_dRdp) const = 0;
157 
158 
159  protected:
162  };
163 
177  void extractPvtTableIndex(std::vector<int>& pvtTableIdx,
178  Opm::DeckConstPtr deck,
179  size_t numCompressed,
180  const int* compressedToCartesianIdx);
181 
182 } // namespace Opm
183 
184 #endif // OPM_PVTINTERFACE_HEADER_INCLUDED
185 
virtual void rsSat(const int n, const int *pvtRegionIdx, const double *p, double *output_rsSat, double *output_drsSatdp) const =0
Solution gas/oil ratio and its derivatives at saturated conditions as a function of p...
Definition: BlackoilPhases.hpp:48
virtual void dBdp(const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_B, double *output_dBdp) const =0
Formation volume factor and p-derivative as functions of p and z.
Definition: AnisotropicEikonal.hpp:43
Definition: BlackoilPhases.hpp:27
int num_phases_
Definition: PvtInterface.hpp:160
virtual void B(const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_B) const =0
Formation volume factor as a function of p, T and z.
virtual ~PvtInterface()
int phase_pos_[MaxNumPhases]
Definition: PvtInterface.hpp:161
virtual void R(const int n, const int *pvtRegionIdx, const double *p, const double *z, double *output_R) const =0
Solution factor as a function of p and z.
virtual void dRdp(const int n, const int *pvtRegionIdx, const double *p, const double *z, double *output_R, double *output_dRdp) const =0
Solution factor and p-derivative as functions of p and z.
void setPhaseConfiguration(const int num_phases, const int *phase_pos)
virtual void mu(const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *z, double *output_mu) const =0
Viscosity as a function of p, T and z.
static const int MaxNumPhases
Definition: BlackoilPhases.hpp:30
virtual void b(const int n, const int *pvtRegionIdx, const double *p, const double *T, const double *r, double *output_b, double *output_dbdp, double *output_dpdr) const =0
Definition: PvtInterface.hpp:30
virtual void rvSat(const int n, const int *pvtRegionIdx, const double *p, double *output_rvSat, double *output_drvSatdp) const =0
Vapor oil/gas ratio and its derivatives at saturated conditions as a function of p.
void extractPvtTableIndex(std::vector< int > &pvtTableIdx, Opm::DeckConstPtr deck, size_t numCompressed, const int *compressedToCartesianIdx)
Helper function to create an array containing the (C-Style) PVT table index for each compressed cell ...