mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move getGuideRateValues(Group) into BlackoilWellModelGuideRates
This commit is contained in:
@@ -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
|
data::GuideRateValue
|
||||||
BlackoilWellModelGeneric::
|
BlackoilWellModelGeneric::
|
||||||
getGuideRateInjectionGroupValues(const Group& group) const
|
getGuideRateInjectionGroupValues(const Group& group) const
|
||||||
@@ -1136,7 +1108,7 @@ calculateAllGroupGuiderates(const int reportStepIdx) const
|
|||||||
if (gname == "FIELD") { return; }
|
if (gname == "FIELD") { return; }
|
||||||
|
|
||||||
if (this->guideRate_.has(gname)) {
|
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) ||
|
if (this->guideRate_.has(gname, Phase::WATER) ||
|
||||||
|
|||||||
@@ -271,7 +271,6 @@ protected:
|
|||||||
const int pvtreg,
|
const int pvtreg,
|
||||||
std::vector<double>& resv_coeff) = 0;
|
std::vector<double>& resv_coeff) = 0;
|
||||||
|
|
||||||
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
|
||||||
data::GuideRateValue getGuideRateInjectionGroupValues(const Group& group) const;
|
data::GuideRateValue getGuideRateInjectionGroupValues(const Group& group) const;
|
||||||
|
|
||||||
void assignWellGuideRates(data::Wells& wsrpt,
|
void assignWellGuideRates(data::Wells& wsrpt,
|
||||||
|
|||||||
@@ -85,5 +85,32 @@ getGuideRateValues(const Well& well) const
|
|||||||
return grval;
|
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.
|
//! \brief Obtain guide rate values for well.
|
||||||
data::GuideRateValue getGuideRateValues(const Well& well) const;
|
data::GuideRateValue getGuideRateValues(const Well& well) const;
|
||||||
|
|
||||||
|
//! \brief Obtain guide rate values for group.
|
||||||
|
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const BlackoilWellModelGeneric& wellModel_; //!< Reference to well model
|
const BlackoilWellModelGeneric& wellModel_; //!< Reference to well model
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user