From bcc96eda2cec97206c754282ca24902ba6347201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 16 Apr 2021 18:56:54 +0200 Subject: [PATCH] Merge pull request #2432 from goncalvesmachadoc/welltemp_output Fix Well Temperature Output --- src/opm/output/eclipse/Summary.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 6f98d6568..dfd24c730 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -926,6 +926,7 @@ quantity roew(const fn_args& args) { return { oil_prod / args.initial_inplace.get( region_name, Opm::Inplace::Phase::OIL, args.num ) , measure::identity }; } +template< bool injection = true> inline quantity temperature( const fn_args& args ) { const quantity zero = { 0, measure::temperature }; if (args.schedule_wells.empty()) @@ -933,7 +934,8 @@ inline quantity temperature( const fn_args& args ) { const auto p = args.wells.find(args.schedule_wells.front().name()); if ((p == args.wells.end()) || - (p->second.dynamicStatus == Opm::Well::Status::SHUT)) + (p->second.dynamicStatus == Opm::Well::Status::SHUT) || + (p->second.current_control.isProducer == injection)) { return zero; } @@ -1510,8 +1512,8 @@ static const std::unordered_map< std::string, ofun > funs = { { "WBHP", bhp }, { "WTHP", thp }, - { "WTPCHEA", temperature}, - { "WTICHEA", temperature}, + { "WTPCHEA", temperature< producer >}, + { "WTICHEA", temperature< injector >}, { "WVPRT", res_vol_production_target }, { "WMCTL", well_control_mode },