mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use well index for polymer perforation rates
This commit is contained in:
@@ -795,7 +795,7 @@ namespace Opm
|
||||
cq_s_poly *= extendEval(intQuants.polymerConcentration() * intQuants.polymerViscosityCorrection());
|
||||
}
|
||||
// Note. Efficiency factor is handled in the output layer
|
||||
auto * perf_rate_polymer = &well_state.perfRatePolymer()[first_perf_];
|
||||
auto * perf_rate_polymer = well_state.perfRatePolymer(this->index_of_well_);
|
||||
perf_rate_polymer[perf] = cq_s_poly.value();
|
||||
|
||||
cq_s_poly *= well_efficiency_factor_;
|
||||
|
||||
@@ -778,7 +778,7 @@ void WellState::reportConnections(data::Well& well,
|
||||
comp.rates.set( pi [ i ], *(connPI + i) );
|
||||
}
|
||||
if ( pu.has_polymer ) {
|
||||
const auto * perf_polymer_rate = &this->perfRatePolymer()[wt.second[1]];
|
||||
const auto * perf_polymer_rate = this->perfRatePolymer(well_index);
|
||||
comp.rates.set( rt::polymer, perf_polymer_rate[local_comp_index]);
|
||||
}
|
||||
if ( pu.has_brine ) {
|
||||
@@ -961,7 +961,7 @@ double WellState::solventWellRate(const int w) const
|
||||
|
||||
double WellState::polymerWellRate(const int w) const
|
||||
{
|
||||
const auto * perf_rates_polymer = &perfRatePolymer_[first_perf_index_[w]];
|
||||
const auto * perf_rates_polymer = this->perfRatePolymer(w);
|
||||
return parallel_well_info_[w]->sumPerfValues(perf_rates_polymer, perf_rates_polymer + this->numPerf(w));
|
||||
}
|
||||
|
||||
|
||||
@@ -160,8 +160,13 @@ public:
|
||||
double solventWellRate(const int w) const;
|
||||
|
||||
/// One rate pr well connection.
|
||||
std::vector<double>& perfRatePolymer() { return perfRatePolymer_; }
|
||||
const std::vector<double>& perfRatePolymer() const { return perfRatePolymer_; }
|
||||
double * perfRatePolymer(std::size_t well_index) {
|
||||
return &this->perfRatePolymer_[this->first_perf_index_[well_index]];
|
||||
}
|
||||
|
||||
const double * perfRatePolymer(std::size_t well_index) const {
|
||||
return &this->perfRatePolymer_[this->first_perf_index_[well_index]];
|
||||
}
|
||||
|
||||
/// One rate pr well
|
||||
double polymerWellRate(const int w) const;
|
||||
|
||||
Reference in New Issue
Block a user