Add a comment warning in Summary evaluation of WGLIR

This commit is contained in:
Joakim Hove 2020-10-15 10:59:49 +02:00
parent 134834cefa
commit 8ffc4b85b0

View File

@ -469,20 +469,20 @@ double efac( const std::vector<std::pair<std::string,double>>& eff_factors, cons
return (it != eff_factors.end()) ? it->second : 1; 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 }; const quantity zero = { 0.0, measure::gas_surface_rate };
if (args.schedule_wells.empty()) { if (args.schedule_wells.empty())
// No wells. Before simulation starts?
return zero; return zero;
}
const auto& well = args.schedule_wells.front(); const auto& well = args.schedule_wells.front();
auto xwPos = args.wells.find(well.name()); auto xwPos = args.wells.find(well.name());
if (xwPos == args.wells.end()) { if (xwPos == args.wells.end())
return zero; 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 }; 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 > }, { "WOPR", rate< rt::oil, producer > },
{ "WGPR", rate< rt::gas, producer > }, { "WGPR", rate< rt::gas, producer > },
{ "WEPR", rate< rt::energy, producer > }, { "WEPR", rate< rt::energy, producer > },
{ "WGLIR", alqrate }, { "WGLIR", wglir},
{ "WNPR", rate< rt::solvent, producer > }, { "WNPR", rate< rt::solvent, producer > },
{ "WCPR", rate< rt::polymer, producer > }, { "WCPR", rate< rt::polymer, producer > },
{ "WSPR", rate< rt::brine, producer > }, { "WSPR", rate< rt::brine, producer > },