mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-02 09:16:07 -06:00
throw if well does not have group target
if it is under GRUP control and OPEN.
This commit is contained in:
1 parent
4b298e1dc8
commit
11c95cf224
1 file changed
+2
-2
@@ -1968,13 +1968,13 @@ updateNONEProductionGroups(const GasLiftOpt& glo, DeferredLogger& deferred_logge
|
||||
|
||||
for (std::size_t w = 0; w < well_state.size(); ++w) {
|
||||
const auto& ws = well_state.well(w);
|
||||
if (ws.producer && ws.production_cmode == WellProducerCMode::GRUP) {
|
||||
if (ws.producer && ws.production_cmode == WellProducerCMode::GRUP && ws.status == Well::Status::OPEN) {
|
||||
const auto& group_target = ws.group_target;
|
||||
if (group_target.has_value()) {
|
||||
targeted_production_groups.insert(group_target->group_name);
|
||||
} else {
|
||||
const std::string msg = fmt::format("Well {} is on GRUP control but has no group target assigned.", ws.name);
|
||||
deferred_logger.debug(msg);
|
||||
OPM_DEFLOG_THROW(std::runtime_error, msg, deferred_logger);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user