25 #ifndef OPM_ECL_EPS_GRID_PROPERTIES_HPP
26 #define OPM_ECL_EPS_GRID_PROPERTIES_HPP
31 #include <opm/parser/eclipse/Deck/Deck.hpp>
32 #include <opm/parser/eclipse/Deck/DeckRecord.hpp>
33 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
34 #include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
35 #include <opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp>
36 #include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
37 #include <opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp>
38 #include <opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp>
39 #include <opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp>
40 #include <opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp>
41 #include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
42 #include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
64 std::vector<double> try_get(
const FieldPropsManager& fp,
const std::string& keyword) {
65 if (fp.has_double(keyword))
66 return fp.get_double(keyword);
84 const std::string kwPrefix = useImbibition ?
"I" :
"";
86 const auto& fp = eclState.fieldProps();
88 compressed_satnum = useImbibition
89 ? fp.get_int(
"IMBNUM") : fp.get_int(
"SATNUM");
91 this->compressed_swl = try_get( fp, kwPrefix+
"SWL");
92 this->compressed_sgl = try_get( fp, kwPrefix+
"SGL");
93 this->compressed_swcr = try_get( fp, kwPrefix+
"SWCR");
94 this->compressed_sgcr = try_get( fp, kwPrefix+
"SGCR");
95 this->compressed_sowcr = try_get( fp, kwPrefix+
"SOWCR");
96 this->compressed_sogcr = try_get( fp, kwPrefix+
"SOGCR");
97 this->compressed_swu = try_get( fp, kwPrefix+
"SWU");
98 this->compressed_sgu = try_get( fp, kwPrefix+
"SGU");
99 this->compressed_pcw = try_get( fp, kwPrefix+
"PCW");
100 this->compressed_pcg = try_get( fp, kwPrefix+
"PCG");
101 this->compressed_krw = try_get( fp, kwPrefix+
"KRW");
102 this->compressed_krwr = try_get( fp, kwPrefix+
"KRWR");
103 this->compressed_kro = try_get( fp, kwPrefix+
"KRO");
104 this->compressed_krorg = try_get( fp, kwPrefix+
"KRORG");
105 this->compressed_krorw = try_get( fp, kwPrefix+
"KRORW");
106 this->compressed_krg = try_get( fp, kwPrefix+
"KRG");
107 this->compressed_krgr = try_get( fp, kwPrefix+
"KRGR");
110 if (fp.has_double(
"PORO"))
111 this->compressed_poro = fp.get_double(
"PORO");
113 this->compressed_permx = fp.has_double(
"PERMX")
114 ? fp.get_double(
"PERMX")
115 : std::vector<double>(this->compressed_satnum.size());
117 this->compressed_permy = fp.has_double(
"PERMY")
118 ? fp.get_double(
"PERMY") : this->compressed_permx;
120 this->compressed_permz = fp.has_double(
"PERMZ")
121 ? fp.get_double(
"PERMZ") : this->compressed_permx;
128 unsigned satRegion(std::size_t active_index)
const {
129 return this->compressed_satnum[active_index] - 1;
132 double permx(std::size_t active_index)
const {
133 return this->compressed_permx[active_index];
136 double permy(std::size_t active_index)
const {
137 return this->compressed_permy[active_index];
140 double permz(std::size_t active_index)
const {
141 return this->compressed_permz[active_index];
144 double poro(std::size_t active_index)
const {
145 return this->compressed_poro[active_index];
148 const double * swl(std::size_t active_index)
const {
149 return this->satfunc(this->compressed_swl, active_index);
152 const double * sgl(std::size_t active_index)
const {
153 return this->satfunc(this->compressed_sgl, active_index);
156 const double * swcr(std::size_t active_index)
const {
157 return this->satfunc(this->compressed_swcr, active_index);
160 const double * sgcr(std::size_t active_index)
const {
161 return this->satfunc(this->compressed_sgcr, active_index);
164 const double * sowcr(std::size_t active_index)
const {
165 return this->satfunc(this->compressed_sowcr, active_index);
168 const double * sogcr(std::size_t active_index)
const {
169 return this->satfunc(this->compressed_sogcr, active_index);
172 const double * swu(std::size_t active_index)
const {
173 return this->satfunc(this->compressed_swu, active_index);
176 const double * sgu(std::size_t active_index)
const {
177 return this->satfunc(this->compressed_sgu, active_index);
180 const double * pcw(std::size_t active_index)
const {
181 return this->satfunc(this->compressed_pcw, active_index);
184 const double * pcg(std::size_t active_index)
const {
185 return this->satfunc(this->compressed_pcg, active_index);
188 const double * krw(std::size_t active_index)
const {
189 return this->satfunc(this->compressed_krw, active_index);
192 const double * krwr(std::size_t active_index)
const {
193 return this->satfunc(this->compressed_krwr, active_index);
196 const double * krg(std::size_t active_index)
const {
197 return this->satfunc(this->compressed_krg, active_index);
200 const double * krgr(std::size_t active_index)
const {
201 return this->satfunc(this->compressed_krgr, active_index);
204 const double * kro(std::size_t active_index)
const {
205 return this->satfunc(this->compressed_kro, active_index);
208 const double * krorg(std::size_t active_index)
const {
209 return this->satfunc(this->compressed_krorg, active_index);
212 const double * krorw(std::size_t active_index)
const {
213 return this->satfunc(this->compressed_krorw, active_index);
218 satfunc(
const std::vector<double>& data,
219 const std::size_t active_index)
const
221 return data.empty() ? nullptr : &data[active_index];
225 std::vector<int> compressed_satnum;
226 std::vector<double> compressed_swl;
227 std::vector<double> compressed_sgl;
228 std::vector<double> compressed_swcr;
229 std::vector<double> compressed_sgcr;
230 std::vector<double> compressed_sowcr;
231 std::vector<double> compressed_sogcr;
232 std::vector<double> compressed_swu;
233 std::vector<double> compressed_sgu;
234 std::vector<double> compressed_pcw;
235 std::vector<double> compressed_pcg;
236 std::vector<double> compressed_krw;
237 std::vector<double> compressed_krwr;
238 std::vector<double> compressed_kro;
239 std::vector<double> compressed_krorg;
240 std::vector<double> compressed_krorw;
241 std::vector<double> compressed_krg;
242 std::vector<double> compressed_krgr;
244 std::vector<double> compressed_permx;
245 std::vector<double> compressed_permy;
246 std::vector<double> compressed_permz;
247 std::vector<double> compressed_poro;
Specifies the configuration used by the endpoint scaling code.
Implements some common averages.
Definition: EclEpsGridProperties.hpp:76