Added H2STORE keyword.

Activates H2-Brine PVT models in opm-material.
This commit is contained in:
Svenn Tveit
2022-03-04 15:45:44 +01:00
parent 8473d9b8ec
commit c7713c41f5
5 changed files with 49 additions and 49 deletions

View File

@@ -455,6 +455,7 @@ public:
const Nupcol& nupcol() const noexcept;
const Tracers& tracers() const;
bool co2Storage() const noexcept;
bool h2Storage() const noexcept;
bool micp() const noexcept;
bool operator==(const Runspec& data) const;
@@ -478,6 +479,7 @@ public:
serializer(m_sfuncctrl);
serializer(m_nupcol);
serializer(m_co2storage);
serializer(m_h2storage);
serializer(m_micp);
}
@@ -498,6 +500,7 @@ private:
Nupcol m_nupcol;
Tracers m_tracers;
bool m_co2storage;
bool m_h2storage;
bool m_micp;
};

View File

@@ -26,6 +26,7 @@
#include <opm/input/eclipse/Parser/ParserKeywords/C.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/F.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/G.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/H.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/M.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/N.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/O.hpp>
@@ -578,6 +579,7 @@ Runspec::Runspec( const Deck& deck )
, m_nupcol( )
, m_tracers( deck )
, m_co2storage (false)
, m_h2storage (false)
, m_micp (false)
{
if (DeckSection::hasRUNSPEC(deck)) {
@@ -612,6 +614,13 @@ Runspec::Runspec( const Deck& deck )
}
if (runspecSection.hasKeyword<ParserKeywords::H2STORE>()) {
m_h2storage = true;
std::string msg = "The H2 storage option is given. PVT properties from the Brine-H2 system is used \n"
"See the OPM manual for details on the used models.";
OpmLog::note(msg);
}
if (runspecSection.hasKeyword<ParserKeywords::MICP>()) {
m_micp = true;
std::string msg = "The MICP option is given. Single phase (WATER) + 3 transported components + \n"
@@ -638,6 +647,7 @@ Runspec Runspec::serializationTestObject()
result.m_sfuncctrl = SatFuncControls::serializationTestObject();
result.m_nupcol = Nupcol::serializationTestObject();
result.m_co2storage = true;
result.m_h2storage = true;
result.m_micp = true;
return result;
@@ -703,6 +713,11 @@ bool Runspec::co2Storage() const noexcept
return this->m_co2storage;
}
bool Runspec::h2Storage() const noexcept
{
return this->m_h2storage;
}
bool Runspec::micp() const noexcept
{
return this->m_micp;
@@ -745,6 +760,7 @@ bool Runspec::rst_cmp(const Runspec& full_spec, const Runspec& rst_spec) {
full_spec.saturationFunctionControls() == rst_spec.saturationFunctionControls() &&
full_spec.m_nupcol == rst_spec.m_nupcol &&
full_spec.m_co2storage == rst_spec.m_co2storage &&
full_spec.m_h2storage == rst_spec.m_h2storage &&
full_spec.m_micp == rst_spec.m_micp &&
Welldims::rst_cmp(full_spec.wellDimensions(), rst_spec.wellDimensions());
}
@@ -762,6 +778,7 @@ bool Runspec::operator==(const Runspec& data) const {
this->saturationFunctionControls() == data.saturationFunctionControls() &&
this->m_nupcol == data.m_nupcol &&
this->m_co2storage == data.m_co2storage &&
this->m_h2storage == data.m_h2storage &&
this->m_micp == data.m_micp;
}

View File

@@ -0,0 +1,6 @@
{
"name": "H2STORE",
"sections": [
"RUNSPEC"
]
}

View File

@@ -1062,6 +1062,7 @@ set( keywords
001_Eclipse300/G/GASWAT
001_Eclipse300/G/GCONPROD
001_Eclipse300/G/GSF
001_Eclipse300/H/H2STORE
001_Eclipse300/H/HEATCR
001_Eclipse300/H/HEATCRT
001_Eclipse300/H/HWELLS

View File

@@ -434,55 +434,6 @@ WELLDIMS
BOOST_CHECK_EQUAL(wd.maxGroupsInField(), 0); // WELLDIMS(3), defaulted
}
BOOST_AUTO_TEST_CASE(WELLDIMS_MaxWList_Dflt)
{
const auto input = std::string { R"(
RUNSPEC
WELLDIMS
/
)" };
const auto wd = Welldims {
Parser{}.parseString(input)
};
BOOST_CHECK_EQUAL(wd.maxWellListsPrWell(), 1); // WELLDIMS(11), defaulted
}
BOOST_AUTO_TEST_CASE(WELLDIMS_MaxWList_Assigned)
{
const auto input = std::string { R"(
RUNSPEC
WELLDIMS
10* 5 /
)" };
const auto wd = Welldims {
Parser{}.parseString(input)
};
BOOST_CHECK_EQUAL(wd.maxWellListsPrWell(), 5); // WELLDIMS(11), assigned
}
BOOST_AUTO_TEST_CASE(WELLDIMS_MaxWList_Zero)
{
const auto input = std::string { R"(
RUNSPEC
WELLDIMS
10* 0 /
)" };
const auto wd = Welldims {
Parser{}.parseString(input)
};
// WELLDIMS(11) assigned but reset to at least 1.
BOOST_CHECK_EQUAL(wd.maxWellListsPrWell(), 1);
}
BOOST_AUTO_TEST_CASE(WSEGDIMS_NotSpecified)
{
const auto input = std::string {
@@ -1049,6 +1000,28 @@ BOOST_AUTO_TEST_CASE(Co2Storage_watergas) {
BOOST_CHECK( runspec.co2Storage() );
}
BOOST_AUTO_TEST_CASE(H2Storage) {
const std::string input = R"(
RUNSPEC
OIL
GAS
H2STORE
)";
Parser parser;
auto deck = parser.parseString(input);
Runspec runspec( deck );
const auto& phases = runspec.phases();
BOOST_CHECK_EQUAL( 2U, phases.size() );
BOOST_CHECK( phases.active( Phase::OIL ) );
BOOST_CHECK( phases.active( Phase::GAS ) );
BOOST_CHECK( runspec.h2Storage() );
}
BOOST_AUTO_TEST_CASE(Co2Storage_oilwater) {