mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use PerfData for connection productivity index
This commit is contained in:
parent
81c5ce8843
commit
3c3a4afcfc
@ -580,8 +580,9 @@ namespace Opm
|
||||
std::transform(src, src + np, dest, dest, std::plus<>{});
|
||||
};
|
||||
|
||||
auto& perf_data = well_state.perfData(this->index_of_well_);
|
||||
auto* wellPI = well_state.productivityIndex(this->index_of_well_).data();
|
||||
auto* connPI = well_state.connectionProductivityIndex(this->index_of_well_).data();
|
||||
auto* connPI = perf_data.prod_index.data();
|
||||
|
||||
setToZero(wellPI);
|
||||
|
||||
|
@ -32,7 +32,7 @@ PerfData::PerfData(std::size_t num_perf, const PhaseUsage& pu_arg):
|
||||
solvent_rates(num_perf),
|
||||
polymer_rates(num_perf),
|
||||
brine_rates(num_perf),
|
||||
prod_index(num_perf),
|
||||
prod_index(num_perf * pu.num_phases),
|
||||
water_throughput(num_perf),
|
||||
skin_pressure(num_perf),
|
||||
water_velocity(num_perf)
|
||||
|
@ -1072,8 +1072,9 @@ namespace Opm
|
||||
std::transform(src, src + np, dest, dest, std::plus<>{});
|
||||
};
|
||||
|
||||
auto& perf_data = well_state.perfData(this->index_of_well_);
|
||||
auto* wellPI = well_state.productivityIndex(this->index_of_well_).data();
|
||||
auto* connPI = well_state.connectionProductivityIndex(this->index_of_well_).data();
|
||||
auto* connPI = perf_data.prod_index.data();
|
||||
|
||||
setToZero(wellPI);
|
||||
|
||||
|
@ -51,7 +51,6 @@ void WellState::base_init(const std::vector<double>& cellPressures,
|
||||
this->segment_state.clear();
|
||||
this->well_potentials_.clear();
|
||||
this->productivity_index_.clear();
|
||||
this->conn_productivity_index_.clear();
|
||||
{
|
||||
// const int nw = wells->number_of_wells;
|
||||
const int nw = wells_ecl.size();
|
||||
@ -105,7 +104,6 @@ void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
||||
this->bhp_.add(well.name(), 0.0);
|
||||
this->thp_.add(well.name(), 0.0);
|
||||
this->productivity_index_.add(well.name(), std::vector<double>(np, 0));
|
||||
this->conn_productivity_index_.add(well.name(), std::vector<double>(num_perf_this_well * np, 0));
|
||||
if ( well.isInjector() )
|
||||
this->temperature_.add(well.name(), well.injectionControls(summary_state).temperature);
|
||||
else
|
||||
@ -687,7 +685,7 @@ void WellState::reportConnections(data::Well& well,
|
||||
}
|
||||
for( auto& comp : well.connections) {
|
||||
const auto * rates = &perf_data.phase_rates[np*local_comp_index];
|
||||
const auto& connPI = this->connectionProductivityIndex(well_index);
|
||||
const auto& connPI = perf_data.prod_index;
|
||||
|
||||
for( int i = 0; i < np; ++i ) {
|
||||
comp.rates.set( phs[ i ], rates[i] );
|
||||
@ -908,7 +906,8 @@ void WellState::shutWell(int well_index)
|
||||
wpi[p] = 0.0;
|
||||
}
|
||||
|
||||
auto& connpi = this->conn_productivity_index_[well_index];
|
||||
auto& perf_data = this->perfData(well_index);
|
||||
auto& connpi = perf_data.prod_index;
|
||||
connpi.assign(connpi.size(), 0);
|
||||
}
|
||||
|
||||
|
@ -202,15 +202,6 @@ public:
|
||||
return this->productivity_index_[well_index];
|
||||
}
|
||||
|
||||
std::vector<double>& connectionProductivityIndex(std::size_t well_index) {
|
||||
return this->conn_productivity_index_[well_index];
|
||||
}
|
||||
|
||||
const std::vector<double>& connectionProductivityIndex(std::size_t well_index) const {
|
||||
return this->conn_productivity_index_[well_index];
|
||||
}
|
||||
|
||||
|
||||
std::vector<double>& wellPotentials(std::size_t well_index) {
|
||||
return this->well_potentials_[well_index];
|
||||
}
|
||||
@ -409,9 +400,6 @@ private:
|
||||
// Productivity Index
|
||||
WellContainer<std::vector<double>> productivity_index_;
|
||||
|
||||
// Connection-level Productivity Index
|
||||
WellContainer<std::vector<double>> conn_productivity_index_;
|
||||
|
||||
// Well potentials
|
||||
WellContainer<std::vector<double>> well_potentials_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user