My Project
RelpermDiagnostics.hpp
1 /*
2  Copyright 2015 Statoil ASA.
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 
20 #ifndef OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
21 #define OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
22 
23 #include <vector>
24 #include <utility>
25 
26 #if HAVE_CONFIG_H
27 #include "config.h"
28 #endif // HAVE_CONFIG_H
29 
30 #include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
31 
32 namespace Opm {
33 
34  class EclipseState;
35  class MiscTable;
36  class MsfnTable;
37  class SgcwimTable;
38  class Sof2Table;
39  class SorwmisTable;
40  class SsfnTable;
41  class SgwfnTable;
42 
46  {
47  public:
53  template <class CartesianIndexMapper>
54  void diagnosis(const EclipseState& eclState,
55  const CartesianIndexMapper& cartesianIndexMapper);
56 
57  private:
58  enum FluidSystem {
59  OilWater,
60  OilGas,
61  WaterGas,
62  BlackOil,
63  Solvent
64  };
65 
66  FluidSystem fluidSystem_;
67 
68  enum SaturationFunctionFamily {
69  FamilyI,
70  FamilyII,
71  NoFamily
72  };
73 
74  SaturationFunctionFamily satFamily_;
75 
76  std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_;
77  std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_;
78 
79 
82  bool phaseCheck_(const EclipseState& es);
83 
85  void satFamilyCheck_(const EclipseState& eclState);
86 
88  void tableCheck_(const EclipseState& eclState);
89 
91  void unscaledEndPointsCheck_(const EclipseState& eclState);
92 
93  template <class CartesianIndexMapper>
94  void scaledEndPointsCheck_(const EclipseState& eclState,
95  const CartesianIndexMapper& cartesianIndexMapper);
96 
98  void swofTableCheck_(const SwofTable& swofTables,
99  const int satnumIdx);
100  void sgofTableCheck_(const SgofTable& sgofTables,
101  const int satnumIdx);
102  void slgofTableCheck_(const SlgofTable& slgofTables,
103  const int satnumIdx);
104  void swfnTableCheck_(const SwfnTable& swfnTables,
105  const int satnumIdx);
106  void sgfnTableCheck_(const SgfnTable& sgfnTables,
107  const int satnumIdx);
108  void sof3TableCheck_(const Sof3Table& sof3Tables,
109  const int satnumIdx);
110  void sof2TableCheck_(const Sof2Table& sof2Tables,
111  const int satnumIdx);
112  void sgwfnTableCheck_(const SgwfnTable& sgwfnTables,
113  const int satnumIdx);
115  void sgcwmisTableCheck_(const SgcwmisTable& sgcwmisTables,
116  const int satnumIdx);
117  void sorwmisTableCheck_(const SorwmisTable& sorwmisTables,
118  const int satnumIdx);
119  void ssfnTableCheck_(const SsfnTable& ssfnTables,
120  const int satnumIdx);
121  void miscTableCheck_(const MiscTable& miscTables,
122  const int miscnumIdx);
123  void msfnTableCheck_(const MsfnTable& msfnTables,
124  const int satnumIdx);
125  };
126 
127 } //namespace Opm
128 
129 #endif // OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
This class is intend to be a relperm diagnostics, to detect wrong input of relperm table and endpoint...
Definition: RelpermDiagnostics.hpp:46
void diagnosis(const EclipseState &eclState, const CartesianIndexMapper &cartesianIndexMapper)
This function is used to diagnosis relperm in eclipse data file.
Definition: RelpermDiagnostics.cpp:733
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27