Updated WellsManager testing

This commit is contained in:
Joakim Hove 2014-10-14 12:44:25 +02:00
parent 827089b835
commit 4c53baed3e
2 changed files with 69 additions and 3 deletions

View File

@ -172,6 +172,23 @@ 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_AUTO_TEST_CASE(New_Constructor_Works) {
const std::string filename = "wells_manager_data.data";
@ -192,6 +209,20 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
wells_static_check( wellsManager.c_wells() );
check_controls_epoch1( wellsManager.c_wells()->ctrls );
}
{
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid(), NULL);
const Wells* wells = wellsManager.c_wells();
BOOST_CHECK_EQUAL(3 , 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");
check_controls_epoch3( wellsManager.c_wells()->ctrls );
}
}

View File

@ -43,7 +43,7 @@ WCONINJE
/
DATES
DATES -- Step1
1 'FEB' 2000 /
/
@ -56,15 +56,50 @@ WCONINJE
/
DATES
DATES -- Step2
1 'MAR' 2000 /
/
WCONPROD
'PROD1' 'SHUT' 15* /
'PROD1' 'SHUT' /
/
DATES -- Step3
1 'APR' 2000 /
/
WELSPECS
'NEW' 'G' 2 2 1* 'OIL' 2* 'STOP' 4* /
/
COMPDAT
'NEW' 2 2 2 2 'OPEN' 1 10.6092 0.5 /
/
WCONHIST
'NEW' 'OPEN' 'ORAT' 0.000 0.000 0.000 5* /
/
WCONPROD
'NEW' 'SHUT' /
/
WCONPROD
'PROD1' 'SHUT' /
/
END