Use PerfData for perforation rates

This commit is contained in:
Joakim Hove 2021-06-05 08:21:48 +02:00
parent b6318ac017
commit 4b69d12335
5 changed files with 9 additions and 11 deletions

View File

@ -40,5 +40,9 @@ PerfData::PerfData(std::size_t num_perf, const PhaseUsage& pu_arg):
}
std::size_t PerfData::size() const {
return this->pressure.size();
}
}

View File

@ -35,6 +35,8 @@ private:
public:
PerfData(std::size_t num_perf, const PhaseUsage& pu);
std::size_t size() const;
std::vector<double> pressure;
std::vector<double> rates;
std::vector<double> phase_rates;

View File

@ -46,7 +46,6 @@ void WellState::base_init(const std::vector<double>& cellPressures,
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();
@ -112,7 +111,6 @@ void WellState::initSingleWell(const std::vector<double>& cellPressures,
this->segment_state.add(well.name(), SegmentState{});
this->perfdata.add(well.name(), PerfData{num_perf_this_well, this->phase_usage_});
this->perfpress_.add(well.name(), std::vector<double>(num_perf_this_well, -1e100));
this->perfrates_.add(well.name(), std::vector<double>(num_perf_this_well, 0));
this->perfphaserates_.add(well.name(), std::vector<double>(np*num_perf_this_well, 0));
this->perf_skin_pressure_.add(well.name(), std::vector<double>(num_perf_this_well, 0));
this->perf_water_velocity_.add(well.name(), std::vector<double>(num_perf_this_well, 0));
@ -710,8 +708,8 @@ void WellState::reportConnections(data::Well& well,
const auto& pd = this->well_perf_data_[well_index];
const int num_perf_well = pd.size();
well.connections.resize(num_perf_well);
const auto& perf_rates = this->perfRates(well_index);
const auto& perf_data = this->perfData(well_index);
const auto& perf_rates = perf_data.rates;
const auto& perf_pressure = this->perfPress(well_index);
for( int i = 0; i < num_perf_well; ++i ) {
const auto active_index = this->well_perf_data_[well_index][i].cell_index;

View File

@ -398,12 +398,6 @@ public:
std::vector<double>& wellRates(std::size_t well_index) { return wellrates_[well_index]; }
const std::vector<double>& wellRates(std::size_t well_index) const { return wellrates_[well_index]; }
/// One rate per well connection.
std::vector<double>& perfRates(std::size_t well_index) { return this->perfrates_[well_index]; }
const std::vector<double>& perfRates(std::size_t well_index) const { return this->perfrates_[well_index]; }
std::vector<double>& perfRates(const std::string& wname) { return this->perfrates_[wname]; }
const std::vector<double>& perfRates(const std::string& wname) const { return this->perfrates_[wname]; }
/// One pressure per well connection.
std::vector<double>& perfPress(std::size_t well_index) { return perfpress_[well_index]; }
const std::vector<double>& perfPress(std::size_t well_index) const { return perfpress_[well_index]; }
@ -447,7 +441,6 @@ private:
WellContainer<std::vector<double>> wellrates_;
PhaseUsage phase_usage_;
WellContainer<PerfData> perfdata;
WellContainer<std::vector<double>> perfrates_;
WellContainer<std::vector<double>> perfpress_;
WellContainer<std::vector<double>> perfphaserates_;

View File

@ -292,6 +292,7 @@ BOOST_AUTO_TEST_CASE(Pressure)
const auto& perf_data = wstate.perfData("PROD01");
(void) perf_data;
}
// ---------------------------------------------------------------------