SatfuncPropertyInitializers.hpp
Go to the documentation of this file.
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 <vector>
23 #include <string>
24 #include <exception>
25 #include <memory>
26 #include <limits>
27 #include <algorithm>
28 #include <cmath>
29 
30 #include <cassert>
31 
37 
39 
40 namespace Opm {
41 
42 // forward definitions
43 class Deck;
44 class EclipseState;
45 class EnptvdTable;
46 class ImptvdTable;
47 
48 
49 template <class EclipseState=Opm::EclipseState,
50  class Deck=Opm::Deck>
52  : public GridPropertyBaseInitializer<double>
53 {
54 public:
55  EndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
56  : m_deck(deck)
57  , m_eclipseState(eclipseState)
58  { }
59 
61 
62  /*
63  See the "Saturation Functions" chapter in the Eclipse Technical
64  Description; there are several alternative families of keywords
65  which can be used to enter relperm and capillary pressure
66  tables.
67  */
68 
69 
70 protected:
71 
72  /*
73  The method here goes through the saturation function tables
74  Either family I (SWOF,SGOF) or family II (SWFN, SGFN and SOF3)
75  must be specified. Other keyword alternatives like SOF2
76  and SGWFN and the two dimensional saturation tables
77  are currently not supported.
78 
79  ** Must be fixed. **
80  */
81 
82 
83  void findSaturationEndpoints( ) const {
84  auto tables = m_eclipseState.getTableManager();
85  auto tabdims = tables->getTabdims();
86  size_t numSatTables = tabdims->getNumSatTables();
87  m_minWaterSat.resize( numSatTables , 0 );
88  m_maxWaterSat.resize( numSatTables , 0 );
89  m_minGasSat.resize( numSatTables , 0 );
90  m_maxGasSat.resize( numSatTables , 0 );
91 
92  switch (getSaturationFunctionFamily()) {
93  case SaturationFunctionFamily::FamilyI:
94  {
95  const TableContainer& swofTables = tables->getSwofTables();
96  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
97  const SwofTable& swofTable = swofTables.getTable<SwofTable>(tableIdx);
98  m_minWaterSat[tableIdx] = swofTable.getSwColumn().front();
99  m_maxWaterSat[tableIdx] = swofTable.getSwColumn().back();
100  }
101 
102  {
103  const TableContainer& sgofTables = tables->getSgofTables();
104  const TableContainer& slgofTables = tables->getSlgofTables();
105 
106  if (!sgofTables.empty()) {
107  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
108  const SgofTable& sgofTable = sgofTables.getTable<SgofTable>( tableIdx );
109  m_minGasSat[tableIdx] = sgofTable.getSgColumn().front();
110  m_maxGasSat[tableIdx] = sgofTable.getSgColumn().back();
111  }
112  }
113  else {
114  assert(!slgofTables.empty());
115  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
116  const SlgofTable& slgofTable = slgofTables.getTable<SlgofTable>( tableIdx );
117  m_minGasSat[tableIdx] = 1.0 - slgofTable.getSlColumn().back();
118  m_maxGasSat[tableIdx] = 1.0 - slgofTable.getSlColumn().front();
119  }
120  }
121  }
122 
123  break;
124  }
125  case SaturationFunctionFamily::FamilyII:
126  {
127  const TableContainer& swfnTables = tables->getSwfnTables();
128  const TableContainer& sgfnTables = tables->getSgfnTables();
129  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
130  const SwfnTable& swfnTable = swfnTables.getTable<SwfnTable>(tableIdx);
131  const SgfnTable& sgfnTable = sgfnTables.getTable<SgfnTable>(tableIdx);
132 
133  m_minWaterSat[tableIdx] = swfnTable.getSwColumn().front();
134  m_maxWaterSat[tableIdx] = swfnTable.getSwColumn().back();
135 
136  m_minGasSat[tableIdx] = sgfnTable.getSgColumn().front();
137  m_maxGasSat[tableIdx] = sgfnTable.getSgColumn().back();
138  }
139  break;
140  }
141  default:
142  throw std::domain_error("No valid saturation keyword family specified");
143  }
144  }
145 
146 
147  void findCriticalPoints( ) const {
148  auto tables = m_eclipseState.getTableManager();
149  auto tabdims = tables->getTabdims();
150  size_t numSatTables = tabdims->getNumSatTables();
151 
152  m_criticalWaterSat.resize( numSatTables , 0 );
153  m_criticalGasSat.resize( numSatTables , 0 );
154  m_criticalOilOGSat.resize( numSatTables , 0 );
155  m_criticalOilOWSat.resize( numSatTables , 0 );
156 
157  switch (getSaturationFunctionFamily()) {
158  case SaturationFunctionFamily::FamilyI:
159  {
160  const TableContainer& swofTables = tables->getSwofTables();
161 
162  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
163  // find the critical water saturation
164  const SwofTable& swofTable = swofTables.getTable<SwofTable>( tableIdx );
165  int numRows = swofTable.numRows();
166  const auto &krwCol = swofTable.getKrwColumn();
167  for (int rowIdx = 0; rowIdx < numRows; ++rowIdx) {
168  if (krwCol[rowIdx] > 0.0) {
169  double Sw = 0.0;
170  if (rowIdx > 0)
171  Sw = swofTable.getSwColumn()[rowIdx - 1];
172  m_criticalWaterSat[tableIdx] = Sw;
173  break;
174  }
175  }
176 
177  // find the critical oil saturation of the water-oil system
178  const auto &kroOWCol = swofTable.getKrowColumn();
179  for (int rowIdx = numRows - 1; rowIdx >= 0; --rowIdx) {
180  if (kroOWCol[rowIdx] > 0.0) {
181  double Sw = swofTable.getSwColumn()[rowIdx + 1];
182  m_criticalOilOWSat[tableIdx] = 1 - Sw;
183  break;
184  }
185  }
186  }
187 
188  {
189  const TableContainer& sgofTables = tables->getSgofTables();
190  const TableContainer& slgofTables = tables->getSlgofTables();
191 
192  if (!sgofTables.empty()) {
193  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
194  const SgofTable& sgofTable = sgofTables.getTable<SgofTable>( tableIdx );
195  // find the critical gas saturation
196  int numRows = sgofTable.numRows();
197  const auto &krgCol = sgofTable.getKrgColumn();
198  for (int rowIdx = 0; rowIdx < numRows; ++rowIdx) {
199  if (krgCol[rowIdx] > 0.0) {
200  double Sg = 0.0;
201  if (rowIdx > 0)
202  Sg = sgofTable.getSgColumn()[rowIdx - 1];
203  m_criticalGasSat[tableIdx] = Sg;
204  break;
205  }
206  }
207 
208  // find the critical oil saturation of the oil-gas system
209  const auto &kroOGCol = sgofTable.getKrogColumn();
210  for (int rowIdx = numRows - 1; rowIdx >= 0; --rowIdx) {
211  if (kroOGCol[rowIdx] > 0.0) {
212  double Sg = sgofTable.getSgColumn()[rowIdx + 1];
213  m_criticalOilOGSat[tableIdx] = 1 - Sg;
214  break;
215  }
216  }
217  }
218  }
219  else {
220  assert(!slgofTables.empty());
221  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
222  const SlgofTable& slgofTable = slgofTables.getTable<SlgofTable>( tableIdx );
223  // find the critical gas saturation
224  int numRows = slgofTable.numRows();
225  const auto &krgCol = slgofTable.getKrgColumn();
226  for (int rowIdx = numRows - 1; rowIdx >= 0; -- rowIdx) {
227  if (krgCol[rowIdx] > 0.0) {
228  assert(rowIdx < numRows - 1);
229  m_criticalGasSat[tableIdx] =
230  1.0 - slgofTable.getSlColumn()[rowIdx + 1];
231  break;
232  }
233  }
234 
235  // find the critical oil saturation of the oil-gas system
236  const auto &kroOGCol = slgofTable.getKrogColumn();
237  for (int rowIdx = 0; rowIdx < numRows; ++rowIdx) {
238  if (kroOGCol[rowIdx] > 0.0) {
239  m_criticalOilOGSat[tableIdx] =
240  slgofTable.getSlColumn()[rowIdx + 1];
241  break;
242  }
243  }
244  }
245  }
246 
247  break;
248  }
249  }
250 
251  case SaturationFunctionFamily::FamilyII: {
252  const TableContainer& swfnTables = tables->getSwfnTables();
253  const TableContainer& sgfnTables = tables->getSgfnTables();
254  const TableContainer& sof3Tables = tables->getSof3Tables();
255 
256  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
257  {
258  const SwfnTable& swfnTable = swfnTables.getTable<SwfnTable>( tableIdx );
259  // find the critical water saturation
260  size_t numRows = swfnTable.numRows();
261  const auto &krwCol = swfnTable.getKrwColumn();
262  for (size_t rowIdx = 0; rowIdx < numRows; ++rowIdx) {
263  if (krwCol[rowIdx] > 0.0) {
264  double Sw = 0.0;
265  if (rowIdx > 0)
266  Sw = swfnTable.getSwColumn()[rowIdx - 1];
267  m_criticalWaterSat[tableIdx] = Sw;
268  break;
269  }
270  }
271  }
272 
273  {
274  const SgfnTable& sgfnTable = sgfnTables.getTable<SgfnTable>( tableIdx );
275  // find the critical gas saturation
276  size_t numRows = sgfnTable.numRows();
277  const auto &krgCol = sgfnTable.getKrgColumn();
278  for (size_t rowIdx = 0; rowIdx < numRows; ++rowIdx) {
279  if (krgCol[rowIdx] > 0.0) {
280  double Sg = 0.0;
281  if (rowIdx > 0)
282  Sg = sgfnTable.getSgColumn()[rowIdx - 1];
283  m_criticalGasSat[tableIdx] = Sg;
284  break;
285  }
286  }
287  }
288 
289  // find the critical oil saturation of the oil-gas system
290  {
291  const Sof3Table& sof3Table = sof3Tables.getTable<Sof3Table>( tableIdx );
292  size_t numRows = sof3Table.numRows();
293  const auto &kroOGCol = sof3Table.getKrogColumn();
294  for (size_t rowIdx = 0; rowIdx < numRows; ++rowIdx) {
295  if (kroOGCol[rowIdx] > 0.0) {
296  double So = sof3Table.getSoColumn()[rowIdx - 1];
297  m_criticalOilOGSat[tableIdx] = So;
298  break;
299  }
300  }
301 
302  // find the critical oil saturation of the water-oil system
303  const auto &kroOWCol = sof3Table.getKrowColumn();
304  for (size_t rowIdx = 0; rowIdx < numRows; ++rowIdx) {
305  if (kroOWCol[rowIdx] > 0.0) {
306  double So = sof3Table.getSoColumn()[rowIdx - 1];
307  m_criticalOilOWSat[tableIdx] = So;
308  break;
309  }
310  }
311  }
312  }
313  break;
314 
315  }
316  default:
317  throw std::domain_error("No valid saturation keyword family specified");
318  }
319 
320 
321  }
322 
323  void findVerticalPoints( ) const {
324  auto tables = m_eclipseState.getTableManager();
325  auto tabdims = tables->getTabdims();
326  size_t numSatTables = tabdims->getNumSatTables();
327 
328  m_maxPcog.resize( numSatTables , 0 );
329  m_maxPcow.resize( numSatTables , 0 );
330  m_maxKrg.resize( numSatTables , 0 );
331  m_krgr.resize( numSatTables , 0 );
332  m_maxKro.resize( numSatTables , 0 );
333  m_krorw.resize( numSatTables , 0 );
334  m_krorg.resize( numSatTables , 0 );
335  m_maxKrw.resize( numSatTables , 0 );
336  m_krwr.resize( numSatTables , 0 );
337 
338  switch (getSaturationFunctionFamily()) {
339  case SaturationFunctionFamily::FamilyI:
340  {
341  const TableContainer& swofTables = tables->getSwofTables();
342  const TableContainer& sgofTables = tables->getSgofTables();
343 
344  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
345  const SwofTable& swofTable = swofTables.getTable<SwofTable>(tableIdx);
346  const SgofTable& sgofTable = sgofTables.getTable<SgofTable>(tableIdx);
347  // find the maximum output values of the oil-gas system
348  m_maxPcog[tableIdx] = sgofTable.getPcogColumn().front();
349  m_maxKrg[tableIdx] = sgofTable.getKrgColumn().back();
350 
351  m_krgr[tableIdx] = sgofTable.getKrgColumn().front();
352  m_krwr[tableIdx] = swofTable.getKrwColumn().front();
353 
354  // find the oil relperm which corresponds to the critical water saturation
355  const auto &krwCol = swofTable.getKrwColumn();
356  const auto &krowCol = swofTable.getKrowColumn();
357  for (size_t rowIdx = 0; rowIdx < krwCol.size(); ++rowIdx) {
358  if (krwCol[rowIdx] > 0.0) {
359  m_krorw[tableIdx] = krowCol[rowIdx - 1];
360  break;
361  }
362  }
363 
364  // find the oil relperm which corresponds to the critical gas saturation
365  const auto &krgCol = sgofTable.getKrgColumn();
366  const auto &krogCol = sgofTable.getKrogColumn();
367  for (size_t rowIdx = 0; rowIdx < krgCol.size(); ++rowIdx) {
368  if (krgCol[rowIdx] > 0.0) {
369  m_krorg[tableIdx] = krogCol[rowIdx - 1];
370  break;
371  }
372  }
373 
374  // find the maximum output values of the water-oil system. the maximum oil
375  // relperm is possibly wrong because we have two oil relperms in a threephase
376  // system. the documentation is very ambiguos here, though: it says that the
377  // oil relperm at the maximum oil saturation is scaled according to maximum
378  // specified the KRO keyword. the first part of the statement points at
379  // scaling the resultant threephase oil relperm, but then the gas saturation
380  // is not taken into account which means that some twophase quantity must be
381  // scaled.
382  m_maxPcow[tableIdx] = swofTable.getPcowColumn().front();
383  m_maxKro[tableIdx] = swofTable.getKrowColumn().front();
384  m_maxKrw[tableIdx] = swofTable.getKrwColumn().back();
385  }
386  break;
387  }
388  case SaturationFunctionFamily::FamilyII: {
389  const TableContainer& swfnTables = tables->getSwfnTables();
390  const TableContainer& sgfnTables = tables->getSgfnTables();
391  const TableContainer& sof3Tables = tables->getSof3Tables();
392 
393  for (size_t tableIdx = 0; tableIdx < numSatTables; ++tableIdx) {
394  const Sof3Table& sof3Table = sof3Tables.getTable<Sof3Table>( tableIdx );
395  const SgfnTable& sgfnTable = sgfnTables.getTable<SgfnTable>( tableIdx );
396  const SwfnTable& swfnTable = swfnTables.getTable<SwfnTable>( tableIdx );
397 
398  // find the maximum output values of the oil-gas system
399  m_maxPcog[tableIdx] = sgfnTable.getPcogColumn().back();
400  m_maxKrg[tableIdx] = sgfnTable.getKrgColumn().back();
401 
402  // find the minimum output values of the relperm
403  m_krgr[tableIdx] = sgfnTable.getKrgColumn().front();
404  m_krwr[tableIdx] = swfnTable.getKrwColumn().front();
405 
406  // find the oil relperm which corresponds to the critical water saturation
407  const double OilSatAtcritialWaterSat = 1.0 - m_criticalWaterSat[tableIdx] - m_minGasSat[tableIdx];
408  m_krorw[tableIdx] = sof3Table.evaluate("KROW", OilSatAtcritialWaterSat);
409 
410  // find the oil relperm which corresponds to the critical gas saturation
411  const double OilSatAtCritialGasSat = 1.0 - m_criticalGasSat[tableIdx] - m_minWaterSat[tableIdx];
412  m_krorg[tableIdx] = sof3Table.evaluate("KROG", OilSatAtCritialGasSat);
413 
414  // find the maximum output values of the water-oil system. the maximum oil
415  // relperm is possibly wrong because we have two oil relperms in a threephase
416  // system. the documentation is very ambiguos here, though: it says that the
417  // oil relperm at the maximum oil saturation is scaled according to maximum
418  // specified the KRO keyword. the first part of the statement points at
419  // scaling the resultant threephase oil relperm, but then the gas saturation
420  // is not taken into account which means that some twophase quantity must be
421  // scaled.
422  m_maxPcow[tableIdx] = swfnTable.getPcowColumn().front();
423  m_maxKro[tableIdx] = sof3Table.getKrowColumn().back();
424  m_maxKrw[tableIdx] = swfnTable.getKrwColumn().back();
425  }
426  break;
427  }
428 
429  default:
430  throw std::domain_error("No valid saturation keyword family specified");
431  }
432 
433  }
434  // The saturation function family.
435  // If SWOF and SGOF are specified in the deck it return FamilyI
436  // If SWFN, SGFN and SOF3 are specified in the deck it return FamilyII
437  // If keywords are missing or mixed, an error is given.
439  auto tables = m_eclipseState.getTableManager( );
440  const TableContainer& swofTables = tables->getSwofTables();
441  const TableContainer& sgofTables = tables->getSgofTables();
442  const TableContainer& slgofTables = tables->getSlgofTables();
443  const TableContainer& sof3Tables = tables->getSof3Tables();
444  const TableContainer& swfnTables = tables->getSwfnTables();
445  const TableContainer& sgfnTables = tables->getSgfnTables();
446 
447 
448  bool family1 = (!sgofTables.empty() || !slgofTables.empty()) && !swofTables.empty();
449  bool family2 = !swfnTables.empty() && !sgfnTables.empty() && !sof3Tables.empty();
450 
451  if (family1 && family2) {
452  throw std::invalid_argument("Saturation families should not be mixed \n"
453  "Use either SGOF (or SLGOF) and SWOF or SGFN, SWFN and SOF3");
454  }
455 
456  if (!family1 && !family2) {
457  throw std::invalid_argument("Saturations function must be specified using either "
458  "family 1 or family 2 keywords \n"
459  "Use either SGOF (or SLGOF) and SWOF or SGFN, SWFN and SOF3" );
460  }
461 
462  if (family1 && !family2)
463  return SaturationFunctionFamily::FamilyI;
464  else if (family2 && !family1)
465  return SaturationFunctionFamily::FamilyII;
466  return SaturationFunctionFamily::noFamily; // no family or two families
467  }
468 
469 
470 
471  double selectValue(const TableContainer& depthTables,
472  int tableIdx,
473  const std::string& columnName,
474  double cellDepth,
475  double fallbackValue,
476  bool useOneMinusTableValue) const {
477  double value = fallbackValue;
478 
479  if (tableIdx >= 0) {
480  const SimpleTable& table = depthTables.getTable( tableIdx );
481  if (tableIdx >= static_cast<int>(depthTables.size()))
482  throw std::invalid_argument("Not enough tables!");
483 
484  // evaluate the table at the cell depth
485  value = table.evaluate(columnName, cellDepth);
486 
487  if (!std::isfinite(value))
488  // a column can be fully defaulted. In this case, eval() returns a NaN
489  // and we have to use the data from saturation tables
490  value = fallbackValue;
491  else if (useOneMinusTableValue)
492  value = 1 - value;
493  }
494 
495  return value;
496  }
497 
498  const Deck& m_deck;
500 
501  mutable std::vector<double> m_criticalGasSat;
502  mutable std::vector<double> m_criticalWaterSat;
503  mutable std::vector<double> m_criticalOilOWSat;
504  mutable std::vector<double> m_criticalOilOGSat;
505 
506  mutable std::vector<double> m_minGasSat;
507  mutable std::vector<double> m_maxGasSat;
508  mutable std::vector<double> m_minWaterSat;
509  mutable std::vector<double> m_maxWaterSat;
510 
511  mutable std::vector<double> m_maxPcow;
512  mutable std::vector<double> m_maxPcog;
513  mutable std::vector<double> m_maxKrw;
514  mutable std::vector<double> m_krwr;
515  mutable std::vector<double> m_maxKro;
516  mutable std::vector<double> m_krorw;
517  mutable std::vector<double> m_krorg;
518  mutable std::vector<double> m_maxKrg;
519  mutable std::vector<double> m_krgr;
520 };
521 
522 
523 template <class EclipseState=Opm::EclipseState,
524  class Deck=Opm::Deck>
526  : public EndpointInitializer<EclipseState,Deck>
527 {
528 public:
529  SatnumEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
530  : EndpointInitializer<EclipseState,Deck>( deck , eclipseState )
531  { }
532 
533  void apply(std::vector<double>& ) const = 0;
534 
535 
536  void satnumApply( std::vector<double>& values,
537  const std::string& columnName,
538  const std::vector<double>& fallbackValues,
539  bool useOneMinusTableValue) const
540  {
541  auto eclipseGrid = this->m_eclipseState.getEclipseGrid();
542  auto tables = this->m_eclipseState.getTableManager();
543  auto tabdims = tables->getTabdims();
544  auto satnum = this->m_eclipseState.getIntGridProperty("SATNUM");
545  auto endnum = this->m_eclipseState.getIntGridProperty("ENDNUM");
546  int numSatTables = tabdims->getNumSatTables();
547 
548 
549  satnum->checkLimits(1 , numSatTables);
550 
551  // All table lookup assumes three-phase model
552  assert( this->m_eclipseState.getNumPhases() == 3 );
553 
554  this->findSaturationEndpoints( );
555  this->findCriticalPoints( );
556  this->findVerticalPoints( );
557 
558  // acctually assign the defaults. if the ENPVD keyword was specified in the deck,
559  // this currently cannot be done because we would need the Z-coordinate of the
560  // cell and we would need to know how the simulator wants to interpolate between
561  // sampling points. Both of these are outside the scope of opm-parser, so we just
562  // assign a NaN in this case...
563  bool useEnptvd = this->m_deck.hasKeyword("ENPTVD");
564  const auto& enptvdTables = tables->getEnptvdTables();
565  for (size_t cellIdx = 0; cellIdx < eclipseGrid->getCartesianSize(); cellIdx++) {
566  int satTableIdx = satnum->iget( cellIdx ) - 1;
567  int endNum = endnum->iget( cellIdx ) - 1;
568  double cellDepth = std::get<2>(eclipseGrid->getCellCenter(cellIdx));
569 
570 
571  values[cellIdx] = this->selectValue(enptvdTables,
572  (useEnptvd && endNum >= 0) ? endNum : -1,
573  columnName ,
574  cellDepth,
575  fallbackValues[satTableIdx],
576  useOneMinusTableValue);
577  }
578  }
579 };
580 
581 
582 
583 template <class EclipseState=Opm::EclipseState,
584  class Deck=Opm::Deck>
586  : public EndpointInitializer<EclipseState,Deck>
587 {
588 public:
589  ImbnumEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
590  : EndpointInitializer<EclipseState,Deck>( deck , eclipseState )
591  { }
592 
593  void apply(std::vector<double>& ) const = 0;
594 
595  void imbnumApply( std::vector<double>& values,
596  const std::string& columnName,
597  const std::vector<double>& fallBackValues ,
598  bool useOneMinusTableValue) const
599  {
600  auto eclipseGrid = this->m_eclipseState.getEclipseGrid();
601  auto tables = this->m_eclipseState.getTableManager();
602  auto imbnum = this->m_eclipseState.getIntGridProperty("IMBNUM");
603  auto endnum = this->m_eclipseState.getIntGridProperty("ENDNUM");
604 
605  auto tabdims = tables->getTabdims();
606  int numSatTables = tabdims->getNumSatTables();
607 
608  imbnum->checkLimits(1 , numSatTables);
609  this->findSaturationEndpoints( );
610  this->findCriticalPoints( );
611  this->findVerticalPoints( );
612 
613  // acctually assign the defaults. if the ENPVD keyword was specified in the deck,
614  // this currently cannot be done because we would need the Z-coordinate of the
615  // cell and we would need to know how the simulator wants to interpolate between
616  // sampling points. Both of these are outside the scope of opm-parser, so we just
617  // assign a NaN in this case...
618  bool useImptvd = this->m_deck.hasKeyword("IMPTVD");
619  const TableContainer& imptvdTables = tables->getImptvdTables();
620  for (size_t cellIdx = 0; cellIdx < eclipseGrid->getCartesianSize(); cellIdx++) {
621  int imbTableIdx = imbnum->iget( cellIdx ) - 1;
622  int endNum = endnum->iget( cellIdx ) - 1;
623  double cellDepth = std::get<2>(eclipseGrid->getCellCenter(cellIdx));
624 
625  values[cellIdx] = this->selectValue(imptvdTables,
626  (useImptvd && endNum >= 0) ? endNum : -1,
627  columnName,
628  cellDepth,
629  fallBackValues[imbTableIdx],
630  useOneMinusTableValue);
631  }
632  }
633 };
634 
635 
636 /*****************************************************************/
637 
638 template <class EclipseState=Opm::EclipseState,
639  class Deck=Opm::Deck>
641  : public SatnumEndpointInitializer<EclipseState,Deck>
642 {
643 public:
644  SGLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
645  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
646  { }
647 
648  void apply(std::vector<double>& values) const
649  {
650  this->satnumApply(values , "SGCO" , this->m_minGasSat , false);
651  }
652 };
653 
654 
655 template <class EclipseState=Opm::EclipseState,
656  class Deck=Opm::Deck>
658  : public ImbnumEndpointInitializer<EclipseState,Deck>
659 {
660 public:
661  ISGLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
662  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
663  { }
664 
665  void apply(std::vector<double>& values) const
666  {
667  this->imbnumApply(values , "SGCO" , this->m_minGasSat , false);
668  }
669 };
670 
671 /*****************************************************************/
672 
673 template <class EclipseState=Opm::EclipseState,
674  class Deck=Opm::Deck>
676  : public SatnumEndpointInitializer<EclipseState,Deck>
677 {
678 public:
679  SGUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
680  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
681  { }
682 
683  void apply(std::vector<double>& values) const
684  {
685  this->satnumApply(values , "SGMAX" , this->m_maxGasSat, false);
686  }
687 };
688 
689 
690 template <class EclipseState=Opm::EclipseState,
691  class Deck=Opm::Deck>
693  : public ImbnumEndpointInitializer<EclipseState,Deck>
694 {
695 public:
696  ISGUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
697  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
698  { }
699 
700  void apply(std::vector<double>& values) const
701  {
702  this->imbnumApply(values , "SGMAX" , this->m_maxGasSat , false);
703  }
704 };
705 
706 /*****************************************************************/
707 
708 template <class EclipseState=Opm::EclipseState,
709  class Deck=Opm::Deck>
711  : public SatnumEndpointInitializer<EclipseState,Deck>
712 {
713 public:
714  SWLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
715  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
716  { }
717 
718  void apply(std::vector<double>& values) const
719  {
720  this->satnumApply(values , "SWCO" , this->m_minWaterSat , false);
721  }
722 };
723 
724 
725 
726 template <class EclipseState=Opm::EclipseState,
727  class Deck=Opm::Deck>
729  : public ImbnumEndpointInitializer<EclipseState,Deck>
730 {
731 public:
732  ISWLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
733  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
734  { }
735 
736  void apply(std::vector<double>& values) const
737  {
738  this->imbnumApply(values , "SWCO" , this->m_minWaterSat , false);
739  }
740 };
741 
742 /*****************************************************************/
743 
744 template <class EclipseState=Opm::EclipseState,
745  class Deck=Opm::Deck>
747  : public SatnumEndpointInitializer<EclipseState,Deck>
748 {
749 public:
750  SWUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
751  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
752  { }
753 
754  void apply(std::vector<double>& values) const
755  {
756  this->satnumApply(values , "SWMAX" , this->m_maxWaterSat , true);
757  }
758 };
759 
760 
761 
762 template <class EclipseState=Opm::EclipseState,
763  class Deck=Opm::Deck>
765  : public ImbnumEndpointInitializer<EclipseState,Deck>
766 {
767 public:
768  ISWUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
769  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
770  { }
771 
772  void apply(std::vector<double>& values) const
773  {
774  this->imbnumApply(values , "SWMAX" , this->m_maxWaterSat , true);
775  }
776 };
777 
778 /*****************************************************************/
779 
780 template <class EclipseState=Opm::EclipseState,
781  class Deck=Opm::Deck>
783  : public SatnumEndpointInitializer<EclipseState,Deck>
784 {
785 public:
786  SGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
787  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
788  { }
789 
790  void apply(std::vector<double>& values) const
791  {
792  this->satnumApply(values , "SGCRIT" , this->m_criticalGasSat , false);
793  }
794 };
795 
796 
797 
798 template <class EclipseState=Opm::EclipseState,
799  class Deck=Opm::Deck>
801  : public ImbnumEndpointInitializer<EclipseState,Deck>
802 {
803 public:
804  ISGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
805  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
806  { }
807 
808  void apply(std::vector<double>& values) const
809  {
810  this->imbnumApply(values , "SGCRIT" , this->m_criticalGasSat , false);
811  }
812 };
813 
814 /*****************************************************************/
815 
816 template <class EclipseState=Opm::EclipseState,
817  class Deck=Opm::Deck>
819  : public SatnumEndpointInitializer<EclipseState,Deck>
820 {
821 public:
822  SOWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
823  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
824  { }
825 
826  void apply(std::vector<double>& values) const
827  {
828  this->satnumApply(values , "SOWCRIT", this->m_criticalOilOWSat , false);
829  }
830 };
831 
832 
833 
834 template <class EclipseState=Opm::EclipseState,
835  class Deck=Opm::Deck>
837  : public ImbnumEndpointInitializer<EclipseState,Deck>
838 {
839 public:
840  ISOWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
841  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
842  { }
843 
844  void apply(std::vector<double>& values) const
845  {
846  this->imbnumApply(values , "SOWCRIT" , this->m_criticalOilOWSat , false);
847  }
848 };
849 
850 /*****************************************************************/
851 
852 template <class EclipseState=Opm::EclipseState,
853  class Deck=Opm::Deck>
855  : public SatnumEndpointInitializer<EclipseState,Deck>
856 {
857 public:
858  SOGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
859  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
860  { }
861 
862  void apply(std::vector<double>& values) const
863  {
864  this->satnumApply(values , "SOGCRIT" , this->m_criticalOilOGSat , false);
865  }
866 };
867 
868 
869 
870 template <class EclipseState=Opm::EclipseState,
871  class Deck=Opm::Deck>
873  : public ImbnumEndpointInitializer<EclipseState,Deck>
874 {
875 public:
876  ISOGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
877  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
878  { }
879 
880  void apply(std::vector<double>& values) const
881  {
882  this->imbnumApply(values , "SOGCRIT" , this->m_criticalOilOGSat , false);
883  }
884 };
885 
886 /*****************************************************************/
887 
888 template <class EclipseState=Opm::EclipseState,
889  class Deck=Opm::Deck>
891  : public SatnumEndpointInitializer<EclipseState,Deck>
892 {
893 public:
894  SWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
895  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
896  { }
897 
898  void apply(std::vector<double>& values) const
899  {
900  this->satnumApply(values , "SWCRIT" , this->m_criticalWaterSat , false);
901  }
902 };
903 
904 
905 
906 template <class EclipseState=Opm::EclipseState,
907  class Deck=Opm::Deck>
909  : public ImbnumEndpointInitializer<EclipseState,Deck>
910 {
911 public:
912  ISWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
913  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
914  { }
915 
916  void apply(std::vector<double>& values) const
917  {
918  this->imbnumApply(values , "SWCRIT" , this->m_criticalWaterSat , false);
919  }
920 };
921 
922 /*****************************************************************/
923 
924 template <class EclipseState=Opm::EclipseState,
925  class Deck=Opm::Deck>
927  : public SatnumEndpointInitializer<EclipseState,Deck>
928 {
929 public:
930  PCWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
931  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
932  { }
933 
934  void apply(std::vector<double>& values) const
935  {
936  this->satnumApply(values , "PCW" , this->m_maxPcow , false);
937  }
938 };
939 
940 
941 
942 template <class EclipseState=Opm::EclipseState,
943  class Deck=Opm::Deck>
945  : public ImbnumEndpointInitializer<EclipseState,Deck>
946 {
947 public:
948  IPCWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
949  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
950  { }
951 
952  void apply(std::vector<double>& values) const
953  {
954  this->imbnumApply(values , "IPCW" , this->m_maxPcow , false);
955  }
956 };
957 
958 
959 /*****************************************************************/
960 
961 template <class EclipseState=Opm::EclipseState,
962  class Deck=Opm::Deck>
964  : public SatnumEndpointInitializer<EclipseState,Deck>
965 {
966 public:
967  PCGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
968  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
969  { }
970 
971  void apply(std::vector<double>& values) const
972  {
973  this->satnumApply(values , "PCG" , this->m_maxPcog , false);
974  }
975 };
976 
977 
978 
979 template <class EclipseState=Opm::EclipseState,
980  class Deck=Opm::Deck>
982  : public ImbnumEndpointInitializer<EclipseState,Deck>
983 {
984 public:
985  IPCGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
986  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
987  { }
988 
989  void apply(std::vector<double>& values) const
990  {
991  this->imbnumApply(values , "IPCG" , this->m_maxPcog , false);
992  }
993 };
994 
995 /*****************************************************************/
996 
997 template <class EclipseState=Opm::EclipseState,
998  class Deck=Opm::Deck>
1000  : public SatnumEndpointInitializer<EclipseState,Deck>
1001 {
1002 public:
1003  KRWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1004  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1005  { }
1006 
1007  void apply(std::vector<double>& values) const
1008  {
1009  this->satnumApply(values , "KRW" , this->m_maxKrw , false);
1010  }
1011 };
1012 
1013 
1014 
1015 template <class EclipseState=Opm::EclipseState,
1016  class Deck=Opm::Deck>
1018  : public ImbnumEndpointInitializer<EclipseState,Deck>
1019 {
1020 public:
1021  IKRWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1022  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1023  { }
1024 
1025  void apply(std::vector<double>& values) const
1026  {
1027  this->imbnumApply(values , "IKRW" , this->m_maxKrw , false);
1028  }
1029 };
1030 
1031 
1032 /*****************************************************************/
1033 
1034 template <class EclipseState=Opm::EclipseState,
1035  class Deck=Opm::Deck>
1037  : public SatnumEndpointInitializer<EclipseState,Deck>
1038 {
1039 public:
1040  KRWREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1041  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1042  { }
1043 
1044  void apply(std::vector<double>& values) const
1045  {
1046  this->satnumApply(values , "KRWR" , this->m_krwr , false);
1047  }
1048 };
1049 
1050 
1051 
1052 template <class EclipseState=Opm::EclipseState,
1053  class Deck=Opm::Deck>
1055  : public ImbnumEndpointInitializer<EclipseState,Deck>
1056 {
1057 public:
1058  IKRWREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1059  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1060  { }
1061 
1062  void apply(std::vector<double>& values) const
1063  {
1064  this->imbnumApply(values , "IKRWR" , this->m_krwr , false);
1065  }
1066 };
1067 
1068 /*****************************************************************/
1069 
1070 template <class EclipseState=Opm::EclipseState,
1071  class Deck=Opm::Deck>
1073  : public SatnumEndpointInitializer<EclipseState,Deck>
1074 {
1075 public:
1076  KROEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1077  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1078  { }
1079 
1080  void apply(std::vector<double>& values) const
1081  {
1082  this->satnumApply(values , "KRO" , this->m_maxKro , false);
1083  }
1084 };
1085 
1086 
1087 
1088 template <class EclipseState=Opm::EclipseState,
1089  class Deck=Opm::Deck>
1091  : public ImbnumEndpointInitializer<EclipseState,Deck>
1092 {
1093 public:
1094  IKROEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1095  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1096  { }
1097 
1098  void apply(std::vector<double>& values) const
1099  {
1100  this->imbnumApply(values , "IKRO" , this->m_maxKro , false);
1101  }
1102 };
1103 
1104 
1105 /*****************************************************************/
1106 
1107 template <class EclipseState=Opm::EclipseState,
1108  class Deck=Opm::Deck>
1110  : public SatnumEndpointInitializer<EclipseState,Deck>
1111 {
1112 public:
1113  KRORWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1114  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1115  { }
1116 
1117  void apply(std::vector<double>& values) const
1118  {
1119  this->satnumApply(values , "KRORW" , this->m_krorw , false);
1120  }
1121 };
1122 
1123 
1124 
1125 template <class EclipseState=Opm::EclipseState,
1126  class Deck=Opm::Deck>
1128  : public ImbnumEndpointInitializer<EclipseState,Deck>
1129 {
1130 public:
1131  IKRORWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1132  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1133  { }
1134 
1135  void apply(std::vector<double>& values) const
1136  {
1137  this->imbnumApply(values , "IKRORW" , this->m_krorw , false);
1138  }
1139 };
1140 
1141 /*****************************************************************/
1142 
1143 template <class EclipseState=Opm::EclipseState,
1144  class Deck=Opm::Deck>
1146  : public SatnumEndpointInitializer<EclipseState,Deck>
1147 {
1148 public:
1149  KRORGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1150  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1151  { }
1152 
1153  void apply(std::vector<double>& values) const
1154  {
1155  this->satnumApply(values , "KRORG" , this->m_krorg , false);
1156  }
1157 };
1158 
1159 
1160 
1161 template <class EclipseState=Opm::EclipseState,
1162  class Deck=Opm::Deck>
1164  : public ImbnumEndpointInitializer<EclipseState,Deck>
1165 {
1166 public:
1167  IKRORGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1168  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1169  { }
1170 
1171  void apply(std::vector<double>& values) const
1172  {
1173  this->imbnumApply(values , "IKRORG" , this->m_krorg , false);
1174  }
1175 };
1176 
1177 /*****************************************************************/
1178 
1179 template <class EclipseState=Opm::EclipseState,
1180  class Deck=Opm::Deck>
1182  : public SatnumEndpointInitializer<EclipseState,Deck>
1183 {
1184 public:
1185  KRGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1186  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1187  { }
1188 
1189  void apply(std::vector<double>& values) const
1190  {
1191  this->satnumApply(values , "KRG" , this->m_maxKrg , false);
1192  }
1193 };
1194 
1195 
1196 
1197 template <class EclipseState=Opm::EclipseState,
1198  class Deck=Opm::Deck>
1200  : public ImbnumEndpointInitializer<EclipseState,Deck>
1201 {
1202 public:
1203  IKRGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1204  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1205  { }
1206 
1207  void apply(std::vector<double>& values) const
1208  {
1209  this->imbnumApply(values , "IKRG" , this->m_maxKrg , false);
1210  }
1211 };
1212 
1213 /*****************************************************************/
1214 
1215 template <class EclipseState=Opm::EclipseState,
1216  class Deck=Opm::Deck>
1218  : public SatnumEndpointInitializer<EclipseState,Deck>
1219 {
1220 public:
1221  KRGREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1222  : SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1223  { }
1224 
1225  void apply(std::vector<double>& values) const
1226  {
1227  this->satnumApply(values , "KRGR" , this->m_krgr , false);
1228  }
1229 };
1230 
1231 
1232 
1233 template <class EclipseState=Opm::EclipseState,
1234  class Deck=Opm::Deck>
1236  : public ImbnumEndpointInitializer<EclipseState,Deck>
1237 {
1238 public:
1239  IKRGREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
1240  : ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
1241  { }
1242 
1243  void apply(std::vector<double>& values) const
1244  {
1245  this->imbnumApply(values , "IKRGR" , this->m_krgr , false);
1246  }
1247 };
1248 
1249 }
1250 
1251 #endif
const std::vector< double > & getKrgColumn() const
Definition: SgofTable.hpp:64
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:754
std::vector< double > m_maxWaterSat
Definition: SatfuncPropertyInitializers.hpp:509
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1117
Definition: SatfuncPropertyInitializers.hpp:1109
std::vector< double > m_criticalGasSat
Definition: SatfuncPropertyInitializers.hpp:501
Definition: SatfuncPropertyInitializers.hpp:710
std::vector< double > m_minWaterSat
Definition: SatfuncPropertyInitializers.hpp:508
IKRGREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1239
std::vector< double > m_krorg
Definition: SatfuncPropertyInitializers.hpp:517
const std::vector< double > & getKrogColumn() const
Definition: SlgofTable.hpp:74
EndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:55
SGLEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:644
Definition: TableContainer.hpp:31
Definition: SatfuncPropertyInitializers.hpp:1145
std::vector< double > m_criticalOilOWSat
Definition: SatfuncPropertyInitializers.hpp:503
Definition: SatfuncPropertyInitializers.hpp:1217
Definition: SatfuncPropertyInitializers.hpp:908
KRORWEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1113
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1225
bool hasKeyword(DeckKeywordConstPtr keyword) const
PCWEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:930
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:934
Definition: Deck.hpp:29
Definition: SatfuncPropertyInitializers.hpp:854
Definition: SatfuncPropertyInitializers.hpp:585
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:718
Definition: SatfuncPropertyInitializers.hpp:1054
std::vector< double > m_maxPcow
Definition: SatfuncPropertyInitializers.hpp:511
void findSaturationEndpoints() const
Definition: SatfuncPropertyInitializers.hpp:83
EclipseGridConstPtr getEclipseGrid() const
const std::vector< double > & getSgColumn() const
Definition: SgofTable.hpp:61
SGCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:786
const std::vector< double > & getSgColumn() const
Definition: SgfnTable.hpp:63
IKROEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1094
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1007
SOGCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:858
KRORGEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1149
KROEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1076
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:898
std::vector< double > m_maxKro
Definition: SatfuncPropertyInitializers.hpp:515
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1153
ISGLEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:661
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1080
const std::vector< double > & getKrwColumn() const
Definition: SwfnTable.hpp:67
void findVerticalPoints() const
Definition: SatfuncPropertyInitializers.hpp:323
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:989
ISGUEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:696
const std::vector< double > & getKrwColumn() const
Definition: SwofTable.hpp:65
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1189
Definition: Deck.hpp:31
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1025
const std::vector< double > & getKrogColumn() const
Definition: SgofTable.hpp:67
const std::vector< double > & getKrgColumn() const
Definition: SgfnTable.hpp:66
IPCGEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:985
Definition: SatfuncPropertyInitializers.hpp:890
std::vector< double > m_minGasSat
Definition: SatfuncPropertyInitializers.hpp:506
size_t getNumPhases() const
Definition: SatfuncPropertyInitializers.hpp:926
const std::vector< double > & getKrowColumn() const
Definition: SwofTable.hpp:68
Definition: SatfuncPropertyInitializers.hpp:944
Definition: SatfuncPropertyInitializers.hpp:746
Definition: SatfuncPropertyInitializers.hpp:51
Definition: SatfuncPropertyInitializers.hpp:981
KRWEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1003
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1044
ISOGCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:876
SGUEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:679
std::vector< double > m_krwr
Definition: SatfuncPropertyInitializers.hpp:514
SaturationFunctionFamily
Definition: SatfuncPropertyInitializers.hpp:60
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:862
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1062
const std::vector< double > & getKrowColumn() const
Definition: Sof3Table.hpp:66
std::vector< double > m_maxGasSat
Definition: SatfuncPropertyInitializers.hpp:507
KRGEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1185
Definition: EclipseState.hpp:50
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:844
Definition: SatfuncPropertyInitializers.hpp:60
std::vector< double > m_criticalOilOGSat
Definition: SatfuncPropertyInitializers.hpp:504
Definition: SatfuncPropertyInitializers.hpp:60
const std::vector< double > & getSoColumn() const
Definition: Sof3Table.hpp:63
Definition: SatfuncPropertyInitializers.hpp:963
Definition: SatfuncPropertyInitializers.hpp:640
void satnumApply(std::vector< double > &values, const std::string &columnName, const std::vector< double > &fallbackValues, bool useOneMinusTableValue) const
Definition: SatfuncPropertyInitializers.hpp:536
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:952
const std::vector< double > & getKrgColumn() const
Definition: SlgofTable.hpp:71
Definition: SatfuncPropertyInitializers.hpp:1235
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:971
std::shared_ptr< const TableManager > getTableManager() const
Definition: SatfuncPropertyInitializers.hpp:692
Definition: SatfuncPropertyInitializers.hpp:657
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:916
Definition: SatfuncPropertyInitializers.hpp:1036
IKRWREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1058
Definition: SatfuncPropertyInitializers.hpp:800
IPCWEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:948
Definition: Sof3Table.hpp:28
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:808
const std::vector< double > & getSwColumn() const
Definition: SwfnTable.hpp:64
KRWREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1040
size_t numRows() const
Definition: SatfuncPropertyInitializers.hpp:60
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:648
Definition: SatfuncPropertyInitializers.hpp:872
ISWCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:912
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:790
Definition: GridPropertyInitializers.hpp:52
double evaluate(const std::string &columnName, double xPos) const
Evaluate a column of the table at a given position.
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:736
std::vector< double > m_maxPcog
Definition: SatfuncPropertyInitializers.hpp:512
Definition: SatfuncPropertyInitializers.hpp:1127
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:683
Definition: SatfuncPropertyInitializers.hpp:525
const SimpleTable & getTable(size_t tableNumber) const
ISWUEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:768
IKRWEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1021
Definition: SatfuncPropertyInitializers.hpp:1072
Definition: SatfuncPropertyInitializers.hpp:1163
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:880
Definition: SatfuncPropertyInitializers.hpp:818
const EclipseState & m_eclipseState
Definition: SatfuncPropertyInitializers.hpp:499
Definition: SatfuncPropertyInitializers.hpp:999
std::vector< double > m_criticalWaterSat
Definition: SatfuncPropertyInitializers.hpp:502
const Deck & m_deck
Definition: SatfuncPropertyInitializers.hpp:498
ISWLEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:732
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:826
std::vector< double > m_maxKrw
Definition: SatfuncPropertyInitializers.hpp:513
std::vector< double > m_krgr
Definition: SatfuncPropertyInitializers.hpp:519
Definition: SatfuncPropertyInitializers.hpp:836
SOWCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:822
SWUEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:750
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1207
SWCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:894
const std::vector< double > & getPcowColumn() const
Definition: SwofTable.hpp:73
double selectValue(const TableContainer &depthTables, int tableIdx, const std::string &columnName, double cellDepth, double fallbackValue, bool useOneMinusTableValue) const
Definition: SatfuncPropertyInitializers.hpp:471
void apply(std::vector< double > &) const =0
size_t size() const
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1135
std::vector< double > m_maxKrg
Definition: SatfuncPropertyInitializers.hpp:518
Definition: SimpleTable.hpp:32
ISOWCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:840
std::vector< double > m_krorw
Definition: SatfuncPropertyInitializers.hpp:516
Definition: SwofTable.hpp:28
Definition: SgofTable.hpp:28
KRGREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1221
const std::vector< double > & getSlColumn() const
Definition: SlgofTable.hpp:68
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:772
Definition: SatfuncPropertyInitializers.hpp:1181
void apply(std::vector< double > &) const =0
Definition: SatfuncPropertyInitializers.hpp:675
Definition: SlgofTable.hpp:28
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:700
ISGCREndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:804
SatnumEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:529
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1243
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1098
PCGEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:967
bool empty() const
IKRORWEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1131
Definition: SatfuncPropertyInitializers.hpp:782
SWLEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:714
IKRGEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1203
std::shared_ptr< GridProperty< int > > getIntGridProperty(const std::string &keyword) const
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:1171
Definition: SwfnTable.hpp:28
Definition: SgfnTable.hpp:28
void findCriticalPoints() const
Definition: SatfuncPropertyInitializers.hpp:147
SaturationFunctionFamily getSaturationFunctionFamily() const
Definition: SatfuncPropertyInitializers.hpp:438
void apply(std::vector< double > &values) const
Definition: SatfuncPropertyInitializers.hpp:665
Definition: SatfuncPropertyInitializers.hpp:1017
IKRORGEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:1167
Definition: SatfuncPropertyInitializers.hpp:1090
ImbnumEndpointInitializer(const Deck &deck, const EclipseState &eclipseState)
Definition: SatfuncPropertyInitializers.hpp:589
Definition: SatfuncPropertyInitializers.hpp:1199
Definition: SatfuncPropertyInitializers.hpp:764
const std::vector< double > & getSwColumn() const
Definition: SwofTable.hpp:62
Definition: SatfuncPropertyInitializers.hpp:728
void imbnumApply(std::vector< double > &values, const std::string &columnName, const std::vector< double > &fallBackValues, bool useOneMinusTableValue) const
Definition: SatfuncPropertyInitializers.hpp:595
const std::vector< double > & getKrogColumn() const
Definition: Sof3Table.hpp:69