add the infrastructure for SPECROCK

this is analogous to the SPECHEAT patch:

- fix the JSON definition
- add a table class
- wire the table class into TableManager
This commit is contained in:
Andreas Lauser
2017-11-23 13:18:32 +01:00
parent a5f334977c
commit 1f7cda4569
5 changed files with 74 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
/*
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_SPECROCK_TABLE_HPP
#define OPM_PARSER_SPECROCK_TABLE_HPP
#include "SimpleTable.hpp"
namespace Opm {
class DeckItem;
// this table specifies the volumetric heat capacity of the rock not including the
// pore space.
class SpecrockTable : public SimpleTable {
public:
SpecrockTable(const DeckItem& item);
const TableColumn& getTemperatureColumn() const;
const TableColumn& getCpRockColumn() const;
};
}
#endif

View File

@@ -87,6 +87,7 @@ namespace Opm {
const TableContainer& getPvdoTables() const;
const TableContainer& getPvdsTables() const;
const TableContainer& getSpecheatTables() const;
const TableContainer& getSpecrockTables() const;
const TableContainer& getWatvisctTables() const;
const TableContainer& getOilvisctTables() const;
const TableContainer& getGasvisctTables() const;

View File

@@ -62,6 +62,7 @@
#include <opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
@@ -211,6 +212,7 @@ namespace Opm {
addTables( "PVDS", m_tabdims.getNumPVTTables());
addTables( "SPECHEAT", m_tabdims.getNumPVTTables());
addTables( "SPECROCK", m_tabdims.getNumSatTables());
addTables( "OILVISCT", m_tabdims.getNumPVTTables());
addTables( "WATVISCT", m_tabdims.getNumPVTTables());
@@ -310,6 +312,7 @@ namespace Opm {
initSimpleTableContainer<PvdoTable>(deck, "PVDO", m_tabdims.getNumPVTTables());
initSimpleTableContainer<PvdsTable>(deck, "PVDS", m_tabdims.getNumPVTTables());
initSimpleTableContainer<SpecheatTable>(deck, "SPECHEAT", m_tabdims.getNumPVTTables());
initSimpleTableContainer<SpecrockTable>(deck, "SPECROCK", m_tabdims.getNumSatTables());
initSimpleTableContainer<OilvisctTable>(deck, "OILVISCT", m_tabdims.getNumPVTTables());
initSimpleTableContainer<WatvisctTable>(deck, "WATVISCT", m_tabdims.getNumPVTTables());
@@ -631,6 +634,10 @@ namespace Opm {
return getTables("SPECHEAT");
}
const TableContainer& TableManager::getSpecrockTables() const {
return getTables("SPECROCK");
}
const TableContainer& TableManager::getOilvisctTables() const {
return getTables("OILVISCT");
}

View File

@@ -64,6 +64,7 @@
#include <opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
@@ -123,6 +124,20 @@ const TableColumn& SpecheatTable::getCpWaterColumn() const
const TableColumn& SpecheatTable::getCpGasColumn() const
{ return SimpleTable::getColumn(3); }
SpecrockTable::SpecrockTable(const DeckItem& item)
{
m_schema.addColumn(ColumnSchema("TEMPERATURE", Table::STRICTLY_INCREASING, Table::DEFAULT_NONE));
m_schema.addColumn(ColumnSchema("CP_ROCK", Table::RANDOM, Table::DEFAULT_LINEAR));
SimpleTable::init(item);
}
const TableColumn& SpecrockTable::getTemperatureColumn() const
{ return SimpleTable::getColumn(0); }
const TableColumn& SpecrockTable::getCpRockColumn() const
{ return SimpleTable::getColumn(1); }
SwofTable::SwofTable( const DeckItem& item , const bool jfunc) {
m_schema.addColumn( ColumnSchema( "SW" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) );

View File

@@ -1,3 +1,13 @@
{"name" : "SPECROCK" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTSFUN"},
"items" :
[{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]}
{
"name": "SPECROCK",
"sections": ["PROPS"],
"size": {
"keyword": "TABDIMS",
"item": "NTSFUN"
},
"items": [
{ "name":"DATA", "value_type":"DOUBLE", "size_type": "ALL", "dimension": ["Temperature", "Energy/Length*Length*Length*AbsoluteTemperature"] }
]
}