Using pointers for WellProductionProperties
This commit is contained in:
@@ -81,8 +81,10 @@ BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) {
|
||||
BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
std::cout << "Parsing file SCHEDULE_WELLS2" << std::endl;
|
||||
DeckPtr deck = parser->parseFile(scheduleFile.string());
|
||||
ScheduleConstPtr sched(new Schedule(deck));
|
||||
std::cout << "Finished parsing file SCHEDULE_WELLS2" << std::endl;
|
||||
|
||||
BOOST_CHECK_EQUAL(3U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@@ -91,9 +93,9 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
|
||||
{
|
||||
WellPtr well2 = sched->getWell("W_2");
|
||||
BOOST_CHECK_EQUAL( 0 , well2->getResVRate(2));
|
||||
BOOST_CHECK_CLOSE( 777/Metric::Time , well2->getResVRate(7) , 0.0001);
|
||||
BOOST_CHECK_EQUAL( 0 , well2->getResVRate(8));
|
||||
BOOST_CHECK_EQUAL( 0 , well2->getProductionProperties(2)->ResVRate);
|
||||
BOOST_CHECK_CLOSE( 777/Metric::Time , well2->getProductionProperties(7)->ResVRate , 0.0001);
|
||||
BOOST_CHECK_EQUAL( 0 , well2->getProductionProperties(8)->ResVRate);
|
||||
|
||||
BOOST_CHECK_EQUAL( WellCommon::SHUT , well2->getStatus(3));
|
||||
|
||||
@@ -109,9 +111,9 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
|
||||
BOOST_CHECK_EQUAL( WellCommon::AUTO , well3->getStatus(3));
|
||||
|
||||
BOOST_CHECK_EQUAL( 0 , well3->getLiquidRate(2));
|
||||
BOOST_CHECK_CLOSE( 999/Metric::Time , well3->getLiquidRate(7) , 0.001);
|
||||
BOOST_CHECK_EQUAL( 0 , well3->getLiquidRate(8));
|
||||
BOOST_CHECK_EQUAL( 0 , well3->getProductionProperties(2)->LiquidRate);
|
||||
BOOST_CHECK_CLOSE( 999/Metric::Time , well3->getProductionProperties(7)->LiquidRate , 0.001);
|
||||
BOOST_CHECK_EQUAL( 0 , well3->getProductionProperties(8)->LiquidRate);
|
||||
|
||||
BOOST_CHECK_EQUAL( WellProducer::RESV, well3->getProducerControlMode( 7 ));
|
||||
}
|
||||
@@ -120,33 +122,33 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
WellPtr well1 = sched->getWell("W_1");
|
||||
|
||||
BOOST_CHECK(well1->isInPredictionMode(0));
|
||||
BOOST_CHECK_EQUAL(0, well1->getOilRate(0));
|
||||
BOOST_CHECK_EQUAL(0, well1->getProductionProperties(0)->OilRate);
|
||||
|
||||
BOOST_CHECK_EQUAL(0, well1->getOilRate(1));
|
||||
BOOST_CHECK_EQUAL(0, well1->getOilRate(2));
|
||||
BOOST_CHECK_EQUAL(0, well1->getProductionProperties(1)->OilRate);
|
||||
BOOST_CHECK_EQUAL(0, well1->getProductionProperties(2)->OilRate);
|
||||
|
||||
BOOST_CHECK(!well1->isInPredictionMode(3));
|
||||
BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getOilRate(3) , 0.001);
|
||||
BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getOilRate(4) , 0.001);
|
||||
BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getOilRate(5) , 0.001);
|
||||
BOOST_CHECK_CLOSE(4/Metric::Time , well1->getWaterRate(3) , 0.001);
|
||||
BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getGasRate(3) , 0.001);
|
||||
BOOST_CHECK_CLOSE(4/Metric::Time , well1->getWaterRate(4) , 0.001);
|
||||
BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getGasRate(4) , 0.001);
|
||||
BOOST_CHECK_CLOSE(4/Metric::Time , well1->getWaterRate(5) , 0.001);
|
||||
BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getGasRate(5) , 0.001);
|
||||
BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getProductionProperties(3)->OilRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getProductionProperties(4)->OilRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(4000/Metric::Time , well1->getProductionProperties(5)->OilRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(4/Metric::Time , well1->getProductionProperties(3)->WaterRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getProductionProperties(3)->GasRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(4/Metric::Time , well1->getProductionProperties(4)->WaterRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getProductionProperties(4)->GasRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(4/Metric::Time , well1->getProductionProperties(5)->WaterRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(12345/Metric::Time , well1->getProductionProperties(5)->GasRate , 0.001);
|
||||
|
||||
|
||||
BOOST_CHECK(!well1->isInPredictionMode(6));
|
||||
BOOST_CHECK_CLOSE(14000/Metric::Time , well1->getOilRate(6) , 0.001);
|
||||
BOOST_CHECK_CLOSE(14000/Metric::Time , well1->getProductionProperties(6)->OilRate , 0.001);
|
||||
|
||||
BOOST_CHECK(well1->isInPredictionMode(7));
|
||||
BOOST_CHECK_CLOSE(11000/Metric::Time , well1->getOilRate(7) , 0.001);
|
||||
BOOST_CHECK_CLOSE(44/Metric::Time , well1->getWaterRate(7) , 0.001);
|
||||
BOOST_CHECK_CLOSE(188/Metric::Time , well1->getGasRate(7) , 0.001);
|
||||
BOOST_CHECK_CLOSE(11000/Metric::Time , well1->getProductionProperties(7)->OilRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(44/Metric::Time , well1->getProductionProperties(7)->WaterRate , 0.001);
|
||||
BOOST_CHECK_CLOSE(188/Metric::Time , well1->getProductionProperties(7)->GasRate , 0.001);
|
||||
|
||||
BOOST_CHECK(!well1->isInPredictionMode(8));
|
||||
BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getOilRate(8) , 0.001);
|
||||
BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getProductionProperties(8)->OilRate , 0.001);
|
||||
|
||||
BOOST_CHECK( well1->isInjector(9));
|
||||
BOOST_CHECK_CLOSE(20000/Metric::Time , well1->getSurfaceInjectionRate(9) , 0.001);
|
||||
@@ -188,7 +190,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) {
|
||||
BOOST_CHECK(sched->hasWell("W_3"));
|
||||
{
|
||||
WellPtr well1 = sched->getWell("W_1");
|
||||
BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getOilRate(8) , 0.0001);
|
||||
BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getProductionProperties(8)->OilRate , 0.0001);
|
||||
CompletionSetConstPtr completions = well1->getCompletions(0);
|
||||
BOOST_CHECK_EQUAL(0U, completions->size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user