Add support for WGLIR.
Add support for summary output of WGLIR (lift gas injection rate).
This commit is contained in:
@@ -69,6 +69,7 @@ namespace Opm {
|
||||
well_potential_oil = (1 << 15),
|
||||
well_potential_gas = (1 << 16),
|
||||
brine = (1 << 17),
|
||||
alq = (1 << 18)
|
||||
};
|
||||
|
||||
using enum_size = std::underlying_type< opt >::type;
|
||||
@@ -121,6 +122,7 @@ namespace Opm {
|
||||
double well_potential_oil = 0.0;
|
||||
double well_potential_gas = 0.0;
|
||||
double brine = 0.0;
|
||||
double alq = 0.0;
|
||||
};
|
||||
|
||||
struct Connection {
|
||||
@@ -444,6 +446,7 @@ namespace Opm {
|
||||
case opt::well_potential_oil: return this->well_potential_oil;
|
||||
case opt::well_potential_gas: return this->well_potential_gas;
|
||||
case opt::brine: return this->brine;
|
||||
case opt::alq: return this->alq;
|
||||
}
|
||||
|
||||
throw std::invalid_argument(
|
||||
@@ -491,6 +494,7 @@ namespace Opm {
|
||||
buffer.write(this->well_potential_oil);
|
||||
buffer.write(this->well_potential_gas);
|
||||
buffer.write(this->brine);
|
||||
buffer.write(this->alq);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
|
||||
@@ -467,6 +467,14 @@ double efac( const std::vector<std::pair<std::string,double>>& eff_factors, cons
|
||||
return (it != eff_factors.end()) ? it->second : 1;
|
||||
}
|
||||
|
||||
inline quantity alqrate( const fn_args& args ) {
|
||||
const auto& well = args.schedule_wells.front();
|
||||
const auto& name = well.name();
|
||||
if( args.wells.count( name ) == 0 ) return { 0, measure::rate };
|
||||
const auto alq_value = args.wells.at(name).rates.get(rt::alq, 0.0);
|
||||
return { alq_value, measure::rate };
|
||||
}
|
||||
|
||||
template< rt phase, bool injection = true >
|
||||
inline quantity rate( const fn_args& args ) {
|
||||
double sum = 0.0;
|
||||
@@ -1008,6 +1016,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 },
|
||||
{ "WNPR", rate< rt::solvent, producer > },
|
||||
{ "WCPR", rate< rt::polymer, producer > },
|
||||
{ "WSPR", rate< rt::brine, producer > },
|
||||
|
||||
Reference in New Issue
Block a user