Adding the support for the keyword PLYSHLOG.
Assuming only one group of PLYSHLOG data is available.
This commit is contained in:
@@ -205,6 +205,7 @@ EclipseState/Tables/Sof2Table.hpp
|
||||
EclipseState/Tables/EnptvdTable.hpp
|
||||
EclipseState/Tables/FullTable.hpp
|
||||
EclipseState/Tables/PlyviscTable.hpp
|
||||
EclipseState/Tables/PlyshlogTable.hpp
|
||||
EclipseState/Tables/EnkrvdTable.hpp
|
||||
EclipseState/Tables/ImkrvdTable.hpp
|
||||
EclipseState/Tables/SgofTable.hpp
|
||||
|
||||
@@ -288,6 +288,8 @@ namespace Opm {
|
||||
|
||||
initGasvisctTables(deck, "GASVISCT", m_gasvisctTables);
|
||||
|
||||
initPlyshlogTables(deck, "PLYSHLOG", m_plyshlogTables);
|
||||
|
||||
// the ROCKTAB table comes with additional fun because the number of columns
|
||||
//depends on the presence of the RKTRMDIR keyword...
|
||||
initRocktabTables(deck);
|
||||
@@ -559,6 +561,27 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
void EclipseState::initPlyshlogTables(DeckConstPtr deck,
|
||||
const std::string& keywordName,
|
||||
std::vector<PlyshlogTable>& tableVector){
|
||||
|
||||
if (!deck->hasKeyword(keywordName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!deck->numKeywords(keywordName)) {
|
||||
complainAboutAmbiguousKeyword(deck, keywordName);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& keyword = deck->getKeyword(keywordName);
|
||||
|
||||
tableVector.push_back(PlyshlogTable());
|
||||
|
||||
tableVector[0].init(keyword);
|
||||
|
||||
}
|
||||
|
||||
bool EclipseState::supportsGridProperty(const std::string& keyword, int enabledTypes) const {
|
||||
bool result = false;
|
||||
if (enabledTypes & IntProperties)
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
|
||||
@@ -198,6 +199,11 @@ namespace Opm {
|
||||
const std::string& keywordName,
|
||||
std::vector<GasvisctTable>& tableVector);
|
||||
|
||||
void initPlyshlogTables(DeckConstPtr deck,
|
||||
const std::string& keywordName,
|
||||
std::vector<PlyshlogTable>& tableVector);
|
||||
|
||||
|
||||
void setMULTFLT(std::shared_ptr<const Section> section) const;
|
||||
void initMULTREGT(DeckConstPtr deck);
|
||||
|
||||
@@ -238,6 +244,7 @@ namespace Opm {
|
||||
std::vector<PlymaxTable> m_plymaxTables;
|
||||
std::vector<PlyrockTable> m_plyrockTables;
|
||||
std::vector<PlyviscTable> m_plyviscTables;
|
||||
std::vector<PlyshlogTable> m_plyshlogTables;
|
||||
std::vector<PvdgTable> m_pvdgTables;
|
||||
std::vector<PvdoTable> m_pvdoTables;
|
||||
std::vector<PvtgTable> m_pvtgTables;
|
||||
|
||||
145
opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp
Normal file
145
opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp
Normal file
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
Copyright 2015 SINTEF ICT, Applied Mathematics.
|
||||
|
||||
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_PARSER_PLYSHLOG_TABLE_HPP
|
||||
#define OPM_PARSER_PLYSHLOG_TABLE_HPP
|
||||
|
||||
#include "SingleRecordTable.hpp"
|
||||
|
||||
namespace Opm {
|
||||
// forward declaration
|
||||
class EclipseState;
|
||||
|
||||
class PlyshlogTable {
|
||||
|
||||
friend class EclipseState;
|
||||
PlyshlogTable() = default;
|
||||
|
||||
/*!
|
||||
* \brief Read the PLYSHLOG keyword and provide some convenience
|
||||
* methods for it.
|
||||
*/
|
||||
void init(Opm::DeckKeywordConstPtr keyword) {
|
||||
|
||||
// the reference conditions
|
||||
DeckRecordConstPtr record1 = keyword->getRecord(0);
|
||||
|
||||
const auto itemRefPolymerConcentration = record1->getItem("REF_POLYMER_CONCENTRATION");
|
||||
const auto itemRefSalinity = record1->getItem("REF_SALINITY");
|
||||
const auto itemRefTemperature = record1->getItem("REF_TEMPERATURE");
|
||||
|
||||
assert(itemRefPolymerConcentration->hasValue(0));
|
||||
|
||||
const double refPolymerConcentration = itemRefPolymerConcentration->getRawDouble(0);
|
||||
|
||||
setRefPolymerConcentration(refPolymerConcentration);
|
||||
|
||||
if (itemRefSalinity->hasValue(0)) {
|
||||
setHasRefSalinity(true);
|
||||
const double refSalinity = itemRefSalinity->getRawDouble(0);
|
||||
setRefSalinity(refSalinity);
|
||||
} else {
|
||||
setHasRefSalinity(false);
|
||||
}
|
||||
|
||||
if (itemRefTemperature->hasValue(0)) {
|
||||
setHasRefTemperature(true);
|
||||
const double refTemperature = itemRefTemperature->getRawDouble(0);
|
||||
setRefTemperature(refTemperature);
|
||||
} else {
|
||||
setHasRefTemperature(false);
|
||||
}
|
||||
|
||||
m_data = new SingleRecordTable();
|
||||
|
||||
m_data->init(keyword,
|
||||
std::vector<std::string>{
|
||||
"WaterVelocity",
|
||||
"ShearMultiplier"
|
||||
},
|
||||
/*recordIdx*/ 1,
|
||||
/*firstEntityOffset=*/0);
|
||||
|
||||
m_data->checkNonDefaultable("WaterVelocity");
|
||||
m_data->checkMonotonic("WaterVelocity", /*isAscending=*/true);
|
||||
m_data->checkNonDefaultable("ShearMultiplier");
|
||||
|
||||
}
|
||||
|
||||
|
||||
double getRefPolymerConcentration() const {
|
||||
return m_refPolymerConcentration;
|
||||
}
|
||||
double getRefSalinity() const {
|
||||
return m_refSalinity;
|
||||
}
|
||||
|
||||
double getRefTemperature() const{
|
||||
return m_refTemperature;
|
||||
}
|
||||
|
||||
void setRefPolymerConcentration(const double refPlymerConcentration) {
|
||||
m_refPolymerConcentration = refPlymerConcentration;
|
||||
}
|
||||
|
||||
void setRefSalinity(const double refSalinity) {
|
||||
m_refSalinity = refSalinity;
|
||||
}
|
||||
|
||||
void setRefTemperature(const double refTemperature) {
|
||||
m_refTemperature = refTemperature;
|
||||
}
|
||||
|
||||
bool hasRefSalinity() {
|
||||
return m_hasRefSalinity;
|
||||
}
|
||||
|
||||
bool hasRefTemperature() {
|
||||
return m_hasRefTemperature;
|
||||
}
|
||||
|
||||
void setHasRefSalinity(const bool has){
|
||||
m_hasRefSalinity = has;
|
||||
}
|
||||
|
||||
void setHasRefTemperature(const bool has){
|
||||
m_refTemperature = has;
|
||||
}
|
||||
|
||||
const std::vector<double> &getWaterVelocityColumn() const
|
||||
{ return m_data->getColumn(0); }
|
||||
|
||||
const std::vector<double> &getShearMultiplierColumn() const
|
||||
{ return m_data->getColumn(1); }
|
||||
|
||||
|
||||
private:
|
||||
double m_refPolymerConcentration;
|
||||
double m_refSalinity;
|
||||
double m_refTemperature;
|
||||
|
||||
bool m_hasRefSalinity;
|
||||
bool m_hasRefTemperature;
|
||||
|
||||
SingleRecordTable *m_data;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <cassert>
|
||||
|
||||
namespace Opm {
|
||||
class PlyshlogTable;
|
||||
class SingleRecordTable {
|
||||
friend class PlyshlogTable;
|
||||
protected:
|
||||
SingleRecordTable(const SingleRecordTable&) = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user