From 72a08beb39fb27dcbccc29b969d4eecda3e02535 Mon Sep 17 00:00:00 2001 From: "Sveinung Styve Rundhovde (IT SI SIB)" Date: Wed, 15 Nov 2017 09:35:36 +0100 Subject: [PATCH] Add WGPRS+WGPRF keywords --- src/opm/output/eclipse/Summary.cpp | 3 +++ tests/summary_deck.DATA | 6 ++++++ tests/test_Summary.cpp | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index b883c3834..b3dbda789 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -533,6 +533,9 @@ static const std::unordered_map< std::string, ofun > funs = { { "WGPR", rate< rt::gas, producer > }, { "WNPR", rate< rt::solvent, producer > }, + { "WGPRS", rate< rt::dissolved_gas, producer > }, + { "WGPRF", sub( rate< rt::gas, producer >, rate< rt::dissolved_gas, producer > ) }, + { "WLPR", sum( rate< rt::wat, producer >, rate< rt::oil, producer > ) }, { "WWPT", mul( rate< rt::wat, producer >, duration ) }, { "WOPT", mul( rate< rt::oil, producer >, duration ) }, diff --git a/tests/summary_deck.DATA b/tests/summary_deck.DATA index 2d3a60a89..523af49df 100644 --- a/tests/summary_deck.DATA +++ b/tests/summary_deck.DATA @@ -339,6 +339,12 @@ WLPT WLPTH / +WGPRS +/ + +WGPRF +/ + -- Injection Rates WWIR W_3 diff --git a/tests/test_Summary.cpp b/tests/test_Summary.cpp index 5493f8c95..c8072ab0d 100644 --- a/tests/test_Summary.cpp +++ b/tests/test_Summary.cpp @@ -275,6 +275,11 @@ BOOST_AUTO_TEST_CASE(well_keywords) { BOOST_CHECK_CLOSE( 10.3, ecl_sum_get_well_var( resp, 1, "W_1", "WNPR" ), 1e-5 ); BOOST_CHECK_CLOSE( 20.3, ecl_sum_get_well_var( resp, 1, "W_2", "WNPR" ), 1e-5 ); + BOOST_CHECK_CLOSE( 10.4, ecl_sum_get_well_var( resp, 1, "W_1", "WGPRS" ), 1e-5 ); + BOOST_CHECK_CLOSE( 20.4, ecl_sum_get_well_var( resp, 1, "W_2", "WGPRS" ), 1e-5 ); + BOOST_CHECK_CLOSE( 10.2 - 10.4, ecl_sum_get_well_var( resp, 1, "W_1", "WGPRF" ), 1e-5 ); + BOOST_CHECK_CLOSE( 20.2 - 20.4, ecl_sum_get_well_var( resp, 1, "W_2", "WGPRF" ), 1e-5 ); + /* Production totals */ BOOST_CHECK_CLOSE( 10.0, ecl_sum_get_well_var( resp, 1, "W_1", "WWPT" ), 1e-5 ); BOOST_CHECK_CLOSE( 20.0, ecl_sum_get_well_var( resp, 1, "W_2", "WWPT" ), 1e-5 );