From 853d64c12c39db079933d90e842aef2cb534ce04 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 19 Dec 2017 17:25:02 +0100 Subject: [PATCH] deactivate DR[SV]DT if VAPPARS is present actually, it depends on the ordering of these keywords, but this requires some probably rather extensive changes in opm-parser. --- ebos/eclproblem.hh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 43c390cd1..508e1132c 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -358,10 +358,16 @@ public: if (!deck.hasKeyword("NOGRAV") && EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) this->gravity_[dim - 1] = 9.80665; + // this is actually not fully correct: the latest occurence of VAPPARS and DRSDT + // or DRVDT up to the current time step in the schedule section counts, presence + // of VAPPARS alone is not sufficient to disable DR[SV]DT. TODO: implment support + // for this in opm-parser's Schedule object" + bool hasVappars = deck.hasKeyword("VAPPARS"); + // deal with DRSDT maxDRsDt_ = 0.0; maxDRs_ = -1.0; - if (deck.hasKeyword("DRSDT")) { + if (!hasVappars && deck.hasKeyword("DRSDT")) { const auto& drsdtKeyword = deck.getKeyword("DRSDT"); maxDRsDt_ = drsdtKeyword.getRecord(0).getItem("DRSDT_MAX").getSIDouble(0); size_t numDof = this->model().numGridDof(); @@ -371,7 +377,7 @@ public: // deal with DRVDT maxDRvDt_ = 0.0; maxDRv_ = -1.0; - if (deck.hasKeyword("DRVDT")) { + if (!hasVappars && deck.hasKeyword("DRVDT")) { const auto& drvdtKeyword = deck.getKeyword("DVSDT"); maxDRvDt_ = drvdtKeyword.getRecord(0).getItem("DRVDT_MAX").getSIDouble(0); size_t numDof = this->model().numGridDof();