From 85eca28c84a6112fa1d76c18cf7954011302c152 Mon Sep 17 00:00:00 2001 From: "Sveinung Styve Rundhovde (IT SI SIB)" Date: Wed, 15 Nov 2017 15:01:13 +0100 Subject: [PATCH] Add WGPTS+WGPTF keywords --- src/opm/output/eclipse/Summary.cpp | 4 ++++ tests/summary_deck.DATA | 4 ++++ tests/test_Summary.cpp | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index b3dbda789..abd81db25 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -544,6 +544,10 @@ static const std::unordered_map< std::string, ofun > funs = { { "WLPT", mul( sum( rate< rt::wat, producer >, rate< rt::oil, producer > ), duration ) }, + { "WGPTS", mul( rate< rt::dissolved_gas, producer >, duration )}, + { "WGPTF", sub( mul( rate< rt::gas, producer >, duration ), + mul( rate< rt::dissolved_gas, producer >, duration ))}, + { "WWCT", div( rate< rt::wat, producer >, sum( rate< rt::wat, producer >, rate< rt::oil, producer > ) ) }, { "GWCT", div( rate< rt::wat, producer >, diff --git a/tests/summary_deck.DATA b/tests/summary_deck.DATA index 523af49df..e615dccd0 100644 --- a/tests/summary_deck.DATA +++ b/tests/summary_deck.DATA @@ -393,6 +393,10 @@ WGPTH / WNPT / +WGPTF +/ +WGPTS +/ -- Tracers --WTPRSEA diff --git a/tests/test_Summary.cpp b/tests/test_Summary.cpp index c8072ab0d..89b82a53b 100644 --- a/tests/test_Summary.cpp +++ b/tests/test_Summary.cpp @@ -303,6 +303,11 @@ BOOST_AUTO_TEST_CASE(well_keywords) { BOOST_CHECK_CLOSE( 2 * 10.3, ecl_sum_get_well_var( resp, 2, "W_1", "WNPT" ), 1e-5 ); BOOST_CHECK_CLOSE( 2 * 20.3, ecl_sum_get_well_var( resp, 2, "W_2", "WNPT" ), 1e-5 ); + BOOST_CHECK_CLOSE( 2 * 10.4, ecl_sum_get_well_var( resp, 2, "W_1", "WGPTS" ), 1e-5 ); + BOOST_CHECK_CLOSE( 2 * 20.4, ecl_sum_get_well_var( resp, 2, "W_2", "WGPTS" ), 1e-5 ); + BOOST_CHECK_CLOSE( 2 * ( 10.2 - 10.4 ), ecl_sum_get_well_var( resp, 2, "W_1", "WGPTF" ), 1e-5 ); + BOOST_CHECK_CLOSE( 2 * ( 20.2 - 20.4 ), ecl_sum_get_well_var( resp, 2, "W_2", "WGPTF" ), 1e-5 ); + /* Production rates (history) */ BOOST_CHECK_CLOSE( 10, ecl_sum_get_well_var( resp, 1, "W_1", "WWPRH" ), 1e-5 ); BOOST_CHECK_CLOSE( 20, ecl_sum_get_well_var( resp, 1, "W_2", "WWPRH" ), 1e-5 );