From 8c7d7e3d2e44985fc6e7b71a61632af3f90882ed Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 8 Oct 2019 15:49:48 +0200 Subject: [PATCH] enables rockcomp in flow --- ebos/eclfluxmodule.hh | 8 +++----- ebos/eclproblem.hh | 23 ++++++++++------------- opm/simulators/flow/MissingFeatures.cpp | 1 - 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ebos/eclfluxmodule.hh b/ebos/eclfluxmodule.hh index 09ea27436..3b3db87c3 100644 --- a/ebos/eclfluxmodule.hh +++ b/ebos/eclfluxmodule.hh @@ -119,7 +119,6 @@ class EclTransExtensiveQuantities enum { numPhases = FluidSystem::numPhases }; enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) }; enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; - enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; typedef Opm::MathToolbox Toolbox; typedef Dune::FieldVector DimVector; @@ -437,10 +436,9 @@ protected: const auto& up = elemCtx.intensiveQuantities(upstreamIdx, timeIdx); Evaluation transModified = trans; - if (enableExperiments) { - // deal with water induced rock compaction - transModified *= problem.template rockCompTransMultiplier(up, stencil.globalSpaceIndex(upstreamIdx)); - } + + // deal with water induced rock compaction + transModified *= problem.template rockCompTransMultiplier(up, stencil.globalSpaceIndex(upstreamIdx)); if (upstreamIdx == interiorDofIdx_) { volumeFlux_[phaseIdx] = diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 640668f30..76ce9141f 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -872,13 +872,11 @@ public: for (size_t pvtRegionIdx = 0; pvtRegionIdx < maxDRv_.size(); ++pvtRegionIdx) maxDRv_[pvtRegionIdx] = oilVaporizationControl.getMaxDRVDT(pvtRegionIdx)*this->simulator().timeStepSize(); - if (enableExperiments) { - // update maximum water saturation and minimum pressure - // used when ROCKCOMP is activated - const bool invalidateFromMaxWaterSat = updateMaxWaterSaturation_(); - const bool invalidateFromMinPressure = updateMinPressure_(); - invalidateIntensiveQuantities = invalidateFromMaxWaterSat || invalidateFromMinPressure; - } + // update maximum water saturation and minimum pressure + // used when ROCKCOMP is activated + const bool invalidateFromMaxWaterSat = updateMaxWaterSaturation_(); + const bool invalidateFromMinPressure = updateMinPressure_(); + invalidateIntensiveQuantities = invalidateFromMaxWaterSat || invalidateFromMinPressure; if (invalidateIntensiveQuantities) this->model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0); @@ -1768,7 +1766,7 @@ public: template LhsEval rockCompPoroMultiplier(const IntensiveQuantities& intQuants, unsigned elementIdx) const { - if (!enableExperiments || rockCompPoroMult_.size() == 0) + if (rockCompPoroMult_.empty()) return 1.0; unsigned tableIdx = 0; @@ -1800,7 +1798,7 @@ public: template LhsEval rockCompTransMultiplier(const IntensiveQuantities& intQuants, unsigned elementIdx) const { - if (!enableExperiments || rockCompTransMult_.size() == 0) + if (rockCompTransMult_.empty()) return 1.0; unsigned tableIdx = 0; @@ -1831,7 +1829,7 @@ public: */ Scalar overburdenPressure(unsigned elementIdx) const { - if (!enableExperiments || overburdenPressure_.size() == 0) + if (overburdenPressure_.empty()) return 0.0; return overburdenPressure_[elementIdx]; @@ -2074,7 +2072,7 @@ private: bool updateMinPressure_() { // IRREVERS option is used in ROCKCOMP - if (minOilPressure_.size() == 0) + if (minOilPressure_.empty()) return false; ElementContext elemCtx(this->simulator()); @@ -2120,8 +2118,7 @@ private: } // read the parameters for water-induced rock compaction - if (enableExperiments) - readRockCompactionParameters_(); + readRockCompactionParameters_(); // check the kind of region which is supposed to be used by checking the ROCKOPTS // keyword. note that for some funny reason, the ROCK keyword uses PVTNUM by diff --git a/opm/simulators/flow/MissingFeatures.cpp b/opm/simulators/flow/MissingFeatures.cpp index e28b81b87..58d711a3e 100644 --- a/opm/simulators/flow/MissingFeatures.cpp +++ b/opm/simulators/flow/MissingFeatures.cpp @@ -393,7 +393,6 @@ namespace MissingFeatures { "RADFIN4", "RHO", "RKTRMDIR", - "ROCKCOMP", "ROCKOPTS", "ROCKTAB", "RPTGRID",