Apply WELPI is based on newWellPI and not scaling factor

This commit is contained in:
Joakim Hove
2021-02-05 12:52:09 +01:00
parent c9908df914
commit e571aca93b
2 changed files with 8 additions and 11 deletions

View File

@@ -1296,7 +1296,7 @@ void Schedule::applyAction(std::size_t reportStep, const std::chrono::system_clo
void Schedule::applyWellProdIndexScaling(const std::string& well_name, const std::size_t reportStep, const double scalingFactor) {
void Schedule::applyWellProdIndexScaling(const std::string& well_name, const std::size_t reportStep, const double newWellPI) {
auto wstat = this->wells_static.find(well_name);
if (wstat == this->wells_static.end())
return;
@@ -1319,6 +1319,7 @@ void Schedule::applyAction(std::size_t reportStep, const std::chrono::system_clo
// which means unique_well_instances is a vector<pair<report_step, shared_ptr<>>>
std::vector<bool> scalingApplicable;
auto wellPtr = start->second;
auto scalingFactor = wellPtr->getWellPIScalingFactor(newWellPI);
wellPtr->applyWellProdIndexScaling(scalingFactor, scalingApplicable);
for (; start != end; ++start)