New kw PVTSOL to accomodate an extension of the back oil model.
This commit is contained in:
parent
c46488236a
commit
58aa93dcfe
@ -667,6 +667,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtsolTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp
|
||||
|
@ -42,11 +42,13 @@ enum class Phase {
|
||||
ENERGY = 5,
|
||||
POLYMW = 6,
|
||||
FOAM = 7,
|
||||
BRINE = 8
|
||||
BRINE = 8,
|
||||
ZFRACTION = 9
|
||||
|
||||
// If you add more entries to this enum, remember to update NUM_PHASES_IN_ENUM below.
|
||||
};
|
||||
|
||||
constexpr int NUM_PHASES_IN_ENUM = static_cast<int>(Phase::BRINE) + 1; // Used to get correct size of the bitset in class Phases.
|
||||
constexpr int NUM_PHASES_IN_ENUM = static_cast<int>(Phase::ZFRACTION) + 1; // Used to get correct size of the bitset in class Phases.
|
||||
|
||||
Phase get_phase( const std::string& );
|
||||
std::ostream& operator<<( std::ostream&, const Phase& );
|
||||
@ -55,7 +57,7 @@ class Phases {
|
||||
public:
|
||||
Phases() noexcept = default;
|
||||
Phases( bool oil, bool gas, bool wat, bool solvent = false, bool polymer = false, bool energy = false,
|
||||
bool polymw = false, bool foam = false, bool brine = false ) noexcept;
|
||||
bool polymw = false, bool foam = false, bool brine = false, bool zfraction = false ) noexcept;
|
||||
|
||||
static Phases serializeObject();
|
||||
|
||||
|
35
opm/parser/eclipse/EclipseState/Tables/PvtsolTable.hpp
Normal file
35
opm/parser/eclipse/EclipseState/Tables/PvtsolTable.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Andreas Lauser
|
||||
|
||||
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_PVTSOL_TABLE_HPP
|
||||
#define OPM_PARSER_PVTSOL_TABLE_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckKeyword;
|
||||
|
||||
class PvtsolTable : public PvtxTable {
|
||||
public:
|
||||
PvtsolTable(const DeckKeyword& keyword, size_t tableIdx);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgwTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgwoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtsolTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
|
||||
@ -142,6 +143,7 @@ namespace Opm {
|
||||
const std::vector<PvtgwTable>& getPvtgwTables() const;
|
||||
const std::vector<PvtgwoTable>& getPvtgwoTables() const;
|
||||
const std::vector<PvtoTable>& getPvtoTables() const;
|
||||
const std::vector<PvtsolTable>& getPvtsolTables() const;
|
||||
const std::vector<Rock2dTable>& getRock2dTables() const;
|
||||
const std::vector<Rock2dtrTable>& getRock2dtrTables() const;
|
||||
const TableContainer& getRockwnodTables() const;
|
||||
@ -207,6 +209,7 @@ namespace Opm {
|
||||
serializer.vector(m_pvtgwTables);
|
||||
serializer.vector(m_pvtgwoTables);
|
||||
serializer.vector(m_pvtoTables);
|
||||
serializer.vector(m_pvtsolTables);
|
||||
serializer.vector(m_rock2dTables);
|
||||
serializer.vector(m_rock2dtrTables);
|
||||
m_pvtwTable.serializeOp(serializer);
|
||||
@ -505,6 +508,7 @@ namespace Opm {
|
||||
std::vector<PvtgwTable> m_pvtgwTables;
|
||||
std::vector<PvtgwoTable> m_pvtgwoTables;
|
||||
std::vector<PvtoTable> m_pvtoTables;
|
||||
std::vector<PvtsolTable> m_pvtsolTables;
|
||||
std::vector<Rock2dTable> m_rock2dTables;
|
||||
std::vector<Rock2dtrTable> m_rock2dtrTables;
|
||||
PvtwTable m_pvtwTable;
|
||||
|
@ -42,6 +42,7 @@ Phase get_phase( const std::string& str ) {
|
||||
if( str == "POLYMW" ) return Phase::POLYMW;
|
||||
if( str == "FOAM" ) return Phase::FOAM;
|
||||
if( str == "BRINE" ) return Phase::BRINE;
|
||||
if( str == "ZFRACTION" ) return Phase::ZFRACTION;
|
||||
|
||||
throw std::invalid_argument( "Unknown phase '" + str + "'" );
|
||||
}
|
||||
@ -57,6 +58,7 @@ std::ostream& operator<<( std::ostream& stream, const Phase& p ) {
|
||||
case Phase::POLYMW: return stream << "POLYMW";
|
||||
case Phase::FOAM: return stream << "FOAM";
|
||||
case Phase::BRINE: return stream << "BRINE";
|
||||
case Phase::ZFRACTION: return stream << "ZFRACTION";
|
||||
|
||||
}
|
||||
|
||||
@ -65,7 +67,7 @@ std::ostream& operator<<( std::ostream& stream, const Phase& p ) {
|
||||
|
||||
using un = std::underlying_type< Phase >::type;
|
||||
|
||||
Phases::Phases( bool oil, bool gas, bool wat, bool sol, bool pol, bool energy, bool polymw, bool foam, bool brine) noexcept :
|
||||
Phases::Phases( bool oil, bool gas, bool wat, bool sol, bool pol, bool energy, bool polymw, bool foam, bool brine, bool zfraction) noexcept :
|
||||
bits( (oil ? (1 << static_cast< un >( Phase::OIL ) ) : 0) |
|
||||
(gas ? (1 << static_cast< un >( Phase::GAS ) ) : 0) |
|
||||
(wat ? (1 << static_cast< un >( Phase::WATER ) ) : 0) |
|
||||
@ -74,7 +76,8 @@ Phases::Phases( bool oil, bool gas, bool wat, bool sol, bool pol, bool energy, b
|
||||
(energy ? (1 << static_cast< un >( Phase::ENERGY ) ) : 0) |
|
||||
(polymw ? (1 << static_cast< un >( Phase::POLYMW ) ) : 0) |
|
||||
(foam ? (1 << static_cast< un >( Phase::FOAM ) ) : 0) |
|
||||
(brine ? (1 << static_cast< un >( Phase::BRINE ) ) : 0) )
|
||||
(brine ? (1 << static_cast< un >( Phase::BRINE ) ) : 0) |
|
||||
(zfraction ? (1 << static_cast< un >( Phase::ZFRACTION ) ) : 0) )
|
||||
|
||||
{}
|
||||
|
||||
@ -311,7 +314,8 @@ Runspec::Runspec( const Deck& deck ) :
|
||||
deck.hasKeyword( "THERMAL" ),
|
||||
deck.hasKeyword( "POLYMW" ),
|
||||
deck.hasKeyword( "FOAM" ),
|
||||
deck.hasKeyword( "BRINE" ) ) ),
|
||||
deck.hasKeyword( "BRINE" ),
|
||||
deck.hasKeyword( "PVTSOL" ) ) ),
|
||||
m_tabdims( deck ),
|
||||
endscale( deck ),
|
||||
welldims( deck ),
|
||||
|
@ -1284,7 +1284,9 @@ double Well::production_rate(const SummaryState& st, Phase prod_phase) const {
|
||||
case Phase::FOAM:
|
||||
throw std::invalid_argument( "Production of 'FOAM' requested.");
|
||||
case Phase::BRINE:
|
||||
throw std::invalid_argument( "Production of 'BRINE' requested.");
|
||||
throw std::invalid_argument( "Production of 'BRINE' requested.");
|
||||
case Phase::ZFRACTION:
|
||||
throw std::invalid_argument( "Production of 'ZFRACTION' requested.");
|
||||
}
|
||||
|
||||
throw std::logic_error( "Unreachable state. Invalid Phase value. "
|
||||
|
@ -71,7 +71,7 @@ namespace Opm {
|
||||
m_saturatedTable = SimpleTable(m_saturatedSchema);
|
||||
for (size_t sat_index = 0; sat_index < size(); sat_index++) {
|
||||
const auto& underSaturatedTable = getUnderSaturatedTable( sat_index );
|
||||
std::vector<double> row(4);
|
||||
std::vector<double> row(m_saturatedSchema.size());
|
||||
row[0] = m_outerColumn[sat_index];
|
||||
for (size_t col_index = 0; col_index < m_underSaturatedSchema.size(); col_index++)
|
||||
row[col_index + 1] = underSaturatedTable.get( col_index , 0 );
|
||||
|
@ -138,6 +138,9 @@ namespace Opm {
|
||||
this->checkPVTOMonotonicity(deck);
|
||||
}
|
||||
|
||||
if( deck.hasKeyword( "PVTSOL" ) )
|
||||
initFullTables(deck, "PVTSOL", m_pvtsolTables);
|
||||
|
||||
if( deck.hasKeyword( "PVTW" ) )
|
||||
this->m_pvtwTable = PvtwTable( deck.getKeyword( "PVTW" ) );
|
||||
|
||||
@ -1036,6 +1039,10 @@ namespace Opm {
|
||||
return m_pvtoTables;
|
||||
}
|
||||
|
||||
const std::vector<PvtsolTable>& TableManager::getPvtsolTables() const {
|
||||
return m_pvtsolTables;
|
||||
}
|
||||
|
||||
const std::vector<Rock2dTable>& TableManager::getRock2dTables() const {
|
||||
return m_rock2dTables;
|
||||
}
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgwTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgwoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtsolTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp>
|
||||
@ -216,6 +217,32 @@ PvtoTable::nonMonotonicSaturatedFVF() const
|
||||
return nonmonoFVF;
|
||||
}
|
||||
|
||||
PvtsolTable::PvtsolTable( const DeckKeyword& keyword, size_t tableIdx) :
|
||||
PvtxTable("ZCO2") {
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "P" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "B_O" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "B_G" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "RS" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "RV" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "XVOL" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "YVOL" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "MU_O" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_underSaturatedSchema.addColumn( ColumnSchema( "MU_G" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "ZCO2" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "P" , Table::INCREASING , Table::DEFAULT_NONE ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "B_O" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "B_G" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "RS" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "RV" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "XVOL" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "YVOL" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "MU_O" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
m_saturatedSchema.addColumn( ColumnSchema( "MU_G" , Table::RANDOM , Table::DEFAULT_LINEAR ));
|
||||
|
||||
PvtxTable::init(keyword , tableIdx);
|
||||
}
|
||||
|
||||
SpecheatTable::SpecheatTable(const DeckItem& item)
|
||||
{
|
||||
m_schema.addColumn(ColumnSchema("TEMPERATURE", Table::STRICTLY_INCREASING, Table::DEFAULT_NONE));
|
||||
|
6
src/opm/parser/eclipse/share/keywords/900_OPM/P/PVTSOL
Normal file
6
src/opm/parser/eclipse/share/keywords/900_OPM/P/PVTSOL
Normal file
@ -0,0 +1,6 @@
|
||||
{"name" : "PVTSOL" , "sections" : ["PROPS"], "num_tables" : {"keyword" : "TABDIMS" , "item" : "NTPVT"},
|
||||
"items" : [
|
||||
{"name":"ZCO2", "value_type" : "DOUBLE", "dimension":"1" },
|
||||
{"name":"DATA", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : ["Pressure","1","OilDissolutionFactor","GasDissolutionFactor","OilDissolutionFactor","1","1","Viscosity","Viscosity"]}
|
||||
]
|
||||
}
|
@ -1102,6 +1102,7 @@ set( keywords
|
||||
900_OPM/P/PRECSALT
|
||||
900_OPM/P/PVTGW
|
||||
900_OPM/P/PVTGWO
|
||||
900_OPM/P/PVTSOL
|
||||
900_OPM/P/PYACTION
|
||||
900_OPM/P/PYINPUT
|
||||
900_OPM/R/RHO
|
||||
|
Loading…
Reference in New Issue
Block a user