Drop BHP control when producer <-> injector.
This commit is contained in:
parent
ce9727b337
commit
90c55b0257
@ -68,14 +68,18 @@ namespace Opm {
|
||||
|
||||
void Well::switchToProducer( size_t timeStep) {
|
||||
WellInjectionProperties p = getInjectionPropertiesCopy(timeStep);
|
||||
|
||||
p.BHPLimit = 0;
|
||||
p.dropInjectionControl( Opm::WellInjector::BHP );
|
||||
setInjectionProperties( timeStep , p );
|
||||
}
|
||||
|
||||
|
||||
void Well::switchToInjector( size_t timeStep) {
|
||||
WellProductionProperties p = getProductionPropertiesCopy(timeStep);
|
||||
|
||||
p.BHPLimit = 0;
|
||||
p.dropProductionControl( Opm::WellProducer::BHP );
|
||||
setProductionProperties( timeStep , p );
|
||||
}
|
||||
|
||||
|
@ -1416,6 +1416,10 @@ BOOST_AUTO_TEST_CASE(changeBhpLimitInHistoryModeWithWeltarg) {
|
||||
// Check that the BHP limit is reset when changing between injector and producer.
|
||||
BOOST_CHECK_EQUAL(well_i->getInjectionProperties(3).BHPLimit, 0); // 3
|
||||
BOOST_CHECK_EQUAL(well_i->getInjectionProperties(4).BHPLimit, 0); // 4
|
||||
|
||||
BOOST_CHECK_EQUAL( true , well_i->getInjectionProperties(2).hasInjectionControl(Opm::WellInjector::BHP) );
|
||||
BOOST_CHECK_EQUAL( false , well_i->getInjectionProperties(3).hasInjectionControl(Opm::WellInjector::BHP) );
|
||||
BOOST_CHECK_EQUAL( false , well_i->getInjectionProperties(4).hasInjectionControl(Opm::WellInjector::BHP) );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user