Add keyword SGWFN.
This commit is contained in:
parent
eca2105f82
commit
68a9366d8d
@ -237,6 +237,7 @@ EclipseState/Tables/PlymaxTable.hpp
|
||||
EclipseState/Tables/PvtgTable.hpp
|
||||
EclipseState/Tables/PlyrockTable.hpp
|
||||
EclipseState/Tables/SwofTable.hpp
|
||||
EclipseState/Tables/SgwfnTable.hpp
|
||||
EclipseState/Tables/SwfnTable.hpp
|
||||
EclipseState/Tables/SgfnTable.hpp
|
||||
EclipseState/Tables/SsfnTable.hpp
|
||||
|
@ -118,6 +118,7 @@ namespace Opm {
|
||||
|
||||
void TableManager::initSimpleTables(const Deck& deck) {
|
||||
addTables( "SWOF" , m_tabdims->getNumSatTables() );
|
||||
addTables( "SGWFN", m_tabdims->getNumSatTables() );
|
||||
addTables( "SGOF", m_tabdims->getNumSatTables() );
|
||||
addTables( "SLGOF", m_tabdims->getNumSatTables() );
|
||||
addTables( "SOF2", m_tabdims->getNumSatTables() );
|
||||
@ -169,6 +170,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
initSimpleTableContainer<SwofTable>(deck, "SWOF" , m_tabdims->getNumSatTables());
|
||||
initSimpleTableContainer<SgwfnTable>(deck, "SGWFN", m_tabdims->getNumSatTables());
|
||||
initSimpleTableContainer<SgofTable>(deck, "SGOF" , m_tabdims->getNumSatTables());
|
||||
initSimpleTableContainer<SlgofTable>(deck, "SLGOF" , m_tabdims->getNumSatTables());
|
||||
initSimpleTableContainer<Sof2Table>(deck, "SOF2" , m_tabdims->getNumSatTables());
|
||||
@ -436,6 +438,10 @@ namespace Opm {
|
||||
return getTables("SWOF");
|
||||
}
|
||||
|
||||
const TableContainer& TableManager::getSgwfnTables() const {
|
||||
return getTables("SGWFN");
|
||||
}
|
||||
|
||||
const TableContainer& TableManager::getSlgofTables() const {
|
||||
return getTables("SLGOF");
|
||||
}
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Regdims.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp>
|
||||
@ -74,6 +75,7 @@ namespace Opm {
|
||||
std::shared_ptr<const Tabdims> getTabdims() const;
|
||||
|
||||
const TableContainer& getSwofTables() const;
|
||||
const TableContainer& getSgwfnTables() const;
|
||||
const TableContainer& getSof2Tables() const;
|
||||
const TableContainer& getSof3Tables() const;
|
||||
const TableContainer& getSgofTables() const;
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/VFPProdTable.hpp>
|
||||
@ -197,6 +198,55 @@ BOOST_AUTO_TEST_CASE(SwofTable_Tests) {
|
||||
BOOST_CHECK_EQUAL(swof2Table.getSwColumn().back(), 17.0);
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SgwfnTable_Tests) {
|
||||
const char *deckData =
|
||||
"TABDIMS\n"
|
||||
"2 /\n"
|
||||
"\n"
|
||||
"SGWFN\n"
|
||||
" 1 2 3 4\n"
|
||||
" 5 6 7 8/\n"
|
||||
" 9 10 11 12\n"
|
||||
" 13 14 15 16\n"
|
||||
" 17 18 19 20/\n";
|
||||
|
||||
Opm::ParserPtr parser(new Opm::Parser);
|
||||
Opm::DeckConstPtr deck(parser->parseString(deckData, Opm::ParseMode()));
|
||||
Opm::DeckKeywordConstPtr sgwfnKeyword = deck->getKeyword("SGWFN");
|
||||
|
||||
BOOST_CHECK_EQUAL(Opm::SgwfnTable::numTables(sgwfnKeyword), 2);
|
||||
|
||||
Opm::SgwfnTable sgwfn1Table;
|
||||
Opm::SgwfnTable sgwfn2Table;
|
||||
|
||||
sgwfn1Table.initFORUNITTESTONLY(deck->getKeyword("SGWFN")->getRecord(0)->getItem(0));
|
||||
sgwfn2Table.initFORUNITTESTONLY(deck->getKeyword("SGWFN")->getRecord(1)->getItem(0));
|
||||
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.numRows(), 2);
|
||||
BOOST_CHECK_EQUAL(sgwfn2Table.numRows(), 3);
|
||||
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.numColumns(), 4);
|
||||
BOOST_CHECK_EQUAL(sgwfn2Table.numColumns(), 4);
|
||||
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getSgColumn().front(), 1.0);
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getSgColumn().back(), 5.0);
|
||||
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getKrgColumn().front(), 2.0);
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getKrgColumn().back(), 6.0);
|
||||
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getKrgwColumn().front(), 3.0);
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getKrgwColumn().back(), 7.0);
|
||||
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getPcgwColumn().front(), 4.0e5);
|
||||
BOOST_CHECK_EQUAL(sgwfn1Table.getPcgwColumn().back(), 8.0e5);
|
||||
|
||||
// for the second table, we only check the first column and trust
|
||||
// that everything else is fine...
|
||||
BOOST_CHECK_EQUAL(sgwfn2Table.getSgColumn().front(), 9.0);
|
||||
BOOST_CHECK_EQUAL(sgwfn2Table.getSgColumn().back(), 17.0);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SgofTable_Tests) {
|
||||
const char *deckData =
|
||||
"TABDIMS\n"
|
||||
|
5
opm/parser/share/keywords/000_Eclipse100/S/SGWFN
Normal file
5
opm/parser/share/keywords/000_Eclipse100/S/SGWFN
Normal file
@ -0,0 +1,5 @@
|
||||
{"name" : "SGWFN" , "sections" : ["PROPS"], "size" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"},
|
||||
"items" : [
|
||||
{"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["1","1","1","Pressure"]}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user