diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 9a2cf6129..c13c4e0c4 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -190,7 +190,7 @@ namespace Opm { WellPtr well = getWell(wellName); double injectionRate = record->getItem("SURFACE_FLOW_TARGET")->getSIDouble(0); - well->setInjectionRate( currentStep , injectionRate ); + well->setSurfaceInjectionRate( currentStep , injectionRate ); well->setInPredictionMode(currentStep, true); } } @@ -202,7 +202,7 @@ namespace Opm { WellPtr well = getWell(wellName); double injectionRate = record->getItem("RATE")->getSIDouble(0); - well->setInjectionRate( currentStep , injectionRate ); + well->setSurfaceInjectionRate( currentStep , injectionRate ); well->setInPredictionMode(currentStep, false ); } } diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well.cpp b/opm/parser/eclipse/EclipseState/Schedule/Well.cpp index 076afa6ee..281d7390e 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Well.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Well.cpp @@ -31,7 +31,7 @@ namespace Opm { : m_oilRate( new DynamicState( timeMap , 0.0)) , m_gasRate(new DynamicState(timeMap, 0.0)), m_waterRate(new DynamicState(timeMap, 0.0)), - m_injectionRate(new DynamicState(timeMap, 0.0)), + m_surfaceInjectionRate(new DynamicState(timeMap, 0.0)), m_inPredictionMode(new DynamicState(timeMap, true)), m_isProducer(new DynamicState(timeMap, true)) , m_completions( new DynamicState( timeMap , CompletionSetConstPtr( new CompletionSet()) )), @@ -85,12 +85,12 @@ namespace Opm { switch2Producer( timeStep ); } - double Well::getInjectionRate(size_t timeStep) const { - return m_injectionRate->get(timeStep); + double Well::getSurfaceInjectionRate(size_t timeStep) const { + return m_surfaceInjectionRate->get(timeStep); } - void Well::setInjectionRate(size_t timeStep, double injectionRate) { - m_injectionRate->add(timeStep, injectionRate); + void Well::setSurfaceInjectionRate(size_t timeStep, double injectionRate) { + m_surfaceInjectionRate->add(timeStep, injectionRate); switch2Injector( timeStep ); } @@ -104,7 +104,7 @@ namespace Opm { void Well::switch2Producer(size_t timeStep ) { m_isProducer->add(timeStep , true); - m_injectionRate->add(timeStep, 0); + m_surfaceInjectionRate->add(timeStep, 0); } void Well::switch2Injector(size_t timeStep ) { diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well.hpp b/opm/parser/eclipse/EclipseState/Schedule/Well.hpp index 2ab5690c3..5d2e4d1d4 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Well.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Well.hpp @@ -46,8 +46,8 @@ namespace Opm { void setGasRate(size_t timeStep, double gasRate); double getWaterRate(size_t timeStep) const; void setWaterRate(size_t timeStep, double waterRate); - double getInjectionRate(size_t timeStep) const; - void setInjectionRate(size_t timeStep, double injectionRate); + double getSurfaceInjectionRate(size_t timeStep) const; + void setSurfaceInjectionRate(size_t timeStep, double injectionRate); int getHeadI() const; int getHeadJ() const; @@ -70,7 +70,7 @@ namespace Opm { std::shared_ptr > m_oilRate; std::shared_ptr > m_gasRate; std::shared_ptr > m_waterRate; - std::shared_ptr > m_injectionRate; + std::shared_ptr > m_surfaceInjectionRate; std::shared_ptr > m_inPredictionMode; std::shared_ptr > m_isProducer; diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp index a52d80cb9..085cf0d0e 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp @@ -149,14 +149,14 @@ BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) { } -BOOST_AUTO_TEST_CASE(setInjectionRate_RateSetCorrect) { +BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) { Opm::TimeMapPtr timeMap = createXDaysTimeMap(10); Opm::Well well("WELL1" , 0, 0, 0.0, timeMap , 0); - BOOST_CHECK_EQUAL(0.0 , well.getInjectionRate( 5 )); - well.setInjectionRate( 5 , 108 ); - BOOST_CHECK_EQUAL(108 , well.getInjectionRate( 5 )); - BOOST_CHECK_EQUAL(108 , well.getInjectionRate( 8 )); + BOOST_CHECK_EQUAL(0.0 , well.getSurfaceInjectionRate( 5 )); + well.setSurfaceInjectionRate( 5 , 108 ); + BOOST_CHECK_EQUAL(108 , well.getSurfaceInjectionRate( 5 )); + BOOST_CHECK_EQUAL(108 , well.getSurfaceInjectionRate( 8 )); } @@ -169,10 +169,10 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) { BOOST_CHECK_EQUAL( true , well.isProducer(0)); /* Set an injection rate => Well becomes an Injector */ - well.setInjectionRate(3 , 100); + well.setSurfaceInjectionRate(3 , 100); BOOST_CHECK_EQUAL( true , well.isInjector(3)); BOOST_CHECK_EQUAL( false , well.isProducer(3)); - BOOST_CHECK_EQUAL( 100 , well.getInjectionRate(3)); + BOOST_CHECK_EQUAL( 100 , well.getSurfaceInjectionRate(3)); /* Set rates => Well becomes a producer; injection rate should be set to 0. */ well.setOilRate(4 , 100 ); @@ -181,16 +181,16 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) { BOOST_CHECK_EQUAL( false , well.isInjector(4)); BOOST_CHECK_EQUAL( true , well.isProducer(4)); - BOOST_CHECK_EQUAL( 0 , well.getInjectionRate(4)); + BOOST_CHECK_EQUAL( 0 , well.getSurfaceInjectionRate(4)); BOOST_CHECK_EQUAL( 100 , well.getOilRate(4)); BOOST_CHECK_EQUAL( 200 , well.getGasRate(4)); BOOST_CHECK_EQUAL( 300 , well.getWaterRate(4)); /* Set injection rate => Well becomes injector - all produced rates -> 0 */ - well.setInjectionRate( 6 , 50 ); + well.setSurfaceInjectionRate( 6 , 50 ); BOOST_CHECK_EQUAL( true , well.isInjector(6)); BOOST_CHECK_EQUAL( false , well.isProducer(6)); - BOOST_CHECK_EQUAL( 50 , well.getInjectionRate(6)); + BOOST_CHECK_EQUAL( 50 , well.getSurfaceInjectionRate(6)); BOOST_CHECK_EQUAL( 0 , well.getOilRate(6)); BOOST_CHECK_EQUAL( 0 , well.getGasRate(6)); BOOST_CHECK_EQUAL( 0 , well.getWaterRate(6)); diff --git a/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp b/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp index 03fc26e02..dff514564 100644 --- a/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp +++ b/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp @@ -102,8 +102,8 @@ BOOST_AUTO_TEST_CASE(WellTesting) { BOOST_CHECK_CLOSE(13000/Metric::Time , well1->getOilRate(8) , 0.001); BOOST_CHECK( well1->isInjector(9)); - BOOST_CHECK_CLOSE(20000/Metric::Time , well1->getInjectionRate(9) , 0.001); - BOOST_CHECK_CLOSE(5000/Metric::Time , well1->getInjectionRate(10) , 0.001); + BOOST_CHECK_CLOSE(20000/Metric::Time , well1->getSurfaceInjectionRate(9) , 0.001); + BOOST_CHECK_CLOSE(5000/Metric::Time , well1->getSurfaceInjectionRate(10) , 0.001); } }