Use WellContainer for perforation throughput

This commit is contained in:
Joakim Hove
2021-06-03 13:20:31 +02:00
parent b0fd14a597
commit a2009b1189
2 changed files with 8 additions and 10 deletions

View File

@@ -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);
}
}