mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
update well rates from target
This commit is contained in:
@@ -282,6 +282,11 @@ namespace Opm {
|
|||||||
void prepareTimeStep(DeferredLogger& deferred_logger);
|
void prepareTimeStep(DeferredLogger& deferred_logger);
|
||||||
void initPrimaryVariablesEvaluation() const;
|
void initPrimaryVariablesEvaluation() const;
|
||||||
void updateWellControls(DeferredLogger& deferred_logger, const bool checkGroupControls);
|
void updateWellControls(DeferredLogger& deferred_logger, const bool checkGroupControls);
|
||||||
|
|
||||||
|
void updateAndCommunicate(const int reportStepIdx,
|
||||||
|
const int iterationIdx,
|
||||||
|
DeferredLogger& deferred_logger);
|
||||||
|
|
||||||
WellInterfacePtr getWell(const std::string& well_name) const;
|
WellInterfacePtr getWell(const std::string& well_name) const;
|
||||||
bool hasWell(const std::string& well_name) const;
|
bool hasWell(const std::string& well_name) const;
|
||||||
|
|
||||||
|
|||||||
@@ -1272,7 +1272,8 @@ namespace Opm {
|
|||||||
|
|
||||||
const int episodeIdx = ebosSimulator_.episodeIndex();
|
const int episodeIdx = ebosSimulator_.episodeIndex();
|
||||||
const int iterationIdx = ebosSimulator_.model().newtonMethod().numIterations();
|
const int iterationIdx = ebosSimulator_.model().newtonMethod().numIterations();
|
||||||
updateAndCommunicateGroupData(episodeIdx, iterationIdx);
|
|
||||||
|
updateAndCommunicate(episodeIdx, iterationIdx, deferred_logger);
|
||||||
|
|
||||||
updateNetworkPressures(episodeIdx);
|
updateNetworkPressures(episodeIdx);
|
||||||
|
|
||||||
@@ -1284,12 +1285,14 @@ namespace Opm {
|
|||||||
updateGroupIndividualControls(deferred_logger, switched_groups,
|
updateGroupIndividualControls(deferred_logger, switched_groups,
|
||||||
episodeIdx, iterationIdx);
|
episodeIdx, iterationIdx);
|
||||||
|
|
||||||
|
updateAndCommunicate(episodeIdx, iterationIdx, deferred_logger);
|
||||||
|
|
||||||
// Check group's constraints from higher levels.
|
// Check group's constraints from higher levels.
|
||||||
updateGroupHigherControls(deferred_logger,
|
updateGroupHigherControls(deferred_logger,
|
||||||
episodeIdx,
|
episodeIdx,
|
||||||
switched_groups);
|
switched_groups);
|
||||||
|
|
||||||
updateAndCommunicateGroupData(episodeIdx, iterationIdx);
|
updateAndCommunicate(episodeIdx, iterationIdx, deferred_logger);
|
||||||
|
|
||||||
// Check wells' group constraints and communicate.
|
// Check wells' group constraints and communicate.
|
||||||
for (const auto& well : well_container_) {
|
for (const auto& well : well_container_) {
|
||||||
@@ -1299,7 +1302,7 @@ namespace Opm {
|
|||||||
switched_wells.insert(well->name());
|
switched_wells.insert(well->name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateAndCommunicateGroupData(episodeIdx, iterationIdx);
|
updateAndCommunicate(episodeIdx, iterationIdx, deferred_logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check individual well constraints and communicate.
|
// Check individual well constraints and communicate.
|
||||||
@@ -1310,11 +1313,23 @@ namespace Opm {
|
|||||||
const auto mode = WellInterface<TypeTag>::IndividualOrGroup::Individual;
|
const auto mode = WellInterface<TypeTag>::IndividualOrGroup::Individual;
|
||||||
well->updateWellControl(ebosSimulator_, mode, this->wellState(), this->groupState(), deferred_logger);
|
well->updateWellControl(ebosSimulator_, mode, this->wellState(), this->groupState(), deferred_logger);
|
||||||
}
|
}
|
||||||
updateAndCommunicateGroupData(episodeIdx, iterationIdx);
|
updateAndCommunicate(episodeIdx, iterationIdx, deferred_logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename TypeTag>
|
||||||
|
void
|
||||||
|
BlackoilWellModel<TypeTag>::
|
||||||
|
updateAndCommunicate(const int reportStepIdx,
|
||||||
|
const int iterationIdx,
|
||||||
|
DeferredLogger& deferred_logger)
|
||||||
|
{
|
||||||
|
updateAndCommunicateGroupData(reportStepIdx, iterationIdx);
|
||||||
|
// if a well or group change control it affects all wells that are under the same group
|
||||||
|
for (const auto& well : well_container_) {
|
||||||
|
well->updateWellStateWithTarget(ebosSimulator_, this->groupState(), this->wellState(), deferred_logger);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user