GWCTH support

This commit is contained in:
Jørgen Kvalsvik 2016-10-28 12:19:07 +02:00
parent cc73c9d95f
commit 9181a260e8
2 changed files with 6 additions and 0 deletions

View File

@ -495,6 +495,9 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "GGIRH", injection_history< Phase::GAS > },
{ "GGORH", div( production_history< Phase::GAS >,
production_history< Phase::OIL > ) },
{ "GWCTH", div( production_history< Phase::WATER >,
sum( production_history< Phase::WATER >,
production_history< Phase::OIL > ) ) },
{ "GWPTH", mul( production_history< Phase::WATER >, duration ) },
{ "GOPTH", mul( production_history< Phase::OIL >, duration ) },

View File

@ -430,6 +430,9 @@ BOOST_AUTO_TEST_CASE(group_keywords) {
BOOST_CHECK_CLOSE( gwcut1, ecl_sum_get_group_var( resp, 1, "G_1", "GWCT" ), 1e-5 );
BOOST_CHECK_CLOSE( gwcut2, ecl_sum_get_group_var( resp, 1, "G_2", "GWCT" ), 1e-5 );
BOOST_CHECK_CLOSE( gwcut1, ecl_sum_get_group_var( resp, 1, "G_1", "GWCTH" ), 1e-5 );
BOOST_CHECK_CLOSE( gwcut2, ecl_sum_get_group_var( resp, 1, "G_2", "GWCTH" ), 1e-5 );
/* ggor - gas-oil ratio */
const double ggor1 = (10.2 + 20.2) / (10.1 + 20.1);
const double ggor2 = 0;