From 9e90dcebe5c727fb4fb9a8f32833a2917986164e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 8 Oct 2012 14:27:56 +0200 Subject: [PATCH] Fix sign of production rate controls. In the Wells struct, production rate control targets must be negative (and injection rate control targets are always positive). In the WellsGroup classes, there are separate variables for injection and production, and all rates are positive. Therefore, upon adding or modification of a production rate control, the negated value must be used. --- opm/core/wells/WellsGroup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/wells/WellsGroup.cpp b/opm/core/wells/WellsGroup.cpp index afa17f12d..c340c1aec 100644 --- a/opm/core/wells/WellsGroup.cpp +++ b/opm/core/wells/WellsGroup.cpp @@ -863,7 +863,7 @@ namespace Opm return; } // We're a producer, so we need to negate the input - double ntarget = target; + double ntarget = -target; double distr[3] = { 0.0, 0.0, 0.0 }; const int* phase_pos = phaseUsage().phase_pos;