Merge pull request #3239 from osae/tracer

Tracer summary curves, collect well rates.
This commit is contained in:
Bård Skaflestad
2021-06-25 17:48:40 +02:00
committed by GitHub
5 changed files with 343 additions and 90 deletions

View File

@@ -1736,4 +1736,33 @@ namespace Opm {
this->wellState().update_temperature(wellID, weighted_temperature/total_weight);
}
}
template <typename TypeTag>
void
BlackoilWellModel<TypeTag>::
assignWellTracerRates(data::Wells& wsrpt) const
{
const auto & wellTracerRates = ebosSimulator_.problem().tracerModel().getWellTracerRates();
if (wellTracerRates.empty())
return; // no tracers
for (const auto& wTR : wellTracerRates) {
std::string wellName = wTR.first.first;
auto xwPos = wsrpt.find(wellName);
if (xwPos == wsrpt.end()) { // No well results.
continue;
}
std::string tracerName = wTR.first.second;
double rate = wTR.second;
xwPos->second.rates.set(data::Rates::opt::tracer, rate, tracerName);
}
}
} // namespace Opm