add a table for RTEMPVD
This commit is contained in:
parent
fdd66d911c
commit
9ab4897587
@ -182,6 +182,7 @@ EclipseState/Tables/ImptvdTable.hpp
|
|||||||
EclipseState/Tables/RsvdTable.hpp
|
EclipseState/Tables/RsvdTable.hpp
|
||||||
EclipseState/Tables/PvtoInnerTable.hpp
|
EclipseState/Tables/PvtoInnerTable.hpp
|
||||||
EclipseState/Tables/RvvdTable.hpp
|
EclipseState/Tables/RvvdTable.hpp
|
||||||
|
EclipseState/Tables/RtempvdTable.hpp
|
||||||
EclipseState/Tables/PvtgOuterTable.hpp
|
EclipseState/Tables/PvtgOuterTable.hpp
|
||||||
#
|
#
|
||||||
Utility/WconinjeWrapper.hpp
|
Utility/WconinjeWrapper.hpp
|
||||||
|
@ -200,6 +200,10 @@ namespace Opm {
|
|||||||
return m_rvvdTables;
|
return m_rvvdTables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::vector<RtempvdTable>& EclipseState::getRtempvdTables() const {
|
||||||
|
return m_rtempvdTables;
|
||||||
|
}
|
||||||
|
|
||||||
const std::vector<SgofTable>& EclipseState::getSgofTables() const {
|
const std::vector<SgofTable>& EclipseState::getSgofTables() const {
|
||||||
return m_sgofTables;
|
return m_sgofTables;
|
||||||
}
|
}
|
||||||
@ -244,6 +248,17 @@ namespace Opm {
|
|||||||
//depends on the presence of the RKTRMDIR keyword...
|
//depends on the presence of the RKTRMDIR keyword...
|
||||||
initRocktabTables(deck, parserLog);
|
initRocktabTables(deck, parserLog);
|
||||||
|
|
||||||
|
// the temperature vs depth table. the problem here is that
|
||||||
|
// the TEMPVD (E300) and RTEMPVD (E300 + E100) keywords are
|
||||||
|
// synonymous, but we want to provide only a single cannonical
|
||||||
|
// API here, so we jump through some small hoops...
|
||||||
|
if (deck->hasKeyword("TEMPVD") && deck->hasKeyword("RTEMPVD"))
|
||||||
|
throw std::invalid_argument("The TEMPVD and RTEMPVD tables are mutually exclusive!");
|
||||||
|
else if (deck->hasKeyword("TEMPVD"))
|
||||||
|
initSimpleTables(deck, parserLog, "TEMPVD", m_rtempvdTables);
|
||||||
|
else if (deck->hasKeyword("RTEMPVD"))
|
||||||
|
initSimpleTables(deck, parserLog, "RTEMPVD", m_rtempvdTables);
|
||||||
|
|
||||||
initFullTables(deck, parserLog, "PVTG", m_pvtgTables);
|
initFullTables(deck, parserLog, "PVTG", m_pvtgTables);
|
||||||
initFullTables(deck, parserLog, "PVTO", m_pvtoTables);
|
initFullTables(deck, parserLog, "PVTO", m_pvtoTables);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
|
||||||
|
|
||||||
@ -104,6 +105,7 @@ namespace Opm {
|
|||||||
const std::vector<RocktabTable>& getRocktabTables() const;
|
const std::vector<RocktabTable>& getRocktabTables() const;
|
||||||
const std::vector<RsvdTable>& getRsvdTables() const;
|
const std::vector<RsvdTable>& getRsvdTables() const;
|
||||||
const std::vector<RvvdTable>& getRvvdTables() const;
|
const std::vector<RvvdTable>& getRvvdTables() const;
|
||||||
|
const std::vector<RtempvdTable>& getRtempvdTables() const;
|
||||||
const std::vector<SgofTable>& getSgofTables() const;
|
const std::vector<SgofTable>& getSgofTables() const;
|
||||||
const std::vector<SwofTable>& getSwofTables() const;
|
const std::vector<SwofTable>& getSwofTables() const;
|
||||||
|
|
||||||
@ -219,6 +221,7 @@ namespace Opm {
|
|||||||
std::vector<RocktabTable> m_rocktabTables;
|
std::vector<RocktabTable> m_rocktabTables;
|
||||||
std::vector<RsvdTable> m_rsvdTables;
|
std::vector<RsvdTable> m_rsvdTables;
|
||||||
std::vector<RvvdTable> m_rvvdTables;
|
std::vector<RvvdTable> m_rvvdTables;
|
||||||
|
std::vector<RtempvdTable> m_rtempvdTables;
|
||||||
std::vector<SgofTable> m_sgofTables;
|
std::vector<SgofTable> m_sgofTables;
|
||||||
std::vector<SwofTable> m_swofTables;
|
std::vector<SwofTable> m_swofTables;
|
||||||
|
|
||||||
|
68
opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp
Normal file
68
opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
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_RTEMPVD_TABLE_HPP
|
||||||
|
#define OPM_PARSER_RTEMPVD_TABLE_HPP
|
||||||
|
|
||||||
|
#include "SingleRecordTable.hpp"
|
||||||
|
|
||||||
|
namespace Opm {
|
||||||
|
// forward declaration
|
||||||
|
class EclipseState;
|
||||||
|
|
||||||
|
class RtempvdTable : protected SingleRecordTable {
|
||||||
|
typedef SingleRecordTable ParentType;
|
||||||
|
|
||||||
|
friend class EclipseState;
|
||||||
|
RtempvdTable() = default;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Read the RTEMPVD keyword and provide some convenience
|
||||||
|
* methods for it.
|
||||||
|
*/
|
||||||
|
void init(Opm::DeckKeywordConstPtr keyword, int recordIdx)
|
||||||
|
{
|
||||||
|
ParentType::init(keyword,
|
||||||
|
std::vector<std::string>{
|
||||||
|
"Depth",
|
||||||
|
"Temperature"
|
||||||
|
},
|
||||||
|
recordIdx,
|
||||||
|
/*firstEntityOffset=*/0);
|
||||||
|
|
||||||
|
ParentType::checkNonDefaultable("Depth");
|
||||||
|
ParentType::checkMonotonic("Depth", /*isAscending=*/true);
|
||||||
|
|
||||||
|
ParentType::checkNonDefaultable("Temperature");
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
using ParentType::numTables;
|
||||||
|
using ParentType::numRows;
|
||||||
|
using ParentType::numColumns;
|
||||||
|
using ParentType::evaluate;
|
||||||
|
|
||||||
|
const std::vector<double> &getDepthColumn() const
|
||||||
|
{ return ParentType::getColumn(0); }
|
||||||
|
|
||||||
|
const std::vector<double> &getTemperatureColumn() const
|
||||||
|
{ return ParentType::getColumn(1); }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user