Report Well Level Injection Guide Rates if Group Controlled

This commit uses the new GroupTreeWalker helper class to ensure that
we always extract and report pertinent injection guide rates at the
well level (i.e., WxIGR) if at least one of the groups in the well's
upline has an entry for the corresponding phase in GCONINJE.  This
is for increased compatibility with ECLIPSE.

Prior to this change we would report zero-valued WWIGR vectors on a
real field case which made analysing simulation results needlessly
difficult.
This commit is contained in:
Bård Skaflestad
2021-10-25 13:06:02 +02:00
parent 2b0aa379f5
commit 0c70eac490
3 changed files with 141 additions and 9 deletions

View File

@@ -230,15 +230,15 @@ namespace Opm {
data::Wells wellData() const
{
auto wsrpt = this->wellState()
.report(UgGridHelpers::globalCell(grid()),
[this](const int well_ndex) -> bool
.report(UgGridHelpers::globalCell(this->grid()),
[this](const int well_index) -> bool
{
return this->wasDynamicallyShutThisTimeStep(well_ndex);
return this->wasDynamicallyShutThisTimeStep(well_index);
});
this->assignWellTracerRates(wsrpt);
this->assignWellGuideRates(wsrpt);
this->assignWellGuideRates(wsrpt, this->reportStepIndex());
this->assignShutConnections(wsrpt, this->reportStepIndex());
return wsrpt;