diff --git a/opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp b/opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp index 5e321ca7d22..8db50c5f0a3 100644 --- a/opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp @@ -93,6 +93,22 @@ struct PvcdoTable : public FlatTable< PVCDORecord > { using FlatTable< PVCDORecord >::FlatTable; }; +struct TlmixparRecord { + static constexpr std::size_t size = 2; + + double viscosity; + double density; + + bool operator==(const TlmixparRecord& data) const { + return viscosity == data.viscosity && + density == data.density; + } +}; + +struct TlmixparTable : public FlatTable< TlmixparRecord> { + using FlatTable< TlmixparRecord >::FlatTable; +}; + struct VISCREFRecord { static constexpr std::size_t size = 2; diff --git a/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp b/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp index e1a861db799..7bc60609df6 100644 --- a/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp @@ -71,6 +71,7 @@ namespace Opm { const PvcdoTable& pvcdoTable, const DensityTable& densityTable, const RockTable& rockTable, + const TlmixparTable& tlmixparTable, const ViscrefTable& viscrefTable, const WatdentTable& watdentTable, const std::vector& pvtwsaltTables, @@ -178,6 +179,7 @@ namespace Opm { const DensityTable& getDensityTable() const; const RockTable& getRockTable() const; const ViscrefTable& getViscrefTable() const; + const TlmixparTable& getTlmixparTable() const; const WatdentTable& getWatdentTable() const; const std::map& getPlymwinjTables() const; const std::map& getSkprwatTables() const; @@ -424,6 +426,7 @@ namespace Opm { PvcdoTable m_pvcdoTable; DensityTable m_densityTable; RockTable m_rockTable; + TlmixparTable m_tlmixparTable; ViscrefTable m_viscrefTable; WatdentTable m_watdentTable; std::vector m_pvtwsaltTables; diff --git a/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp b/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp index 38343cff5d3..6700e79a27b 100644 --- a/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp +++ b/src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp @@ -104,6 +104,7 @@ namespace Opm { const PvcdoTable& pvcdoTable, const DensityTable& densityTable, const RockTable& rockTable, + const TlmixparTable& tlmixparTable, const ViscrefTable& viscrefTable, const WatdentTable& watdentTable, const std::vector& pvtwsaltTables, @@ -136,6 +137,7 @@ namespace Opm { m_pvcdoTable(pvcdoTable), m_densityTable(densityTable), m_rockTable(rockTable), + m_tlmixparTable(tlmixparTable), m_viscrefTable(viscrefTable), m_watdentTable(watdentTable), m_pvtwsaltTables(pvtwsaltTables), @@ -235,6 +237,10 @@ namespace Opm { this->stcond.pressure = stcondKeyword.getRecord(0).getItem("PRESSURE").getSIDouble(0); } + if (deck.hasKeyword()) { + this->m_tlmixparTable = TlmixparTable(deck.getKeyword("TLMIXPAR")); + } + using GC = ParserKeywords::GCOMPIDX; if (deck.hasKeyword()) this->m_gas_comp_index = deck.getKeyword().getRecord(0).getItem().get(0); @@ -249,6 +255,7 @@ namespace Opm { m_pvtwTable = data.m_pvtwTable; m_pvcdoTable = data.m_pvcdoTable; m_densityTable = data.m_densityTable; + m_tlmixparTable = data.m_tlmixparTable; m_viscrefTable = data.m_viscrefTable; m_watdentTable = data.m_watdentTable; m_pvtwsaltTables = data.m_pvtwsaltTables; @@ -1017,6 +1024,10 @@ namespace Opm { return getTables("TLPMIXPA"); } + const TlmixparTable& TableManager::getTlmixparTable() const { + return m_tlmixparTable; + } + const JFunc& TableManager::getJFunc() const { if (!jfunc) throw std::invalid_argument("Cannot get JFUNC table when JFUNC not in deck"); @@ -1092,6 +1103,7 @@ namespace Opm { m_pvtwTable == data.m_pvtwTable && m_pvcdoTable == data.m_pvcdoTable && m_densityTable == data.m_densityTable && + m_tlmixparTable == data.m_tlmixparTable && m_viscrefTable == data.m_viscrefTable && m_watdentTable == data.m_watdentTable && m_pvtwsaltTables == data.m_pvtwsaltTables && diff --git a/src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp b/src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp index 8d66ea91cbd..eb9f11c243a 100644 --- a/src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp +++ b/src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp @@ -1338,6 +1338,7 @@ template FlatTable< PVTWRecord >::FlatTable( const DeckKeyword& ); template FlatTable< PVCDORecord >::FlatTable( const DeckKeyword& ); template FlatTable< ROCKRecord >::FlatTable( const DeckKeyword& ); template FlatTable< VISCREFRecord >::FlatTable( const DeckKeyword& ); +template FlatTable< TlmixparRecord>::FlatTable( const DeckKeyword& ); template FlatTable< WATDENTRecord >::FlatTable( const DeckKeyword& ); } // namespace Opm