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#include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
27
28namespace Opm {
29
30 class EclipseState;
31 class MiscTable;
32 class MsfnTable;
33 class SgcwimTable;
34 class Sof2Table;
35 class SorwmisTable;
36 class SsfnTable;
37 class SgwfnTable;
38
42 {
43 public:
49 template <class CartesianIndexMapper>
50 void diagnosis(const EclipseState& eclState,
51 const CartesianIndexMapper& cartesianIndexMapper);
52
53 private:
54 enum FluidSystem {
55 OilWater,
56 OilGas,
57 WaterGas,
58 BlackOil,
59 Solvent
60 };
61
62 FluidSystem fluidSystem_;
63
64 enum SaturationFunctionFamily {
65 FamilyI,
66 FamilyII,
67 NoFamily
68 };
69
70 SaturationFunctionFamily satFamily_;
71
72 std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_;
73 std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_;
74
75
78 bool phaseCheck_(const EclipseState& es);
79
81 void satFamilyCheck_(const EclipseState& eclState);
82
84 void tableCheck_(const EclipseState& eclState);
85
87 void unscaledEndPointsCheck_(const EclipseState& eclState);
88
89 template <class CartesianIndexMapper>
90 void scaledEndPointsCheck_(const EclipseState& eclState,
91 const CartesianIndexMapper& cartesianIndexMapper);
92
94 void swofTableCheck_(const SwofTable& swofTables,
95 const int satnumIdx);
96 void sgofTableCheck_(const SgofTable& sgofTables,
97 const int satnumIdx);
98 void slgofTableCheck_(const SlgofTable& slgofTables,
99 const int satnumIdx);
100 void swfnTableCheck_(const SwfnTable& swfnTables,
101 const int satnumIdx);
102 void sgfnTableCheck_(const SgfnTable& sgfnTables,
103 const int satnumIdx);
104 void sof3TableCheck_(const Sof3Table& sof3Tables,
105 const int satnumIdx);
106 void sof2TableCheck_(const Sof2Table& sof2Tables,
107 const int satnumIdx);
108 void sgwfnTableCheck_(const SgwfnTable& sgwfnTables,
109 const int satnumIdx);
111 void sgcwmisTableCheck_(const SgcwmisTable& sgcwmisTables,
112 const int satnumIdx);
113 void sorwmisTableCheck_(const SorwmisTable& sorwmisTables,
114 const int satnumIdx);
115 void ssfnTableCheck_(const SsfnTable& ssfnTables,
116 const int satnumIdx);
117 void miscTableCheck_(const MiscTable& miscTables,
118 const int miscnumIdx);
119 void msfnTableCheck_(const MsfnTable& msfnTables,
120 const int satnumIdx);
121 };
122
123} //namespace Opm
124
125#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:42
void diagnosis(const EclipseState &eclState, const CartesianIndexMapper &cartesianIndexMapper)
This function is used to diagnosis relperm in eclipse data file.
Definition: RelpermDiagnostics.cpp:750
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27