My Project
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
35#if HAVE_ECL_INPUT
36class EclipseState;
37#endif
38
47{
48
49public:
50#if HAVE_ECL_INPUT
51 EclEpsGridProperties(const EclipseState& eclState,
52 bool useImbibition);
53#endif
54
55 int satRegion(const std::size_t active_index) const
56 {
57 return (*this->satnum_)[active_index] - 1;
58 }
59
60 double permx(const std::size_t active_index) const
61 {
62 return this->perm(this->permx_, active_index);
63 }
64
65 double permy(const std::size_t active_index) const
66 {
67 return this->perm(this->permy_, active_index);
68 }
69
70 double permz(const std::size_t active_index) const
71 {
72 return this->perm(this->permy_, active_index);
73 }
74
75 double poro(const std::size_t active_index) const
76 {
77 return (*this->poro_)[active_index];
78 }
79
80 const double* swl(const std::size_t active_index) const
81 {
82 return this->satfunc(this->swl_, active_index);
83 }
84
85 const double* sgl(const std::size_t active_index) const
86 {
87 return this->satfunc(this->sgl_, active_index);
88 }
89
90 const double* swcr(const std::size_t active_index) const
91 {
92 return this->satfunc(this->swcr_, active_index);
93 }
94
95 const double* sgcr(const std::size_t active_index) const
96 {
97 return this->satfunc(this->sgcr_, active_index);
98 }
99
100 const double* sowcr(const std::size_t active_index) const
101 {
102 return this->satfunc(this->sowcr_, active_index);
103 }
104
105 const double* sogcr(const std::size_t active_index) const
106 {
107 return this->satfunc(this->sogcr_, active_index);
108 }
109
110 const double* swu(const std::size_t active_index) const
111 {
112 return this->satfunc(this->swu_, active_index);
113 }
114
115 const double* sgu(const std::size_t active_index) const
116 {
117 return this->satfunc(this->sgu_, active_index);
118 }
119
120 const double* pcw(const std::size_t active_index) const
121 {
122 return this->satfunc(this->pcw_, active_index);
123 }
124
125 const double* pcg(const std::size_t active_index) const
126 {
127 return this->satfunc(this->pcg_, active_index);
128 }
129
130 const double* krw(const std::size_t active_index) const
131 {
132 return this->satfunc(this->krw_, active_index);
133 }
134
135 const double* krwr(const std::size_t active_index) const
136 {
137 return this->satfunc(this->krwr_, active_index);
138 }
139
140 const double* krg(const std::size_t active_index) const
141 {
142 return this->satfunc(this->krg_, active_index);
143 }
144
145 const double* krgr(const std::size_t active_index) const
146 {
147 return this->satfunc(this->krgr_, active_index);
148 }
149
150 const double* kro(const std::size_t active_index) const
151 {
152 return this->satfunc(this->kro_, active_index);
153 }
154
155 const double* krorg(const std::size_t active_index) const
156 {
157 return this->satfunc(this->krorg_, active_index);
158 }
159
160 const double* krorw(const std::size_t active_index) const
161 {
162 return this->satfunc(this->krorw_, active_index);
163 }
164
165private:
166 const std::vector<int>* satnum_ { nullptr };
167
168 const std::vector<double>* swl_ { nullptr };
169 const std::vector<double>* sgl_ { nullptr };
170 const std::vector<double>* swcr_ { nullptr };
171 const std::vector<double>* sgcr_ { nullptr };
172 const std::vector<double>* sowcr_ { nullptr };
173 const std::vector<double>* sogcr_ { nullptr };
174 const std::vector<double>* swu_ { nullptr };
175 const std::vector<double>* sgu_ { nullptr };
176
177 const std::vector<double>* pcw_ { nullptr };
178 const std::vector<double>* pcg_ { nullptr };
179
180 const std::vector<double>* krw_ { nullptr };
181 const std::vector<double>* krwr_ { nullptr };
182 const std::vector<double>* kro_ { nullptr };
183 const std::vector<double>* krorg_ { nullptr };
184 const std::vector<double>* krorw_ { nullptr };
185 const std::vector<double>* krg_ { nullptr };
186 const std::vector<double>* krgr_ { nullptr };
187
188 const std::vector<double>* permx_ { nullptr };
189 const std::vector<double>* permy_ { nullptr };
190 const std::vector<double>* permz_ { nullptr };
191 const std::vector<double>* poro_ { nullptr };
192
193 const double*
194 satfunc(const std::vector<double>* data,
195 const std::size_t active_index) const
196 {
197 return ((data == nullptr) || data->empty())
198 ? nullptr
199 : &(*data)[active_index];
200 }
201
202 double perm(const std::vector<double>* data,
203 const std::size_t active_index) const
204 {
205 return ((data == nullptr) || data->empty())
206 ? 0.0
207 : (*data)[active_index];
208 }
209};
210
211} // namespace Opm
212
213#endif
Specifies the configuration used by the endpoint scaling code.
Collects all grid properties which are relevant for end point scaling.
Definition EclEpsGridProperties.hpp:47
Definition EclipseState.hpp:62
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30