2016-10-31 16:47:59 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2016 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_RUNSPEC_HPP
|
|
|
|
|
#define OPM_RUNSPEC_HPP
|
|
|
|
|
|
|
|
|
|
#include <iosfwd>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2016-11-17 16:15:18 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp>
|
2017-01-03 19:25:30 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/EndpointScaling.hpp>
|
2019-01-28 15:17:10 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/UDQParams.hpp>
|
2016-11-17 16:15:18 +01:00
|
|
|
|
2016-10-31 16:47:59 +01:00
|
|
|
namespace Opm {
|
|
|
|
|
class Deck;
|
|
|
|
|
|
2017-01-03 19:25:30 +01:00
|
|
|
|
2016-10-31 16:47:59 +01:00
|
|
|
enum class Phase {
|
2016-12-20 12:51:44 +01:00
|
|
|
OIL = 0,
|
|
|
|
|
GAS = 1,
|
|
|
|
|
WATER = 2,
|
|
|
|
|
SOLVENT = 3,
|
2017-06-16 13:41:09 +02:00
|
|
|
POLYMER = 4,
|
2017-11-23 13:18:33 +01:00
|
|
|
ENERGY = 5,
|
2018-03-08 22:15:47 +01:00
|
|
|
POLYMW = 6
|
2016-10-31 16:47:59 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Phase get_phase( const std::string& );
|
|
|
|
|
std::ostream& operator<<( std::ostream&, const Phase& );
|
|
|
|
|
|
|
|
|
|
class Phases {
|
|
|
|
|
public:
|
|
|
|
|
Phases() noexcept = default;
|
2018-03-08 22:15:47 +01:00
|
|
|
Phases( bool oil, bool gas, bool wat, bool solvent = false, bool polymer = false, bool energy = false,
|
|
|
|
|
bool polymw = false ) noexcept;
|
2016-10-31 16:47:59 +01:00
|
|
|
|
|
|
|
|
bool active( Phase ) const noexcept;
|
|
|
|
|
size_t size() const noexcept;
|
|
|
|
|
private:
|
2018-03-08 22:15:47 +01:00
|
|
|
std::bitset< 7 > bits;
|
2016-10-31 16:47:59 +01:00
|
|
|
};
|
|
|
|
|
|
2017-01-03 15:42:41 +01:00
|
|
|
|
2018-03-07 20:50:08 +01:00
|
|
|
class Welldims {
|
|
|
|
|
public:
|
|
|
|
|
explicit Welldims(const Deck& deck);
|
|
|
|
|
|
|
|
|
|
int maxConnPerWell() const
|
|
|
|
|
{
|
|
|
|
|
return this->nCWMax;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int maxWellsPerGroup() const
|
|
|
|
|
{
|
|
|
|
|
return this->nWGMax;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int maxGroupsInField() const
|
|
|
|
|
{
|
|
|
|
|
return this->nGMax;
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-04 16:27:04 +02:00
|
|
|
int maxWellsInField() const
|
|
|
|
|
{
|
|
|
|
|
return this->nWMax;
|
|
|
|
|
}
|
2018-03-07 20:50:08 +01:00
|
|
|
private:
|
2018-07-04 16:27:04 +02:00
|
|
|
int nWMax { 0 };
|
2018-03-07 20:50:08 +01:00
|
|
|
int nCWMax { 0 };
|
|
|
|
|
int nWGMax { 0 };
|
|
|
|
|
int nGMax { 0 };
|
|
|
|
|
};
|
|
|
|
|
|
2018-03-22 11:14:51 +01:00
|
|
|
class WellSegmentDims {
|
|
|
|
|
public:
|
2018-03-22 14:23:02 +01:00
|
|
|
WellSegmentDims();
|
2018-03-22 11:14:51 +01:00
|
|
|
explicit WellSegmentDims(const Deck& deck);
|
|
|
|
|
|
|
|
|
|
int maxSegmentedWells() const
|
|
|
|
|
{
|
|
|
|
|
return this->nSegWellMax;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int maxSegmentsPerWell() const
|
|
|
|
|
{
|
|
|
|
|
return this->nSegmentMax;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int maxLateralBranchesPerWell() const
|
|
|
|
|
{
|
|
|
|
|
return this->nLatBranchMax;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
2018-03-22 14:23:02 +01:00
|
|
|
int nSegWellMax;
|
|
|
|
|
int nSegmentMax;
|
|
|
|
|
int nLatBranchMax;
|
2018-03-22 11:14:51 +01:00
|
|
|
};
|
|
|
|
|
|
2019-01-18 08:52:11 +01:00
|
|
|
class EclHysterConfig
|
2019-01-17 17:41:41 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2019-01-18 08:52:11 +01:00
|
|
|
EclHysterConfig();
|
|
|
|
|
explicit EclHysterConfig(const Deck& deck);
|
2019-01-17 17:41:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Specify whether hysteresis is enabled or not.
|
|
|
|
|
*/
|
|
|
|
|
void setEnableHysteresis(bool yesno);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Returns whether hysteresis is enabled.
|
|
|
|
|
*/
|
|
|
|
|
const bool enableHysteresis() const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Set the type of the hysteresis model which is used for capillary pressure.
|
|
|
|
|
*
|
|
|
|
|
* -1: capillary pressure hysteresis is disabled
|
|
|
|
|
* 0: use the Killough model for capillary pressure hysteresis
|
|
|
|
|
*/
|
|
|
|
|
void setPcHysteresisModel(int value);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Return the type of the hysteresis model which is used for capillary pressure.
|
|
|
|
|
*
|
|
|
|
|
* -1: capillary pressure hysteresis is disabled
|
|
|
|
|
* 0: use the Killough model for capillary pressure hysteresis
|
|
|
|
|
*/
|
|
|
|
|
const int pcHysteresisModel() const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Set the type of the hysteresis model which is used for relative permeability.
|
|
|
|
|
*
|
|
|
|
|
* -1: relperm hysteresis is disabled
|
|
|
|
|
* 0: use the Carlson model for relative permeability hysteresis of the non-wetting
|
|
|
|
|
* phase and the drainage curve for the relperm of the wetting phase
|
|
|
|
|
* 1: use the Carlson model for relative permeability hysteresis of the non-wetting
|
|
|
|
|
* phase and the imbibition curve for the relperm of the wetting phase
|
|
|
|
|
*/
|
|
|
|
|
void setKrHysteresisModel(int value);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Return the type of the hysteresis model which is used for relative permeability.
|
|
|
|
|
*
|
|
|
|
|
* -1: relperm hysteresis is disabled
|
|
|
|
|
* 0: use the Carlson model for relative permeability hysteresis
|
|
|
|
|
*/
|
|
|
|
|
const int krHysteresisModel() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// enable hysteresis at all
|
|
|
|
|
bool enableHysteresis_;
|
|
|
|
|
|
|
|
|
|
// the capillary pressure and the relperm hysteresis models to be used
|
|
|
|
|
int pcHysteresisModel_;
|
|
|
|
|
int krHysteresisModel_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-31 16:47:59 +01:00
|
|
|
class Runspec {
|
2017-01-03 19:25:30 +01:00
|
|
|
public:
|
2016-10-31 16:47:59 +01:00
|
|
|
explicit Runspec( const Deck& );
|
|
|
|
|
|
2019-01-28 15:17:10 +01:00
|
|
|
const UDQParams& udqParams() const noexcept;
|
2016-10-31 16:47:59 +01:00
|
|
|
const Phases& phases() const noexcept;
|
2016-11-17 16:15:18 +01:00
|
|
|
const Tabdims& tabdims() const noexcept;
|
2017-01-03 19:29:56 +01:00
|
|
|
const EndpointScaling& endpointScaling() const noexcept;
|
2018-03-07 20:50:08 +01:00
|
|
|
const Welldims& wellDimensions() const noexcept;
|
2018-03-22 11:14:51 +01:00
|
|
|
const WellSegmentDims& wellSegmentDimensions() const noexcept;
|
2017-01-11 13:46:51 +01:00
|
|
|
int eclPhaseMask( ) const noexcept;
|
2019-01-18 08:52:11 +01:00
|
|
|
const EclHysterConfig& hysterPar() const noexcept;
|
2017-01-03 15:42:41 +01:00
|
|
|
|
2017-01-11 13:46:51 +01:00
|
|
|
private:
|
2016-10-31 16:47:59 +01:00
|
|
|
Phases active_phases;
|
2016-11-17 16:15:18 +01:00
|
|
|
Tabdims m_tabdims;
|
2017-01-03 15:42:41 +01:00
|
|
|
EndpointScaling endscale;
|
2018-03-07 20:50:08 +01:00
|
|
|
Welldims welldims;
|
2018-03-22 11:14:51 +01:00
|
|
|
WellSegmentDims wsegdims;
|
2019-01-28 15:17:10 +01:00
|
|
|
UDQParams udq_params;
|
2019-01-18 08:52:11 +01:00
|
|
|
EclHysterConfig hystpar;
|
2016-10-31 16:47:59 +01:00
|
|
|
};
|
|
|
|
|
|
2019-01-17 17:41:41 +01:00
|
|
|
|
2016-10-31 16:47:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // OPM_RUNSPEC_HPP
|
|
|
|
|
|