add unit test for WPOLYMER.

This commit is contained in:
Liu Ming 2014-11-21 13:21:24 +08:00
parent 81be71cac8
commit 5b3a92159a
2 changed files with 99 additions and 0 deletions

View File

@ -592,3 +592,46 @@ BOOST_AUTO_TEST_CASE(WELLS_SHUT) {
BOOST_CHECK_EQUAL( WellCommon::StatusEnum::SHUT , well3->getStatus(2));
}
BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) {
ParserPtr parser(new Parser());
boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER");
DeckPtr deck = parser->parseFile(scheduleFile.string());
ScheduleConstPtr sched(new Schedule(deck));
BOOST_CHECK_EQUAL(4U, sched->numWells());
BOOST_CHECK(sched->hasWell("INJE01"));
BOOST_CHECK(sched->hasWell("PROD01"));
WellConstPtr well1 = sched->getWell("INJE01");
BOOST_CHECK( well1->isInjector(0));
{
const WellPolymerProperties& props_well10 = well1->getPolymerProperties(0);
BOOST_CHECK_CLOSE(1.5*Metric::PolymerDensity, props_well10.m_polymerConcentration, 0.0001);
const WellPolymerProperties& props_well11 = well1->getPolymerProperties(1);
BOOST_CHECK_CLOSE(1.0*Metric::PolymerDensity, props_well11.m_polymerConcentration, 0.0001);
const WellPolymerProperties& props_well12 = well1->getPolymerProperties(2);
BOOST_CHECK_CLOSE(0.1*Metric::PolymerDensity, props_well12.m_polymerConcentration, 0.0001);
}
WellConstPtr well2 = sched->getWell("INJE02");
BOOST_CHECK( well2->isInjector(0));
{
const WellPolymerProperties& props_well20 = well2->getPolymerProperties(0);
BOOST_CHECK_CLOSE(2.0*Metric::PolymerDensity, props_well20.m_polymerConcentration, 0.0001);
const WellPolymerProperties& props_well21 = well2->getPolymerProperties(1);
BOOST_CHECK_CLOSE(1.5*Metric::PolymerDensity, props_well21.m_polymerConcentration, 0.0001);
const WellPolymerProperties& props_well22 = well2->getPolymerProperties(2);
BOOST_CHECK_CLOSE(0.2*Metric::PolymerDensity, props_well22.m_polymerConcentration, 0.0001);
}
WellConstPtr well3 = sched->getWell("INJE03");
BOOST_CHECK( well3->isInjector(0));
{
const WellPolymerProperties& props_well30 = well3->getPolymerProperties(0);
BOOST_CHECK_CLOSE(2.5*Metric::PolymerDensity, props_well30.m_polymerConcentration, 0.0001);
const WellPolymerProperties& props_well31 = well3->getPolymerProperties(1);
BOOST_CHECK_CLOSE(2.0*Metric::PolymerDensity, props_well31.m_polymerConcentration, 0.0001);
const WellPolymerProperties& props_well32 = well3->getPolymerProperties(2);
BOOST_CHECK_CLOSE(0.3*Metric::PolymerDensity, props_well32.m_polymerConcentration, 0.0001);
}
}

View File

@ -0,0 +1,56 @@
START
10 MAI 2007 /
SCHEDULE
WELSPECS
'INJE01' 'I' 1 1 1* 'WATER' /
'INJE02' 'I' 5 1 1* 'WATER' /
'INJE03' 'I' 10 1 1* 'WATER' /
'PROD01' 'P' 20 1 1* 'OIL' 7* /
/
COMPDAT
'INJE01' 1 1 2 2 'OPEN' 1* 200. 0.5 /
'INJE02' 5 1 2 2 'OPEN' 1* 200. 0.5 /
'INJE03' 10 1 2 2 'OPEN' 1* 200. 0.5 /
'PROD01' 20 1 1 1 'OPEN' 1* 200. 0.5 /
/
WCONINJE
'INJE01' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 /
'INJE02' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 /
'INJE03' 'WATER' 'OPEN' 'RATE' 800.00 1* 1000 /
/
WCONPROD
'PROD01' 'OPEN' 'BHP' 5* 200 /
/
WPOLYMER
'INJE01' 1.5 0.0 /
'INJE02' 2.0 0.0 /
'INJE03' 2.5 0.0 /
/
TSTEP
10
/
WPOLYMER
'INJE01' 1.0 0.0 /
'INJE02' 1.5 0.0 /
'INJE03' 2.0 0.0 /
/
TSTEP
10
/
WPOLYMER
'INJE01' 0.1 0.0 /
'INJE02' 0.2 0.0 /
'INJE03' 0.3 0.0 /
/
TSTEP
10
/