BlackoilPropsAdInterface.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2013 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_BLACKOILPROPSADINTERFACE_HEADER_INCLUDED
21 #define OPM_BLACKOILPROPSADINTERFACE_HEADER_INCLUDED
22 
24 #include <opm/core/props/BlackoilPhases.hpp>
25 
26 namespace Opm
27 {
28 
39  {
40  public:
42  virtual ~BlackoilPropsAdInterface();
43 
45  // Rock interface //
47 
49  virtual int numDimensions() const = 0;
50 
52  virtual int numCells() const = 0;
53 
55  virtual const double* porosity() const = 0;
56 
60  virtual const double* permeability() const = 0;
61 
62 
64  // Fluid interface //
66 
68  typedef ADB::V V;
69  typedef ADB::M M;
70  typedef std::vector<int> Cells;
71 
73  virtual int numPhases() const = 0;
74 
76  virtual PhaseUsage phaseUsage() const = 0;
77 
78  // ------ Canonical named indices for each phase ------
79 
81  enum PhaseIndex { Water = BlackoilPhases::Aqua, Oil = BlackoilPhases::Liquid,
82  Gas = BlackoilPhases::Vapour,
83  Aqua = BlackoilPhases::Aqua,
84  Liquid = BlackoilPhases::Liquid,
85  Vapour = BlackoilPhases::Vapour,
87 
88  // ------ Density ------
89 
92  virtual const double* surfaceDensity(int regionIdx = 0) const = 0;
93 
94 
95  // ------ Viscosity ------
96 
102  virtual
103  ADB muWat(const ADB& pw,
104  const ADB& T,
105  const Cells& cells) const = 0;
106 
114  virtual
115  ADB muOil(const ADB& po,
116  const ADB& T,
117  const ADB& rs,
118  const std::vector<PhasePresence>& cond,
119  const Cells& cells) const = 0;
120 
128  virtual
129  ADB muGas(const ADB& pg,
130  const ADB& T,
131  const ADB& rv,
132  const std::vector<PhasePresence>& cond,
133  const Cells& cells) const = 0;
134 
135  // ------ Formation volume factor (b) ------
136 
142  virtual
143  ADB bWat(const ADB& pw,
144  const ADB& T,
145  const Cells& cells) const = 0;
146 
154  virtual
155  ADB bOil(const ADB& po,
156  const ADB& T,
157  const ADB& rs,
158  const std::vector<PhasePresence>& cond,
159  const Cells& cells) const = 0;
160 
168  virtual
169  ADB bGas(const ADB& pg,
170  const ADB& T,
171  const ADB& rv,
172  const std::vector<PhasePresence>& cond,
173  const Cells& cells) const = 0;
174 
175  // ------ Rs bubble point curve ------
176 
181  virtual
182  ADB rsSat(const ADB& po,
183  const Cells& cells) const = 0;
184 
190  virtual
191  ADB rsSat(const ADB& po,
192  const ADB& so,
193  const Cells& cells) const = 0;
194 
195  // ------ Rv condensation curve ------
196 
201  virtual
202  ADB rvSat(const ADB& po,
203  const Cells& cells) const = 0;
204 
210  virtual
211  ADB rvSat(const ADB& po,
212  const ADB& so,
213  const Cells& cells) const = 0;
214 
215  // ------ Relative permeability ------
216 
224  virtual
225  std::vector<ADB> relperm(const ADB& sw,
226  const ADB& so,
227  const ADB& sg,
228  const Cells& cells) const = 0;
229 
230 
239  virtual
240  std::vector<ADB> capPress(const ADB& sw,
241  const ADB& so,
242  const ADB& sg,
243  const Cells& cells) const = 0;
244 
247  virtual
248  void updateSatHyst(const std::vector<double>& saturation,
249  const std::vector<int>& cells) = 0;
250 
252  virtual
253  void updateSatOilMax(const std::vector<double>& saturation) = 0;
254  };
255 
256 } // namespace Opm
257 
258 #endif // OPM_BLACKOILPROPSADINTERFACE_HEADER_INCLUDED
virtual ADB muGas(const ADB &pg, const ADB &T, const ADB &rv, const std::vector< PhasePresence > &cond, const Cells &cells) const =0
virtual ADB muWat(const ADB &pw, const ADB &T, const Cells &cells) const =0
Definition: BlackoilPropsAdInterface.hpp:38
Definition: BlackoilPropsAdInterface.hpp:81
Eigen::Array< double, Eigen::Dynamic, 1 > V
Underlying type for values.
Definition: AutoDiffBlock.hpp:98
AutoDiffBlock< double > ADB
Definition: BlackoilPropsAdInterface.hpp:67
Definition: AdditionalObjectDeleter.hpp:22
Definition: BlackoilPropsAdInterface.hpp:86
Definition: BlackoilPropsAdInterface.hpp:84
virtual void updateSatHyst(const std::vector< double > &saturation, const std::vector< int > &cells)=0
Definition: BlackoilModelEnums.hpp:32
virtual void updateSatOilMax(const std::vector< double > &saturation)=0
Update for max oil saturation.
Definition: BlackoilPropsAdInterface.hpp:81
virtual ADB rsSat(const ADB &po, const Cells &cells) const =0
std::vector< int > Cells
Definition: BlackoilPropsAdInterface.hpp:70
virtual std::vector< ADB > capPress(const ADB &sw, const ADB &so, const ADB &sg, const Cells &cells) const =0
virtual int numPhases() const =0
virtual ~BlackoilPropsAdInterface()
Virtual destructor for inheritance.
virtual const double * porosity() const =0
Definition: BlackoilPropsAdInterface.hpp:82
virtual ADB bGas(const ADB &pg, const ADB &T, const ADB &rv, const std::vector< PhasePresence > &cond, const Cells &cells) const =0
Definition: AutoDiffMatrix.hpp:43
Definition: BlackoilPropsAdInterface.hpp:83
virtual std::vector< ADB > relperm(const ADB &sw, const ADB &so, const ADB &sg, const Cells &cells) const =0
virtual int numDimensions() const =0
virtual int numCells() const =0
virtual ADB muOil(const ADB &po, const ADB &T, const ADB &rs, const std::vector< PhasePresence > &cond, const Cells &cells) const =0
ADB::V V
Definition: BlackoilPropsAdInterface.hpp:68
virtual const double * surfaceDensity(int regionIdx=0) const =0
ADB::M M
Definition: BlackoilPropsAdInterface.hpp:69
PhaseIndex
Canonical named indices for each phase.
Definition: BlackoilPropsAdInterface.hpp:81
virtual ADB bWat(const ADB &pw, const ADB &T, const Cells &cells) const =0
virtual const double * permeability() const =0
virtual ADB rvSat(const ADB &po, const Cells &cells) const =0
Definition: BlackoilPropsAdInterface.hpp:85
virtual ADB bOil(const ADB &po, const ADB &T, const ADB &rs, const std::vector< PhasePresence > &cond, const Cells &cells) const =0
virtual PhaseUsage phaseUsage() const =0