From c62345282317e036f64bad40dac736b38427d320 Mon Sep 17 00:00:00 2001 From: Sveinung Rundhovde Date: Wed, 24 Jan 2018 11:44:24 +0100 Subject: [PATCH] Add support for WVIT keyword --- src/opm/output/eclipse/Summary.cpp | 2 ++ tests/test_Summary.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index caedce125..843f02439 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -633,6 +633,8 @@ static const std::unordered_map< std::string, ofun > funs = { { "WOIT", mul( rate< rt::oil, injector >, duration ) }, { "WGIT", mul( rate< rt::gas, injector >, duration ) }, { "WNIT", mul( rate< rt::solvent, injector >, duration ) }, + { "WVIT", mul( sum( sum( rate< rt::reservoir_water, injector >, rate< rt::reservoir_oil, injector > ), + rate< rt::reservoir_gas, injector > ), duration ) }, { "WWPR", rate< rt::wat, producer > }, { "WOPR", rate< rt::oil, producer > }, diff --git a/tests/test_Summary.cpp b/tests/test_Summary.cpp index 0972b2cf0..b3301ca8b 100644 --- a/tests/test_Summary.cpp +++ b/tests/test_Summary.cpp @@ -371,9 +371,13 @@ BOOST_AUTO_TEST_CASE(well_keywords) { BOOST_CHECK_CLOSE( 30.0, ecl_sum_get_well_var( resp, 1, "W_3", "WWIT" ), 1e-5 ); BOOST_CHECK_CLOSE( 30.2, ecl_sum_get_well_var( resp, 1, "W_3", "WGIT" ), 1e-5 ); BOOST_CHECK_CLOSE( 30.3, ecl_sum_get_well_var( resp, 1, "W_3", "WNIT" ), 1e-5 ); + BOOST_CHECK_CLOSE( (30.6 + 30.7 + 30.8), + ecl_sum_get_well_var( resp, 1, "W_3", "WVIT" ), 1e-5 ); BOOST_CHECK_CLOSE( 2 * 30.0, ecl_sum_get_well_var( resp, 2, "W_3", "WWIT" ), 1e-5 ); BOOST_CHECK_CLOSE( 2 * 30.2, ecl_sum_get_well_var( resp, 2, "W_3", "WGIT" ), 1e-5 ); BOOST_CHECK_CLOSE( 2 * 30.3, ecl_sum_get_well_var( resp, 2, "W_3", "WNIT" ), 1e-5 ); + BOOST_CHECK_CLOSE( 2* (30.6 + 30.7 + 30.8), + ecl_sum_get_well_var( resp, 2, "W_3", "WVIT" ), 1e-5 ); /* Injection rates (history) */ BOOST_CHECK_CLOSE( 30.0, ecl_sum_get_well_var( resp, 1, "W_3", "WWIRH" ), 1e-5 );