mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use PerfData for perforation rates
This commit is contained in:
parent
b6318ac017
commit
4b69d12335
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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_;
|
||||
|
@ -292,6 +292,7 @@ BOOST_AUTO_TEST_CASE(Pressure)
|
||||
|
||||
|
||||
const auto& perf_data = wstate.perfData("PROD01");
|
||||
(void) perf_data;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user