PvtDead.hpp
Go to the documentation of this file.
1 /*
2  Copyright 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_PVTDEAD_HEADER_INCLUDED
21 #define OPM_PVTDEAD_HEADER_INCLUDED
22 
25 
26 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
27 #include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
28 
29 #include <vector>
30 
31 namespace Opm
32 {
33 
45  class PvtDead : public PvtInterface
46  {
47  public:
48  PvtDead() {};
49 
50  void initFromOil(const TableContainer& pvdoTables);
51  void initFromGas(const TableContainer& pvdgTables);
52  virtual ~PvtDead();
53 
55  virtual void mu(const int n,
56  const int* pvtTableIdx,
57  const double* p,
58  const double* T,
59  const double* z,
60  double* output_mu) const;
61 
64  virtual void mu(const int n,
65  const int* pvtTableIdx,
66  const double* p,
67  const double* T,
68  const double* r,
69  double* output_mu,
70  double* output_dmudp,
71  double* output_dmudr) const;
72 
75  virtual void mu(const int n,
76  const int* pvtTableIdx,
77  const double* p,
78  const double* T,
79  const double* r,
80  const PhasePresence* cond,
81  double* output_mu,
82  double* output_dmudp,
83  double* output_dmudr) const;
84 
86  virtual void B(const int n,
87  const int* pvtTableIdx,
88  const double* p,
89  const double* T,
90  const double* z,
91  double* output_B) const;
92 
94  virtual void dBdp(const int n,
95  const int* pvtTableIdx,
96  const double* p,
97  const double* T,
98  const double* z,
99  double* output_B,
100  double* output_dBdp) const;
101 
104  virtual void b(const int n,
105  const int* pvtTableIdx,
106  const double* p,
107  const double* T,
108  const double* r,
109  double* output_b,
110  double* output_dbdp,
111  double* output_dbdr) const;
112 
115  virtual void b(const int n,
116  const int* pvtTableIdx,
117  const double* p,
118  const double* T,
119  const double* r,
120  const PhasePresence* cond,
121  double* output_b,
122  double* output_dbdp,
123  double* output_dbdr) const;
124 
125 
127  virtual void rsSat(const int n,
128  const int* pvtTableIdx,
129  const double* p,
130  double* output_rsSat,
131  double* output_drsSatdp) const;
132 
134  virtual void rvSat(const int n,
135  const int* pvtTableIdx,
136  const double* p,
137  double* output_rvSat,
138  double* output_drvSatdp) const;
139 
141  virtual void R(const int n,
142  const int* pvtTableIdx,
143  const double* p,
144  const double* z,
145  double* output_R) const;
146 
148  virtual void dRdp(const int n,
149  const int* pvtTableIdx,
150  const double* p,
151  const double* z,
152  double* output_R,
153  double* output_dRdp) const;
154  private:
155  int getTableIndex_(const int* pvtTableIdx, int cellIdx) const
156  {
157  if (!pvtTableIdx)
158  return 0;
159  return pvtTableIdx[cellIdx];
160  }
161 
162  // PVT properties of dry gas or dead oil. We need to store one
163  // table per PVT region.
164  std::vector<NonuniformTableLinear<double> > b_;
165  std::vector<NonuniformTableLinear<double> > viscosity_;
166  std::vector<NonuniformTableLinear<double> > inverseBmu_;
167  };
168 }
169 
170 
171 #endif // OPM_PVTDEAD_HEADER_INCLUDED
Definition: BlackoilPhases.hpp:48
virtual ~PvtDead()
Definition: AnisotropicEikonal.hpp:43
virtual void rvSat(const int n, const int *pvtTableIdx, const double *p, double *output_rvSat, double *output_drvSatdp) const
Vapor oil/gas ratio and its derivatives at saturated conditions as a function of p.
virtual void dBdp(const int n, const int *pvtTableIdx, const double *p, const double *T, const double *z, double *output_B, double *output_dBdp) const
Formation volume factor and p-derivative as functions of p, T and z.
void initFromOil(const TableContainer &pvdoTables)
virtual void rsSat(const int n, const int *pvtTableIdx, const double *p, double *output_rsSat, double *output_drsSatdp) const
Solution gas/oil ratio and its derivatives at saturated conditions as a function of p...
virtual void b(const int n, const int *pvtTableIdx, const double *p, const double *T, const double *r, double *output_b, double *output_dbdp, double *output_dbdr) const
PvtDead()
Definition: PvtDead.hpp:48
virtual void R(const int n, const int *pvtTableIdx, const double *p, const double *z, double *output_R) const
Solution factor as a function of p and z.
virtual void B(const int n, const int *pvtTableIdx, const double *p, const double *T, const double *z, double *output_B) const
Formation volume factor as a function of p, T and z.
Definition: PvtDead.hpp:45
void initFromGas(const TableContainer &pvdgTables)
Definition: PvtInterface.hpp:30
virtual void dRdp(const int n, const int *pvtTableIdx, const double *p, const double *z, double *output_R, double *output_dRdp) const
Solution factor and p-derivative as functions of p and z.
virtual void mu(const int n, const int *pvtTableIdx, const double *p, const double *T, const double *z, double *output_mu) const
Viscosity as a function of p, T and z.