From d90717877ba870f2375f0f7488af2839336df7b2 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Fri, 4 Apr 2014 12:15:49 +0200 Subject: [PATCH] Hack to set compi for producer. compi is set to [0 1 0] for all producers --- opm/core/wells/WellsManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 389b2dddb..d7ef2c8cb 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -761,6 +761,11 @@ namespace Opm OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]); } set_current_control(well_index, cpos, w_); + + // Set well component fraction in producers to 1 for all phases. This HACK make sure volrates are nonzero for all perforations. + double cf[3] = { 0, 1, 0}; + std::copy(cf, cf + phaseUsage.num_phases, w_->comp_frac + well_index*phaseUsage.num_phases); + } well_index++; }