diff --git a/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE b/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE index 4c4663d4e..8aba42d3a 100644 --- a/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE +++ b/src/opm/input/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE @@ -102,8 +102,10 @@ "WBGLR", "WBHP", "WBHPH", + "WBHPT", "WTHP", "WTHPH", + "WTHPT", "WPI", "WBP", "WBP4", diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 61cb2267c..dfb86a30e 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -724,7 +724,27 @@ inline quantity well_rate_target( const fn_args& args ) { return zero; } } else { - return zero; + if (phase == rt::wat){ + if (wtype.injector() ){ + return zero; + } + const auto& production = well->productionControls(args.st); + return { production.water_rate, rate_unit() }; + } else if (phase == rt::oil){ + if (wtype.injector() ){ + return zero; + } + const auto& production = well->productionControls(args.st); + return { production.oil_rate, rate_unit() }; + } else if (phase == rt::gas){ + if (wtype.injector() ){ + return zero; + } + const auto& production = well->productionControls(args.st); + return { production.gas_rate, rate_unit() }; + } else{ + return zero; + } } } @@ -1272,6 +1292,30 @@ inline quantity thp_history( const fn_args& args ) { return { thp_hist, measure::pressure }; } +inline quantity bhp_target( const fn_args& args ) { + if( args.schedule_wells.empty() ) return { 0.0, measure::pressure }; + + const auto* sched_well = args.schedule_wells.front(); + + const auto bhp_target = sched_well->isProducer() + ? sched_well->getProductionProperties().BHPTarget.getSI() + : sched_well->getInjectionProperties().BHPTarget.getSI(); + + return { bhp_target, measure::pressure }; +} + +inline quantity thp_target( const fn_args& args ) { + if( args.schedule_wells.empty() ) return { 0.0, measure::pressure }; + + const auto* sched_well = args.schedule_wells.front(); + + const auto thp_target = sched_well->isProducer() + ? sched_well->getProductionProperties().THPTarget.getSI() + : sched_well->getInjectionProperties().THPTarget.getSI(); + + return { thp_target, measure::pressure }; +} + inline quantity node_pressure(const fn_args& args) { auto nodePos = args.grp_nwrk.nodeData.find(args.group_name); @@ -1391,6 +1435,16 @@ inline quantity res_vol_production_target( const fn_args& args ) return { sum, measure::rate }; } +inline quantity res_vol_injection_target( const fn_args& args ) +{ + double sum = 0.0; + for (const auto* sched_well : args.schedule_wells) + if (sched_well->getInjectionProperties().predictionMode) + sum += sched_well->getInjectionProperties().reservoirInjectionRate.getSI(); + + return { sum, measure::rate }; +} + inline quantity duration( const fn_args& args ) { return { args.duration, measure::time }; } @@ -1828,6 +1882,9 @@ static const auto funs = std::unordered_map { { "WWPR", rate< rt::wat, producer > }, { "WOPR", rate< rt::oil, producer > }, + { "WWPRT", well_rate_target }, + { "WOPRT", well_rate_target }, + { "WGPRT", well_rate_target }, { "WWPTL",mul(ratel< rt::wat, producer >, duration) }, { "WGPTL",mul(ratel< rt::gas, producer >, duration) }, { "WOPTL",mul(ratel< rt::oil, producer >, duration) }, @@ -1916,6 +1973,7 @@ static const auto funs = std::unordered_map { { "WTPCHEA", temperature< producer >}, { "WTICHEA", temperature< injector >}, { "WVPRT", res_vol_production_target }, + { "WVIRT", res_vol_injection_target }, { "WMCTL", well_control_mode }, @@ -1935,6 +1993,10 @@ static const auto funs = std::unordered_map { { "GGIGR", group_guiderate }, { "GWIGR", group_guiderate }, + { "GWIRT", well_rate_target }, + { "GOIRT", well_rate_target }, + { "GGIRT", well_rate_target }, + { "GWIT", mul( rate< rt::wat, injector >, duration ) }, { "GOIT", mul( rate< rt::oil, injector >, duration ) }, { "GGIT", mul( rate< rt::gas, injector >, duration ) }, @@ -1968,6 +2030,11 @@ static const auto funs = std::unordered_map { { "GWPGR", group_guiderate }, { "GVPGR", group_guiderate }, + + { "GWPRT", well_rate_target }, + { "GOPRT", well_rate_target }, + { "GGPRT", well_rate_target }, + { "GPR", node_pressure }, { "GWPT", mul( rate< rt::wat, producer >, duration ) }, @@ -2034,6 +2101,8 @@ static const auto funs = std::unordered_map { { "WTHPH", thp_history }, { "WBHPH", bhp_history }, + { "WTHPT", thp_target }, + { "WBHPT", bhp_target }, { "GWPRH", production_history< Opm::Phase::WATER > }, { "GOPRH", production_history< Opm::Phase::OIL > }, @@ -2072,6 +2141,7 @@ static const auto funs = std::unordered_map { { "GMWPR", flowing< producer > }, { "GVPRT", res_vol_production_target }, + { "GVIRT", res_vol_injection_target }, { "CPR", cpr }, { "CGIRL", cratel< rt::gas, injector> }, @@ -2250,6 +2320,7 @@ static const auto funs = std::unordered_map { { "FMWIN", flowing< injector > }, { "FMWPR", flowing< producer > }, { "FVPRT", res_vol_production_target }, + { "FVIRT", res_vol_injection_target }, { "FMWPA", abandoned_well< producer > }, { "FMWIA", abandoned_well< injector >}, @@ -2258,6 +2329,14 @@ static const auto funs = std::unordered_map { { "FMCTW", group_control< false, false, true, false >}, { "FMCTG", group_control< false, false, false, true >}, + { "FWIRT", well_rate_target }, + { "FOIRT", well_rate_target }, + { "FGIRT", well_rate_target }, + { "FWPRT", well_rate_target }, + { "FOPRT", well_rate_target }, + { "FGPRT", well_rate_target }, + + /* Region properties */ { "ROIR" , region_rate< rt::oil, injector > }, { "RGIR" , region_rate< rt::gas, injector > },