From 225d6ea26d0d71ff18f450764272cb79916eb308 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 26 Nov 2019 08:52:04 +0100 Subject: [PATCH] Make GCONSALE an injector --- opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp | 3 ++- src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp b/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp index f2d869117..17f3f6e00 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp @@ -63,7 +63,8 @@ enum class InjectionCMode : int { RESV = 2, REIN = 4, VREP = 8, - FLD = 16 + FLD = 16, + SALE = 32 }; static const std::string InjectionCMode2String( InjectionCMode enumValue ); static InjectionCMode InjectionCModeFromString( const std::string& stringValue ); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 1dba63b82..5ed945b8f 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -1629,6 +1629,12 @@ namespace { new_gconsale->add(groupName, sales_target, max_rate, min_rate, procedure); + auto group_ptr = std::make_shared(this->getGroup(groupName, currentStep)); + Group::GroupInjectionProperties injection; + injection.phase = Phase::GAS; + if (group_ptr->updateInjection(injection)) { + this->updateGroup(std::move(group_ptr), currentStep); + } } this->gconsale.update(currentStep, new_gconsale); }