mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Refactor Well Guide Rate Summary Assignment
In anticipation of adding more steps later.
This commit is contained in:
@@ -214,16 +214,7 @@ namespace Opm {
|
|||||||
{
|
{
|
||||||
auto wsrpt = well_state_.report(phase_usage_, Opm::UgGridHelpers::globalCell(grid()));
|
auto wsrpt = well_state_.report(phase_usage_, Opm::UgGridHelpers::globalCell(grid()));
|
||||||
|
|
||||||
for (const auto& well : this->wells_ecl_) {
|
this->assignWellGuideRates(wsrpt);
|
||||||
auto xwPos = wsrpt.find(well.name());
|
|
||||||
if (xwPos == wsrpt.end()) { // No well results. Unexpected.
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& grval = xwPos->second.guide_rates;
|
|
||||||
grval.clear();
|
|
||||||
grval += this->getGuideRateValues(well);
|
|
||||||
}
|
|
||||||
|
|
||||||
return wsrpt;
|
return wsrpt;
|
||||||
}
|
}
|
||||||
@@ -473,6 +464,7 @@ namespace Opm {
|
|||||||
|
|
||||||
void setWsolvent(const Group& group, const Schedule& schedule, const int reportStepIdx, double wsolvent);
|
void setWsolvent(const Group& group, const Schedule& schedule, const int reportStepIdx, double wsolvent);
|
||||||
|
|
||||||
|
void assignWellGuideRates(data::Wells& wsrpt) const;
|
||||||
void assignGroupValues(const int reportStepIdx,
|
void assignGroupValues(const int reportStepIdx,
|
||||||
const Schedule& sched,
|
const Schedule& sched,
|
||||||
std::map<std::string, data::GroupData>& gvalues) const;
|
std::map<std::string, data::GroupData>& gvalues) const;
|
||||||
|
|||||||
@@ -2591,6 +2591,29 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<typename TypeTag>
|
||||||
|
void
|
||||||
|
BlackoilWellModel<TypeTag>::
|
||||||
|
assignWellGuideRates(data::Wells& wsrpt) const
|
||||||
|
{
|
||||||
|
for (const auto& well : this->wells_ecl_) {
|
||||||
|
auto xwPos = wsrpt.find(well.name());
|
||||||
|
if (xwPos == wsrpt.end()) { // No well results. Unexpected.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
xwPos->second.guide_rates = this->getGuideRateValues(well);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename TypeTag>
|
template <typename TypeTag>
|
||||||
void
|
void
|
||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
|
|||||||
Reference in New Issue
Block a user