mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4359 from totto82/fixGPMAINT2
Fix GPMAINT for groups without control
This commit is contained in:
@@ -208,9 +208,8 @@ namespace Opm {
|
||||
|
||||
// Compute regional average pressures used by gpmaint
|
||||
if (schedule_[timeStepIdx].has_gpmaint()) {
|
||||
const auto& fp = this->eclState_.fieldProps();
|
||||
const auto& fipnum = fp.get_int("FIPNUM");
|
||||
regionalAveragePressureCalculator_.reset(new AverageRegionalPressureType (phase_usage_,fipnum));
|
||||
WellGroupHelpers::setRegionAveragePressureCalculator(fieldGroup, schedule(),
|
||||
timeStepIdx, this->eclState_.fieldProps(), phase_usage_, regionalAveragePressureCalculator_);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -330,10 +329,12 @@ namespace Opm {
|
||||
auto exc_type = ExceptionType::NONE;
|
||||
// update gpmaint targets
|
||||
if (schedule_[reportStepIdx].has_gpmaint()) {
|
||||
regionalAveragePressureCalculator_->template defineState<ElementContext>(ebosSimulator_);
|
||||
for (auto& calculator : regionalAveragePressureCalculator_) {
|
||||
calculator.second->template defineState<ElementContext>(ebosSimulator_);
|
||||
}
|
||||
const double dt = ebosSimulator_.timeStepSize();
|
||||
WellGroupHelpers::updateGpMaintTargetForGroups(fieldGroup,
|
||||
schedule_, *regionalAveragePressureCalculator_, reportStepIdx, dt, this->wellState(), this->groupState());
|
||||
schedule_, regionalAveragePressureCalculator_, reportStepIdx, dt, this->wellState(), this->groupState());
|
||||
}
|
||||
try {
|
||||
// Compute initial well solution for new wells and injectors that change injection type i.e. WAG.
|
||||
|
||||
Reference in New Issue
Block a user