mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Store producer status, only call getALQ() for producers.
As it was, the getALQ() call would insert injectors into the ALQ maps, leading to trouble. Also, this gets rid of the slightly weird thing that the output data structure's producer/injector status was only set after creation, in BlackoilWellModel::wellData().
This commit is contained in:
@@ -212,9 +212,8 @@ namespace Opm {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
xwPos->second.current_control.isProducer = well.isProducer();
|
auto& grval = xwPos->second.guide_rates;
|
||||||
|
grval.clear();
|
||||||
auto& grval = xwPos->second.guide_rates; grval.clear();
|
|
||||||
grval += this->getGuideRateValues(well);
|
grval += this->getGuideRateValues(well);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,11 @@ namespace Opm
|
|||||||
first_perf_index_[w+1] = connpos;
|
first_perf_index_[w+1] = connpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_producer_.resize(nw, false);
|
||||||
|
for (int w = 0; w < nw; ++w) {
|
||||||
|
is_producer_[w] = wells_ecl[w].isProducer();
|
||||||
|
}
|
||||||
|
|
||||||
current_injection_controls_.resize(nw);
|
current_injection_controls_.resize(nw);
|
||||||
current_production_controls_.resize(nw);
|
current_production_controls_.resize(nw);
|
||||||
|
|
||||||
@@ -587,7 +592,7 @@ namespace Opm
|
|||||||
well.rates.set( rt::brine, brineWellRate(w) );
|
well.rates.set( rt::brine, brineWellRate(w) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( well.current_control.isProducer ) {
|
if ( is_producer_[w] ) {
|
||||||
well.rates.set( rt::alq, getALQ(/*wellName=*/wt.first) );
|
well.rates.set( rt::alq, getALQ(/*wellName=*/wt.first) );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -600,6 +605,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
auto& curr = well.current_control;
|
auto& curr = well.current_control;
|
||||||
|
|
||||||
|
curr.isProducer = this->is_producer_[w];
|
||||||
curr.prod = this->currentProductionControls()[w];
|
curr.prod = this->currentProductionControls()[w];
|
||||||
curr.inj = this->currentInjectionControls() [w];
|
curr.inj = this->currentInjectionControls() [w];
|
||||||
}
|
}
|
||||||
@@ -1162,6 +1168,7 @@ namespace Opm
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<double> perfphaserates_;
|
std::vector<double> perfphaserates_;
|
||||||
|
std::vector<bool> is_producer_; // Size equal to number of local wells.
|
||||||
|
|
||||||
// vector with size number of wells +1.
|
// vector with size number of wells +1.
|
||||||
// iterate over all perforations of a given well
|
// iterate over all perforations of a given well
|
||||||
|
|||||||
Reference in New Issue
Block a user