Merge pull request #3071 from OPMUSER/MINPORV

Support MINPORV
This commit is contained in:
Bård Skaflestad 2022-07-12 14:12:34 +02:00 committed by GitHub
commit 5cca4b0be0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View File

@ -345,15 +345,22 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
}
if (deck.hasKeyword<ParserKeywords::MINPV>() && deck.hasKeyword<ParserKeywords::MINPVFIL>()) {
throw std::invalid_argument("Can not have both MINPV and MINPVFIL in deck.");
throw std::invalid_argument("Can not have both MINPV and MINPVFIL in the deck.");
} else if(deck.hasKeyword<ParserKeywords::MINPORV>() && deck.hasKeyword<ParserKeywords::MINPVFIL>()) {
throw std::invalid_argument("Can not have both MINPORV and MINPVFIL in the deck.");
}
m_minpvVector.resize(getCartesianSize(), 0.0);
if (deck.hasKeyword<ParserKeywords::MINPV>()) {
const auto& record = deck.get<ParserKeywords::MINPV>( ).back().getRecord(0);
const auto& item = record.getItem<ParserKeywords::MINPV::VALUE>( );
std::fill(m_minpvVector.begin(), m_minpvVector.end(), item.getSIDouble(0));
m_minpvMode = MinpvMode::ModeEnum::EclSTD;
} else if (deck.hasKeyword<ParserKeywords::MINPORV>()) {
const auto& record = deck.get<ParserKeywords::MINPORV>( ).back().getRecord(0);
const auto& item = record.getItem<ParserKeywords::MINPORV::VALUE>( );
std::fill(m_minpvVector.begin(), m_minpvVector.end(), item.getSIDouble(0));
m_minpvMode = MinpvMode::ModeEnum::EclSTD;
} else if(deck.hasKeyword<ParserKeywords::MINPVV>()) {
// We should use the grid properties to support BOX, but then we need the eclipseState
const auto& record = deck.get<ParserKeywords::MINPVV>( ).back().getRecord(0);

View File

@ -3,11 +3,12 @@
"sections": [
"GRID"
],
"prohibits" : ["MINPV"],
"size": 1,
"items": [
{
"name": "MIN_PORE_VOL",
"value_type": "DOUBLE",
"name": "VALUE",
"value_type": "DOUBLE",
"dimension": "ReservoirVolume",
"default": 1e-06
}

View File

@ -3,6 +3,7 @@
"sections": [
"GRID"
],
"prohibits" : ["MINPORV"],
"size": 1,
"items": [
{