mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use WellContainer for perforation throughput
This commit is contained in:
parent
b0fd14a597
commit
a2009b1189
@ -42,6 +42,7 @@ void WellState::base_init(const std::vector<double>& cellPressures,
|
||||
this->wellMap_.clear();
|
||||
this->perfpress_.clear();
|
||||
this->perf_skin_pressure_.clear();
|
||||
this->perf_water_throughput_.clear();
|
||||
this->perfrates_.clear();
|
||||
this->status_.clear();
|
||||
this->well_perf_data_.clear();
|
||||
@ -103,6 +104,7 @@ void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
||||
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->perf_skin_pressure_.add(well.name(), std::vector<double>(num_perf_this_well, 0));
|
||||
this->perf_water_throughput_.add(well.name(), std::vector<double>(num_perf_this_well, 0));
|
||||
this->bhp_.add(well.name(), 0.0);
|
||||
this->thp_.add(well.name(), 0.0);
|
||||
if ( well.isInjector() )
|
||||
@ -282,8 +284,6 @@ void WellState::init(const std::vector<double>& cellPressures,
|
||||
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);
|
||||
|
||||
@ -481,18 +481,16 @@ void WellState::init(const std::vector<double>& cellPressures,
|
||||
if (pu.has_polymermw) {
|
||||
if (global_num_perf_same)
|
||||
{
|
||||
auto * throughput_target = this->perfThroughput(newIndex);
|
||||
auto * velocity_target = this->perfWaterVelocity(newIndex);
|
||||
|
||||
const auto * throughput_src = prevState->perfThroughput(oldIndex);
|
||||
const auto * velocity_src = prevState->perfWaterVelocity(oldIndex);
|
||||
|
||||
for (int perf = 0; perf < num_perf_this_well; ++perf)
|
||||
{
|
||||
throughput_target[ perf ] = throughput_src[perf];
|
||||
velocity_target[ perf ] = velocity_src[perf];
|
||||
}
|
||||
this->perf_skin_pressure_.copy_welldata(prevState->perf_skin_pressure_, wname);
|
||||
this->perf_water_throughput_.copy_welldata(prevState->perf_water_throughput_, wname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,12 +258,12 @@ public:
|
||||
return well_potentials_;
|
||||
}
|
||||
|
||||
double * perfThroughput(std::size_t well_index) {
|
||||
return &perf_water_throughput_[this->first_perf_index_[well_index]];
|
||||
std::vector<double>& 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<double>& perfThroughput(std::size_t well_index) const {
|
||||
return perf_water_throughput_[well_index];
|
||||
}
|
||||
|
||||
std::vector<double>& perfSkinPressure(std::size_t well_index) {
|
||||
@ -461,7 +461,7 @@ private:
|
||||
// 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<double> perf_water_throughput_;
|
||||
WellContainer<std::vector<double>> perf_water_throughput_;
|
||||
|
||||
// skin pressure of peforation
|
||||
// it will only be used for injectors to check the injectivity
|
||||
|
Loading…
Reference in New Issue
Block a user