Merge pull request #673 from totto82/shut_wells_fix

BUGFIX Shut wells
This commit is contained in:
Atgeirr Flø Rasmussen 2014-10-27 10:13:43 +01:00
commit 1d7b5f2217
3 changed files with 7 additions and 31 deletions

View File

@ -412,8 +412,7 @@ namespace Opm
}
if (well->getStatus(timeStep) == WellCommon::SHUT) {
//well_controls_shut_well( w_->ctrls[well_index] );
well_index++;
//SHUT wells are not added to the well list
continue;
}

View File

@ -176,14 +176,7 @@ void check_controls_epoch1( struct WellControls ** ctrls) {
void check_controls_epoch3( struct WellControls ** ctrls) {
// The new producer
const struct WellControls * ctrls1 = ctrls[1];
const struct WellControls * ctrls2 = ctrls[2];
BOOST_CHECK_EQUAL( 0 , well_controls_get_num(ctrls1));
BOOST_CHECK( well_controls_well_is_shut( ctrls1));
BOOST_CHECK_EQUAL( 0 , well_controls_get_num(ctrls2));
BOOST_CHECK( well_controls_well_is_shut(ctrls2));
BOOST_CHECK_EQUAL( 5 , well_controls_get_num(ctrls1));
}
@ -215,10 +208,12 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid(), NULL);
const Wells* wells = wellsManager.c_wells();
BOOST_CHECK_EQUAL(3 , wells->number_of_wells);
// There is 3 wells in total in the deck at the 3rd schedule step.
// PROD1 is shut and should therefore not be counted.
// The new well is therefore the secound well.
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
BOOST_CHECK_EQUAL( wells->name[0] , "INJ1");
BOOST_CHECK_EQUAL( wells->name[1] , "PROD1");
BOOST_CHECK_EQUAL( wells->name[2] , "NEW");
BOOST_CHECK_EQUAL( wells->name[1] , "NEW");
check_controls_epoch3( wellsManager.c_wells()->ctrls );
}

View File

@ -83,23 +83,5 @@ WCONHIST
'NEW' 'OPEN' 'ORAT' 0.000 0.000 0.000 5* /
/
WCONPROD
'NEW' 'SHUT' /
/
WCONPROD
'PROD1' 'SHUT' /
/
END