diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index 1b59efd78..8576c6505 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -342,7 +342,7 @@ namespace Opm { for (auto& well : well_container_) { if (well->isVFPActive(local_deferredLogger)){ - well->setExplicitSurfaceRates(this->wellState(), this->prevWellState()); + well->setPrevSurfaceRates(this->wellState(), this->prevWellState()); } } diff --git a/opm/simulators/wells/SingleWellState.cpp b/opm/simulators/wells/SingleWellState.cpp index 4715c0bbc..f79fd18de 100644 --- a/opm/simulators/wells/SingleWellState.cpp +++ b/opm/simulators/wells/SingleWellState.cpp @@ -44,7 +44,7 @@ SingleWellState::SingleWellState(const std::string& name_, , productivity_index(pu_.num_phases) , surface_rates(pu_.num_phases) , reservoir_rates(pu_.num_phases) - , explicit_surface_rates(pu_.num_phases) + , prev_surface_rates(pu_.num_phases) , perf_data(perf_input.size(), pressure_first_connection, !is_producer, pu_.num_phases) , trivial_target(false) { @@ -85,7 +85,7 @@ void SingleWellState::shut() { this->thp = 0; this->status = Well::Status::SHUT; std::fill(this->surface_rates.begin(), this->surface_rates.end(), 0); - std::fill(this->explicit_surface_rates.begin(), this->explicit_surface_rates.end(), 0); + std::fill(this->prev_surface_rates.begin(), this->prev_surface_rates.end(), 0); std::fill(this->reservoir_rates.begin(), this->reservoir_rates.end(), 0); std::fill(this->productivity_index.begin(), this->productivity_index.end(), 0); @@ -298,7 +298,7 @@ bool SingleWellState::operator==(const SingleWellState& rhs) const this->productivity_index == rhs.productivity_index && this->surface_rates == rhs.surface_rates && this->reservoir_rates == rhs.reservoir_rates && - this->explicit_surface_rates == rhs.explicit_surface_rates && + this->prev_surface_rates == rhs.prev_surface_rates && this->trivial_target == rhs.trivial_target && this->segments == rhs.segments && this->events == rhs.events && diff --git a/opm/simulators/wells/SingleWellState.hpp b/opm/simulators/wells/SingleWellState.hpp index 4609f497d..2935b3e85 100644 --- a/opm/simulators/wells/SingleWellState.hpp +++ b/opm/simulators/wells/SingleWellState.hpp @@ -63,7 +63,7 @@ public: serializer(productivity_index); serializer(surface_rates); serializer(reservoir_rates); - serializer(explicit_surface_rates); + serializer(prev_surface_rates); serializer(trivial_target); serializer(segments); serializer(events); @@ -96,7 +96,7 @@ public: std::vector productivity_index; std::vector surface_rates; std::vector reservoir_rates; - std::vector explicit_surface_rates; + std::vector prev_surface_rates; PerfData perf_data; bool trivial_target; SegmentState segments; diff --git a/opm/simulators/wells/VFPProperties.hpp b/opm/simulators/wells/VFPProperties.hpp index bd24ccc2e..96d1b0d4c 100644 --- a/opm/simulators/wells/VFPProperties.hpp +++ b/opm/simulators/wells/VFPProperties.hpp @@ -72,7 +72,7 @@ public: } double getExplicitWFR(const int table_id, const size_t well_index) const { - const auto& rates = well_state_.well(well_index).explicit_surface_rates; + const auto& rates = well_state_.well(well_index).prev_surface_rates; const auto& pu = well_state_.phaseUsage(); const auto& aqua = pu.phase_used[BlackoilPhases::Aqua]? rates[pu.phase_pos[BlackoilPhases::Aqua]]:0.0; const auto& liquid = pu.phase_used[BlackoilPhases::Liquid]? rates[pu.phase_pos[BlackoilPhases::Liquid]]:0.0; @@ -82,7 +82,7 @@ public: } double getExplicitGFR(const int table_id, const size_t well_index) const { - const auto& rates = well_state_.well(well_index).explicit_surface_rates; + const auto& rates = well_state_.well(well_index).prev_surface_rates; const auto& pu = well_state_.phaseUsage(); const auto& aqua = pu.phase_used[BlackoilPhases::Aqua]? rates[pu.phase_pos[BlackoilPhases::Aqua]]:0.0; const auto& liquid = pu.phase_used[BlackoilPhases::Liquid]? rates[pu.phase_pos[BlackoilPhases::Liquid]]:0.0; diff --git a/opm/simulators/wells/WellInterface.hpp b/opm/simulators/wells/WellInterface.hpp index be3b034c5..7a912b18f 100644 --- a/opm/simulators/wells/WellInterface.hpp +++ b/opm/simulators/wells/WellInterface.hpp @@ -315,8 +315,8 @@ public: WellState& well_state, DeferredLogger& deferred_logger) const; - void setExplicitSurfaceRates(WellState& well_state, - const WellState& prev_well_state) const; + void setPrevSurfaceRates(WellState& well_state, + const WellState& prev_well_state) const; void solveWellEquation(const Simulator& ebosSimulator, WellState& well_state, diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index 4156b18de..1b90e4392 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -1195,18 +1195,18 @@ namespace Opm template void WellInterface:: - setExplicitSurfaceRates(WellState& well_state, + setPrevSurfaceRates(WellState& well_state, const WellState& prev_well_state) const { const int np = this->number_of_phases_; auto& ws = well_state.well(this->index_of_well_); if (!this->changedToOpenThisStep()){ for (int p = 0; pindex_of_well_).surface_rates[p]; + ws.prev_surface_rates[p] = prev_well_state.well(this->index_of_well_).surface_rates[p]; } } else { for (int p = 0; p