mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Rephrase explicit to prev(uous)
This commit is contained in:
parent
ab98e477c4
commit
2dcebd4bdd
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 &&
|
||||
|
@ -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<double> productivity_index;
|
||||
std::vector<double> surface_rates;
|
||||
std::vector<double> reservoir_rates;
|
||||
std::vector<double> explicit_surface_rates;
|
||||
std::vector<double> prev_surface_rates;
|
||||
PerfData perf_data;
|
||||
bool trivial_target;
|
||||
SegmentState segments;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -1195,18 +1195,18 @@ namespace Opm
|
||||
template <typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
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; 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 {
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user