diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 422830b03..fdb1b18ee 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -469,20 +469,20 @@ double efac( const std::vector>& eff_factors, cons return (it != eff_factors.end()) ? it->second : 1; } -inline quantity alqrate( const fn_args& args ) { +inline quantity wglir( const fn_args& args ) { const quantity zero = { 0.0, measure::gas_surface_rate }; - if (args.schedule_wells.empty()) { - // No wells. Before simulation starts? + if (args.schedule_wells.empty()) return zero; - } const auto& well = args.schedule_wells.front(); auto xwPos = args.wells.find(well.name()); - if (xwPos == args.wells.end()) { + if (xwPos == args.wells.end()) return zero; - } + // This is bit dangerous, exactly how the ALQ value should be interpreted + // varies between the different VFP tables. The code here assumes - without + // checking - that it represents gas lift rate. return { xwPos->second.rates.get(rt::alq, 0.0), measure::gas_surface_rate }; } @@ -1037,7 +1037,7 @@ static const std::unordered_map< std::string, ofun > funs = { { "WOPR", rate< rt::oil, producer > }, { "WGPR", rate< rt::gas, producer > }, { "WEPR", rate< rt::energy, producer > }, - { "WGLIR", alqrate }, + { "WGLIR", wglir}, { "WNPR", rate< rt::solvent, producer > }, { "WCPR", rate< rt::polymer, producer > }, { "WSPR", rate< rt::brine, producer > },