mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
keep current injection and production control
This commit is contained in:
parent
008eb17693
commit
04701580d8
@ -35,19 +35,23 @@ namespace Opm {
|
|||||||
setCmodeGroup( schedule.getGroup2(groupName, reportStepIdx), schedule, summaryState, reportStepIdx, wellState);
|
setCmodeGroup( schedule.getGroup2(groupName, reportStepIdx), schedule, summaryState, reportStepIdx, wellState);
|
||||||
}
|
}
|
||||||
|
|
||||||
// use FLD as default control
|
if (!wellState.hasInjectionGroupControl(group.name())) {
|
||||||
wellState.setCurrentInjectionGroupControl(group.name(), Group2::InjectionCMode::FLD);
|
// use NONE as default control
|
||||||
wellState.setCurrentProductionGroupControl(group.name(), Group2::ProductionCMode::FLD);
|
wellState.setCurrentInjectionGroupControl(group.name(), Group2::InjectionCMode::NONE);
|
||||||
|
|
||||||
if (group.isInjectionGroup()) {
|
if (group.isInjectionGroup()) {
|
||||||
const auto controls = group.injectionControls(summaryState);
|
const auto controls = group.injectionControls(summaryState);
|
||||||
wellState.setCurrentInjectionGroupControl(group.name(), controls.cmode);
|
wellState.setCurrentInjectionGroupControl(group.name(), controls.cmode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!wellState.hasProductionGroupControl(group.name())) {
|
||||||
|
// use NONE as default control
|
||||||
|
wellState.setCurrentProductionGroupControl(group.name(), Group2::ProductionCMode::NONE);
|
||||||
if (group.isProductionGroup()) {
|
if (group.isProductionGroup()) {
|
||||||
const auto controls = group.productionControls(summaryState);
|
const auto controls = group.productionControls(summaryState);
|
||||||
wellState.setCurrentProductionGroupControl(group.name(), controls.cmode);
|
wellState.setCurrentProductionGroupControl(group.name(), controls.cmode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void accumulateGroupEfficiencyFactor(const Group2& group, const Schedule& schedule, const int reportStepIdx, double& factor) {
|
inline void accumulateGroupEfficiencyFactor(const Group2& group, const Schedule& schedule, const int reportStepIdx, double& factor) {
|
||||||
|
@ -160,9 +160,6 @@ namespace Opm
|
|||||||
|
|
||||||
current_injection_controls_.resize(nw);
|
current_injection_controls_.resize(nw);
|
||||||
current_production_controls_.resize(nw);
|
current_production_controls_.resize(nw);
|
||||||
current_injection_group_controls_.clear();
|
|
||||||
current_production_group_controls_.clear();
|
|
||||||
|
|
||||||
|
|
||||||
perfRateSolvent_.clear();
|
perfRateSolvent_.clear();
|
||||||
perfRateSolvent_.resize(nperf, 0.0);
|
perfRateSolvent_.resize(nperf, 0.0);
|
||||||
@ -326,6 +323,14 @@ namespace Opm
|
|||||||
std::vector<Well2::ProducerCMode>& currentProductionControls() { return current_production_controls_; }
|
std::vector<Well2::ProducerCMode>& currentProductionControls() { return current_production_controls_; }
|
||||||
const std::vector<Well2::ProducerCMode>& currentProductionControls() const { return current_production_controls_; }
|
const std::vector<Well2::ProducerCMode>& currentProductionControls() const { return current_production_controls_; }
|
||||||
|
|
||||||
|
bool hasProductionGroupControl(const std::string& groupName) {
|
||||||
|
return current_production_group_controls_.count(groupName) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasInjectionGroupControl(const std::string& groupName) {
|
||||||
|
return current_injection_group_controls_.count(groupName) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
/// One current control per group.
|
/// One current control per group.
|
||||||
void setCurrentProductionGroupControl(const std::string& groupName, const Group2::ProductionCMode& groupControl ) {
|
void setCurrentProductionGroupControl(const std::string& groupName, const Group2::ProductionCMode& groupControl ) {
|
||||||
current_production_group_controls_[groupName] = groupControl;
|
current_production_group_controls_[groupName] = groupControl;
|
||||||
|
Loading…
Reference in New Issue
Block a user