mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 20:06:26 -06:00
move getGuideRateValues(Group) into BlackoilWellModelGuideRates
This commit is contained in:
parent
41b1a38de3
commit
b6659d6960
@ -929,34 +929,6 @@ setWsolvent(const Group& group,
|
||||
}
|
||||
}
|
||||
|
||||
data::GuideRateValue
|
||||
BlackoilWellModelGeneric::
|
||||
getGuideRateValues(const Group& group) const
|
||||
{
|
||||
auto grval = data::GuideRateValue{};
|
||||
const auto& gname = group.name();
|
||||
|
||||
if (!this->groupState().has_production_rates(gname)) {
|
||||
// No flow rates for production group 'gname' -- might be before
|
||||
// group comes online (e.g., for the initial condition before
|
||||
// simulation starts).
|
||||
return grval;
|
||||
}
|
||||
|
||||
if (!this->guideRate_.has(gname)) {
|
||||
// No guiderates exist for 'gname'.
|
||||
return grval;
|
||||
}
|
||||
|
||||
const auto qs = WellGroupHelpers::
|
||||
getProductionGroupRateVector(this->groupState(), this->phase_usage_, gname);
|
||||
|
||||
const auto is_inj = false; // This procedure only applies to G*PGR.
|
||||
BlackoilWellModelGuideRates(*this).getGuideRateValues(qs, is_inj, gname, grval);
|
||||
|
||||
return grval;
|
||||
}
|
||||
|
||||
data::GuideRateValue
|
||||
BlackoilWellModelGeneric::
|
||||
getGuideRateInjectionGroupValues(const Group& group) const
|
||||
@ -1136,7 +1108,7 @@ calculateAllGroupGuiderates(const int reportStepIdx) const
|
||||
if (gname == "FIELD") { return; }
|
||||
|
||||
if (this->guideRate_.has(gname)) {
|
||||
gr[gname].production = this->getGuideRateValues(group);
|
||||
gr[gname].production = BlackoilWellModelGuideRates(*this).getGuideRateValues(group);
|
||||
}
|
||||
|
||||
if (this->guideRate_.has(gname, Phase::WATER) ||
|
||||
|
@ -271,7 +271,6 @@ protected:
|
||||
const int pvtreg,
|
||||
std::vector<double>& resv_coeff) = 0;
|
||||
|
||||
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
||||
data::GuideRateValue getGuideRateInjectionGroupValues(const Group& group) const;
|
||||
|
||||
void assignWellGuideRates(data::Wells& wsrpt,
|
||||
|
@ -85,5 +85,32 @@ getGuideRateValues(const Well& well) const
|
||||
return grval;
|
||||
}
|
||||
|
||||
data::GuideRateValue
|
||||
BlackoilWellModelGuideRates::
|
||||
getGuideRateValues(const Group& group) const
|
||||
{
|
||||
auto grval = data::GuideRateValue{};
|
||||
const auto& gname = group.name();
|
||||
|
||||
if (!wellModel_.groupState().has_production_rates(gname)) {
|
||||
// No flow rates for production group 'gname' -- might be before
|
||||
// group comes online (e.g., for the initial condition before
|
||||
// simulation starts).
|
||||
return grval;
|
||||
}
|
||||
|
||||
if (!wellModel_.guideRate().has(gname)) {
|
||||
// No guiderates exist for 'gname'.
|
||||
return grval;
|
||||
}
|
||||
|
||||
const auto qs = WellGroupHelpers::
|
||||
getProductionGroupRateVector(wellModel_.groupState(), wellModel_.phaseUsage(), gname);
|
||||
|
||||
const auto is_inj = false; // This procedure only applies to G*PGR.
|
||||
this->getGuideRateValues(qs, is_inj, gname, grval);
|
||||
|
||||
return grval;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ public:
|
||||
//! \brief Obtain guide rate values for well.
|
||||
data::GuideRateValue getGuideRateValues(const Well& well) const;
|
||||
|
||||
//! \brief Obtain guide rate values for group.
|
||||
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
||||
|
||||
private:
|
||||
const BlackoilWellModelGeneric& wellModel_; //!< Reference to well model
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user