mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move getGuideRateValues(Well) into BlackoilWellModelGuideRates
This commit is contained in:
parent
dc607ce3ff
commit
41b1a38de3
@ -929,33 +929,6 @@ setWsolvent(const Group& group,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data::GuideRateValue
|
|
||||||
BlackoilWellModelGeneric::
|
|
||||||
getGuideRateValues(const Well& well) const
|
|
||||||
{
|
|
||||||
auto grval = data::GuideRateValue{};
|
|
||||||
|
|
||||||
const auto& wname = well.name();
|
|
||||||
if (!this->wellState().has(wname)) {
|
|
||||||
// No flow rates for 'wname' -- might be before well comes
|
|
||||||
// online (e.g., for the initial condition before simulation
|
|
||||||
// starts).
|
|
||||||
return grval;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this->guideRate_.has(wname)) {
|
|
||||||
// No guiderates exist for 'wname'.
|
|
||||||
return grval;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto qs = WellGroupHelpers::
|
|
||||||
getWellRateVector(this->wellState(), this->phase_usage_, wname);
|
|
||||||
|
|
||||||
BlackoilWellModelGuideRates(*this).getGuideRateValues(qs, well.isInjector(), wname, grval);
|
|
||||||
|
|
||||||
return grval;
|
|
||||||
}
|
|
||||||
|
|
||||||
data::GuideRateValue
|
data::GuideRateValue
|
||||||
BlackoilWellModelGeneric::
|
BlackoilWellModelGeneric::
|
||||||
getGuideRateValues(const Group& group) const
|
getGuideRateValues(const Group& group) const
|
||||||
@ -1195,7 +1168,7 @@ calculateAllGroupGuiderates(const int reportStepIdx) const
|
|||||||
? gr[gname].injection
|
? gr[gname].injection
|
||||||
: gr[gname].production;
|
: gr[gname].production;
|
||||||
|
|
||||||
grval += this->getGuideRateValues(well);
|
grval += BlackoilWellModelGuideRates(*this).getGuideRateValues(well);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Visit wells and groups before their parents, meaning no group is
|
// Visit wells and groups before their parents, meaning no group is
|
||||||
|
@ -272,7 +272,6 @@ protected:
|
|||||||
std::vector<double>& resv_coeff) = 0;
|
std::vector<double>& resv_coeff) = 0;
|
||||||
|
|
||||||
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
data::GuideRateValue getGuideRateValues(const Group& group) const;
|
||||||
data::GuideRateValue getGuideRateValues(const Well& well) 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,
|
||||||
|
@ -58,4 +58,32 @@ getGuideRateValues(const GuideRate::RateVector& qs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data::GuideRateValue
|
||||||
|
BlackoilWellModelGuideRates::
|
||||||
|
getGuideRateValues(const Well& well) const
|
||||||
|
{
|
||||||
|
auto grval = data::GuideRateValue{};
|
||||||
|
|
||||||
|
const auto& wname = well.name();
|
||||||
|
if (!wellModel_.wellState().has(wname)) {
|
||||||
|
// No flow rates for 'wname' -- might be before well comes
|
||||||
|
// online (e.g., for the initial condition before simulation
|
||||||
|
// starts).
|
||||||
|
return grval;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!wellModel_.guideRate().has(wname)) {
|
||||||
|
// No guiderates exist for 'wname'.
|
||||||
|
return grval;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto qs = WellGroupHelpers::
|
||||||
|
getWellRateVector(wellModel_.wellState(), wellModel_.phaseUsage(), wname);
|
||||||
|
|
||||||
|
this->getGuideRateValues(qs, well.isInjector(), wname, grval);
|
||||||
|
|
||||||
|
return grval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ namespace Opm {
|
|||||||
class BlackoilWellModelGeneric;
|
class BlackoilWellModelGeneric;
|
||||||
namespace data { class GuideRateValue; }
|
namespace data { class GuideRateValue; }
|
||||||
class Group;
|
class Group;
|
||||||
|
class Well;
|
||||||
|
|
||||||
/// Class for handling the guide rates in the blackoil well model.
|
/// Class for handling the guide rates in the blackoil well model.
|
||||||
class BlackoilWellModelGuideRates
|
class BlackoilWellModelGuideRates
|
||||||
@ -48,6 +49,9 @@ public:
|
|||||||
const std::string& wgname,
|
const std::string& wgname,
|
||||||
data::GuideRateValue& grval) const;
|
data::GuideRateValue& grval) const;
|
||||||
|
|
||||||
|
//! \brief Obtain guide rate values for well.
|
||||||
|
data::GuideRateValue getGuideRateValues(const Well& well) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const BlackoilWellModelGeneric& wellModel_; //!< Reference to well model
|
const BlackoilWellModelGeneric& wellModel_; //!< Reference to well model
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user