From 67a8283000f672840dddffd32d1775b9edddf09a Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 4 Apr 2019 14:37:37 +0200 Subject: [PATCH 1/2] ebos: call Opm::checkDeck() after parsing this catches at least some common issues with ECL decks. --- ebos/eclbasevanguard.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index 2c95660ab..f6135f3af 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -68,6 +68,7 @@ NEW_PROP_TAG(EnableOpmRstFile); NEW_PROP_TAG(EclStrictParsing); NEW_PROP_TAG(EclOutputInterval); NEW_PROP_TAG(IgnoreKeywords); +NEW_PROP_TAG(EnableExperiments); SET_STRING_PROP(EclBaseVanguard, IgnoreKeywords, ""); SET_STRING_PROP(EclBaseVanguard, EclDeckFileName, ""); @@ -92,6 +93,8 @@ class EclBaseVanguard : public BaseVanguard typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; + enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; + public: typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; @@ -257,6 +260,9 @@ public: internalDeck_.reset(new Opm::Deck(parser.parseFile(fileName , parseContext, errorGuard))); internalEclState_.reset(new Opm::EclipseState(*internalDeck_, parseContext, errorGuard)); + if (enableExperiments && myRank == 0) + Opm::checkDeck(*internalDeck_, parser, parseContext, errorGuard); + deck_ = &(*internalDeck_); eclState_ = &(*internalEclState_); } From 4805e9fe055cb782e142edf28e9828c2a338bde5 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 4 Apr 2019 14:37:37 +0200 Subject: [PATCH 2/2] ebos: run the diagnostics code for relative permeabilities maybe this needs to be reverted since the code in question can cause the simulation to abort inadvertently. As usual, `flow` is unaffected because this functionality is only called in experimental mode and flow calls it itself. --- ebos/eclbasevanguard.hh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index f6135f3af..ef6aa8142 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -31,6 +31,10 @@ #include #include +#include +#include +#include + #include #include #include @@ -316,6 +320,11 @@ public: asImp_().filterConnections_(); asImp_().updateOutputDir_(); asImp_().finalizeInit_(); + + if (enableExperiments) { + Opm::RelpermDiagnostics relpermDiagnostics; + relpermDiagnostics.diagnosis(*internalEclState_, *internalDeck_, asImp_().grid()); + } } /*!