diff --git a/opm/simulators/wells/MultisegmentWellEval.cpp b/opm/simulators/wells/MultisegmentWellEval.cpp index 78d30d149..009c135d1 100644 --- a/opm/simulators/wells/MultisegmentWellEval.cpp +++ b/opm/simulators/wells/MultisegmentWellEval.cpp @@ -1363,6 +1363,12 @@ updateThp(WellState& well_state, ws.thp = 0; return; } + // For THP controled wells, we know the thp value + bool thp_controled = baseif_.isInjector() ? ws.injection_cmode == Well::InjectorCMode::THP: + ws.production_cmode == Well::ProducerCMode::THP; + if (thp_controled) { + return; + } // the well is under other control types, we calculate the thp based on bhp and rates std::vector rates(3, 0.0); diff --git a/opm/simulators/wells/StandardWellEval.cpp b/opm/simulators/wells/StandardWellEval.cpp index 4b74113de..6cbc1291a 100644 --- a/opm/simulators/wells/StandardWellEval.cpp +++ b/opm/simulators/wells/StandardWellEval.cpp @@ -572,6 +572,8 @@ updateThp(WellState& well_state, ws.thp = 0; return; } + + // For THP controled wells, we know the thp value bool thp_controled = baseif_.isInjector() ? ws.injection_cmode == Well::InjectorCMode::THP: ws.production_cmode == Well::ProducerCMode::THP; if (thp_controled) {