diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 843f02439..a81c4a3c2 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -677,6 +677,8 @@ static const std::unordered_map< std::string, ofun > funs = { { "GOIR", rate< rt::oil, injector > }, { "GGIR", rate< rt::gas, injector > }, { "GNIR", rate< rt::solvent, injector > }, + { "GVIR", sum( sum( rate< rt::reservoir_water, injector >, rate< rt::reservoir_oil, injector > ), + rate< rt::reservoir_gas, injector > ) }, { "GWIT", mul( rate< rt::wat, injector >, duration ) }, { "GOIT", mul( rate< rt::oil, injector >, duration ) }, { "GGIT", mul( rate< rt::gas, injector >, duration ) }, diff --git a/tests/test_Summary.cpp b/tests/test_Summary.cpp index b3301ca8b..713c6f400 100644 --- a/tests/test_Summary.cpp +++ b/tests/test_Summary.cpp @@ -518,6 +518,8 @@ BOOST_AUTO_TEST_CASE(group_keywords) { BOOST_CHECK_CLOSE( 30.0, ecl_sum_get_group_var( resp, 1, "G_2", "GWIR" ), 1e-5 ); BOOST_CHECK_CLOSE( 30.2, ecl_sum_get_group_var( resp, 1, "G_2", "GGIR" ), 1e-5 ); BOOST_CHECK_CLOSE( 30.3, ecl_sum_get_group_var( resp, 1, "G_2", "GNIR" ), 1e-5 ); + BOOST_CHECK_CLOSE( (30.6 + 30.7 + 30.8), + ecl_sum_get_group_var( resp, 1, "G_2", "GVIR" ), 1e-5 ); /* Injection totals */ BOOST_CHECK_CLOSE( 30.0, ecl_sum_get_group_var( resp, 1, "G_2", "GWIT" ), 1e-5 );