diff --git a/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp b/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp index 924b278a5..a8c643715 100644 --- a/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp @@ -338,10 +338,9 @@ namespace Opm { rwgtables.resize(numTables); const auto& keyword = deck.getKeyword("RWGSALT"); - size_t numEntries = keyword.size(); size_t regionIdx = 0; - for (unsigned lineIdx = 0; lineIdx < numEntries; lineIdx += 2) { - rwgtables[regionIdx].init(keyword.getRecord(lineIdx+1)); + for (const auto& record : keyword) { + rwgtables[regionIdx].init(record); ++regionIdx; } assert(regionIdx == numTables); diff --git a/src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp b/src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp index cb2360734..3203fe551 100644 --- a/src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp +++ b/src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp @@ -68,7 +68,7 @@ namespace Opm { std::vector RwgsaltTable::getSaltConcentrationColumn() const { - size_t tableindex = 0; + size_t tableindex = 1; std::vector saltConc(this->size()); for(size_t i=0; isize(); ++i){ saltConc[i] = m_tableValues[tableindex]; @@ -80,7 +80,7 @@ namespace Opm { std::vector RwgsaltTable::getVaporizedWaterGasRatioColumn() const { - size_t tableindex = 1; + size_t tableindex = 2; std::vector vaporizedwatergasratio(this->size()); for(size_t i=0; isize(); ++i){ vaporizedwatergasratio[i] = m_tableValues[tableindex]; diff --git a/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp b/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp index 409cf0df1..d260cc17c 100644 --- a/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp +++ b/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp @@ -476,8 +476,8 @@ namespace Opm { initSimpleTableContainer(deck, "RVVD" , m_eqldims.getNumEquilRegions()); initSimpleTableContainer(deck, "PBVD" , m_eqldims.getNumEquilRegions()); initSimpleTableContainer(deck, "PDVD" , m_eqldims.getNumEquilRegions()); + initSimpleTableContainer(deck, "SALTPVD" , m_eqldims.getNumEquilRegions()); initSimpleTableContainer(deck, "SALTVD" , m_eqldims.getNumEquilRegions()); - initSimpleTableContainer(deck, "SALTRVD" , m_eqldims.getNumEquilRegions()); initSimpleTableContainer(deck, "PERMFACT" , m_eqldims.getNumEquilRegions()); initSimpleTableContainer(deck, "AQUTAB" , m_aqudims.getNumInfluenceTablesCT()); { diff --git a/src/opm/parser/eclipse/share/keywords/900_OPM/P/PERMFACT b/src/opm/parser/eclipse/share/keywords/900_OPM/P/PERMFACT index 3936e806f..a80ed1f55 100644 --- a/src/opm/parser/eclipse/share/keywords/900_OPM/P/PERMFACT +++ b/src/opm/parser/eclipse/share/keywords/900_OPM/P/PERMFACT @@ -3,16 +3,19 @@ "sections": [ "PROPS" ], + "size": { + "keyword": "EQLDIMS", + "item": "NTEQUL" + }, "items": [ - { - "name": "POROSITY", + { + "name": "DATA", "value_type": "DOUBLE", - "dimension": "1" - }, - { - "name": "PERMFACTMULT", - "value_type": "DOUBLE", - "dimension": "1" - } + "size_type": "ALL", + "dimension": [ + "1", + "1" + ] + } ] } diff --git a/src/opm/parser/eclipse/share/keywords/900_OPM/R/RWGSALT b/src/opm/parser/eclipse/share/keywords/900_OPM/R/RWGSALT index 1a2ae3fdb..c0ae7c5c5 100644 --- a/src/opm/parser/eclipse/share/keywords/900_OPM/R/RWGSALT +++ b/src/opm/parser/eclipse/share/keywords/900_OPM/R/RWGSALT @@ -3,27 +3,16 @@ "sections": [ "PROPS" ], - "num_tables": { + "size": { "keyword": "TABDIMS", "item": "NTPVT" }, "items": [ - { - "name": "RESERVOIR_PRESSURE", - "value_type": "DOUBLE", - "dimension": "Pressure" - }, - { - "name": "SALT_CONCENTRATION", - "value_type": "DOUBLE", - "size_type": "ALL", - "dimension": "Mass/Length*Length*Length" - }, { "name": "DATA", + "value_type": "DOUBLE", "size_type": "ALL", - "value_type":"DOUBLE", - "dimension": "OilDissolutionFactor" + "dimension": ["Pressure","Mass/Length*Length*Length", "OilDissolutionFactor"] } ] } diff --git a/tests/parser/SaltTableTests.cpp b/tests/parser/SaltTableTests.cpp index 7f2b1a370..d905a9c3c 100644 --- a/tests/parser/SaltTableTests.cpp +++ b/tests/parser/SaltTableTests.cpp @@ -25,6 +25,7 @@ #include #include #include +#include // generic table classes #include @@ -55,27 +56,27 @@ BOOST_AUTO_TEST_CASE( Brine ) { "TABDIMS\n" "1 1/\n" "\n" + "EQLDIMS\n" + "1 /\n" + "\n" "PVTWSALT\n" " 1000 0.0/\n" " 0 1 2 3 4 \n" " 10 11 12 13 14/\n" - "\n" + "\n" "RWGSALT\n" - " 300 0.0 0.00013/ \n" - " 600 0.5 0.000132/ \n" - "/ \n" + " 300 0.0 0.00013 \n" + " 600 0.5 0.000132 \n" + "/ \n" "PERMFACT\n" "0 0 \n" "0.5 0.5 \n" "1 1 \n" - "1.5 1.5/\n" + "1.5 1.5\n" "/ \n" "BDENSITY\n" " 1000 1050 /\n" "\n" - "EQLDIMS\n" - "1 /\n" - "\n" "SALTVD\n" "500 0\n" "550 50/\n" @@ -106,21 +107,21 @@ BOOST_AUTO_TEST_CASE( Brine ) { BOOST_CHECK_CLOSE (PvtwsaltTable1.getViscosityColumn()[1], 13*0.001, 1e-5); BOOST_CHECK_CLOSE (PvtwsaltTable1.getReferencePressureValue(), 1000*1e5, 1e-5); - + const auto& RwgsaltTables = tables.getRwgSaltTables( ); - BOOST_CHECK_EQUAL(2 , RwgsaltTables.size() ); - BOOST_CHECK_EQUAL(3, RwgsaltTables[0].size()); + BOOST_CHECK_EQUAL(1 , RwgsaltTables.size() ); + BOOST_CHECK_EQUAL(2, RwgsaltTables[0].size()); const auto& RwgsaltTable1 = RwgsaltTables[0]; - BOOST_CHECK_EQUAL (RwgsaltTable1.getPressureColumn().size(), 2); - BOOST_CHECK_CLOSE (RwgsaltTable1.getPressureColumn()[1], 600, 1e-5); + BOOST_CHECK_EQUAL (RwgsaltTable1.getPressureColumn().size(), 2); + BOOST_CHECK_CLOSE (RwgsaltTable1.getPressureColumn()[1], Metric::Pressure * 600, 1e-5); BOOST_CHECK_EQUAL (RwgsaltTable1.getSaltConcentrationColumn().size(), 2); BOOST_CHECK_CLOSE (RwgsaltTable1.getSaltConcentrationColumn()[1], 0.5, 1e-5); BOOST_CHECK_EQUAL (RwgsaltTable1.getVaporizedWaterGasRatioColumn().size(), 2); - BOOST_CHECK_CLOSE (RwgsaltTable1.getVaporizedWaterGasRatioColumn()[0], 0.00013, 1e-5); + BOOST_CHECK_CLOSE (RwgsaltTable1.getVaporizedWaterGasRatioColumn()[0], 0.00013, 1e-5); const auto& BdensityTables = tables.getBrineDensityTables( ); const auto& BdensityTable1 = BdensityTables[0]; @@ -145,7 +146,7 @@ BOOST_AUTO_TEST_CASE( Brine ) { const auto& permfactTable = permfactTables.getTable(0); BOOST_CHECK_EQUAL(permfactTable.getPorosityChangeColumn().size(), 4); - BOOST_CHECK_CLOSE(permfactTable.getPermeabilityMultiplierColumn() [1],1.5, 1e-5); + BOOST_CHECK_CLOSE(permfactTable.getPermeabilityMultiplierColumn() [3],1.5, 1e-5); }