Rephrase explicit to prev(uous)

This commit is contained in:
Stein Krogstad 2023-05-23 14:12:55 +02:00
parent ab98e477c4
commit 2dcebd4bdd
6 changed files with 13 additions and 13 deletions

View File

@ -342,7 +342,7 @@ namespace Opm {
for (auto& well : well_container_) { for (auto& well : well_container_) {
if (well->isVFPActive(local_deferredLogger)){ if (well->isVFPActive(local_deferredLogger)){
well->setExplicitSurfaceRates(this->wellState(), this->prevWellState()); well->setPrevSurfaceRates(this->wellState(), this->prevWellState());
} }
} }

View File

@ -44,7 +44,7 @@ SingleWellState::SingleWellState(const std::string& name_,
, productivity_index(pu_.num_phases) , productivity_index(pu_.num_phases)
, surface_rates(pu_.num_phases) , surface_rates(pu_.num_phases)
, reservoir_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) , perf_data(perf_input.size(), pressure_first_connection, !is_producer, pu_.num_phases)
, trivial_target(false) , trivial_target(false)
{ {
@ -85,7 +85,7 @@ void SingleWellState::shut() {
this->thp = 0; this->thp = 0;
this->status = Well::Status::SHUT; this->status = Well::Status::SHUT;
std::fill(this->surface_rates.begin(), this->surface_rates.end(), 0); 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->reservoir_rates.begin(), this->reservoir_rates.end(), 0);
std::fill(this->productivity_index.begin(), this->productivity_index.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->productivity_index == rhs.productivity_index &&
this->surface_rates == rhs.surface_rates && this->surface_rates == rhs.surface_rates &&
this->reservoir_rates == rhs.reservoir_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->trivial_target == rhs.trivial_target &&
this->segments == rhs.segments && this->segments == rhs.segments &&
this->events == rhs.events && this->events == rhs.events &&

View File

@ -63,7 +63,7 @@ public:
serializer(productivity_index); serializer(productivity_index);
serializer(surface_rates); serializer(surface_rates);
serializer(reservoir_rates); serializer(reservoir_rates);
serializer(explicit_surface_rates); serializer(prev_surface_rates);
serializer(trivial_target); serializer(trivial_target);
serializer(segments); serializer(segments);
serializer(events); serializer(events);
@ -96,7 +96,7 @@ public:
std::vector<double> productivity_index; std::vector<double> productivity_index;
std::vector<double> surface_rates; std::vector<double> surface_rates;
std::vector<double> reservoir_rates; std::vector<double> reservoir_rates;
std::vector<double> explicit_surface_rates; std::vector<double> prev_surface_rates;
PerfData perf_data; PerfData perf_data;
bool trivial_target; bool trivial_target;
SegmentState segments; SegmentState segments;

View File

@ -72,7 +72,7 @@ public:
} }
double getExplicitWFR(const int table_id, const size_t well_index) const { 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& pu = well_state_.phaseUsage();
const auto& aqua = pu.phase_used[BlackoilPhases::Aqua]? rates[pu.phase_pos[BlackoilPhases::Aqua]]:0.0; 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; 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 { 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& pu = well_state_.phaseUsage();
const auto& aqua = pu.phase_used[BlackoilPhases::Aqua]? rates[pu.phase_pos[BlackoilPhases::Aqua]]:0.0; 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; const auto& liquid = pu.phase_used[BlackoilPhases::Liquid]? rates[pu.phase_pos[BlackoilPhases::Liquid]]:0.0;

View File

@ -315,7 +315,7 @@ public:
WellState& well_state, WellState& well_state,
DeferredLogger& deferred_logger) const; DeferredLogger& deferred_logger) const;
void setExplicitSurfaceRates(WellState& well_state, void setPrevSurfaceRates(WellState& well_state,
const WellState& prev_well_state) const; const WellState& prev_well_state) const;
void solveWellEquation(const Simulator& ebosSimulator, void solveWellEquation(const Simulator& ebosSimulator,

View File

@ -1195,18 +1195,18 @@ namespace Opm
template <typename TypeTag> template <typename TypeTag>
void void
WellInterface<TypeTag>:: WellInterface<TypeTag>::
setExplicitSurfaceRates(WellState& well_state, setPrevSurfaceRates(WellState& well_state,
const WellState& prev_well_state) const const WellState& prev_well_state) const
{ {
const int np = this->number_of_phases_; const int np = this->number_of_phases_;
auto& ws = well_state.well(this->index_of_well_); auto& ws = well_state.well(this->index_of_well_);
if (!this->changedToOpenThisStep()){ if (!this->changedToOpenThisStep()){
for (int p = 0; p<np; ++p){ for (int p = 0; p<np; ++p){
ws.explicit_surface_rates[p] = prev_well_state.well(this->index_of_well_).surface_rates[p]; ws.prev_surface_rates[p] = prev_well_state.well(this->index_of_well_).surface_rates[p];
} }
} else { } else {
for (int p = 0; p<np; ++p){ for (int p = 0; p<np; ++p){
ws.explicit_surface_rates[p] = ws.surface_rates[p]; ws.prev_surface_rates[p] = ws.surface_rates[p];
} }
} }
} }