mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
only using Wells for determination of the RESV well
One of them is redundant, we do not need both of them.
This commit is contained in:
parent
98450b5aa8
commit
60e5a95972
@ -1489,11 +1489,8 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
computeRESV(const std::size_t step)
|
computeRESV(const std::size_t step)
|
||||||
{
|
{
|
||||||
typedef SimFIBODetails::WellMap WellMap;
|
|
||||||
|
|
||||||
const WellMap& wmap = SimFIBODetails::mapWells(wells_ecl_);
|
const std::vector<int>& resv_wells = SimFIBODetails::resvWells(wells());
|
||||||
|
|
||||||
const std::vector<int>& resv_wells = SimFIBODetails::resvWells(wells(), step, wmap);
|
|
||||||
|
|
||||||
int global_number_resv_wells = resv_wells.size();
|
int global_number_resv_wells = resv_wells.size();
|
||||||
global_number_resv_wells = ebosSimulator_.gridView().comm().sum(global_number_resv_wells);
|
global_number_resv_wells = ebosSimulator_.gridView().comm().sum(global_number_resv_wells);
|
||||||
@ -1503,6 +1500,8 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! resv_wells.empty()) {
|
if (! resv_wells.empty()) {
|
||||||
|
typedef SimFIBODetails::WellMap WellMap;
|
||||||
|
const WellMap& wmap = SimFIBODetails::mapWells(wells_ecl_);
|
||||||
|
|
||||||
for (std::vector<int>::const_iterator
|
for (std::vector<int>::const_iterator
|
||||||
rp = resv_wells.begin(), e = resv_wells.end();
|
rp = resv_wells.begin(), e = resv_wells.end();
|
||||||
@ -1529,7 +1528,7 @@ namespace Opm {
|
|||||||
// original distr contains 0 and 1 to indicate phases under control
|
// original distr contains 0 and 1 to indicate phases under control
|
||||||
const double* old_distr = well_controls_get_current_distr(ctrl);
|
const double* old_distr = well_controls_get_current_distr(ctrl);
|
||||||
|
|
||||||
for (size_t p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
distr[p] *= old_distr[p];
|
distr[p] *= old_distr[p];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,42 +70,14 @@ namespace Opm
|
|||||||
return (0 <= resv_control(wells.ctrls[w]));
|
return (0 <= resv_control(wells.ctrls[w]));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
|
||||||
is_resv(const WellMap& wmap,
|
|
||||||
const std::string& name,
|
|
||||||
const std::size_t step)
|
|
||||||
{
|
|
||||||
bool match = false;
|
|
||||||
|
|
||||||
WellMap::const_iterator i = wmap.find(name);
|
|
||||||
|
|
||||||
if (i != wmap.end()) {
|
|
||||||
const Well* wp = i->second;
|
|
||||||
|
|
||||||
match = (wp->isProducer(step) &&
|
|
||||||
wp->getProductionProperties(step)
|
|
||||||
.hasProductionControl(WellProducer::RESV))
|
|
||||||
|| (wp->isInjector(step) &&
|
|
||||||
wp->getInjectionProperties(step)
|
|
||||||
.hasInjectionControl(WellInjector::RESV));
|
|
||||||
}
|
|
||||||
|
|
||||||
return match;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline std::vector<int>
|
inline std::vector<int>
|
||||||
resvWells(const Wells* wells,
|
resvWells(const Wells* wells)
|
||||||
const std::size_t step,
|
|
||||||
const WellMap& wmap)
|
|
||||||
{
|
{
|
||||||
std::vector<int> resv_wells;
|
std::vector<int> resv_wells;
|
||||||
if( wells )
|
if( wells )
|
||||||
{
|
{
|
||||||
for (int w = 0, nw = wells->number_of_wells; w < nw; ++w) {
|
for (int w = 0, nw = wells->number_of_wells; w < nw; ++w) {
|
||||||
if (is_resv(*wells, w) ||
|
if ( is_resv(*wells, w) ) {
|
||||||
((wells->name[w] != 0) &&
|
|
||||||
is_resv(wmap, wells->name[w], step)))
|
|
||||||
{
|
|
||||||
resv_wells.push_back(w);
|
resv_wells.push_back(w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user