Remove WELL_CONNECTIONS_UPDATED Event
With the introduction of Schedule::applyWellProdIndexScaling(), this special-purpose event type is no longer needed and only causes confusion.
This commit is contained in:
@@ -106,12 +106,6 @@ namespace Opm
|
|||||||
* New explicit well productivity/injectivity assignment.
|
* New explicit well productivity/injectivity assignment.
|
||||||
*/
|
*/
|
||||||
WELL_PRODUCTIVITY_INDEX = (1 << 16),
|
WELL_PRODUCTIVITY_INDEX = (1 << 16),
|
||||||
|
|
||||||
/*
|
|
||||||
* Well's internal WellConnections structure changed.
|
|
||||||
* Rerun WELPI scaling if applicable.
|
|
||||||
*/
|
|
||||||
WELL_CONNECTIONS_UPDATED = (1 << 17),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,10 +154,8 @@ namespace {
|
|||||||
auto connections = std::shared_ptr<WellConnections>( new WellConnections( well2->getConnections()));
|
auto connections = std::shared_ptr<WellConnections>( new WellConnections( well2->getConnections()));
|
||||||
connections->loadCOMPDAT(record, handlerContext.grid, handlerContext.fieldPropsManager);
|
connections->loadCOMPDAT(record, handlerContext.grid, handlerContext.fieldPropsManager);
|
||||||
|
|
||||||
if (well2->updateConnections(connections, handlerContext.grid, handlerContext.fieldPropsManager.get_int("PVTNUM"))) {
|
if (well2->updateConnections(connections, handlerContext.grid, handlerContext.fieldPropsManager.get_int("PVTNUM")))
|
||||||
this->updateWell(well2, handlerContext.currentStep);
|
this->updateWell(std::move(well2), handlerContext.currentStep);
|
||||||
this->addWellGroupEvent(name, ScheduleEvents::WELL_CONNECTIONS_UPDATED, handlerContext.currentStep);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->addWellGroupEvent(name, ScheduleEvents::COMPLETION_CHANGE, handlerContext.currentStep);
|
this->addWellGroupEvent(name, ScheduleEvents::COMPLETION_CHANGE, handlerContext.currentStep);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -667,10 +667,9 @@ private:
|
|||||||
{
|
{
|
||||||
auto& dynamic_state = this->wells_static.at(wname);
|
auto& dynamic_state = this->wells_static.at(wname);
|
||||||
auto well_ptr = std::make_shared<Well>( *dynamic_state[currentStep] );
|
auto well_ptr = std::make_shared<Well>( *dynamic_state[currentStep] );
|
||||||
if (well_ptr->handleWELOPEN(record, comp_status, action_mode)) {
|
if (well_ptr->handleWELOPEN(record, comp_status, action_mode))
|
||||||
// The updateWell call breaks test at line 825 and 831 in ScheduleTests
|
// The updateWell call breaks test at line 825 and 831 in ScheduleTests
|
||||||
this->updateWell(well_ptr, currentStep);
|
this->updateWell(std::move(well_ptr), currentStep);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_events.addEvent( ScheduleEvents::COMPLETION_CHANGE, currentStep );
|
m_events.addEvent( ScheduleEvents::COMPLETION_CHANGE, currentStep );
|
||||||
|
|||||||
@@ -3829,21 +3829,6 @@ END
|
|||||||
BOOST_CHECK_MESSAGE(! scalingApplicable[1] , "Connection[1] must NOT be eligible for WELPI scaling");
|
BOOST_CHECK_MESSAGE(! scalingApplicable[1] , "Connection[1] must NOT be eligible for WELPI scaling");
|
||||||
BOOST_CHECK_MESSAGE(bool(scalingApplicable[0]), "Connection[2] must be eligible for WELPI scaling");
|
BOOST_CHECK_MESSAGE(bool(scalingApplicable[0]), "Connection[2] must be eligible for WELPI scaling");
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_CHECK_MESSAGE(sched.hasWellGroupEvent("P", ScheduleEvents::WELL_CONNECTIONS_UPDATED, 0),
|
|
||||||
"Well P must have WELL_CONNECTIONS_UPDATED event at report step 0");
|
|
||||||
|
|
||||||
BOOST_CHECK_MESSAGE(!sched.hasWellGroupEvent("P", ScheduleEvents::WELL_CONNECTIONS_UPDATED, 1),
|
|
||||||
"Well P must NOT have WELL_CONNECTIONS_UPDATED event at report step 1");
|
|
||||||
|
|
||||||
BOOST_CHECK_MESSAGE(sched.hasWellGroupEvent("P", ScheduleEvents::WELL_CONNECTIONS_UPDATED, 2),
|
|
||||||
"Well P must have WELL_CONNECTIONS_UPDATED event at report step 2");
|
|
||||||
|
|
||||||
BOOST_CHECK_MESSAGE(!sched.hasWellGroupEvent("P", ScheduleEvents::WELL_CONNECTIONS_UPDATED, 3),
|
|
||||||
"Well P must NOT have WELL_CONNECTIONS_UPDATED event at report step 3");
|
|
||||||
|
|
||||||
BOOST_CHECK_MESSAGE(sched.hasWellGroupEvent("P", ScheduleEvents::WELL_PRODUCTIVITY_INDEX, 1),
|
|
||||||
"Must have WELL_PRODUCTIVITY_INDEX event at report step 1");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(Schedule_ApplyWellProdIndexScaling) {
|
BOOST_AUTO_TEST_CASE(Schedule_ApplyWellProdIndexScaling) {
|
||||||
|
|||||||
Reference in New Issue
Block a user