Merge pull request #1968 from hakonhagland/wglir
Add support for WGLIR.
This commit is contained in:
commit
8210bcde34
@ -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 {
|
||||
@ -411,7 +413,8 @@ namespace Opm {
|
||||
well_potential_water == rate.well_potential_water &&
|
||||
well_potential_oil == rate.well_potential_oil &&
|
||||
well_potential_gas == rate.well_potential_gas &&
|
||||
brine == rate.brine;
|
||||
brine == rate.brine &&
|
||||
alq == rate.alq;
|
||||
}
|
||||
|
||||
|
||||
@ -444,6 +447,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 +495,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>
|
||||
@ -571,6 +576,7 @@ namespace Opm {
|
||||
buffer.read(this->well_potential_oil);
|
||||
buffer.read(this->well_potential_gas);
|
||||
buffer.read(this->brine);
|
||||
buffer.read(this->alq);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
|
@ -467,6 +467,16 @@ 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();
|
||||
auto xwPos = args.wells.find(well.name());
|
||||
if (xwPos == args.wells.end()) {
|
||||
return { 0.0, measure::gas_surface_rate };
|
||||
}
|
||||
|
||||
return { xwPos->second.rates.get(rt::alq, 0.0), measure::gas_surface_rate };
|
||||
}
|
||||
|
||||
template< rt phase, bool injection = true >
|
||||
inline quantity rate( const fn_args& args ) {
|
||||
double sum = 0.0;
|
||||
@ -1008,6 +1018,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 > },
|
||||
@ -1089,6 +1100,7 @@ static const std::unordered_map< std::string, ofun > funs = {
|
||||
{ "GWPR", rate< rt::wat, producer > },
|
||||
{ "GOPR", rate< rt::oil, producer > },
|
||||
{ "GGPR", rate< rt::gas, producer > },
|
||||
{ "GGLIR", alqrate },
|
||||
{ "GNPR", rate< rt::solvent, producer > },
|
||||
{ "GCPR", rate< rt::polymer, producer > },
|
||||
{ "GSPR", rate< rt::brine, producer > },
|
||||
@ -1242,6 +1254,7 @@ static const std::unordered_map< std::string, ofun > funs = {
|
||||
{ "FWPR", rate< rt::wat, producer > },
|
||||
{ "FOPR", rate< rt::oil, producer > },
|
||||
{ "FGPR", rate< rt::gas, producer > },
|
||||
{ "FGLIR", alqrate },
|
||||
{ "FNPR", rate< rt::solvent, producer > },
|
||||
{ "FCPR", rate< rt::polymer, producer > },
|
||||
{ "FSPR", rate< rt::brine, producer > },
|
||||
|
@ -69,7 +69,7 @@ namespace {
|
||||
"WBHP", "WGIR", "WGIT", "WGOR", "WGPR", "WGPT", "WOIR",
|
||||
"WOIT", "WOPR", "WOPT", "WPI", "WTHP", "WVIR", "WVIT",
|
||||
"WVPR", "WVPT", "WWCT", "WWGR", "WWIR", "WWIT", "WWPR",
|
||||
"WWPT",
|
||||
"WWPT", "WGLIR",
|
||||
// ALL will not expand to these keywords yet
|
||||
"AAQR", "AAQRG", "AAQT", "AAQTG"
|
||||
};
|
||||
@ -196,7 +196,7 @@ namespace {
|
||||
|
||||
bool is_rate(const std::string& keyword) {
|
||||
static const keyword_set ratekw {
|
||||
"OPR", "GPR", "WPR", "LPR", "NPR", "VPR",
|
||||
"OPR", "GPR", "WPR", "GLIR", "LPR", "NPR", "VPR",
|
||||
"OPGR", "GPGR", "WPGR", "VPGR",
|
||||
"OPRH", "GPRH", "WPRH", "LPRH",
|
||||
"OVPR", "GVPR", "WVPR",
|
||||
|
@ -393,7 +393,7 @@ static const auto ALL_keywords = {
|
||||
"WBHP", "WGIR", "WGIT", "WGOR", "WGPR", "WGPT", "WOIR",
|
||||
"WOIT", "WOPR", "WOPT", "WPI", "WTHP", "WVIR", "WVIT",
|
||||
"WVPR", "WVPT", "WWCT", "WWGR", "WWIR", "WWIT", "WWPR",
|
||||
"WWPT",
|
||||
"WWPT", "WGLIR",
|
||||
// ALL will not expand to these keywords yet
|
||||
"AAQR", "AAQRG", "AAQT", "AAQTG"
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user