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.
This commit is contained in:
Atgeirr Flø Rasmussen 2012-10-08 14:27:56 +02:00
parent d6154d8961
commit 9e90dcebe5

View File

@ -863,7 +863,7 @@ namespace Opm
return; return;
} }
// We're a producer, so we need to negate the input // 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 }; double distr[3] = { 0.0, 0.0, 0.0 };
const int* phase_pos = phaseUsage().phase_pos; const int* phase_pos = phaseUsage().phase_pos;