Enable items, 11, 12 and 13 of GCONPROD

This commit is contained in:
Paul 2023-07-12 20:44:10 +02:00
parent 1b905f884c
commit 7302c37b78
4 changed files with 29 additions and 6 deletions

View File

@ -98,9 +98,9 @@ partiallySupported()
{
{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
{11,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTWAT): Only NONE and RATE is supported"}}, // WATER_EXCEED_PROCEDURE
{12,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTGAS): Only NONE and RATE is supported"}}, // GAS_EXCEED_PROCEDURE
{13,{true, allow_values<std::string> {"NONE", "RATE"}, "GCONPROD(ACTLIQ): Only NONE and RATE is 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
},
},

View File

@ -403,6 +403,9 @@ actionOnBrokenConstraints(const Group& group,
void BlackoilWellModelConstraints::
actionOnBrokenConstraints(const Group& group,
const Group::ExceedAction& exceed_action,
const Group::ExceedAction& water_exceed_action,
const Group::ExceedAction& gas_exceed_action,
const Group::ExceedAction& liquid_exceed_action,
const Group::ProductionCMode& newControl,
GroupState& group_state,
DeferredLogger& deferred_logger) const
@ -412,9 +415,20 @@ actionOnBrokenConstraints(const Group& group,
std::string ss;
switch(exceed_action) {
case Group::ExceedAction::NONE: {
// phase specific exceed actions need to be considered
if (oldControl != newControl && oldControl != Group::ProductionCMode::NONE) {
ss = fmt::format("Group production exceed action is NONE for group {}. Nothing happens.",
group.name());
if ((water_exceed_action == Group::ExceedAction::RATE && newControl == Group::ProductionCMode::WRAT) ||
(gas_exceed_action == Group::ExceedAction::RATE && newControl == Group::ProductionCMode::GRAT) ||
(liquid_exceed_action == 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("Group production exceed action is NONE for group {}. Nothing happens.", group.name());
}
}
break;
}
@ -501,6 +515,9 @@ updateGroupIndividualControl(const Group& group,
this->actionOnBrokenConstraints(group,
controls.exceed_action,
controls.water_exceed_action,
controls.gas_exceed_action,
controls.liquid_exceed_action,
changed_this.first,
group_state, deferred_logger);
WellGroupHelpers::updateWellRatesFromGroupTargetScale(changed_this.second,

View File

@ -62,6 +62,9 @@ public:
//! \brief Execute action on broken constraint for a production well group.
void actionOnBrokenConstraints(const Group& group,
const Group::ExceedAction& exceed_action,
const Group::ExceedAction& water_exceed_action,
const Group::ExceedAction& gas_exceed_action,
const Group::ExceedAction& liquid_exceed_action,
const Group::ProductionCMode& newControl,
GroupState& group_state,
DeferredLogger& deferred_logger) const;

View File

@ -573,8 +573,11 @@ checkGroupHigherConstraints(const Group& group,
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 water_exceed_action = group.productionControls(summaryState_).water_exceed_action;
const auto gas_exceed_action = group.productionControls(summaryState_).gas_exceed_action;
const auto liquid_exceed_action = group.productionControls(summaryState_).liquid_exceed_action;
BlackoilWellModelConstraints(*this).
actionOnBrokenConstraints(group, exceed_action,
actionOnBrokenConstraints(group, exceed_action, water_exceed_action, gas_exceed_action, liquid_exceed_action,
Group::ProductionCMode::FLD,
this->groupState(),
deferred_logger);