From a5cfafe4de10bbcef4409be0f953780f2405b282 Mon Sep 17 00:00:00 2001 From: OPMUSER Date: Mon, 11 Jul 2022 14:05:34 +0800 Subject: [PATCH] Support MINPORV Add support for MINPORV, which is an alias for MINPV. Also added additional checks, such that only one of MINPV, MINPORV and MINPVFIL can be active in the deck --- .../input/eclipse/EclipseState/Grid/EclipseGrid.cpp | 11 ++++++++++- .../eclipse/share/keywords/000_Eclipse100/M/MINPORV | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/opm/input/eclipse/EclipseState/Grid/EclipseGrid.cpp b/src/opm/input/eclipse/EclipseState/Grid/EclipseGrid.cpp index 5ac6fe76b..1b7b67f88 100644 --- a/src/opm/input/eclipse/EclipseState/Grid/EclipseGrid.cpp +++ b/src/opm/input/eclipse/EclipseState/Grid/EclipseGrid.cpp @@ -345,7 +345,11 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum) } if (deck.hasKeyword() && deck.hasKeyword()) { - 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() && deck.hasKeyword()) { + throw std::invalid_argument("Can not have both MINPV and MINPORV in the deck."); + } else if(deck.hasKeyword() && deck.hasKeyword()) { + throw std::invalid_argument("Can not have both MINPORV and MINPVFIL in the deck."); } m_minpvVector.resize(getCartesianSize(), 0.0); @@ -354,6 +358,11 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum) const auto& item = record.getItem( ); std::fill(m_minpvVector.begin(), m_minpvVector.end(), item.getSIDouble(0)); m_minpvMode = MinpvMode::ModeEnum::EclSTD; + } else if (deck.hasKeyword()) { + const auto& record = deck.get( ).back().getRecord(0); + const auto& item = record.getItem( ); + std::fill(m_minpvVector.begin(), m_minpvVector.end(), item.getSIDouble(0)); + m_minpvMode = MinpvMode::ModeEnum::EclSTD; } else if(deck.hasKeyword()) { // We should use the grid properties to support BOX, but then we need the eclipseState const auto& record = deck.get( ).back().getRecord(0); diff --git a/src/opm/input/eclipse/share/keywords/000_Eclipse100/M/MINPORV b/src/opm/input/eclipse/share/keywords/000_Eclipse100/M/MINPORV index 4f8f6ea12..ab679d585 100644 --- a/src/opm/input/eclipse/share/keywords/000_Eclipse100/M/MINPORV +++ b/src/opm/input/eclipse/share/keywords/000_Eclipse100/M/MINPORV @@ -6,8 +6,8 @@ "size": 1, "items": [ { - "name": "MIN_PORE_VOL", - "value_type": "DOUBLE", + "name": "VALUE", + "value_type": "DOUBLE", "dimension": "ReservoirVolume", "default": 1e-06 }