mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add variants of all methods which take a deck of the new parser to the BlackOilPropertiesFromDeck
This commit is contained in:
parent
0393a8f87d
commit
42f5025c88
@ -23,9 +23,7 @@
|
|||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck, const UnstructuredGrid& grid,
|
||||||
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
|
||||||
const UnstructuredGrid& grid,
|
|
||||||
bool init_rock)
|
bool init_rock)
|
||||||
{
|
{
|
||||||
if (init_rock){
|
if (init_rock){
|
||||||
@ -43,6 +41,25 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(Opm::DeckConstPtr newParserDeck,
|
||||||
|
const UnstructuredGrid& grid,
|
||||||
|
bool init_rock)
|
||||||
|
{
|
||||||
|
if (init_rock){
|
||||||
|
rock_.init(newParserDeck, grid);
|
||||||
|
}
|
||||||
|
pvt_.init(newParserDeck, /*numSamples=*/200);
|
||||||
|
SaturationPropsFromDeck<SatFuncSimpleUniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncSimpleUniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, /*numSamples=*/200);
|
||||||
|
|
||||||
|
if (pvt_.numPhases() != satprops_->numPhases()) {
|
||||||
|
OPM_THROW(std::runtime_error, "BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
||||||
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_->numPhases() << ").");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const parameter::ParameterGroup& param,
|
const parameter::ParameterGroup& param,
|
||||||
@ -107,6 +124,70 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(Opm::DeckConstPtr newParserDeck,
|
||||||
|
const UnstructuredGrid& grid,
|
||||||
|
const parameter::ParameterGroup& param,
|
||||||
|
bool init_rock)
|
||||||
|
{
|
||||||
|
if(init_rock){
|
||||||
|
rock_.init(newParserDeck, grid);
|
||||||
|
}
|
||||||
|
|
||||||
|
const int pvt_samples = param.getDefault("pvt_tab_size", 200);
|
||||||
|
pvt_.init(newParserDeck, pvt_samples);
|
||||||
|
|
||||||
|
// Unfortunate lack of pointer smartness here...
|
||||||
|
const int sat_samples = param.getDefault("sat_tab_size", 200);
|
||||||
|
std::string threephase_model = param.getDefault<std::string>("threephase_model", "simple");
|
||||||
|
if (newParserDeck->hasKeyword("ENDSCALE") && threephase_model != "simple") {
|
||||||
|
OPM_THROW(std::runtime_error, "Sorry, end point scaling currently available for the 'simple' model only.");
|
||||||
|
}
|
||||||
|
if (sat_samples > 1) {
|
||||||
|
if (threephase_model == "stone2") {
|
||||||
|
SaturationPropsFromDeck<SatFuncStone2Uniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncStone2Uniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, sat_samples);
|
||||||
|
} else if (threephase_model == "simple") {
|
||||||
|
SaturationPropsFromDeck<SatFuncSimpleUniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncSimpleUniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, sat_samples);
|
||||||
|
} else if (threephase_model == "gwseg") {
|
||||||
|
SaturationPropsFromDeck<SatFuncGwsegUniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncGwsegUniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, sat_samples);
|
||||||
|
} else {
|
||||||
|
OPM_THROW(std::runtime_error, "Unknown threephase_model: " << threephase_model);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (threephase_model == "stone2") {
|
||||||
|
SaturationPropsFromDeck<SatFuncStone2Nonuniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncStone2Nonuniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, sat_samples);
|
||||||
|
} else if (threephase_model == "simple") {
|
||||||
|
SaturationPropsFromDeck<SatFuncSimpleNonuniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncSimpleNonuniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, sat_samples);
|
||||||
|
} else if (threephase_model == "gwseg") {
|
||||||
|
SaturationPropsFromDeck<SatFuncGwsegNonuniform>* ptr
|
||||||
|
= new SaturationPropsFromDeck<SatFuncGwsegNonuniform>();
|
||||||
|
satprops_.reset(ptr);
|
||||||
|
ptr->init(newParserDeck, grid, sat_samples);
|
||||||
|
} else {
|
||||||
|
OPM_THROW(std::runtime_error, "Unknown threephase_model: " << threephase_model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pvt_.numPhases() != satprops_->numPhases()) {
|
||||||
|
OPM_THROW(std::runtime_error, "BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
||||||
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_->numPhases() << ").");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BlackoilPropertiesFromDeck::~BlackoilPropertiesFromDeck()
|
BlackoilPropertiesFromDeck::~BlackoilPropertiesFromDeck()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
#include <opm/core/props/satfunc/SaturationPropsFromDeck.hpp>
|
#include <opm/core/props/satfunc/SaturationPropsFromDeck.hpp>
|
||||||
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
||||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
|
|
||||||
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
struct UnstructuredGrid;
|
struct UnstructuredGrid;
|
||||||
@ -44,7 +47,15 @@ namespace Opm
|
|||||||
/// \param[in] grid Grid to which property object applies, needed for the
|
/// \param[in] grid Grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
BlackoilPropertiesFromDeck(const EclipseGridParser &deck,
|
||||||
|
const UnstructuredGrid& grid, bool init_rock=true );
|
||||||
|
|
||||||
|
/// Initialize from deck and grid.
|
||||||
|
/// \param[in] deck Deck input parser
|
||||||
|
/// \param[in] grid Grid to which property object applies, needed for the
|
||||||
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
|
/// to logical cartesian indices consistent with the deck.
|
||||||
|
BlackoilPropertiesFromDeck(Opm::DeckConstPtr newParserDeck,
|
||||||
const UnstructuredGrid& grid, bool init_rock=true );
|
const UnstructuredGrid& grid, bool init_rock=true );
|
||||||
|
|
||||||
/// Initialize from deck, grid and parameters.
|
/// Initialize from deck, grid and parameters.
|
||||||
@ -63,6 +74,22 @@ namespace Opm
|
|||||||
const parameter::ParameterGroup& param,
|
const parameter::ParameterGroup& param,
|
||||||
bool init_rock=true);
|
bool init_rock=true);
|
||||||
|
|
||||||
|
/// Initialize from deck, grid and parameters.
|
||||||
|
/// \param[in] deck Deck input parser
|
||||||
|
/// \param[in] grid Grid to which property object applies, needed for the
|
||||||
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
|
/// to logical cartesian indices consistent with the deck.
|
||||||
|
/// \param[in] param Parameters. Accepted parameters include:
|
||||||
|
/// pvt_tab_size (200) number of uniform sample points for dead-oil pvt tables.
|
||||||
|
/// sat_tab_size (200) number of uniform sample points for saturation tables.
|
||||||
|
/// threephase_model("simple") three-phase relperm model (accepts "simple" and "stone2").
|
||||||
|
/// For both size parameters, a 0 or negative value indicates that no spline fitting is to
|
||||||
|
/// be done, and the input fluid data used directly for linear interpolation.
|
||||||
|
BlackoilPropertiesFromDeck(Opm::DeckConstPtr newParserDeck,
|
||||||
|
const UnstructuredGrid& grid,
|
||||||
|
const parameter::ParameterGroup& param,
|
||||||
|
bool init_rock=true);
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~BlackoilPropertiesFromDeck();
|
virtual ~BlackoilPropertiesFromDeck();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user