Add GOP(R/T)(F/S)

Handling keywords to output rate and total for free and vaporized oil
This commit is contained in:
Lars Petter Øren Hauge
2017-11-17 14:56:57 +01:00
parent 8e6387456c
commit efd108da56
2 changed files with 13 additions and 0 deletions

View File

@@ -576,12 +576,18 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "GOPR", rate< rt::oil, producer > },
{ "GGPR", rate< rt::gas, producer > },
{ "GNPR", rate< rt::solvent, producer > },
{ "GOPRS", rate< rt::vaporized_oil, producer > },
{ "GOPRF", sub (rate < rt::oil, producer >, rate< rt::vaporized_oil, producer > ) },
{ "GLPR", sum( rate< rt::wat, producer >, rate< rt::oil, producer > ) },
{ "GWPT", mul( rate< rt::wat, producer >, duration ) },
{ "GOPT", mul( rate< rt::oil, producer >, duration ) },
{ "GGPT", mul( rate< rt::gas, producer >, duration ) },
{ "GNPT", mul( rate< rt::solvent, producer >, duration ) },
{ "GOPTS", mul( rate< rt::vaporized_oil, producer >, duration ) },
{ "GOPTF", mul( sub (rate < rt::oil, producer >,
rate< rt::vaporized_oil, producer > ),
duration ) },
{ "GLPT", mul( sum( rate< rt::wat, producer >, rate< rt::oil, producer > ),
duration ) },

View File

@@ -424,6 +424,9 @@ BOOST_AUTO_TEST_CASE(group_keywords) {
BOOST_CHECK_CLOSE( 10.4 + 20.4, ecl_sum_get_group_var( resp, 1, "G_1", "GGPRS" ), 1e-5 );
BOOST_CHECK_CLOSE((10.2 - 10.4) + (20.2 - 20.4),
ecl_sum_get_group_var( resp, 1, "G_1", "GGPRF" ), 1e-5 );
BOOST_CHECK_CLOSE( 10.5 + 20.5, ecl_sum_get_group_var( resp, 1, "G_1", "GOPRS" ), 1e-5 );
BOOST_CHECK_CLOSE((10.1 - 10.5) + (20.1 - 20.5),
ecl_sum_get_group_var( resp, 1, "G_1", "GOPRF" ), 1e-5 );
/* Production totals */
BOOST_CHECK_CLOSE( 10.0 + 20.0, ecl_sum_get_group_var( resp, 1, "G_1", "GWPT" ), 1e-5 );
@@ -431,13 +434,17 @@ BOOST_AUTO_TEST_CASE(group_keywords) {
BOOST_CHECK_CLOSE( 10.2 + 20.2, ecl_sum_get_group_var( resp, 1, "G_1", "GGPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 10.3 + 20.3, ecl_sum_get_group_var( resp, 1, "G_1", "GNPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 10.4 + 20.4, ecl_sum_get_group_var( resp, 1, "G_1", "GGPTS" ), 1e-5 );
BOOST_CHECK_CLOSE( 10.5 + 20.5, ecl_sum_get_group_var( resp, 1, "G_1", "GOPTS" ), 1e-5 );
BOOST_CHECK_CLOSE( (10.1 - 10.5) + (20.1 - 20.5), ecl_sum_get_group_var( resp, 1, "G_1", "GOPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( (10.2 - 10.4) + (20.2 - 20.4), ecl_sum_get_group_var( resp, 1, "G_1", "GGPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.0 + 20.0), ecl_sum_get_group_var( resp, 2, "G_1", "GWPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.1 + 20.1), ecl_sum_get_group_var( resp, 2, "G_1", "GOPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.2 + 20.2), ecl_sum_get_group_var( resp, 2, "G_1", "GGPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.3 + 20.3), ecl_sum_get_group_var( resp, 2, "G_1", "GNPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.4 + 20.4), ecl_sum_get_group_var( resp, 2, "G_1", "GGPTS" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.5 + 20.5), ecl_sum_get_group_var( resp, 2, "G_1", "GOPTS" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * ((10.2 - 10.4) + (20.2 - 20.4)), ecl_sum_get_group_var( resp, 2, "G_1", "GGPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * ((10.1 - 10.5) + (20.1 - 20.5)), ecl_sum_get_group_var( resp, 2, "G_1", "GOPTF" ), 1e-5 );
/* Production rates (history) */
BOOST_CHECK_CLOSE( 10.0 + 20.0, ecl_sum_get_group_var( resp, 1, "G_1", "GWPRH" ), 1e-5 );