Merge pull request #2593 from plgbrts/salt_prec
salt solubility table allowing specification of solubility per region
This commit is contained in:
commit
84bf899380
@ -711,6 +711,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PermfactTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltSolubilityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.hpp
|
||||
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
Copyright (C) 2020 Equinor ASA.
|
||||
|
||||
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_SALTSOLUBILITY_TABLE_HPP
|
||||
#define OPM_PARSER_SALTSOLUBILITY_TABLE_HPP
|
||||
|
||||
#include "SimpleTable.hpp"
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckItem;
|
||||
|
||||
class SaltsolTable : public SimpleTable {
|
||||
public:
|
||||
SaltsolTable( const DeckItem& item );
|
||||
|
||||
const TableColumn& getSaltsolColumn() const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -17,7 +17,7 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef OPM_PARSER_SOLVENTDENSITY_TABLE_HPP
|
||||
#define OPM_PARSER_SOLVENTDENSITY_TABLE_HPP
|
||||
#define OPM_PARSER_SOLVENTDENSITY_TABLE_HPP
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
@ -97,6 +97,7 @@ namespace Opm {
|
||||
const TableContainer& getPdvdTables() const;
|
||||
const TableContainer& getSaltvdTables() const;
|
||||
const TableContainer& getSaltpvdTables() const;
|
||||
const TableContainer& getSaltsolTables() const;
|
||||
const TableContainer& getPermfactTables() const;
|
||||
const TableContainer& getEnkrvdTables() const;
|
||||
const TableContainer& getEnptvdTables() const;
|
||||
|
@ -85,6 +85,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PermfactTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltSolubilityTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
|
||||
@ -442,6 +443,7 @@ DensityTable make_density_table(const GravityTable& gravity) {
|
||||
addTables( "PDVD", m_eqldims.getNumEquilRegions());
|
||||
addTables( "SALTVD", m_eqldims.getNumEquilRegions());
|
||||
addTables( "SALTPVD", m_eqldims.getNumEquilRegions());
|
||||
addTables( "SALTSOL", m_tabdims.getNumPVTTables());
|
||||
addTables( "PERMFACT", m_eqldims.getNumEquilRegions());
|
||||
|
||||
addTables( "AQUTAB", m_aqudims.getNumInfluenceTablesCT());
|
||||
@ -507,6 +509,7 @@ DensityTable make_density_table(const GravityTable& gravity) {
|
||||
initSimpleTableContainer<PdvdTable>(deck, "PDVD" , m_eqldims.getNumEquilRegions());
|
||||
initSimpleTableContainer<SaltpvdTable>(deck, "SALTPVD" , m_eqldims.getNumEquilRegions());
|
||||
initSimpleTableContainer<SaltvdTable>(deck, "SALTVD" , m_eqldims.getNumEquilRegions());
|
||||
initSimpleTableContainer<SaltsolTable>(deck, "SALTSOL" , m_tabdims.getNumPVTTables());
|
||||
initSimpleTableContainer<SaltvdTable>(deck, "PERMFACT" , m_eqldims.getNumEquilRegions());
|
||||
initSimpleTableContainer<AqutabTable>(deck, "AQUTAB" , m_aqudims.getNumInfluenceTablesCT());
|
||||
{
|
||||
@ -932,6 +935,10 @@ DensityTable make_density_table(const GravityTable& gravity) {
|
||||
return getTables("SALTPVD");
|
||||
}
|
||||
|
||||
const TableContainer& TableManager::getSaltsolTables() const {
|
||||
return getTables("SALTSOL");
|
||||
}
|
||||
|
||||
const TableContainer& TableManager::getPermfactTables() const {
|
||||
return getTables("PERMFACT");
|
||||
}
|
||||
@ -1476,7 +1483,6 @@ DensityTable make_density_table(const GravityTable& gravity) {
|
||||
assert(regionIdx == numTables);
|
||||
}
|
||||
|
||||
|
||||
template <class TableType>
|
||||
void TableManager::initBrineTables(const Deck& deck, std::vector<TableType>& brinetables ) {
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PermfactTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltSolubilityTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
|
||||
@ -1078,6 +1079,18 @@ const TableColumn& SaltpvdTable::getSaltpColumn() const {
|
||||
return SimpleTable::getColumn(1);
|
||||
}
|
||||
|
||||
|
||||
SaltsolTable::SaltsolTable( const DeckItem& item ) {
|
||||
m_schema.addColumn( ColumnSchema( "SALTSOLUBILITY" , Table::RANDOM , Table::DEFAULT_NONE ));
|
||||
|
||||
SimpleTable::init(item);
|
||||
}
|
||||
|
||||
const TableColumn& SaltsolTable::getSaltsolColumn() const {
|
||||
return SimpleTable::getColumn(0);
|
||||
}
|
||||
|
||||
|
||||
PermfactTable::PermfactTable( const DeckItem& item ) {
|
||||
m_schema.addColumn( ColumnSchema( "POROSITYCHANGE" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE ));
|
||||
m_schema.addColumn( ColumnSchema( "PERMEABILIYMULTIPLIER" , Table::RANDOM , Table::DEFAULT_NONE ));
|
||||
|
@ -3,8 +3,16 @@
|
||||
"sections": [
|
||||
"PROPS"
|
||||
],
|
||||
"data": {
|
||||
"value_type": "DOUBLE",
|
||||
"dimension": "Density"
|
||||
}
|
||||
"size": {
|
||||
"keyword": "TABDIMS",
|
||||
"item": "NTPVT"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"name": "DATA",
|
||||
"value_type": "DOUBLE",
|
||||
"size_type": "ALL",
|
||||
"dimension": "Density"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PermfactTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SaltSolubilityTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
|
||||
// keyword specific table classes
|
||||
@ -80,7 +81,8 @@ BOOST_AUTO_TEST_CASE( Brine ) {
|
||||
"\n"
|
||||
"SALTPVD\n"
|
||||
"500 0\n"
|
||||
"550 0.5/\n";
|
||||
"550 0.5/\n"
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseString(deckData);
|
||||
@ -144,10 +146,31 @@ BOOST_AUTO_TEST_CASE( Brine ) {
|
||||
|
||||
BOOST_CHECK_EQUAL(permfactTable.getPorosityChangeColumn().size(), 4U);
|
||||
BOOST_CHECK_CLOSE(permfactTable.getPermeabilityMultiplierColumn() [3],1.5, 1e-5);
|
||||
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( Saltsol ) {
|
||||
const char *deckData =
|
||||
"TABDIMS\n"
|
||||
"1 2/\n"
|
||||
"\n"
|
||||
"SALTSOL\n"
|
||||
"8.0/\n"
|
||||
"9.0/\n"
|
||||
"\n"
|
||||
;
|
||||
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseString(deckData);
|
||||
|
||||
Opm::TableManager tables(deck);
|
||||
const Opm::TableContainer& saltsolTables = tables.getSaltsolTables();
|
||||
const auto& saltsolTable1 = saltsolTables.getTable<Opm::SaltsolTable>(0);
|
||||
|
||||
BOOST_CHECK_EQUAL(saltsolTable1.getSaltsolColumn().size(), 1U);
|
||||
BOOST_CHECK_CLOSE(saltsolTable1.getSaltsolColumn() [0], 8.0, 1e-5);
|
||||
|
||||
const auto& saltsolTable2 = saltsolTables.getTable<Opm::SaltsolTable>(1);
|
||||
|
||||
BOOST_CHECK_EQUAL(saltsolTable2.getSaltsolColumn().size(), 1U);
|
||||
BOOST_CHECK_CLOSE(saltsolTable2.getSaltsolColumn() [0], 9.0, 1e-5);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user