mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellsManager: do not require a control mode to be set if the well status is SHUT
For Norne it fell on its nose because of this...
This commit is contained in:
parent
0657cc4deb
commit
0a1775db02
@ -411,6 +411,11 @@ namespace Opm
|
|||||||
OPM_THROW(std::runtime_error, "Currently we do not support well status " << WellCommon::Status2String(well->getStatus( timeStep )));
|
OPM_THROW(std::runtime_error, "Currently we do not support well status " << WellCommon::Status2String(well->getStatus( timeStep )));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (well->getStatus(timeStep) == WellCommon::SHUT) {
|
||||||
|
well_controls_shut_well( w_->ctrls[well_index] );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (well->isInjector(timeStep)) {
|
if (well->isInjector(timeStep)) {
|
||||||
const WellInjectionProperties& injectionProperties = well->getInjectionProperties(timeStep);
|
const WellInjectionProperties& injectionProperties = well->getInjectionProperties(timeStep);
|
||||||
int ok = 1;
|
int ok = 1;
|
||||||
@ -484,10 +489,6 @@ namespace Opm
|
|||||||
OPM_THROW(std::runtime_error, "Control not specified in well " << well_names[well_index]);
|
OPM_THROW(std::runtime_error, "Control not specified in well " << well_names[well_index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to check if the well is shut or not
|
|
||||||
if (well->getStatus( timeStep ) == WellCommon::SHUT) {
|
|
||||||
well_controls_shut_well( w_->ctrls[well_index] );
|
|
||||||
}
|
|
||||||
set_current_control(well_index, cpos, w_);
|
set_current_control(well_index, cpos, w_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -619,13 +620,12 @@ namespace Opm
|
|||||||
if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) {
|
if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) {
|
||||||
OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]);
|
OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]);
|
||||||
}
|
}
|
||||||
// If it's shut, we complement the cpos
|
if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) {
|
||||||
if (well->getStatus(timeStep) == WellCommon::SHUT) {
|
|
||||||
well_controls_shut_well( w_->ctrls[well_index] );
|
|
||||||
} else if (cpos == -1 && mode != WellsManagerDetail::ProductionControl::GRUP) {
|
|
||||||
OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]);
|
OPM_THROW(std::runtime_error, "Control mode type " << mode << " not present in well " << well_names[well_index]);
|
||||||
}
|
}
|
||||||
set_current_control(well_index, cpos, w_);
|
else {
|
||||||
|
set_current_control(well_index, cpos, w_);
|
||||||
|
}
|
||||||
|
|
||||||
// Set well component fraction to match preferred phase for the well.
|
// Set well component fraction to match preferred phase for the well.
|
||||||
double cf[3] = { 0.0, 0.0, 0.0 };
|
double cf[3] = { 0.0, 0.0, 0.0 };
|
||||||
|
Loading…
Reference in New Issue
Block a user