My Project
SatfuncPropertyInitializers.hpp
1 /*
2  Copyright 2014 Andreas Lauser
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 #ifndef ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
20 #define ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
21 
22 #include <memory>
23 #include <string>
24 #include <vector>
25 
26 namespace Opm {
27  class Phases;
28  class TableManager;
29 }
30 
31 namespace Opm { namespace satfunc {
32 
36  {
38  struct {
41  std::vector<double> gas;
42 
45  std::vector<double> water;
47 
49  struct {
53  std::vector<double> oil_in_gas;
54 
58  std::vector<double> oil_in_water;
59 
62  std::vector<double> gas;
63 
66  std::vector<double> water;
68 
70  struct {
73  std::vector<double> gas;
74 
77  std::vector<double> water;
79 
80  bool operator==(const RawTableEndPoints& other) const {
81  return this->connate.gas == other.connate.gas &&
82  this->connate.water == other.connate.water &&
83  this->critical.gas == other.critical.gas &&
84  this->critical.water == other.critical.water &&
85  this->maximum.gas == other.maximum.gas &&
86  this->maximum.water == other.maximum.water;
87  }
88  };
89 
93  {
95  struct {
99  std::vector<double> max;
100 
105  std::vector<double> rg;
106 
111  std::vector<double> rw;
112  } kro;
113 
115  struct {
119  std::vector<double> max;
120 
124  std::vector<double> r;
125  } krg;
126 
128  struct {
132  std::vector<double> max;
133 
137  std::vector<double> r;
138  } krw;
139 
141  struct {
145  std::vector<double> g;
146 
150  std::vector<double> w;
151  } pc;
152  };
153 
154  RawTableEndPoints
155  getRawTableEndpoints(const Opm::TableManager& tm,
156  const Opm::Phases& phases,
157  const double tolcrit);
158 
159  RawFunctionValues
160  getRawFunctionValues(const Opm::TableManager& tm,
161  const Opm::Phases& phases,
162  const RawTableEndPoints& ep);
163 
164  std::vector<double> init(const std::string& kewyord,
165  const TableManager& tables,
166  const Phases& phases,
167  const RawTableEndPoints& ep,
168  const std::vector<double>& cell_depth,
169  const std::vector<int>& num,
170  const std::vector<int>& endnum);
171 
172 }} // namespace Opm::satfunc
173 
174 #endif // ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
Definition: Runspec.hpp:57
Definition: TableManager.hpp:64
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Collection of unscaled/raw saturation function value range endpoints extracted directly from tables o...
Definition: SatfuncPropertyInitializers.hpp:93
std::vector< double > r
Relative permeability of gas at critical saturation of displacing phase.
Definition: SatfuncPropertyInitializers.hpp:124
struct Opm::satfunc::RawFunctionValues::@5 kro
Function values for relative permeability of oil.
struct Opm::satfunc::RawFunctionValues::@6 krg
Function values for relative permeability of gas.
std::vector< double > w
Maximum oil/eater capillary pressure value (Po - Pw).
Definition: SatfuncPropertyInitializers.hpp:150
std::vector< double > rg
Relative permeability of oil at critical saturation of displacing phase in oil/gas two-phase system.
Definition: SatfuncPropertyInitializers.hpp:105
struct Opm::satfunc::RawFunctionValues::@7 krw
Function values for relative permeability of gas.
std::vector< double > max
Maximum relative permeability value of oil in both oil/gas and oil/water two-phase systems.
Definition: SatfuncPropertyInitializers.hpp:99
std::vector< double > rw
Relative permeability of oil at critical saturation of displacing phase in oil/water two-phase system...
Definition: SatfuncPropertyInitializers.hpp:111
std::vector< double > g
Maximum gas/oil capillary pressure value (Pg - Po).
Definition: SatfuncPropertyInitializers.hpp:145
struct Opm::satfunc::RawFunctionValues::@8 pc
Maximum capillary function values.
Collection of unscaled/raw saturation range endpoints extracted directly from tables of tabulated sat...
Definition: SatfuncPropertyInitializers.hpp:36
std::vector< double > gas
Connate gas saturation.
Definition: SatfuncPropertyInitializers.hpp:41
std::vector< double > oil_in_water
Critical saturation of oil in oil/water two-phase system.
Definition: SatfuncPropertyInitializers.hpp:58
struct Opm::satfunc::RawTableEndPoints::@2 connate
Connate saturation endpoints.
struct Opm::satfunc::RawTableEndPoints::@4 maximum
Maximum saturation endpoints.
std::vector< double > water
Connate water saturation.
Definition: SatfuncPropertyInitializers.hpp:45
std::vector< double > oil_in_gas
Critical saturation of oil in oil/gas two-phase system.
Definition: SatfuncPropertyInitializers.hpp:53
struct Opm::satfunc::RawTableEndPoints::@3 critical
Critical saturation endpoints.