Revert "Revert "Res vol keywords (WVPR + WVPT & WVPRT+FVPRT)""

This commit is contained in:
Joakim Hove 2018-02-02 12:11:23 +01:00 committed by GitHub
parent 2f332ed702
commit cb5a3bdcea
3 changed files with 27 additions and 0 deletions

View File

@ -645,6 +645,8 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "WGPRF", sub( rate< rt::gas, producer >, rate< rt::dissolved_gas, producer > ) },
{ "WOPRS", rate< rt::vaporized_oil, producer > },
{ "WOPRF", sub (rate < rt::oil, producer >, rate< rt::vaporized_oil, producer > ) },
{ "WVPR", sum( sum( rate< rt::reservoir_water, producer >, rate< rt::reservoir_oil, producer > ),
rate< rt::reservoir_gas, producer > ) },
{ "WLPR", sum( rate< rt::wat, producer >, rate< rt::oil, producer > ) },
{ "WWPT", mul( rate< rt::wat, producer >, duration ) },
@ -660,6 +662,8 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "WOPTS", mul( rate< rt::vaporized_oil, producer >, duration )},
{ "WOPTF", sub( mul( rate< rt::oil, producer >, duration ),
mul( rate< rt::vaporized_oil, producer >, duration ))},
{ "WVPT", mul( sum( sum( rate< rt::reservoir_water, producer >, rate< rt::reservoir_oil, producer > ),
rate< rt::reservoir_gas, producer > ), duration ) },
{ "WWCT", div( rate< rt::wat, producer >,
sum( rate< rt::wat, producer >, rate< rt::oil, producer > ) ) },
@ -672,6 +676,7 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "WBHP", bhp },
{ "WTHP", thp },
{ "WVPRT", res_vol_production_target },
{ "GWIR", rate< rt::wat, injector > },
{ "GOIR", rate< rt::oil, injector > },
@ -887,6 +892,7 @@ static const std::unordered_map< std::string, ofun > funs = {
{ "FMWPR", flowing< producer > },
{ "FPR", fpr },
{ "FPRP", fprp },
{ "FVPRT", res_vol_production_target },
/* Region properties */
{ "RPR" , rpr},

View File

@ -101,6 +101,7 @@ FGPTS
FGPTF
FOPTF
FOPTS
FVPRT
-- Injection Cummulatives
FVIT
FWIT
@ -477,6 +478,8 @@ WVPR
/
WVPT
/
WVPRT
/
WOPP
/
WVIR

View File

@ -303,6 +303,10 @@ BOOST_AUTO_TEST_CASE(well_keywords) {
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 );
BOOST_CHECK_CLOSE( 10.6 + 10.7 + 10.8,
ecl_sum_get_well_var( resp, 1, "W_1", "WVPR" ), 1e-5 );
BOOST_CHECK_CLOSE( 20.6 + 20.7 + 20.8,
ecl_sum_get_well_var( resp, 1, "W_2", "WVPR" ), 1e-5 );
BOOST_CHECK_CLOSE( 10.5, ecl_sum_get_well_var( resp, 1, "W_1", "WOPRS" ), 1e-5 );
BOOST_CHECK_CLOSE( 20.5, ecl_sum_get_well_var( resp, 1, "W_2", "WOPRS" ), 1e-5 );
@ -324,6 +328,10 @@ BOOST_AUTO_TEST_CASE(well_keywords) {
BOOST_CHECK_CLOSE( 20.5, ecl_sum_get_well_var( resp, 1, "W_2", "WOPTS" ), 1e-5 );
BOOST_CHECK_CLOSE( (10.1 - 10.5), ecl_sum_get_well_var( resp, 1, "W_1", "WOPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( (20.1 - 20.5), ecl_sum_get_well_var( resp, 1, "W_2", "WOPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( 10.6 + 10.7 + 10.8,
ecl_sum_get_well_var( resp, 1, "W_1", "WVPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 20.6 + 20.7 + 20.8,
ecl_sum_get_well_var( resp, 1, "W_2", "WVPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * 10.0, ecl_sum_get_well_var( resp, 2, "W_1", "WWPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * 20.0, ecl_sum_get_well_var( resp, 2, "W_2", "WWPT" ), 1e-5 );
@ -345,6 +353,10 @@ BOOST_AUTO_TEST_CASE(well_keywords) {
BOOST_CHECK_CLOSE( 2 * 20.5, ecl_sum_get_well_var( resp, 2, "W_2", "WOPTS" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * ( 10.1 - 10.5 ), ecl_sum_get_well_var( resp, 2, "W_1", "WOPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * ( 20.1 - 20.5 ), ecl_sum_get_well_var( resp, 2, "W_2", "WOPTF" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (10.6 + 10.7 + 10.8),
ecl_sum_get_well_var( resp, 2, "W_1", "WVPT" ), 1e-5 );
BOOST_CHECK_CLOSE( 2 * (20.6 + 20.7 + 20.8),
ecl_sum_get_well_var( resp, 2, "W_2", "WVPT" ), 1e-5 );
/* Production rates (history) */
BOOST_CHECK_CLOSE( 10, ecl_sum_get_well_var( resp, 1, "W_1", "WWPRH" ), 1e-5 );
@ -389,6 +401,9 @@ BOOST_AUTO_TEST_CASE(well_keywords) {
BOOST_CHECK_CLOSE( 60.0, ecl_sum_get_well_var( resp, 2, "W_3", "WWITH" ), 1e-5 );
BOOST_CHECK_CLOSE( 0, ecl_sum_get_well_var( resp, 2, "W_3", "WGITH" ), 1e-5 );
/* Production targets */
BOOST_CHECK_CLOSE( 30.1 , ecl_sum_get_well_var( resp, 1, "W_5", "WVPRT" ), 1e-5 );
/* WWCT - water cut */
const double wwcut1 = 10.0 / ( 10.0 + 10.1 );
const double wwcut2 = 20.0 / ( 20.0 + 20.1 );
@ -777,6 +792,9 @@ BOOST_AUTO_TEST_CASE(field_keywords) {
BOOST_CHECK_CLOSE( 30.0, ecl_sum_get_field_var( resp, 1, "FWITH" ), 1e-5 );
BOOST_CHECK_CLOSE( 60.0, ecl_sum_get_field_var( resp, 2, "FWITH" ), 1e-5 );
/* Production targets */
BOOST_CHECK_CLOSE( 30.1 , ecl_sum_get_field_var( resp, 1, "FVPRT" ), 1e-5 );
/* fwct - water cut */
const double wcut = (10.0 + 20.0) / ( 10.0 + 10.1 + 20.0 + 20.1 );
BOOST_CHECK_CLOSE( wcut, ecl_sum_get_field_var( resp, 1, "FWCT" ), 1e-5 );