Prediction mode: Support GRUP control

If a well is available for group control, we should add that control
mode to its Injection or ProductionProperties before assigning a new
current (active) control mode to the well ('.controlMode').

Suggested by: [at] joakim-hove.
This commit is contained in:
Bård Skaflestad 2014-07-07 15:33:05 +02:00
parent ef5a9e8e1a
commit 92c179f4d3

View File

@ -187,6 +187,13 @@ namespace Opm {
for (auto wellIter=wells.begin(); wellIter != wells.end(); ++wellIter) {
WellPtr well = *wellIter;
if (well->isAvailableForGroupControl(currentStep)) {
properties.addProductionControl(WellProducer::GRUP);
}
else {
properties.dropProductionControl(WellProducer::GRUP);
}
if (status != WellCommon::SHUT) {
const std::string& cmodeString =
record->getItem("CMODE")->getTrimmedString(0);
@ -267,6 +274,11 @@ namespace Opm {
properties.dropInjectionControl(WellInjector::BHP);
else
properties.addInjectionControl(WellInjector::BHP);
if (well->isAvailableForGroupControl(currentStep))
properties.addInjectionControl(WellInjector::GRUP);
else
properties.dropInjectionControl(WellInjector::GRUP);
{
const std::string& cmodeString = record->getItem("CMODE")->getTrimmedString(0);
WellInjector::ControlModeEnum controlMode = WellInjector::ControlModeFromString( cmodeString );