mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
@@ -203,10 +203,15 @@ namespace Opm {
|
||||
WellGroupHelpers::setCmodeGroup(fieldGroup, schedule(), summaryState, timeStepIdx, this->wellState(), this->groupState());
|
||||
|
||||
// Compute reservoir volumes for RESV controls.
|
||||
rateConverter_.reset(new RateConverterType (phase_usage_,
|
||||
std::vector<int>(local_num_cells_, 0)));
|
||||
rateConverter_.reset(new RateConverterType (phase_usage_, std::vector<int>(local_num_cells_, 0)));
|
||||
rateConverter_->template defineState<ElementContext>(ebosSimulator_);
|
||||
|
||||
// Compute regional average pressures used by gpmaint
|
||||
const auto& fp = this->eclState_.fieldProps();
|
||||
const auto& fipnum = fp.get_int("FIPNUM");
|
||||
regionalAveragePressureCalculator_.reset(new AverageRegionalPressureType (phase_usage_,fipnum));
|
||||
regionalAveragePressureCalculator_->template defineState<ElementContext>(ebosSimulator_);
|
||||
|
||||
{
|
||||
const auto& sched_state = this->schedule()[timeStepIdx];
|
||||
// update VFP properties
|
||||
@@ -458,6 +463,12 @@ namespace Opm {
|
||||
// update the rate converter with current averages pressures etc in
|
||||
rateConverter_->template defineState<ElementContext>(ebosSimulator_);
|
||||
|
||||
regionalAveragePressureCalculator_->template defineState<ElementContext>(ebosSimulator_);
|
||||
const Group& fieldGroup = schedule_.getGroup("FIELD", reportStepIdx);
|
||||
WellGroupHelpers::updateGpMaintTargetForGroups(fieldGroup,
|
||||
schedule_, *regionalAveragePressureCalculator_, reportStepIdx, dt, this->wellState(), this->groupState());
|
||||
|
||||
|
||||
// calculate the well potentials
|
||||
try {
|
||||
updateWellPotentials(reportStepIdx,
|
||||
@@ -472,7 +483,6 @@ namespace Opm {
|
||||
updateWellTestState(simulationTime, wellTestState_);
|
||||
|
||||
// check group sales limits at the end of the timestep
|
||||
const Group& fieldGroup = schedule().getGroup("FIELD", reportStepIdx);
|
||||
checkGconsaleLimits(fieldGroup, this->wellState(),
|
||||
ebosSimulator_.episodeIndex(), local_deferredLogger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user