opm-common
Loading...
Searching...
No Matches
EclEpsGridProperties.hpp
Go to the documentation of this file.
1/*
2 This file is part of the Open Porous Media project (OPM).
3
4 OPM is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 OPM is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with OPM. If not, see <http://www.gnu.org/licenses/>.
16
17 Consult the COPYING file in the top-level source directory of this
18 module for the precise wording of the license and the list of
19 copyright holders.
20*/
25#ifndef OPM_ECL_EPS_GRID_PROPERTIES_HPP
26#define OPM_ECL_EPS_GRID_PROPERTIES_HPP
27
29
30#include <cstddef>
31#include <vector>
32
33namespace Opm {
34
35class EclipseState;
36
43
44class EclEpsGridProperties
45{
46
47public:
48 EclEpsGridProperties(const EclipseState& eclState,
49 bool useImbibition);
50
51 int satRegion(const std::size_t active_index) const
52 {
53 return (*this->satnum_)[active_index] - 1;
54 }
55
56 double permx(const std::size_t active_index) const
57 {
58 return this->perm(this->permx_, active_index);
59 }
60
61 double permy(const std::size_t active_index) const
62 {
63 return this->perm(this->permy_, active_index);
64 }
65
66 double permz(const std::size_t active_index) const
67 {
68 return this->perm(this->permy_, active_index);
69 }
70
71 double poro(const std::size_t active_index) const
72 {
73 return (*this->poro_)[active_index];
74 }
75
76 const double* swl(const std::size_t active_index) const
77 {
78 return this->satfunc(this->swl_, active_index);
79 }
80
81 const double* sgl(const std::size_t active_index) const
82 {
83 return this->satfunc(this->sgl_, active_index);
84 }
85
86 const double* swcr(const std::size_t active_index) const
87 {
88 return this->satfunc(this->swcr_, active_index);
89 }
90
91 const double* sgcr(const std::size_t active_index) const
92 {
93 return this->satfunc(this->sgcr_, active_index);
94 }
95
96 const double* sowcr(const std::size_t active_index) const
97 {
98 return this->satfunc(this->sowcr_, active_index);
99 }
100
101 const double* sogcr(const std::size_t active_index) const
102 {
103 return this->satfunc(this->sogcr_, active_index);
104 }
105
106 const double* swu(const std::size_t active_index) const
107 {
108 return this->satfunc(this->swu_, active_index);
109 }
110
111 const double* sgu(const std::size_t active_index) const
112 {
113 return this->satfunc(this->sgu_, active_index);
114 }
115
116 const double* pcw(const std::size_t active_index) const
117 {
118 return this->satfunc(this->pcw_, active_index);
119 }
120
121 const double* pcg(const std::size_t active_index) const
122 {
123 return this->satfunc(this->pcg_, active_index);
124 }
125
126 const double* krw(const std::size_t active_index) const
127 {
128 return this->satfunc(this->krw_, active_index);
129 }
130
131 const double* krwr(const std::size_t active_index) const
132 {
133 return this->satfunc(this->krwr_, active_index);
134 }
135
136 const double* krg(const std::size_t active_index) const
137 {
138 return this->satfunc(this->krg_, active_index);
139 }
140
141 const double* krgr(const std::size_t active_index) const
142 {
143 return this->satfunc(this->krgr_, active_index);
144 }
145
146 const double* kro(const std::size_t active_index) const
147 {
148 return this->satfunc(this->kro_, active_index);
149 }
150
151 const double* krorg(const std::size_t active_index) const
152 {
153 return this->satfunc(this->krorg_, active_index);
154 }
155
156 const double* krorw(const std::size_t active_index) const
157 {
158 return this->satfunc(this->krorw_, active_index);
159 }
160
161private:
162 const std::vector<int>* satnum_ { nullptr };
163
164 const std::vector<double>* swl_ { nullptr };
165 const std::vector<double>* sgl_ { nullptr };
166 const std::vector<double>* swcr_ { nullptr };
167 const std::vector<double>* sgcr_ { nullptr };
168 const std::vector<double>* sowcr_ { nullptr };
169 const std::vector<double>* sogcr_ { nullptr };
170 const std::vector<double>* swu_ { nullptr };
171 const std::vector<double>* sgu_ { nullptr };
172
173 const std::vector<double>* pcw_ { nullptr };
174 const std::vector<double>* pcg_ { nullptr };
175
176 const std::vector<double>* krw_ { nullptr };
177 const std::vector<double>* krwr_ { nullptr };
178 const std::vector<double>* kro_ { nullptr };
179 const std::vector<double>* krorg_ { nullptr };
180 const std::vector<double>* krorw_ { nullptr };
181 const std::vector<double>* krg_ { nullptr };
182 const std::vector<double>* krgr_ { nullptr };
183
184 const std::vector<double>* permx_ { nullptr };
185 const std::vector<double>* permy_ { nullptr };
186 const std::vector<double>* permz_ { nullptr };
187 const std::vector<double>* poro_ { nullptr };
188
189 const double*
190 satfunc(const std::vector<double>* data,
191 const std::size_t active_index) const
192 {
193 return ((data == nullptr) || data->empty())
194 ? nullptr
195 : &(*data)[active_index];
196 }
197
198 double perm(const std::vector<double>* data,
199 const std::size_t active_index) const
200 {
201 return ((data == nullptr) || data->empty())
202 ? 0.0
203 : (*data)[active_index];
204 }
205};
206
207} // namespace Opm
208
209#endif
Specifies the configuration used by the endpoint scaling code.
Definition EclipseState.hpp:66
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30