Support stopped wells

The given control is applied to the stopped well, and the status is set
to not open. (i.e closed, but currently named shut)
This commit is contained in:
Tor Harald Sandve 2014-11-18 07:44:33 +01:00
parent 0d044eada0
commit b8bf45d24d

View File

@ -412,8 +412,9 @@ namespace Opm
for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
WellConstPtr well = (*wellIter);
if ( !( well->getStatus( timeStep ) == WellCommon::SHUT || well->getStatus( timeStep ) == WellCommon::OPEN) ) {
OPM_THROW(std::runtime_error, "Currently we do not support well status " << WellCommon::Status2String(well->getStatus( timeStep )));
if (well->getStatus(timeStep) == WellCommon::STOP) {
// STOPed wells are added to the well list with the given controll and closed.
well_controls_shut_well(w_->ctrls[well_index]);
}
if (well->getStatus(timeStep) == WellCommon::SHUT) {