MiscibilityLiveOil.hpp
1 //===========================================================================
2 //
3 // File: MiscibilityLiveOil.hpp
4 //
5 // Created: Wed Feb 10 09:08:09 2010
6 //
7 // Author: Bjørn Spjelkavik <bsp@sintef.no>
8 //
9 // Revision: $Id$
10 //
11 //===========================================================================
12 /*
13  Copyright 2010 SINTEF ICT, Applied Mathematics.
14 
15  This file is part of the Open Porous Media project (OPM).
16 
17  OPM is free software: you can redistribute it and/or modify
18  it under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  (at your option) any later version.
21 
22  OPM is distributed in the hope that it will be useful,
23  but WITHOUT ANY WARRANTY; without even the implied warranty of
24  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  GNU General Public License for more details.
26 
27  You should have received a copy of the GNU General Public License
28  along with OPM. If not, see <http://www.gnu.org/licenses/>.
29 */
30 
31 #ifndef SINTEF_MISCIBILITYLIVEOIL_HEADER
32 #define SINTEF_MISCIBILITYLIVEOIL_HEADER
33 
38 #include "MiscibilityProps.hpp"
39 
40 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
41 
42 namespace Opm
43 {
44 
45  class PvtoTable;
46 
48  {
49  public:
50  MiscibilityLiveOil(const PvtoTable& pvtoTable);
51  virtual ~MiscibilityLiveOil();
52 
53  virtual double getViscosity(int region, double press, const surfvol_t& surfvol) const;
54  virtual double R (int region, double press, const surfvol_t& surfvol) const;
55  virtual double dRdp(int region, double press, const surfvol_t& surfvol) const;
56  virtual double B (int region, double press, const surfvol_t& surfvol) const;
57  virtual double dBdp(int region, double press, const surfvol_t& surfvol) const;
58 
59  virtual void getViscosity(const std::vector<PhaseVec>& pressures,
60  const std::vector<CompVec>& surfvol,
61  int phase,
62  std::vector<double>& output) const;
63  virtual void B(const std::vector<PhaseVec>& pressures,
64  const std::vector<CompVec>& surfvol,
65  int phase,
66  std::vector<double>& output) const;
67  virtual void dBdp(const std::vector<PhaseVec>& pressures,
68  const std::vector<CompVec>& surfvol,
69  int phase,
70  std::vector<double>& output_B,
71  std::vector<double>& output_dBdp) const;
72  virtual void R(const std::vector<PhaseVec>& pressures,
73  const std::vector<CompVec>& surfvol,
74  int phase,
75  std::vector<double>& output) const;
76  virtual void dRdp(const std::vector<PhaseVec>& pressures,
77  const std::vector<CompVec>& surfvol,
78  int phase,
79  std::vector<double>& output_R,
80  std::vector<double>& output_dRdp) const;
81 
82  protected:
83  double evalR(double press, const surfvol_t& surfvol) const;
84  void evalRDeriv(double press, const surfvol_t& surfvol, double& R, double& dRdp) const;
85  double evalB(double press, const surfvol_t& surfvol) const;
86  void evalBDeriv(double press, const surfvol_t& surfvol, double& B, double& dBdp) const;
87 
88  // item: 1=B 2=mu;
89  double miscible_oil(double press, const surfvol_t& surfvol, int item,
90  bool deriv = false) const;
91 
92  // PVT properties of live oil (with dissolved gas)
93  std::vector<std::vector<double> > saturated_oil_table_;
94  std::vector<std::vector<std::vector<double> > > undersat_oil_tables_;
95  };
96 
97 }
98 
99 #endif // SINTEF_MISCIBILITYLIVEOIL_HEADER
100 
MiscibilityLiveOil(const PvtoTable &pvtoTable)
Constructor.
Definition: MiscibilityLiveOil.cpp:53
Definition: MiscibilityLiveOil.hpp:47
Class for immiscible dead oil and dry gas.
Definition: applier.hpp:18
Definition: MiscibilityProps.hpp:46