diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index b39824f40..21afaac03 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -1996,7 +1996,7 @@ namespace Opm { auto& perf_pressure = well_state.perfPress(well_index); auto& perf_rates = well_state.perfRates(well_index); - auto * perf_phase_rates = well_state.perfPhaseRates(well_index); + auto& perf_phase_rates = well_state.perfPhaseRates(well_index); const auto& perf_data = this->well_perf_data_[well_index]; for (std::size_t perf_index = 0; perf_index < perf_data.size(); perf_index++) { @@ -3373,7 +3373,7 @@ namespace Opm { auto& well_info = *local_parallel_well_info_[wellID]; const int num_perf_this_well = well_info.communication().sum(well_perf_data_[wellID].size()); - auto * perf_phase_rate = this->wellState().perfPhaseRates(wellID); + auto& perf_phase_rate = this->wellState().perfPhaseRates(wellID); for (int perf = 0; perf < num_perf_this_well; ++perf) { const int cell_idx = well_perf_data_[wellID][perf].cell_index; diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 569815636..8c98c32f0 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -2637,7 +2637,7 @@ namespace Opm // calculating the perforation rate for each perforation that belongs to this segment const EvalWell seg_pressure = getSegmentPressure(seg); - auto * perf_rates = well_state.perfPhaseRates(this->index_of_well_); + auto& perf_rates = well_state.perfPhaseRates(this->index_of_well_); auto& perf_press_state = well_state.perfPress(this->index_of_well_); for (const int perf : segment_perforations_[seg]) { const int cell_idx = well_cells_[perf]; diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index c8a22ab89..047467d26 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -591,7 +591,7 @@ namespace Opm const int np = number_of_phases_; std::vector connectionRates = connectionRates_; // Copy to get right size. - auto * perf_rates = well_state.perfPhaseRates(this->index_of_well_); + auto& perf_rates = well_state.perfPhaseRates(this->index_of_well_); for (int perf = 0; perf < number_of_perforations_; ++perf) { // Calculate perforation quantities. std::vector cq_s(num_components_, {numWellEq_ + numEq, 0.0}); @@ -628,7 +628,7 @@ namespace Opm // Store the perforation phase flux for later usage. if (has_solvent && componentIdx == contiSolventEqIdx) { - auto * perf_rate_solvent = well_state.perfRateSolvent(this->index_of_well_); + auto& perf_rate_solvent = well_state.perfRateSolvent(this->index_of_well_); perf_rate_solvent[perf] = cq_s[componentIdx].value(); } else { perf_rates[perf*np + ebosCompIdxToFlowCompIdx(componentIdx)] = cq_s[componentIdx].value(); @@ -794,7 +794,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(this->index_of_well_); + 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_; @@ -827,7 +827,7 @@ namespace Opm const double dis_gas_frac = perf_dis_gas_rate / cq_s_zfrac_effective.value(); cq_s_zfrac_effective *= extendEval(dis_gas_frac*intQuants.xVolume() + (1.0-dis_gas_frac)*intQuants.yVolume()); } - auto * perf_rate_solvent = well_state.perfRateSolvent(this->index_of_well_); + auto& perf_rate_solvent = well_state.perfRateSolvent(this->index_of_well_); perf_rate_solvent[perf] = cq_s_zfrac_effective.value(); cq_s_zfrac_effective *= well_efficiency_factor_; @@ -844,7 +844,7 @@ namespace Opm cq_s_sm *= extendEval(intQuants.fluidState().saltConcentration()); } // Note. Efficiency factor is handled in the output layer - auto * perf_rate_brine = well_state.perfRateBrine(this->index_of_well_); + auto& perf_rate_brine = well_state.perfRateBrine(this->index_of_well_); perf_rate_brine[perf] = cq_s_sm.value(); cq_s_sm *= well_efficiency_factor_; @@ -1304,8 +1304,8 @@ namespace Opm // other primary variables related to polymer injectivity study if constexpr (Base::has_polymermw) { if (this->isInjector()) { - auto * perf_water_velocity = well_state.perfWaterVelocity(this->index_of_well_); - auto * perf_skin_pressure = well_state.perfSkinPressure(this->index_of_well_); + auto& perf_water_velocity = well_state.perfWaterVelocity(this->index_of_well_); + auto& perf_skin_pressure = well_state.perfSkinPressure(this->index_of_well_); for (int perf = 0; perf < number_of_perforations_; ++perf) { perf_water_velocity[perf] = primary_variables_[Bhp + 1 + perf]; perf_skin_pressure[perf] = primary_variables_[Bhp + 1 + number_of_perforations_ + perf]; @@ -2104,7 +2104,7 @@ namespace Opm const int nperf = number_of_perforations_; const int np = number_of_phases_; std::vector perfRates(b_perf.size(),0.0); - const auto * perf_rates_state = well_state.perfPhaseRates(this->index_of_well_); + const auto& perf_rates_state = well_state.perfPhaseRates(this->index_of_well_); for (int perf = 0; perf < nperf; ++perf) { for (int comp = 0; comp < np; ++comp) { @@ -2113,7 +2113,7 @@ namespace Opm } if constexpr (has_solvent) { - const auto * solvent_perf_rates_state = well_state.perfRateSolvent(this->index_of_well_); + const auto& solvent_perf_rates_state = well_state.perfRateSolvent(this->index_of_well_); for (int perf = 0; perf < nperf; ++perf) { perfRates[perf * num_components_ + contiSolventEqIdx] = solvent_perf_rates_state[perf]; } @@ -2832,8 +2832,8 @@ namespace Opm // other primary variables related to polymer injection if constexpr (Base::has_polymermw) { if (this->isInjector()) { - const auto * water_velocity = well_state.perfWaterVelocity(this->index_of_well_); - const auto * skin_pressure = well_state.perfSkinPressure(this->index_of_well_); + const auto& water_velocity = well_state.perfWaterVelocity(this->index_of_well_); + const auto& skin_pressure = well_state.perfSkinPressure(this->index_of_well_); for (int perf = 0; perf < number_of_perforations_; ++perf) { primary_variables_[Bhp + 1 + perf] = water_velocity[perf]; primary_variables_[Bhp + 1 + number_of_perforations_ + perf] = skin_pressure[perf]; @@ -3201,7 +3201,7 @@ namespace Opm { if constexpr (Base::has_polymermw) { if (this->isInjector()) { - auto * perf_water_throughput = well_state.perfThroughput(this->index_of_well_); + auto& perf_water_throughput = well_state.perfThroughput(this->index_of_well_); for (int perf = 0; perf < number_of_perforations_; ++perf) { const double perf_water_vel = primary_variables_[Bhp + 1 + perf]; // we do not consider the formation damage due to water flowing from reservoir into wellbore @@ -3262,7 +3262,7 @@ namespace Opm const EvalWell eq_wat_vel = primary_variables_evaluation_[wat_vel_index] - water_velocity; resWell_[0][wat_vel_index] = eq_wat_vel.value(); - const auto * perf_water_throughput = well_state.perfThroughput(this->index_of_well_); + const auto& perf_water_throughput = well_state.perfThroughput(this->index_of_well_); const double throughput = perf_water_throughput[perf]; const int pskin_index = Bhp + 1 + number_of_perforations_ + perf; @@ -3441,7 +3441,7 @@ namespace Opm const int wat_vel_index = Bhp + 1 + perf; const EvalWell water_velocity = primary_variables_evaluation_[wat_vel_index]; if (water_velocity > 0.) { // injecting - const auto * perf_water_throughput = well_state.perfThroughput(this->index_of_well_); + const auto& perf_water_throughput = well_state.perfThroughput(this->index_of_well_); const double throughput = perf_water_throughput[perf]; const EvalWell molecular_weight = wpolymermw(throughput, water_velocity, deferred_logger); cq_s_polymw *= molecular_weight; diff --git a/opm/simulators/wells/WellInterfaceFluidSystem.cpp b/opm/simulators/wells/WellInterfaceFluidSystem.cpp index 7b735fdb2..093a7304d 100644 --- a/opm/simulators/wells/WellInterfaceFluidSystem.cpp +++ b/opm/simulators/wells/WellInterfaceFluidSystem.cpp @@ -846,7 +846,7 @@ checkMaxRatioLimitCompletions(const WellState& well_state, double max_ratio_completion = 0; const int np = number_of_phases_; - const auto * perf_phase_rates = well_state.perfPhaseRates(this->index_of_well_); + const auto& perf_phase_rates = well_state.perfPhaseRates(this->index_of_well_); // look for the worst_offending_completion for (const auto& completion : completions_) { std::vector completion_rates(np, 0.0); diff --git a/opm/simulators/wells/WellState.cpp b/opm/simulators/wells/WellState.cpp index 8cd13d0de..ff907f1a1 100644 --- a/opm/simulators/wells/WellState.cpp +++ b/opm/simulators/wells/WellState.cpp @@ -41,7 +41,14 @@ void WellState::base_init(const std::vector& cellPressures, // clear old name mapping this->wellMap_.clear(); this->perfpress_.clear(); + this->perf_skin_pressure_.clear(); + this->perf_water_throughput_.clear(); + this->perf_water_velocity_.clear(); + this->perfphaserates_.clear(); this->perfrates_.clear(); + this->perfRateBrine_.clear(); + this->perfRateSolvent_.clear(); + this->perfRatePolymer_.clear(); this->status_.clear(); this->well_perf_data_.clear(); this->parallel_well_info_.clear(); @@ -101,6 +108,13 @@ void WellState::initSingleWell(const std::vector& cellPressures, this->segment_state.add(well.name(), SegmentState{}); this->perfpress_.add(well.name(), std::vector(num_perf_this_well, -1e100)); this->perfrates_.add(well.name(), std::vector(num_perf_this_well, 0)); + this->perfphaserates_.add(well.name(), std::vector(np*num_perf_this_well, 0)); + this->perf_skin_pressure_.add(well.name(), std::vector(num_perf_this_well, 0)); + this->perf_water_velocity_.add(well.name(), std::vector(num_perf_this_well, 0)); + this->perf_water_throughput_.add(well.name(), std::vector(num_perf_this_well, 0)); + this->perfRatePolymer_.add(well.name(), std::vector(num_perf_this_well, 0)); + this->perfRateSolvent_.add(well.name(), std::vector(num_perf_this_well, 0)); + this->perfRateBrine_.add(well.name(), std::vector(num_perf_this_well, 0)); this->bhp_.add(well.name(), 0.0); this->thp_.add(well.name(), 0.0); if ( well.isInjector() ) @@ -275,17 +289,6 @@ void WellState::init(const std::vector& cellPressures, this->events_.add( wname, Events() ); } } - // Ensure that we start out with zero rates by default. - perfphaserates_.clear(); - perfphaserates_.resize(nperf * this->numPhases(), 0.0); - - // these are only used to monitor the injectivity - perf_water_throughput_.clear(); - perf_water_throughput_.resize(nperf, 0.0); - perf_water_velocity_.clear(); - perf_water_velocity_.resize(nperf, 0.0); - perf_skin_pressure_.clear(); - perf_skin_pressure_.resize(nperf, 0.0); first_perf_index_.resize(nw, 0); first_perf_index_[0] = 0; @@ -300,7 +303,7 @@ void WellState::init(const std::vector& cellPressures, auto& perf_press = this->perfPress(w); first_perf_index_[w] = connpos; - auto phase_rates = this->perfPhaseRates(w); + auto& phase_rates = this->perfPhaseRates(w); for (int perf = 0; perf < num_perf_this_well; ++perf) { if (wells_ecl[w].getStatus() == Well::Status::OPEN) { @@ -338,14 +341,10 @@ void WellState::init(const std::vector& cellPressures, } } - perfRateSolvent_.assign(nperf, 0.0); productivity_index_.assign(nw * this->numPhases(), 0.0); conn_productivity_index_.assign(nperf * this->numPhases(), 0.0); well_potentials_.assign(nw * this->numPhases(), 0.0); - perfRatePolymer_.assign(nperf, 0.0); - perfRateBrine_.assign(nperf, 0.0); - for (int w = 0; w < nw; ++w) { switch (wells_ecl[w].getStatus()) { case Well::Status::SHUT: @@ -371,6 +370,7 @@ void WellState::init(const std::vector& cellPressures, if (well.getStatus() == Well::Status::SHUT) { continue; } + const auto& wname = well.name(); auto it = prevState->wellMap().find(well.name()); if (it != end) @@ -431,8 +431,8 @@ void WellState::init(const std::vector& cellPressures, // number of perforations. if (global_num_perf_same) { - const auto * src_rates = prevState->perfPhaseRates(oldIndex); - auto * target_rates = this->perfPhaseRates(newIndex); + const auto& src_rates = prevState->perfPhaseRates(oldIndex); + auto& target_rates = this->perfPhaseRates(newIndex); for (int perf_index = 0; perf_index < num_perf_this_well; perf_index++) { for (int p = 0; p < np; p++) { target_rates[perf_index*np + p] = src_rates[perf_index*np + p]; @@ -440,7 +440,7 @@ void WellState::init(const std::vector& cellPressures, } } else { const int global_num_perf_this_well = parallel_well_info[w]->communication().sum(num_perf_this_well); - auto * target_rates = this->perfPhaseRates(newIndex); + auto& target_rates = this->perfPhaseRates(newIndex); for (int perf_index = 0; perf_index < num_perf_this_well; perf_index++) { for (int p = 0; p < np; ++p) { target_rates[perf_index*np + p] = wellRates(w)[p] / double(global_num_perf_this_well); @@ -463,12 +463,7 @@ void WellState::init(const std::vector& cellPressures, if (pu.has_solvent) { if (global_num_perf_same) { - auto * solvent_target = this->perfRateSolvent(newIndex); - const auto * solvent_src = prevState->perfRateSolvent(oldIndex); - for (int perf = 0; perf < num_perf_this_well; ++perf) - { - solvent_target[perf] = solvent_src[perf]; - } + this->perfRateSolvent_.copy_welldata(prevState->perfRateSolvent_, wname); } } @@ -480,20 +475,9 @@ void WellState::init(const std::vector& cellPressures, if (pu.has_polymermw) { if (global_num_perf_same) { - auto * throughput_target = this->perfThroughput(newIndex); - auto * pressure_target = this->perfSkinPressure(newIndex); - auto * velocity_target = this->perfWaterVelocity(newIndex); - - const auto * throughput_src = prevState->perfThroughput(oldIndex); - const auto * pressure_src = prevState->perfSkinPressure(oldIndex); - const auto * velocity_src = prevState->perfWaterVelocity(oldIndex); - - for (int perf = 0; perf < num_perf_this_well; ++perf) - { - throughput_target[ perf ] = throughput_src[perf]; - pressure_target[ perf ] = pressure_src[perf]; - velocity_target[ perf ] = velocity_src[perf]; - } + this->perf_water_velocity_.copy_welldata(prevState->perf_water_velocity_, wname); + this->perf_skin_pressure_.copy_welldata(prevState->perf_skin_pressure_, wname); + this->perf_water_throughput_.copy_welldata(prevState->perf_water_throughput_, wname); } } @@ -770,7 +754,7 @@ void WellState::reportConnections(data::Well& well, for( auto& comp : well.connections) { const auto connPhaseOffset = np * (wt.second[1] + local_comp_index); - const auto * rates = &this->perfPhaseRates(well_index)[np*local_comp_index]; + const auto& rates = &this->perfPhaseRates(well_index)[np*local_comp_index]; const auto connPI = this->connectionProductivityIndex().begin() + connPhaseOffset; for( int i = 0; i < np; ++i ) { @@ -778,15 +762,15 @@ void WellState::reportConnections(data::Well& well, comp.rates.set( pi [ i ], *(connPI + i) ); } if ( pu.has_polymer ) { - const auto * perf_polymer_rate = this->perfRatePolymer(well_index); + const auto& perf_polymer_rate = this->perfRatePolymer(well_index); comp.rates.set( rt::polymer, perf_polymer_rate[local_comp_index]); } if ( pu.has_brine ) { - const auto * perf_brine_rate = this->perfRateBrine(well_index); + const auto& perf_brine_rate = this->perfRateBrine(well_index); comp.rates.set( rt::brine, perf_brine_rate[local_comp_index]); } if ( pu.has_solvent ) { - const auto * perf_solvent_rate = this->perfRateSolvent(well_index); + const auto& perf_solvent_rate = this->perfRateSolvent(well_index); comp.rates.set( rt::solvent, perf_solvent_rate[local_comp_index] ); } @@ -811,8 +795,6 @@ void WellState::initWellStateMSWell(const std::vector& wells_ecl, for (int w = 0; w < nw; ++w) { const auto& well_ecl = wells_ecl[w]; const auto& wname = wells_ecl[w].name(); - const auto& well_info = this->wellMap().at(wname); - const int num_perf_this_well = well_info[2]; if ( well_ecl.isMultiSegment() ) { const WellSegments& segment_set = well_ecl.getSegments(); @@ -855,7 +837,7 @@ void WellState::initWellStateMSWell(const std::vector& wells_ecl, "Inconsistent number of reservoir connections in well"); if (pu.phase_used[Gas]) { - auto * perf_rates = this->perfPhaseRates(w); + auto& perf_rates = this->perfPhaseRates(w); const int gaspos = pu.phase_pos[Gas]; // scale the phase rates for Gas to avoid too bad initial guess for gas fraction // it will probably benefit the standard well too, while it needs to be justified @@ -866,8 +848,8 @@ void WellState::initWellStateMSWell(const std::vector& wells_ecl, perf_rates[perf*np + gaspos] *= 100; } - const auto * perf_rates = this->perfPhaseRates(w); - std::vector perforation_rates(perf_rates, perf_rates + num_perf_this_well*np); + const auto& perf_rates = this->perfPhaseRates(w); + std::vector perforation_rates(perf_rates.begin(), perf_rates.end()); auto& segments = this->segments(w); calculateSegmentRates(segment_inlets, segment_perforations, perforation_rates, np, 0 /* top segment */, segments.rates); @@ -952,20 +934,20 @@ WellState::calculateSegmentRates(const std::vector>& segment_in double WellState::solventWellRate(const int w) const { - const auto * perf_rates_solvent = this->perfRateSolvent(w); - return parallel_well_info_[w]->sumPerfValues(perf_rates_solvent, perf_rates_solvent + this->numPerf(w)); + const auto& perf_rates_solvent = this->perfRateSolvent(w); + return parallel_well_info_[w]->sumPerfValues(perf_rates_solvent.begin(), perf_rates_solvent.end()); } double WellState::polymerWellRate(const int w) const { - const auto * perf_rates_polymer = this->perfRatePolymer(w); - return parallel_well_info_[w]->sumPerfValues(perf_rates_polymer, perf_rates_polymer + this->numPerf(w)); + const auto& perf_rates_polymer = this->perfRatePolymer(w); + return parallel_well_info_[w]->sumPerfValues(perf_rates_polymer.begin(), perf_rates_polymer.end()); } double WellState::brineWellRate(const int w) const { - const auto * perf_rates_brine = this->perfRateBrine(w); - return parallel_well_info_[w]->sumPerfValues(perf_rates_brine, perf_rates_brine + this->numPerf(w)); + const auto& perf_rates_brine = this->perfRateBrine(w); + return parallel_well_info_[w]->sumPerfValues(perf_rates_brine.begin(), perf_rates_brine.end()); } diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp index d26aecb62..541d47d5c 100644 --- a/opm/simulators/wells/WellState.hpp +++ b/opm/simulators/wells/WellState.hpp @@ -81,7 +81,7 @@ public: /// Allocate and initialize if wells is non-null. Also tries /// to give useful initial values to the bhp(), wellRates() - /// and perfPhaseRates() fields, depending on controls + /// and perfPhaseRatesORG() fields, depending on controls void init(const std::vector& cellPressures, const Schedule& schedule, const std::vector& wells_ecl, @@ -100,12 +100,13 @@ public: const SummaryState& summary_state); /// One rate per phase and well connection. - double * perfPhaseRates(std::size_t well_index) { - return &this->perfphaserates_[this->first_perf_index_[well_index] * this->numPhases()]; + + std::vector& perfPhaseRates(std::size_t well_index) { + return this->perfphaserates_[well_index]; } - const double * perfPhaseRates(std::size_t well_index) const { - return &this->perfphaserates_[this->first_perf_index_[well_index] * this->numPhases()]; + const std::vector& perfPhaseRates(std::size_t well_index) const { + return this->perfphaserates_[well_index]; } /// One current control per injecting well. @@ -158,36 +159,36 @@ public: } /// One rate pr well connection. - double * perfRateSolvent(std::size_t well_index) { - return &perfRateSolvent_[this->first_perf_index_[well_index]]; + std::vector& perfRateSolvent(std::size_t well_index) { + return this->perfRateSolvent_[well_index]; } - const double * perfRateSolvent(std::size_t well_index) const { - return &perfRateSolvent_[this->first_perf_index_[well_index]]; + const std::vector& perfRateSolvent(std::size_t well_index) const { + return this->perfRateSolvent_[well_index]; } /// One rate pr well double solventWellRate(const int w) const; /// One rate pr well connection. - double * perfRatePolymer(std::size_t well_index) { - return &this->perfRatePolymer_[this->first_perf_index_[well_index]]; + std::vector& perfRatePolymer(std::size_t well_index) { + return this->perfRatePolymer_[well_index]; } - const double * perfRatePolymer(std::size_t well_index) const { - return &this->perfRatePolymer_[this->first_perf_index_[well_index]]; + const std::vector& perfRatePolymer(std::size_t well_index) const { + return this->perfRatePolymer_[well_index]; } /// One rate pr well double polymerWellRate(const int w) const; /// One rate pr well connection. - double* perfRateBrine(std::size_t well_index) { - return &this->perfRateBrine_[this->first_perf_index_[well_index]]; + std::vector& perfRateBrine(std::size_t well_index) { + return this->perfRateBrine_[well_index]; } - const double* perfRateBrine(std::size_t well_index) const { - return &this->perfRateBrine_[this->first_perf_index_[well_index]]; + const std::vector& perfRateBrine(std::size_t well_index) const { + return this->perfRateBrine_[well_index]; } /// One rate pr well @@ -258,28 +259,28 @@ public: return well_potentials_; } - double * perfThroughput(std::size_t well_index) { - return &perf_water_throughput_[this->first_perf_index_[well_index]]; + std::vector& perfThroughput(std::size_t well_index) { + return perf_water_throughput_[well_index]; } - const double * perfThroughput(std::size_t well_index) const { - return &perf_water_throughput_[this->first_perf_index_[well_index]]; + const std::vector& perfThroughput(std::size_t well_index) const { + return perf_water_throughput_[well_index]; } - double * perfSkinPressure(std::size_t well_index) { - return &perf_skin_pressure_[this->first_perf_index_[well_index]]; + std::vector& perfSkinPressure(std::size_t well_index) { + return perf_skin_pressure_[well_index]; } - const double * perfSkinPressure(std::size_t well_index) const { - return &perf_skin_pressure_[this->first_perf_index_[well_index]]; + const std::vector& perfSkinPressure(std::size_t well_index) const { + return perf_skin_pressure_[well_index]; } - double * perfWaterVelocity(std::size_t well_index) { - return &perf_water_velocity_[this->first_perf_index_[well_index]]; + std::vector& perfWaterVelocity(std::size_t well_index) { + return perf_water_velocity_[well_index]; } - const double * perfWaterVelocity(std::size_t well_index) const { - return &perf_water_velocity_[this->first_perf_index_[well_index]]; + const std::vector& perfWaterVelocity(std::size_t well_index) const { + return perf_water_velocity_[well_index]; } template @@ -436,7 +437,7 @@ private: WellContainer> perfrates_; WellContainer> perfpress_; - std::vector perfphaserates_; + WellContainer> perfphaserates_; WellContainer is_producer_; // Size equal to number of local wells. // vector with size number of wells +1. @@ -452,24 +453,24 @@ private: std::map>> well_rates; - std::vector perfRateSolvent_; + WellContainer> perfRateSolvent_; // only for output - std::vector perfRatePolymer_; - std::vector perfRateBrine_; + WellContainer> perfRatePolymer_; + WellContainer> perfRateBrine_; // it is the throughput of water flow through the perforations // it is used as a measure of formation damage around well-bore due to particle deposition // it will only be used for injectors to check the injectivity - std::vector perf_water_throughput_; + WellContainer> perf_water_throughput_; // skin pressure of peforation // it will only be used for injectors to check the injectivity - std::vector perf_skin_pressure_; + WellContainer> perf_skin_pressure_; // it will only be used for injectors to check the injectivity // water velocity of perforation - std::vector perf_water_velocity_; + WellContainer> perf_water_velocity_; // phase rates under reservoir condition for wells // or voidage phase rates