mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4748 from plgbrts/gconprod
Enable items, 11, 12 and 13 of GCONPROD
This commit is contained in:
commit
ac6b9b2f34
@ -97,10 +97,10 @@ partiallySupported()
|
||||
"GCONPROD",
|
||||
{
|
||||
{2,{true, allow_values<std::string> {"NONE", "FLD", "ORAT", "WRAT", "GRAT", "LRAT", "RESV"}, "GCONPROD(TARGET): valid option should be NONE/FLD/ORAT/WRAT/GRAT/LRAT or RESV"}}, // CONTROL_MODE
|
||||
{7,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTION): Only NONE and RATE is supported"}},
|
||||
{11,{true, allow_values<std::string> {"NONE"}, "GCONPROD(ACTWAT): water violation procedure not implemented, item should be defaulted"}}, // WATER_EXCEED_PROCEDURE
|
||||
{12,{true, allow_values<std::string> {"NONE"}, "GCONPROD(ACTGAS): gas violation procedure not implemented, item should be defaulted"}}, // GAS_EXCEED_PROCEDURE
|
||||
{13,{true, allow_values<std::string> {"NONE"}, "GCONPROD(ACTLIQ): liquid violation procedure not implemented, item should be defaulted"}}, // LIQUID_EXCEED_PROCEDURE
|
||||
{7,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTION): Only NONE and RATE are supported"}},
|
||||
{11,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTWAT): Only NONE and RATE are supported"}}, // WATER_EXCEED_PROCEDURE
|
||||
{12,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTGAS): Only NONE and RATE are supported"}}, // GAS_EXCEED_PROCEDURE
|
||||
{13,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTLIQ): Only NONE and RATE are supported"}}, // LIQUID_EXCEED_PROCEDURE
|
||||
{21,{true, allow_values<std::string> {"NONE"}, "GCONPROD(COMBPROC): linearly combined procedure is not used and should be defaulted (1*)"}}, // LIN_TARGET_EXCEED_PROCEDURE
|
||||
},
|
||||
},
|
||||
|
@ -402,7 +402,7 @@ actionOnBrokenConstraints(const Group& group,
|
||||
|
||||
void BlackoilWellModelConstraints::
|
||||
actionOnBrokenConstraints(const Group& group,
|
||||
const Group::ExceedAction& exceed_action,
|
||||
const Group::GroupLimitAction group_limit_action,
|
||||
const Group::ProductionCMode& newControl,
|
||||
GroupState& group_state,
|
||||
DeferredLogger& deferred_logger) const
|
||||
@ -410,11 +410,23 @@ actionOnBrokenConstraints(const Group& group,
|
||||
const Group::ProductionCMode oldControl = wellModel_.groupState().production_control(group.name());
|
||||
|
||||
std::string ss;
|
||||
switch(exceed_action) {
|
||||
switch(group_limit_action.allRates) {
|
||||
case Group::ExceedAction::NONE: {
|
||||
if (oldControl != newControl && oldControl != Group::ProductionCMode::NONE) {
|
||||
ss = fmt::format("Group production exceed action is NONE for group {}. Nothing happens.",
|
||||
group.name());
|
||||
if ((group_limit_action.water == Group::ExceedAction::RATE && newControl == Group::ProductionCMode::WRAT) ||
|
||||
(group_limit_action.gas == Group::ExceedAction::RATE && newControl == Group::ProductionCMode::GRAT) ||
|
||||
(group_limit_action.liquid == Group::ExceedAction::RATE && newControl == Group::ProductionCMode::LRAT)) {
|
||||
group_state.production_control(group.name(), newControl);
|
||||
ss = fmt::format("Switching production control mode for group {} from {} to {}",
|
||||
group.name(),
|
||||
Group::ProductionCMode2String(oldControl),
|
||||
Group::ProductionCMode2String(newControl));
|
||||
}
|
||||
else {
|
||||
ss = fmt::format("Procedure on exceeding {} limit is NONE for group {}. Nothing is done.",
|
||||
Group::ProductionCMode2String(oldControl),
|
||||
group.name());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -500,7 +512,7 @@ updateGroupIndividualControl(const Group& group,
|
||||
Group::ProductionCMode2String(changed_this.first));
|
||||
|
||||
this->actionOnBrokenConstraints(group,
|
||||
controls.exceed_action,
|
||||
controls.group_limit_action,
|
||||
changed_this.first,
|
||||
group_state, deferred_logger);
|
||||
WellGroupHelpers::updateWellRatesFromGroupTargetScale(changed_this.second,
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
|
||||
//! \brief Execute action on broken constraint for a production well group.
|
||||
void actionOnBrokenConstraints(const Group& group,
|
||||
const Group::ExceedAction& exceed_action,
|
||||
const Group::GroupLimitAction group_limit_action,
|
||||
const Group::ProductionCMode& newControl,
|
||||
GroupState& group_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
@ -607,9 +607,9 @@ checkGroupHigherConstraints(const Group& group,
|
||||
deferred_logger);
|
||||
if (is_changed) {
|
||||
switched_prod_groups_.insert_or_assign(group.name(), Group::ProductionCMode2String(Group::ProductionCMode::FLD));
|
||||
const auto exceed_action = group.productionControls(summaryState_).exceed_action;
|
||||
const auto group_limit_action = group.productionControls(summaryState_).group_limit_action;
|
||||
BlackoilWellModelConstraints(*this).
|
||||
actionOnBrokenConstraints(group, exceed_action,
|
||||
actionOnBrokenConstraints(group, group_limit_action,
|
||||
Group::ProductionCMode::FLD,
|
||||
this->groupState(),
|
||||
deferred_logger);
|
||||
|
Loading…
Reference in New Issue
Block a user