opm-simulators
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 <array>
24 #include <vector>
25 
26 #include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
27 
28 namespace Opm {
29 
30  class EclipseState;
31  template <typename Grid> class LevelCartesianIndexMapper;
32  class MiscTable;
33  class MsfnTable;
34  class SgcwmisTable;
35  class SgfnTable;
36  class SgofTable;
37  class SgwfnTable;
38  class SlgofTable;
39  class Sof2Table;
40  class Sof3Table;
41  class SorwmisTable;
42  class SsfnTable;
43  class SwfnTable;
44  class SwofTable;
45  class GsfTable;
46  class WsfTable;
47 
51  {
52  public:
58  template <class LevelCartesianIndexMapper>
59  void diagnosis(const EclipseState& eclState,
60  const LevelCartesianIndexMapper& levelCartesianIndexMapper);
61 
62  private:
63  enum FluidSystem {
64  OilWater,
65  OilGas,
66  WaterGas,
67  BlackOil,
68  Solvent
69  };
70 
71  FluidSystem fluidSystem_;
72 
73  enum SaturationFunctionFamily {
74  FamilyI,
75  FamilyII,
76  FamilyIII,
77  NoFamily
78  };
79 
80  SaturationFunctionFamily satFamily_{NoFamily};
81 
82  std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_{};
83  std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_{};
84 
85 
88  bool phaseCheck_(const EclipseState& es);
89 
91  void satFamilyCheck_(const EclipseState& eclState);
92 
94  void tableCheck_(const EclipseState& eclState);
95 
97  void unscaledEndPointsCheck_(const EclipseState& eclState);
98 
99  template <class LevelCartesianIndexMapper>
100  void scaledEndPointsCheck_(const EclipseState& eclState,
101  const LevelCartesianIndexMapper& levelCartesianIndexMapper);
102 
104  template<class TableType>
105  void checkTable_(const TableType& tables,
106  const std::size_t satnumIdx);
107 
108  void analyzeFamily(const EclipseState& eclState,
109  const std::array<bool,3>& family);
110 
111  void blackoilChecks(const EclipseState& eclState,
112  const std::size_t satnumIdx);
113  };
114 
115 } //namespace Opm
116 
117 #endif // OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
void diagnosis(const EclipseState &eclState, const LevelCartesianIndexMapper &levelCartesianIndexMapper)
This function is used to diagnosis relperm in eclipse data file.
Definition: RelpermDiagnostics.cpp:907
Definition: EclGenericWriter.hpp:52
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
This class is intend to be a relperm diagnostics, to detect wrong input of relperm table and endpoint...
Definition: RelpermDiagnostics.hpp:50