mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pass unscaled newWellPI to Schedule::applyWellProdIndexScaling()
This commit is contained in:
parent
ee86c9d991
commit
d9f29945aa
@ -2600,21 +2600,15 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
auto getWellPIScalingFactor = [this](const int well_index,
|
|
||||||
const double newWellPI) -> double
|
|
||||||
{
|
|
||||||
return this->wells_ecl_[well_index].getWellPIScalingFactor(newWellPI);
|
|
||||||
};
|
|
||||||
|
|
||||||
auto rescaleWellPI =
|
auto rescaleWellPI =
|
||||||
[this, timeStepIdx](const int well_index,
|
[this, timeStepIdx](const int well_index,
|
||||||
const double scalingFactor) -> void
|
const double newWellPI) -> void
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
const auto& wname = this->wells_ecl_[well_index].name();
|
const auto& wname = this->wells_ecl_[well_index].name();
|
||||||
auto& schedule = this->ebosSimulator_.vanguard().schedule(); // Mutable
|
auto& schedule = this->ebosSimulator_.vanguard().schedule(); // Mutable
|
||||||
|
|
||||||
schedule.applyWellProdIndexScaling(wname, timeStepIdx, scalingFactor);
|
schedule.applyWellProdIndexScaling(wname, timeStepIdx, newWellPI);
|
||||||
this->wells_ecl_[well_index] = schedule.getWell(wname, timeStepIdx);
|
this->wells_ecl_[well_index] = schedule.getWell(wname, timeStepIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2659,8 +2653,7 @@ namespace Opm {
|
|||||||
for (auto wellID = 0*nw; wellID < nw; ++wellID) {
|
for (auto wellID = 0*nw; wellID < nw; ++wellID) {
|
||||||
if (hasWellPIEvent(wellID)) {
|
if (hasWellPIEvent(wellID)) {
|
||||||
const auto newWellPI = getWellPI(wellID);
|
const auto newWellPI = getWellPI(wellID);
|
||||||
const auto scalingFactor = getWellPIScalingFactor(wellID, newWellPI);
|
rescaleWellPI(wellID, newWellPI);
|
||||||
rescaleWellPI(wellID, scalingFactor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user