From a2c6e674dce9065c1c75fc47df418961d7dc8fce Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Thu, 27 Apr 2023 14:00:49 +0200 Subject: [PATCH] only prediction wells can have THP constraint --- opm/simulators/wells/WellInterfaceGeneric.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opm/simulators/wells/WellInterfaceGeneric.cpp b/opm/simulators/wells/WellInterfaceGeneric.cpp index 710aad7ac..754372b8c 100644 --- a/opm/simulators/wells/WellInterfaceGeneric.cpp +++ b/opm/simulators/wells/WellInterfaceGeneric.cpp @@ -192,6 +192,11 @@ double WellInterfaceGeneric::rsRvInj() const bool WellInterfaceGeneric::wellHasTHPConstraints(const SummaryState& summaryState) const { + // only wells under prediction mode can have THP constraint + if (!this->wellEcl().predictionMode()) { + return false; + } + if (dynamic_thp_limit_) { return true; }