mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
switch to the new parser's table utility classes
This commit is contained in:
parent
2deeeef4e4
commit
198f805c2a
@ -33,8 +33,8 @@
|
|||||||
#include <opm/core/utility/Units.hpp>
|
#include <opm/core/utility/Units.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Utility/FullTable.hpp>
|
#include <opm/parser/eclipse/Utility/PvdoTable.hpp>
|
||||||
#include <opm/parser/eclipse/Utility/SimpleTable.hpp>
|
#include <opm/parser/eclipse/Utility/PvdcoTable.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
@ -109,7 +109,8 @@ namespace Opm
|
|||||||
if (deck.hasField("PVDG")) {
|
if (deck.hasField("PVDG")) {
|
||||||
if (samples > 0) {
|
if (samples > 0) {
|
||||||
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDeadSpline(deck.getPVDG().pvdg_, samples));
|
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDeadSpline(deck.getPVDG().pvdg_, samples));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDead(deck.getPVDG().pvdg_));
|
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDead(deck.getPVDG().pvdg_));
|
||||||
}
|
}
|
||||||
} else if (deck.hasField("PVTG")) {
|
} else if (deck.hasField("PVTG")) {
|
||||||
@ -168,11 +169,7 @@ namespace Opm
|
|||||||
// Water PVT
|
// Water PVT
|
||||||
if (phase_usage_.phase_used[Aqua]) {
|
if (phase_usage_.phase_used[Aqua]) {
|
||||||
if (newParserDeck->hasKeyword("PVTW")) {
|
if (newParserDeck->hasKeyword("PVTW")) {
|
||||||
std::vector<std::string> columnNames{
|
Opm::PvtwTable pvtwTable(newParserDeck->getKeyword("PVTW"), region_number);
|
||||||
"PREF", "FVFREF", "COMPRESSIBILITY", "MUREF", "VISCOSIBILITY"};
|
|
||||||
|
|
||||||
Opm::DeckKeywordConstPtr keyword = newParserDeck->getKeyword("PVTW");
|
|
||||||
Opm::SimpleTable pvtwTable(keyword, columnNames, /*recordIdx=*/region_number);
|
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Aqua]].reset(new SinglePvtConstCompr(pvtwTable));
|
props_[phase_usage_.phase_pos[Aqua]].reset(new SinglePvtConstCompr(pvtwTable));
|
||||||
} else {
|
} else {
|
||||||
@ -184,33 +181,18 @@ namespace Opm
|
|||||||
// Oil PVT
|
// Oil PVT
|
||||||
if (phase_usage_.phase_used[Liquid]) {
|
if (phase_usage_.phase_used[Liquid]) {
|
||||||
if (newParserDeck->hasKeyword("PVDO")) {
|
if (newParserDeck->hasKeyword("PVDO")) {
|
||||||
std::vector<std::string> columnNames{
|
Opm::PvdoTable pvdoTable(newParserDeck->getKeyword("PVDO"), region_number);
|
||||||
"PO", "BO", "MUO"};
|
|
||||||
|
|
||||||
Opm::DeckKeywordConstPtr keyword = newParserDeck->getKeyword("PVDO");
|
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtDead(pvdoTable));
|
||||||
Opm::SimpleTable pvdoTable(keyword, columnNames, region_number);
|
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtDeadSpline(pvdoTable));
|
|
||||||
}
|
}
|
||||||
else if (newParserDeck->hasKeyword("PVTO")) {
|
else if (newParserDeck->hasKeyword("PVTO")) {
|
||||||
std::vector<std::string> outerColumnNames{
|
Opm::PvtoTable pvtoTable(newParserDeck->getKeyword("PVTO"));
|
||||||
"RS", "PBUBB", "RSSAT", "MU"};
|
|
||||||
|
|
||||||
std::vector<std::string> innerColumnNames{
|
|
||||||
"P", "RSSAT", "MU"};
|
|
||||||
|
|
||||||
Opm::DeckKeywordConstPtr pvtoKeyword = newParserDeck->getKeyword("PVTO");
|
|
||||||
Opm::FullTable pvtoTable(pvtoKeyword, outerColumnNames, innerColumnNames);
|
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtLiveOil(pvtoTable));
|
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtLiveOil(pvtoTable));
|
||||||
} else if (newParserDeck->hasKeyword("PVCDO")) {
|
} else if (newParserDeck->hasKeyword("PVCDO")) {
|
||||||
std::vector<std::string> columnNames{
|
Opm::PvdcoTable pvdcoTable(newParserDeck->getKeyword("PVDCO"), region_number);
|
||||||
"PREF", "BO", "CO", "MUREF", "CMUO"};
|
|
||||||
|
|
||||||
Opm::DeckKeywordConstPtr pvcdoKeyword = newParserDeck->getKeyword("PVCDO");
|
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtConstCompr(pvdcoTable));
|
||||||
Opm::SimpleTable pvcdoTable(pvcdoKeyword, columnNames, region_number);
|
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtConstCompr(pvcdoTable));
|
|
||||||
} else {
|
} else {
|
||||||
OPM_THROW(std::runtime_error, "Input is missing PVDO or PVTO\n");
|
OPM_THROW(std::runtime_error, "Input is missing PVDO or PVTO\n");
|
||||||
}
|
}
|
||||||
@ -219,15 +201,11 @@ namespace Opm
|
|||||||
// Gas PVT
|
// Gas PVT
|
||||||
if (phase_usage_.phase_used[Vapour]) {
|
if (phase_usage_.phase_used[Vapour]) {
|
||||||
if (newParserDeck->hasKeyword("PVDG")) {
|
if (newParserDeck->hasKeyword("PVDG")) {
|
||||||
std::vector<std::string> columnNames{
|
Opm::PvdoTable pvdgTable(newParserDeck->getKeyword("PVDG"), region_number);
|
||||||
"PG", "BG", "MUG"};
|
|
||||||
|
|
||||||
Opm::DeckKeywordConstPtr keyword = newParserDeck->getKeyword("PVDG");
|
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDead(pvdgTable));
|
||||||
Opm::SimpleTable pvdgTable(keyword, columnNames, region_number);
|
|
||||||
|
|
||||||
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDeadSpline(pvdgTable));
|
|
||||||
} else {
|
} else {
|
||||||
OPM_THROW(std::runtime_error, "Input is missing PVDG or PVTG\n");
|
OPM_THROW(std::runtime_error, "Input is missing PVDG\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user