From 3bc451ad949e66bb2e0d30ba6271e806ca206f93 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Mon, 12 Dec 2022 16:12:14 +0100 Subject: [PATCH] parsing WINJFCNC --- opm/input/eclipse/Schedule/Schedule.hpp | 1 + opm/input/eclipse/Schedule/Well/Well.hpp | 4 ++++ src/opm/input/eclipse/Schedule/KeywordHandlers.cpp | 14 ++++++++++++++ src/opm/input/eclipse/Schedule/Well/Well.cpp | 3 +++ 4 files changed, 22 insertions(+) diff --git a/opm/input/eclipse/Schedule/Schedule.hpp b/opm/input/eclipse/Schedule/Schedule.hpp index 2a2689b25..3abfb2fbe 100644 --- a/opm/input/eclipse/Schedule/Schedule.hpp +++ b/opm/input/eclipse/Schedule/Schedule.hpp @@ -747,6 +747,7 @@ namespace Opm void handleWWPAVE (HandlerContext&); void handleWPIMULT (HandlerContext&); void handleWINJDAM (HandlerContext&); + void handleWINJFCNC (HandlerContext&); void handleWINJMULT (HandlerContext&); void handleWPMITAB (HandlerContext&); void handleWPOLYMER (HandlerContext&); diff --git a/opm/input/eclipse/Schedule/Well/Well.hpp b/opm/input/eclipse/Schedule/Well/Well.hpp index 6e5856e7d..260ea2c2f 100644 --- a/opm/input/eclipse/Schedule/Well/Well.hpp +++ b/opm/input/eclipse/Schedule/Well/Well.hpp @@ -483,6 +483,8 @@ public: bool handleWPIMULT(const DeckRecord& record); bool handleWINJDAM(const DeckRecord& record, const KeywordLocation& location); bool handleWINJMULT(const DeckRecord& record, const KeywordLocation& location); + // TODO: makes it a handleWINJFCNC? + void setFilterConc(const double conc); bool applyGlobalWPIMULT(double scale_factor); void filterConnections(const ActiveGridCells& grid); @@ -551,6 +553,7 @@ public: serializer(well_temperature); serializer(inj_mult_mode); serializer(well_inj_mult); + serializer(m_filter_concentration); } private: @@ -599,6 +602,7 @@ private: double well_temperature; InjMultMode inj_mult_mode = InjMultMode::NONE; std::optional well_inj_mult; + double m_filter_concentration = 0.; }; std::ostream& operator<<( std::ostream&, const Well::WellInjectionProperties& ); diff --git a/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp b/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp index ea357d03a..afb618184 100644 --- a/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp +++ b/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp @@ -2013,6 +2013,19 @@ Well{0} entered with 'FIELD' parent group: } } + void Schedule::handleWINJFCNC(Schedule::HandlerContext& handlerContext) { + for (const auto& record : handlerContext.keyword) { + const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); + const auto well_names = this->wellNames(wellNamePattern, handlerContext); + // TODO: will check whether we should put all the filter cake related to a separate property + for (const auto& well_name: well_names) { + auto well = this->snapshots.back().wells(well_name); + well.setFilterConc(record.getItem("VOL_CONCENTRATION").get(0).getSI()); + this->snapshots.back().wells.update(std::move(well)); + } + } + } + void Schedule::handleWSALT(HandlerContext& handlerContext) { for (const auto& record : handlerContext.keyword) { const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0); @@ -2565,6 +2578,7 @@ Well{0} entered with 'FIELD' parent group: { "WWPAVE" , &Schedule::handleWWPAVE }, { "WPIMULT" , &Schedule::handleWPIMULT }, { "WINJDAM" , &Schedule::handleWINJDAM }, + { "WINJFCNC", &Schedule::handleWINJFCNC }, { "WPMITAB" , &Schedule::handleWPMITAB }, { "WPOLYMER", &Schedule::handleWPOLYMER }, { "WRFT" , &Schedule::handleWRFT }, diff --git a/src/opm/input/eclipse/Schedule/Well/Well.cpp b/src/opm/input/eclipse/Schedule/Well/Well.cpp index ccf4097b7..8bc0c5813 100644 --- a/src/opm/input/eclipse/Schedule/Well/Well.cpp +++ b/src/opm/input/eclipse/Schedule/Well/Well.cpp @@ -1742,3 +1742,6 @@ bool Opm::Well::aciveWellInjMult() const { } +void Opm::Well::setFilterConc(const double conc) { + this->m_filter_concentration = conc; +}