add keywords used by the opm-core endpoint scaling code
plus some wrappers/tables
This commit is contained in:
79
opm/parser/eclipse/Utility/EndscaleWrapper.hpp
Normal file
79
opm/parser/eclipse/Utility/EndscaleWrapper.hpp
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
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_ENDSCALE_WRAPPER_HPP
|
||||
#define OPM_PARSER_ENDSCALE_WRAPPER_HPP
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace Opm {
|
||||
class EndscaleWrapper {
|
||||
public:
|
||||
/*!
|
||||
* \brief A wrapper class to provide convenient access to the
|
||||
* data of the 'ENDSCALE' keyword.
|
||||
*/
|
||||
EndscaleWrapper(Opm::DeckKeywordConstPtr keyword)
|
||||
: m_keyword(keyword)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Return the directional switch for endpoint scaling
|
||||
*
|
||||
* This is one of:
|
||||
* - DIRECT
|
||||
* - NODIR
|
||||
*/
|
||||
std::string directionSwitch() const
|
||||
{ return m_keyword->getRecord(0)->getItem(0)->getString(0); }
|
||||
|
||||
/*!
|
||||
* \brief Return whether the enpoint scaling should be reversible or not
|
||||
*/
|
||||
bool isReversible() const
|
||||
{ return m_keyword->getRecord(0)->getItem(1)->getString(0) == "REVERS"; }
|
||||
|
||||
/*!
|
||||
* \brief Return the number of endpoint (depending on depth) tables
|
||||
*/
|
||||
int numEndscaleTables() const
|
||||
{ return m_keyword->getRecord(0)->getItem(2)->getInt(0); }
|
||||
|
||||
/*!
|
||||
* \brief Return the maximum number of nodes in endpoint tables
|
||||
*/
|
||||
int numMaxNodes() const
|
||||
{ return m_keyword->getRecord(0)->getItem(3)->getInt(0); }
|
||||
|
||||
/*!
|
||||
* \brief Return the options for combining temperature endpoint data.
|
||||
*/
|
||||
int combiningOptions() const
|
||||
{ return m_keyword->getRecord(0)->getItem(4)->getInt(0); }
|
||||
|
||||
private:
|
||||
Opm::DeckKeywordConstPtr m_keyword;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OPM_PARSER_ENDSCALE_WRAPPER_HPP
|
||||
|
||||
105
opm/parser/eclipse/Utility/EnkrvdTable.hpp
Normal file
105
opm/parser/eclipse/Utility/EnkrvdTable.hpp
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
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_ENKRVD_TABLE_HPP
|
||||
#define OPM_PARSER_ENKRVD_TABLE_HPP
|
||||
|
||||
#include "SimpleTable.hpp"
|
||||
|
||||
namespace Opm {
|
||||
class EnkrvdTable : protected SimpleTable {
|
||||
typedef SimpleTable ParentType;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Read the ENKRVD keyword and provide some convenience
|
||||
* methods for it.
|
||||
*/
|
||||
EnkrvdTable(Opm::DeckKeywordConstPtr keyword,
|
||||
int recordIdx = 0,
|
||||
int firstEntityOffset = 0)
|
||||
: SimpleTable(keyword,
|
||||
std::vector<std::string>{"DEPTH",
|
||||
"KRWMAX",
|
||||
"KRGMAX",
|
||||
"KROMAX",
|
||||
"KRWCRIT",
|
||||
"KRGCRIT",
|
||||
"KROCRITG",
|
||||
"KROCRITW" },
|
||||
recordIdx, firstEntityOffset)
|
||||
{}
|
||||
|
||||
int numRows() const
|
||||
{ return ParentType::numRows(); };
|
||||
|
||||
int numColumns() const
|
||||
{ return ParentType::numColumns(); };
|
||||
|
||||
/*!
|
||||
* \brief The datum depth for the remaining columns
|
||||
*/
|
||||
const std::vector<double> &getDepthColumn() const
|
||||
{ return ParentType::getColumn(0); }
|
||||
|
||||
/*!
|
||||
* \brief Maximum relative permeability of water
|
||||
*/
|
||||
const std::vector<double> &getKrwmaxColumn() const
|
||||
{ return ParentType::getColumn(1); }
|
||||
|
||||
/*!
|
||||
* \brief Maximum relative permeability of gas
|
||||
*/
|
||||
const std::vector<double> &getKrgmaxColumn() const
|
||||
{ return ParentType::getColumn(2); }
|
||||
|
||||
/*!
|
||||
* \brief Maximum relative permeability of oil
|
||||
*/
|
||||
const std::vector<double> &getKromaxColumn() const
|
||||
{ return ParentType::getColumn(3); }
|
||||
|
||||
/*!
|
||||
* \brief Relative permeability of water at the critical oil (or gas) saturation
|
||||
*/
|
||||
const std::vector<double> &getKrwcritColumn() const
|
||||
{ return ParentType::getColumn(4); }
|
||||
|
||||
/*!
|
||||
* \brief Relative permeability of gas at the critical oil (or water) saturation
|
||||
*/
|
||||
const std::vector<double> &getKrgcritColumn() const
|
||||
{ return ParentType::getColumn(5); }
|
||||
|
||||
/*!
|
||||
* \brief Oil relative permeability of oil at the critical gas saturation
|
||||
*/
|
||||
const std::vector<double> &getKrocritgColumn() const
|
||||
{ return ParentType::getColumn(6); }
|
||||
|
||||
/*!
|
||||
* \brief Oil relative permeability of oil at the critical water saturation
|
||||
*/
|
||||
const std::vector<double> &getKrocritwColumn() const
|
||||
{ return ParentType::getColumn(7); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OPM_PARSER_SIMPLE_TABLE_HPP
|
||||
|
||||
109
opm/parser/eclipse/Utility/EnptvdTable.hpp
Normal file
109
opm/parser/eclipse/Utility/EnptvdTable.hpp
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
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_ENPTVD_TABLE_HPP
|
||||
#define OPM_PARSER_ENPTVD_TABLE_HPP
|
||||
|
||||
#include "SimpleTable.hpp"
|
||||
|
||||
namespace Opm {
|
||||
class EnptvdTable : protected SimpleTable {
|
||||
typedef SimpleTable ParentType;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Read the ENPTVD keyword and provide some convenience
|
||||
* methods for it.
|
||||
*/
|
||||
EnptvdTable(Opm::DeckKeywordConstPtr keyword,
|
||||
int recordIdx = 0,
|
||||
int firstEntityOffset = 0)
|
||||
: SimpleTable(keyword,
|
||||
std::vector<std::string>{"DEPTH",
|
||||
"SWCO",
|
||||
"SWCRIT",
|
||||
"SWMAX",
|
||||
"SGCO",
|
||||
"SGCRIT",
|
||||
"SGMAX",
|
||||
"SOWCRIT",
|
||||
"SOGCRIT"},
|
||||
recordIdx, firstEntityOffset)
|
||||
{}
|
||||
|
||||
int numRows() const
|
||||
{ return ParentType::numRows(); };
|
||||
|
||||
int numColumns() const
|
||||
{ return ParentType::numColumns(); };
|
||||
|
||||
const std::vector<double> &getDepthColumn() const
|
||||
{ return ParentType::getColumn(0); }
|
||||
|
||||
/*!
|
||||
* \brief Connate water saturation
|
||||
*/
|
||||
const std::vector<double> &getSwcoColumn() const
|
||||
{ return ParentType::getColumn(1); }
|
||||
|
||||
/*!
|
||||
* \brief Critical water saturation
|
||||
*/
|
||||
const std::vector<double> &getSwcritColumn() const
|
||||
{ return ParentType::getColumn(2); }
|
||||
|
||||
/*!
|
||||
* \brief Maximum water saturation
|
||||
*/
|
||||
const std::vector<double> &getSwmaxColumn() const
|
||||
{ return ParentType::getColumn(3); }
|
||||
|
||||
/*!
|
||||
* \brief Connate gas saturation
|
||||
*/
|
||||
const std::vector<double> &getSgcoColumn() const
|
||||
{ return ParentType::getColumn(4); }
|
||||
|
||||
/*!
|
||||
* \brief Critical gas saturation
|
||||
*/
|
||||
const std::vector<double> &getSgcritColumn() const
|
||||
{ return ParentType::getColumn(5); }
|
||||
|
||||
/*!
|
||||
* \brief Maximum gas saturation
|
||||
*/
|
||||
const std::vector<double> &getSgmaxColumn() const
|
||||
{ return ParentType::getColumn(6); }
|
||||
|
||||
/*!
|
||||
* \brief Critical oil-in-water saturation
|
||||
*/
|
||||
const std::vector<double> &getSowcritColumn() const
|
||||
{ return ParentType::getColumn(7); }
|
||||
|
||||
/*!
|
||||
* \brief Critical oil-in-gas saturation
|
||||
*/
|
||||
const std::vector<double> &getSogcritColumn() const
|
||||
{ return ParentType::getColumn(8); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OPM_PARSER_SIMPLE_TABLE_HPP
|
||||
|
||||
54
opm/parser/eclipse/Utility/ScalecrsWrapper.hpp
Normal file
54
opm/parser/eclipse/Utility/ScalecrsWrapper.hpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
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_SCALECRS_WRAPPER_HPP
|
||||
#define OPM_PARSER_SCALECRS_WRAPPER_HPP
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace Opm {
|
||||
class ScalecrsWrapper {
|
||||
public:
|
||||
/*!
|
||||
* \brief A wrapper class to provide convenient access to the
|
||||
* data of the 'SCALECRS' keyword.
|
||||
*/
|
||||
ScalecrsWrapper(Opm::DeckKeywordConstPtr keyword)
|
||||
: m_keyword(keyword)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Return whether the CRS method should be used to scale the endpoints
|
||||
*/
|
||||
bool isEnabled() const
|
||||
{
|
||||
return m_keyword->getRecord(0)->getItem(0)->getString(0) == "YES"
|
||||
|| m_keyword->getRecord(0)->getItem(0)->getString(0) == "Y";
|
||||
}
|
||||
|
||||
private:
|
||||
Opm::DeckKeywordConstPtr m_keyword;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // OPM_PARSER_SCALECRS_WRAPPER_HPP
|
||||
|
||||
5
opm/parser/share/keywords/E/ENKRVD
Normal file
5
opm/parser/share/keywords/E/ENKRVD
Normal file
@@ -0,0 +1,5 @@
|
||||
{"name" : "ENKRVD" , "size" : {"keyword" : "ENDSCALE" , "item" : "NUM_TABLES"},
|
||||
"items" : [
|
||||
{"name":"DATA", "value_type":"FLOAT", "size_type" : "ALL" , "dimension" : ["L","1","1","1","1","1","1","1"]}
|
||||
]
|
||||
}
|
||||
5
opm/parser/share/keywords/E/ENPTVD
Normal file
5
opm/parser/share/keywords/E/ENPTVD
Normal file
@@ -0,0 +1,5 @@
|
||||
{"name" : "ENPTVD" , "size" : {"keyword" : "ENDSCALE" , "item" : "NUM_TABLES"},
|
||||
"items" : [
|
||||
{"name":"DATA", "value_type":"FLOAT", "size_type" : "ALL" , "dimension" : ["L","1","1","1","1","1","1","1","1"]}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user