2015-11-19 09:21:00 +08:00
|
|
|
/*
|
|
|
|
|
Copyright 2015 Statoil ASA.
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
|
|
|
|
|
#define OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
|
|
#include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
|
|
|
|
|
|
|
|
|
|
namespace Opm {
|
|
|
|
|
|
2021-04-30 09:48:15 +02:00
|
|
|
class EclipseState;
|
|
|
|
|
class MiscTable;
|
|
|
|
|
class MsfnTable;
|
2022-12-09 14:17:55 +01:00
|
|
|
class SgcwmisTable;
|
|
|
|
|
class SgfnTable;
|
|
|
|
|
class SgofTable;
|
|
|
|
|
class SgwfnTable;
|
|
|
|
|
class SlgofTable;
|
2016-01-20 14:12:04 +01:00
|
|
|
class Sof2Table;
|
2022-12-09 14:17:55 +01:00
|
|
|
class Sof3Table;
|
2021-04-30 09:48:15 +02:00
|
|
|
class SorwmisTable;
|
|
|
|
|
class SsfnTable;
|
2022-12-09 14:17:55 +01:00
|
|
|
class SwfnTable;
|
|
|
|
|
class SwofTable;
|
2016-01-20 14:12:04 +01:00
|
|
|
|
2021-04-30 09:48:15 +02:00
|
|
|
///This class is intend to be a relperm diagnostics, to detect
|
2015-11-19 09:21:00 +08:00
|
|
|
///wrong input of relperm table and endpoints.
|
2019-10-04 13:22:20 +02:00
|
|
|
class RelpermDiagnostics
|
2015-11-19 09:21:00 +08:00
|
|
|
{
|
|
|
|
|
public:
|
2015-11-30 10:52:34 +08:00
|
|
|
///This function is used to diagnosis relperm in
|
2019-10-04 13:22:20 +02:00
|
|
|
///eclipse data file. Errors and warings will be
|
2015-11-30 10:52:34 +08:00
|
|
|
///output if they're found.
|
|
|
|
|
///\param[in] eclState eclipse state.
|
|
|
|
|
///\param[in] grid unstructured grid.
|
2021-01-26 14:59:22 +01:00
|
|
|
template <class CartesianIndexMapper>
|
2016-10-13 16:03:35 +02:00
|
|
|
void diagnosis(const EclipseState& eclState,
|
2021-01-26 14:59:22 +01:00
|
|
|
const CartesianIndexMapper& cartesianIndexMapper);
|
2015-11-19 16:24:09 +08:00
|
|
|
|
|
|
|
|
private:
|
2015-11-30 10:20:43 +08:00
|
|
|
enum FluidSystem {
|
|
|
|
|
OilWater,
|
|
|
|
|
OilGas,
|
|
|
|
|
WaterGas,
|
2016-03-10 11:17:18 +08:00
|
|
|
BlackOil,
|
|
|
|
|
Solvent
|
2015-11-30 10:20:43 +08:00
|
|
|
};
|
2019-10-04 13:22:20 +02:00
|
|
|
|
2015-11-30 10:20:43 +08:00
|
|
|
FluidSystem fluidSystem_;
|
|
|
|
|
|
|
|
|
|
enum SaturationFunctionFamily {
|
|
|
|
|
FamilyI,
|
|
|
|
|
FamilyII,
|
|
|
|
|
NoFamily
|
|
|
|
|
};
|
2019-10-04 13:22:20 +02:00
|
|
|
|
2015-11-19 16:24:09 +08:00
|
|
|
SaturationFunctionFamily satFamily_;
|
2015-11-20 10:57:13 +08:00
|
|
|
|
2021-05-05 11:22:44 +02:00
|
|
|
std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_;
|
|
|
|
|
std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_;
|
2015-11-19 16:24:09 +08:00
|
|
|
|
2015-12-02 10:58:06 +08:00
|
|
|
|
2015-11-19 09:21:00 +08:00
|
|
|
///Check the phase that used.
|
2021-01-26 15:20:47 +01:00
|
|
|
/// return false if one-phase system
|
|
|
|
|
bool phaseCheck_(const EclipseState& es);
|
2015-11-19 09:21:00 +08:00
|
|
|
|
|
|
|
|
///Check saturation family I and II.
|
2016-10-13 16:03:35 +02:00
|
|
|
void satFamilyCheck_(const EclipseState& eclState);
|
2019-10-04 13:22:20 +02:00
|
|
|
|
2015-11-19 09:21:00 +08:00
|
|
|
///Check saturation tables.
|
2016-12-20 14:08:58 +01:00
|
|
|
void tableCheck_(const EclipseState& eclState);
|
2015-11-19 09:21:00 +08:00
|
|
|
|
|
|
|
|
///Check endpoints in the saturation tables.
|
2020-03-09 10:29:30 +01:00
|
|
|
void unscaledEndPointsCheck_(const EclipseState& eclState);
|
2015-11-26 15:22:51 +08:00
|
|
|
|
2021-01-26 14:59:22 +01:00
|
|
|
template <class CartesianIndexMapper>
|
2020-03-13 08:53:57 +01:00
|
|
|
void scaledEndPointsCheck_(const EclipseState& eclState,
|
2021-01-26 14:59:22 +01:00
|
|
|
const CartesianIndexMapper& cartesianIndexMapper);
|
2015-11-20 10:57:13 +08:00
|
|
|
|
2015-11-19 09:21:00 +08:00
|
|
|
///For every table, need to deal with case by case.
|
2021-05-05 11:22:44 +02:00
|
|
|
void swofTableCheck_(const SwofTable& swofTables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void sgofTableCheck_(const SgofTable& sgofTables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void slgofTableCheck_(const SlgofTable& slgofTables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void swfnTableCheck_(const SwfnTable& swfnTables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void sgfnTableCheck_(const SgfnTable& sgfnTables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void sof3TableCheck_(const Sof3Table& sof3Tables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void sof2TableCheck_(const Sof2Table& sof2Tables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void sgwfnTableCheck_(const SgwfnTable& sgwfnTables,
|
2016-01-18 11:00:39 +08:00
|
|
|
const int satnumIdx);
|
2016-03-10 14:32:43 +08:00
|
|
|
///Tables for solvent model
|
2021-05-05 11:22:44 +02:00
|
|
|
void sgcwmisTableCheck_(const SgcwmisTable& sgcwmisTables,
|
2016-03-10 14:32:43 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void sorwmisTableCheck_(const SorwmisTable& sorwmisTables,
|
2016-03-10 14:32:43 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void ssfnTableCheck_(const SsfnTable& ssfnTables,
|
2016-03-10 14:32:43 +08:00
|
|
|
const int satnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void miscTableCheck_(const MiscTable& miscTables,
|
2016-09-13 12:38:27 +02:00
|
|
|
const int miscnumIdx);
|
2021-05-05 11:22:44 +02:00
|
|
|
void msfnTableCheck_(const MsfnTable& msfnTables,
|
2016-03-10 14:32:43 +08:00
|
|
|
const int satnumIdx);
|
2015-11-19 09:21:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} //namespace Opm
|
|
|
|
|
|
|
|
|
|
#endif // OPM_RELPERMDIAGNOSTICS_HEADER_INCLUDED
|