From 69d5ec94c96eaa4e48934ed14a1bba89024f8b36 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 25 Nov 2016 13:45:38 +0100 Subject: [PATCH] adding localWellsActive() checking for two MSW functions updatePerfPhaseRatesAndPressures() and addWellFluxEq() --- opm/autodiff/MultisegmentWells_impl.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/autodiff/MultisegmentWells_impl.hpp b/opm/autodiff/MultisegmentWells_impl.hpp index 6c2863296..b8815e828 100644 --- a/opm/autodiff/MultisegmentWells_impl.hpp +++ b/opm/autodiff/MultisegmentWells_impl.hpp @@ -348,6 +348,9 @@ namespace Opm const SolutionState& state, WellState& xw) const { + if ( !localWellsActive() ) { + return; + } // Update the perforation phase rates (used to calculate the pressure drop in the wellbore). const int np = numPhases(); const int nw = numWells(); @@ -604,6 +607,9 @@ namespace Opm const SolutionState& state, LinearisedBlackoilResidual& residual) { + if ( !localWellsActive() ) { + return; + } // the well flux equations are for each segment and each phase. // /delta m_p_n / dt - /sigma Q_pi - /sigma q_pj + Q_pn = 0 // 1. It is the gain of the amount of the component p in the segment n during the