Add support for GVPRT keyword
This commit is contained in:
@@ -344,6 +344,20 @@ inline quantity injection_history( const fn_args& args ) {
|
||||
return { sum, rate_unit< phase >() };
|
||||
}
|
||||
|
||||
inline quantity res_vol_production_target( const fn_args& args ) {
|
||||
|
||||
if( args.timestep == 0 ) return { 0.0, measure::rate };
|
||||
|
||||
const auto timestep = args.timestep - 1;
|
||||
|
||||
double sum = 0.0;
|
||||
for( const Well* sched_well : args.schedule_wells )
|
||||
if (sched_well->getProductionProperties(timestep).predictionMode)
|
||||
sum += sched_well->getProductionProperties( timestep ).ResVRate;
|
||||
|
||||
return { sum, measure::rate };
|
||||
}
|
||||
|
||||
/*
|
||||
* A small DSL, really poor man's function composition, to avoid massive
|
||||
* repetition when declaring the handlers for each individual keyword. bin_op
|
||||
@@ -717,6 +731,8 @@ static const std::unordered_map< std::string, ofun > funs = {
|
||||
{ "GMWIN", flowing< injector > },
|
||||
{ "GMWPR", flowing< producer > },
|
||||
|
||||
{ "GVPRT", res_vol_production_target },
|
||||
|
||||
{ "CWIR", crate< rt::wat, injector > },
|
||||
{ "CGIR", crate< rt::gas, injector > },
|
||||
{ "CWIT", mul( crate< rt::wat, injector >, duration ) },
|
||||
|
||||
@@ -552,6 +552,7 @@ WELSPECS
|
||||
'W_1' 'G_1' 1 1 3.33 'OIL' 7* /
|
||||
'W_2' 'G_1' 2 1 3.33 'OIL' 7* /
|
||||
'W_3' 'G_2' 3 1 3.92 'WATER' 7* /
|
||||
'W_5' 'G_3' 4 1 3.92 'OIL' 7* /
|
||||
/
|
||||
|
||||
-- Completion data.
|
||||
@@ -577,6 +578,10 @@ WCONINJH
|
||||
W_3 WATER STOP 30.0 2.1 2.2 /
|
||||
/
|
||||
|
||||
WCONPROD
|
||||
W_5 SHUT ORAT 0.0 0.0 0.0 1* 30.1 /
|
||||
/
|
||||
|
||||
TSTEP
|
||||
-- register time steps (in days). This allows us to write *two* report steps (1
|
||||
-- and 2. Without this, totals/accumulations would fail (segfault) when looking
|
||||
|
||||
@@ -498,6 +498,9 @@ BOOST_AUTO_TEST_CASE(group_keywords) {
|
||||
ecl_sum_get_group_var( resp, 1, "G_1", "GLPTH" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 0, ecl_sum_get_group_var( resp, 1, "G_2", "GLPTH" ), 1e-5 );
|
||||
|
||||
/* Production targets */
|
||||
BOOST_CHECK_CLOSE( 30.1 , ecl_sum_get_group_var( resp, 1, "G_3", "GVPRT" ), 1e-5 );
|
||||
|
||||
/* Injection rates */
|
||||
BOOST_CHECK_CLOSE( 30.0, ecl_sum_get_group_var( resp, 1, "G_2", "GWIR" ), 1e-5 );
|
||||
BOOST_CHECK_CLOSE( 30.2, ecl_sum_get_group_var( resp, 1, "G_2", "GGIR" ), 1e-5 );
|
||||
|
||||
Reference in New Issue
Block a user