From b8bf45d24dc3bffc124bd5b91fa264d8010d00e9 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 18 Nov 2014 07:44:33 +0100 Subject: [PATCH] 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) --- opm/core/wells/WellsManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 2403f373b..72fb3a14a 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -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) {