mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
commit
ad7af41a44
@ -276,7 +276,7 @@ namespace Opm {
|
|||||||
+ ScheduleEvents::INJECTION_UPDATE
|
+ ScheduleEvents::INJECTION_UPDATE
|
||||||
+ ScheduleEvents::NEW_WELL;
|
+ ScheduleEvents::NEW_WELL;
|
||||||
|
|
||||||
if(!schedule().hasWellEvent(well.name(), effective_events_mask, timeStepIdx))
|
if(!schedule().hasWellGroupEvent(well.name(), effective_events_mask, timeStepIdx))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (well.isProducer()) {
|
if (well.isProducer()) {
|
||||||
@ -1806,14 +1806,11 @@ namespace Opm {
|
|||||||
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
|
|
||||||
if (oldControl != newControl) {
|
|
||||||
const std::string from = Group::ProductionCMode2String(oldControl);
|
|
||||||
ss << "Group " << group.name() << " exceeding "
|
|
||||||
<< from << " limit \n";
|
|
||||||
}
|
|
||||||
switch(exceed_action) {
|
switch(exceed_action) {
|
||||||
case Group::ExceedAction::NONE: {
|
case Group::ExceedAction::NONE: {
|
||||||
OPM_DEFLOG_THROW(std::runtime_error, "Group " + group.name() + "GroupProductionExceedLimit NONE not implemented", deferred_logger);
|
if (oldControl != newControl && oldControl != Group::ProductionCMode::NONE) {
|
||||||
|
ss << "Group production exceed limit is NONE for group " + group.name() + ". Nothing happens";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Group::ExceedAction::CON: {
|
case Group::ExceedAction::CON: {
|
||||||
|
@ -707,7 +707,7 @@ namespace Opm
|
|||||||
const auto& fs = intQuants.fluidState();
|
const auto& fs = intQuants.fluidState();
|
||||||
Eval perf_pressure = getPerfCellPressure(fs);
|
Eval perf_pressure = getPerfCellPressure(fs);
|
||||||
const double drawdown = well_state.perfPress()[first_perf_ + perf] - perf_pressure.value();
|
const double drawdown = well_state.perfPress()[first_perf_ + perf] - perf_pressure.value();
|
||||||
const bool new_well = schedule.hasWellEvent(name(), ScheduleEvents::NEW_WELL, current_step_);
|
const bool new_well = schedule.hasWellGroupEvent(name(), ScheduleEvents::NEW_WELL, current_step_);
|
||||||
double productivity_index = cq_s[compIdx].value() / drawdown;
|
double productivity_index = cq_s[compIdx].value() / drawdown;
|
||||||
scaleProductivityIndex(perf, productivity_index, new_well, deferred_logger);
|
scaleProductivityIndex(perf, productivity_index, new_well, deferred_logger);
|
||||||
well_state.productivityIndex()[np*index_of_well_ + p] += productivity_index;
|
well_state.productivityIndex()[np*index_of_well_ + p] += productivity_index;
|
||||||
|
@ -35,21 +35,22 @@ namespace Opm {
|
|||||||
setCmodeGroup( schedule.getGroup(groupName, reportStepIdx), schedule, summaryState, reportStepIdx, wellState);
|
setCmodeGroup( schedule.getGroup(groupName, reportStepIdx), schedule, summaryState, reportStepIdx, wellState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// use NONE as default control
|
||||||
if (!wellState.hasInjectionGroupControl(group.name())) {
|
if (!wellState.hasInjectionGroupControl(group.name())) {
|
||||||
// use NONE as default control
|
|
||||||
wellState.setCurrentInjectionGroupControl(group.name(), Group::InjectionCMode::NONE);
|
wellState.setCurrentInjectionGroupControl(group.name(), Group::InjectionCMode::NONE);
|
||||||
if (group.isInjectionGroup()) {
|
|
||||||
const auto controls = group.injectionControls(summaryState);
|
|
||||||
wellState.setCurrentInjectionGroupControl(group.name(), controls.cmode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!wellState.hasProductionGroupControl(group.name())) {
|
if (!wellState.hasProductionGroupControl(group.name())) {
|
||||||
// use NONE as default control
|
|
||||||
wellState.setCurrentProductionGroupControl(group.name(), Group::ProductionCMode::NONE);
|
wellState.setCurrentProductionGroupControl(group.name(), Group::ProductionCMode::NONE);
|
||||||
if (group.isProductionGroup()) {
|
}
|
||||||
const auto controls = group.productionControls(summaryState);
|
|
||||||
wellState.setCurrentProductionGroupControl(group.name(), controls.cmode);
|
if (group.isInjectionGroup() && schedule.hasWellGroupEvent(group.name(), ScheduleEvents::GROUP_INJECTION_UPDATE, reportStepIdx)) {
|
||||||
}
|
const auto controls = group.injectionControls(summaryState);
|
||||||
|
wellState.setCurrentInjectionGroupControl(group.name(), controls.cmode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (group.isProductionGroup() && schedule.hasWellGroupEvent(group.name(), ScheduleEvents::GROUP_PRODUCTION_UPDATE, reportStepIdx)) {
|
||||||
|
const auto controls = group.productionControls(summaryState);
|
||||||
|
wellState.setCurrentProductionGroupControl(group.name(), controls.cmode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ namespace Opm
|
|||||||
+ ScheduleEvents::INJECTION_UPDATE;
|
+ ScheduleEvents::INJECTION_UPDATE;
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
effective_events_occurred_[w]
|
effective_events_occurred_[w]
|
||||||
= schedule.hasWellEvent(wells_ecl[w].name(), effective_events_mask, report_step);
|
= schedule.hasWellGroupEvent(wells_ecl[w].name(), effective_events_mask, report_step);
|
||||||
}
|
}
|
||||||
} // end of if (!well_ecl.empty() )
|
} // end of if (!well_ecl.empty() )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user